/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ function _typeof(obj) { return (_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function _typeof(obj) { return typeof obj } : function _typeof(obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj })(obj) } function _possibleConstructorReturn(self, call) { return !call || "object" !== _typeof(call) && "function" != typeof call ? _assertThisInitialized(self) : call } function _getPrototypeOf(o) { return (_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o) })(o) } function _assertThisInitialized(self) { if (void 0 === self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return self } function _inherits(subClass, superClass) { if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function"); subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: !0, configurable: !0 } }), superClass && _setPrototypeOf(subClass, superClass) } function _setPrototypeOf(o, p) { return (_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { return o.__proto__ = p, o })(o, p) } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function") } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor) } } !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0=0)return 1;return 0}();function microtaskDebounce(fn){var called=!1;return function(){called||(called=!0,window.Promise.resolve().then((function(){called=!1,fn()})))}}function taskDebounce(fn){var scheduled=!1;return function(){scheduled||(scheduled=!0,setTimeout((function(){scheduled=!1,fn()}),timeoutDuration))}}var supportsMicroTasks,debounce=isBrowser&&window.Promise?microtaskDebounce:taskDebounce;function isFunction(functionToCheck){var getType;return functionToCheck&&"[object Function]"==={}.toString.call(functionToCheck)}function getStyleComputedProperty(element,property){if(1!==element.nodeType)return[];var window,css=element.ownerDocument.defaultView.getComputedStyle(element,null);return property?css[property]:css}function getParentNode(element){return"HTML"===element.nodeName?element:element.parentNode||element.host}function getScrollParent(element){if(!element)return document.body;switch(element.nodeName){case"HTML":case"BODY":return element.ownerDocument.body;case"#document":return element.body}var _getStyleComputedProp=getStyleComputedProperty(element),overflow=_getStyleComputedProp.overflow,overflowX=_getStyleComputedProp.overflowX,overflowY=_getStyleComputedProp.overflowY;return/(auto|scroll|overlay)/.test(overflow+overflowY+overflowX)?element:getScrollParent(getParentNode(element))}function getReferenceNode(reference){return reference&&reference.referenceNode?reference.referenceNode:reference}var isIE11=isBrowser&&!(!window.MSInputMethodContext||!document.documentMode),isIE10=isBrowser&&/MSIE 10/.test(navigator.userAgent);function isIE(version){return 11===version?isIE11:10===version?isIE10:isIE11||isIE10}function getOffsetParent(element){if(!element)return document.documentElement;for(var noOffsetParent=isIE(10)?document.body:null,offsetParent=element.offsetParent||null;offsetParent===noOffsetParent&&element.nextElementSibling;)offsetParent=(element=element.nextElementSibling).offsetParent;var nodeName=offsetParent&&offsetParent.nodeName;return nodeName&&"BODY"!==nodeName&&"HTML"!==nodeName?-1!==["TH","TD","TABLE"].indexOf(offsetParent.nodeName)&&"static"===getStyleComputedProperty(offsetParent,"position")?getOffsetParent(offsetParent):offsetParent:element?element.ownerDocument.documentElement:document.documentElement}function isOffsetContainer(element){var nodeName=element.nodeName;return"BODY"!==nodeName&&("HTML"===nodeName||getOffsetParent(element.firstElementChild)===element)}function getRoot(node){return null!==node.parentNode?getRoot(node.parentNode):node}function findCommonOffsetParent(element1,element2){if(!(element1&&element1.nodeType&&element2&&element2.nodeType))return document.documentElement;var order=element1.compareDocumentPosition(element2)&Node.DOCUMENT_POSITION_FOLLOWING,start=order?element1:element2,end=order?element2:element1,range=document.createRange();range.setStart(start,0),range.setEnd(end,0);var commonAncestorContainer=range.commonAncestorContainer;if(element1!==commonAncestorContainer&&element2!==commonAncestorContainer||start.contains(end))return isOffsetContainer(commonAncestorContainer)?commonAncestorContainer:getOffsetParent(commonAncestorContainer);var element1root=getRoot(element1);return element1root.host?findCommonOffsetParent(element1root.host,element2):findCommonOffsetParent(element1,getRoot(element2).host)}function getScroll(element){var side=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",upperSide="top"===side?"scrollTop":"scrollLeft",nodeName=element.nodeName;if("BODY"===nodeName||"HTML"===nodeName){var html=element.ownerDocument.documentElement,scrollingElement=element.ownerDocument.scrollingElement||html;return scrollingElement[upperSide]}return element[upperSide]}function includeScroll(rect,element){var subtract=arguments.length>2&&void 0!==arguments[2]&&arguments[2],scrollTop=getScroll(element,"top"),scrollLeft=getScroll(element,"left"),modifier=subtract?-1:1;return rect.top+=scrollTop*modifier,rect.bottom+=scrollTop*modifier,rect.left+=scrollLeft*modifier,rect.right+=scrollLeft*modifier,rect}function getBordersSize(styles,axis){var sideA="x"===axis?"Left":"Top",sideB="Left"===sideA?"Right":"Bottom";return parseFloat(styles["border"+sideA+"Width"])+parseFloat(styles["border"+sideB+"Width"])}function getSize(axis,body,html,computedStyle){return Math.max(body["offset"+axis],body["scroll"+axis],html["client"+axis],html["offset"+axis],html["scroll"+axis],isIE(10)?parseInt(html["offset"+axis])+parseInt(computedStyle["margin"+("Height"===axis?"Top":"Left")])+parseInt(computedStyle["margin"+("Height"===axis?"Bottom":"Right")]):0)}function getWindowSizes(document){var body=document.body,html=document.documentElement,computedStyle=isIE(10)&&getComputedStyle(html);return{height:getSize("Height",body,html,computedStyle),width:getSize("Width",body,html,computedStyle)}}var classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")},createClass=function(){function defineProperties(target,props){for(var i=0;i2&&void 0!==arguments[2]&&arguments[2],isIE10=isIE(10),isHTML="HTML"===parent.nodeName,childrenRect=getBoundingClientRect(children),parentRect=getBoundingClientRect(parent),scrollParent=getScrollParent(children),styles=getStyleComputedProperty(parent),borderTopWidth=parseFloat(styles.borderTopWidth),borderLeftWidth=parseFloat(styles.borderLeftWidth);fixedPosition&&isHTML&&(parentRect.top=Math.max(parentRect.top,0),parentRect.left=Math.max(parentRect.left,0));var offsets=getClientRect({top:childrenRect.top-parentRect.top-borderTopWidth,left:childrenRect.left-parentRect.left-borderLeftWidth,width:childrenRect.width,height:childrenRect.height});if(offsets.marginTop=0,offsets.marginLeft=0,!isIE10&&isHTML){var marginTop=parseFloat(styles.marginTop),marginLeft=parseFloat(styles.marginLeft);offsets.top-=borderTopWidth-marginTop,offsets.bottom-=borderTopWidth-marginTop,offsets.left-=borderLeftWidth-marginLeft,offsets.right-=borderLeftWidth-marginLeft,offsets.marginTop=marginTop,offsets.marginLeft=marginLeft}return(isIE10&&!fixedPosition?parent.contains(scrollParent):parent===scrollParent&&"BODY"!==scrollParent.nodeName)&&(offsets=includeScroll(offsets,parent)),offsets}function getViewportOffsetRectRelativeToArtbitraryNode(element){var excludeScroll=arguments.length>1&&void 0!==arguments[1]&&arguments[1],html=element.ownerDocument.documentElement,relativeOffset=getOffsetRectRelativeToArbitraryNode(element,html),width=Math.max(html.clientWidth,window.innerWidth||0),height=Math.max(html.clientHeight,window.innerHeight||0),scrollTop=excludeScroll?0:getScroll(html),scrollLeft=excludeScroll?0:getScroll(html,"left"),offset={top:scrollTop-relativeOffset.top+relativeOffset.marginTop,left:scrollLeft-relativeOffset.left+relativeOffset.marginLeft,width:width,height:height};return getClientRect(offset)}function isFixed(element){var nodeName=element.nodeName;if("BODY"===nodeName||"HTML"===nodeName)return!1;if("fixed"===getStyleComputedProperty(element,"position"))return!0;var parentNode=getParentNode(element);return!!parentNode&&isFixed(parentNode)}function getFixedPositionOffsetParent(element){if(!element||!element.parentElement||isIE())return document.documentElement;for(var el=element.parentElement;el&&"none"===getStyleComputedProperty(el,"transform");)el=el.parentElement;return el||document.documentElement}function getBoundaries(popper,reference,padding,boundariesElement){var fixedPosition=arguments.length>4&&void 0!==arguments[4]&&arguments[4],boundaries={top:0,left:0},offsetParent=fixedPosition?getFixedPositionOffsetParent(popper):findCommonOffsetParent(popper,getReferenceNode(reference));if("viewport"===boundariesElement)boundaries=getViewportOffsetRectRelativeToArtbitraryNode(offsetParent,fixedPosition);else{var boundariesNode=void 0;"scrollParent"===boundariesElement?"BODY"===(boundariesNode=getScrollParent(getParentNode(reference))).nodeName&&(boundariesNode=popper.ownerDocument.documentElement):boundariesNode="window"===boundariesElement?popper.ownerDocument.documentElement:boundariesElement;var offsets=getOffsetRectRelativeToArbitraryNode(boundariesNode,offsetParent,fixedPosition);if("HTML"!==boundariesNode.nodeName||isFixed(offsetParent))boundaries=offsets;else{var _getWindowSizes=getWindowSizes(popper.ownerDocument),height=_getWindowSizes.height,width=_getWindowSizes.width;boundaries.top+=offsets.top-offsets.marginTop,boundaries.bottom=height+offsets.top,boundaries.left+=offsets.left-offsets.marginLeft,boundaries.right=width+offsets.left}}var isPaddingNumber="number"==typeof(padding=padding||0);return boundaries.left+=isPaddingNumber?padding:padding.left||0,boundaries.top+=isPaddingNumber?padding:padding.top||0,boundaries.right-=isPaddingNumber?padding:padding.right||0,boundaries.bottom-=isPaddingNumber?padding:padding.bottom||0,boundaries}function getArea(_ref){var width,height;return _ref.width*_ref.height}function computeAutoPlacement(placement,refRect,popper,reference,boundariesElement){var padding=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===placement.indexOf("auto"))return placement;var boundaries=getBoundaries(popper,reference,padding,boundariesElement),rects={top:{width:boundaries.width,height:refRect.top-boundaries.top},right:{width:boundaries.right-refRect.right,height:boundaries.height},bottom:{width:boundaries.width,height:boundaries.bottom-refRect.bottom},left:{width:refRect.left-boundaries.left,height:boundaries.height}},sortedAreas=Object.keys(rects).map((function(key){return _extends({key:key},rects[key],{area:getArea(rects[key])})})).sort((function(a,b){return b.area-a.area})),filteredAreas=sortedAreas.filter((function(_ref2){var width=_ref2.width,height=_ref2.height;return width>=popper.clientWidth&&height>=popper.clientHeight})),computedPlacement=filteredAreas.length>0?filteredAreas[0].key:sortedAreas[0].key,variation=placement.split("-")[1];return computedPlacement+(variation?"-"+variation:"")}function getReferenceOffsets(state,popper,reference){var fixedPosition=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,commonOffsetParent=fixedPosition?getFixedPositionOffsetParent(popper):findCommonOffsetParent(popper,getReferenceNode(reference));return getOffsetRectRelativeToArbitraryNode(reference,commonOffsetParent,fixedPosition)}function getOuterSizes(element){var window,styles=element.ownerDocument.defaultView.getComputedStyle(element),x=parseFloat(styles.marginTop||0)+parseFloat(styles.marginBottom||0),y=parseFloat(styles.marginLeft||0)+parseFloat(styles.marginRight||0),result;return{width:element.offsetWidth+y,height:element.offsetHeight+x}}function getOppositePlacement(placement){var hash={left:"right",right:"left",bottom:"top",top:"bottom"};return placement.replace(/left|right|bottom|top/g,(function(matched){return hash[matched]}))}function getPopperOffsets(popper,referenceOffsets,placement){placement=placement.split("-")[0];var popperRect=getOuterSizes(popper),popperOffsets={width:popperRect.width,height:popperRect.height},isHoriz=-1!==["right","left"].indexOf(placement),mainSide=isHoriz?"top":"left",secondarySide=isHoriz?"left":"top",measurement=isHoriz?"height":"width",secondaryMeasurement=isHoriz?"width":"height";return popperOffsets[mainSide]=referenceOffsets[mainSide]+referenceOffsets[measurement]/2-popperRect[measurement]/2,popperOffsets[secondarySide]=placement===secondarySide?referenceOffsets[secondarySide]-popperRect[secondaryMeasurement]:referenceOffsets[getOppositePlacement(secondarySide)],popperOffsets}function find(arr,check){return Array.prototype.find?arr.find(check):arr.filter(check)[0]}function findIndex(arr,prop,value){if(Array.prototype.findIndex)return arr.findIndex((function(cur){return cur[prop]===value}));var match=find(arr,(function(obj){return obj[prop]===value}));return arr.indexOf(match)}function runModifiers(modifiers,data,ends){var modifiersToRun;return(void 0===ends?modifiers:modifiers.slice(0,findIndex(modifiers,"name",ends))).forEach((function(modifier){modifier.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var fn=modifier.function||modifier.fn;modifier.enabled&&isFunction(fn)&&(data.offsets.popper=getClientRect(data.offsets.popper),data.offsets.reference=getClientRect(data.offsets.reference),data=fn(data,modifier))})),data}function update(){if(!this.state.isDestroyed){var data={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};data.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed),data.placement=computeAutoPlacement(this.options.placement,data.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),data.originalPlacement=data.placement,data.positionFixed=this.options.positionFixed,data.offsets.popper=getPopperOffsets(this.popper,data.offsets.reference,data.placement),data.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",data=runModifiers(this.modifiers,data),this.state.isCreated?this.options.onUpdate(data):(this.state.isCreated=!0,this.options.onCreate(data))}}function isModifierEnabled(modifiers,modifierName){return modifiers.some((function(_ref){var name=_ref.name,enabled;return _ref.enabled&&name===modifierName}))}function getSupportedPropertyName(property){for(var prefixes=[!1,"ms","Webkit","Moz","O"],upperProp=property.charAt(0).toUpperCase()+property.slice(1),i=0;ipopper[opSide]&&(data.offsets.popper[side]+=reference[side]+arrowElementSize-popper[opSide]),data.offsets.popper=getClientRect(data.offsets.popper);var center=reference[side]+reference[len]/2-arrowElementSize/2,css=getStyleComputedProperty(data.instance.popper),popperMarginSide=parseFloat(css["margin"+sideCapitalized]),popperBorderSide=parseFloat(css["border"+sideCapitalized+"Width"]),sideValue=center-data.offsets.popper[side]-popperMarginSide-popperBorderSide;return sideValue=Math.max(Math.min(popper[len]-arrowElementSize,sideValue),0),data.arrowElement=arrowElement,data.offsets.arrow=(defineProperty(_data$offsets$arrow={},side,Math.round(sideValue)),defineProperty(_data$offsets$arrow,altSide,""),_data$offsets$arrow),data}function getOppositeVariation(variation){return"end"===variation?"start":"start"===variation?"end":variation}var placements=["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"],validPlacements=placements.slice(3);function clockwise(placement){var counter=arguments.length>1&&void 0!==arguments[1]&&arguments[1],index=validPlacements.indexOf(placement),arr=validPlacements.slice(index+1).concat(validPlacements.slice(0,index));return counter?arr.reverse():arr}var BEHAVIORS_FLIP="flip",BEHAVIORS_CLOCKWISE="clockwise",BEHAVIORS_COUNTERCLOCKWISE="counterclockwise";function flip(data,options){if(isModifierEnabled(data.instance.modifiers,"inner"))return data;if(data.flipped&&data.placement===data.originalPlacement)return data;var boundaries=getBoundaries(data.instance.popper,data.instance.reference,options.padding,options.boundariesElement,data.positionFixed),placement=data.placement.split("-")[0],placementOpposite=getOppositePlacement(placement),variation=data.placement.split("-")[1]||"",flipOrder=[];switch(options.behavior){case BEHAVIORS_FLIP:flipOrder=[placement,placementOpposite];break;case BEHAVIORS_CLOCKWISE:flipOrder=clockwise(placement);break;case BEHAVIORS_COUNTERCLOCKWISE:flipOrder=clockwise(placement,!0);break;default:flipOrder=options.behavior}return flipOrder.forEach((function(step,index){if(placement!==step||flipOrder.length===index+1)return data;placement=data.placement.split("-")[0],placementOpposite=getOppositePlacement(placement);var popperOffsets=data.offsets.popper,refOffsets=data.offsets.reference,floor=Math.floor,overlapsRef="left"===placement&&floor(popperOffsets.right)>floor(refOffsets.left)||"right"===placement&&floor(popperOffsets.left)floor(refOffsets.top)||"bottom"===placement&&floor(popperOffsets.top)floor(boundaries.right),overflowsTop=floor(popperOffsets.top)floor(boundaries.bottom),overflowsBoundaries="left"===placement&&overflowsLeft||"right"===placement&&overflowsRight||"top"===placement&&overflowsTop||"bottom"===placement&&overflowsBottom,isVertical=-1!==["top","bottom"].indexOf(placement),flippedVariationByRef=!!options.flipVariations&&(isVertical&&"start"===variation&&overflowsLeft||isVertical&&"end"===variation&&overflowsRight||!isVertical&&"start"===variation&&overflowsTop||!isVertical&&"end"===variation&&overflowsBottom),flippedVariationByContent=!!options.flipVariationsByContent&&(isVertical&&"start"===variation&&overflowsRight||isVertical&&"end"===variation&&overflowsLeft||!isVertical&&"start"===variation&&overflowsBottom||!isVertical&&"end"===variation&&overflowsTop),flippedVariation=flippedVariationByRef||flippedVariationByContent;(overlapsRef||overflowsBoundaries||flippedVariation)&&(data.flipped=!0,(overlapsRef||overflowsBoundaries)&&(placement=flipOrder[index+1]),flippedVariation&&(variation=getOppositeVariation(variation)),data.placement=placement+(variation?"-"+variation:""),data.offsets.popper=_extends({},data.offsets.popper,getPopperOffsets(data.instance.popper,data.offsets.reference,data.placement)),data=runModifiers(data.instance.modifiers,data,"flip"))})),data}function keepTogether(data){var _data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference,placement=data.placement.split("-")[0],floor=Math.floor,isVertical=-1!==["top","bottom"].indexOf(placement),side=isVertical?"right":"bottom",opSide=isVertical?"left":"top",measurement=isVertical?"width":"height";return popper[side]floor(reference[side])&&(data.offsets.popper[opSide]=floor(reference[side])),data}function toValue(str,measurement,popperOffsets,referenceOffsets){var split=str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),value=+split[1],unit=split[2];if(!value)return str;if(0===unit.indexOf("%")){var element=void 0,rect;switch(unit){case"%p":element=popperOffsets;break;case"%":case"%r":default:element=referenceOffsets}return getClientRect(element)[measurement]/100*value}if("vh"===unit||"vw"===unit){var size=void 0;return(size="vh"===unit?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*value}return value}function parseOffset(offset,popperOffsets,referenceOffsets,basePlacement){var offsets=[0,0],useHeight=-1!==["right","left"].indexOf(basePlacement),fragments=offset.split(/(\+|\-)/).map((function(frag){return frag.trim()})),divider=fragments.indexOf(find(fragments,(function(frag){return-1!==frag.search(/,|\s/)})));fragments[divider]&&-1===fragments[divider].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var splitRegex=/\s*,\s*|\s+/,ops=-1!==divider?[fragments.slice(0,divider).concat([fragments[divider].split(splitRegex)[0]]),[fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider+1))]:[fragments];return(ops=ops.map((function(op,index){var measurement=(1===index?!useHeight:useHeight)?"height":"width",mergeWithPrevious=!1;return op.reduce((function(a,b){return""===a[a.length-1]&&-1!==["+","-"].indexOf(b)?(a[a.length-1]=b,mergeWithPrevious=!0,a):mergeWithPrevious?(a[a.length-1]+=b,mergeWithPrevious=!1,a):a.concat(b)}),[]).map((function(str){return toValue(str,measurement,popperOffsets,referenceOffsets)}))}))).forEach((function(op,index){op.forEach((function(frag,index2){isNumeric(frag)&&(offsets[index]+=frag*("-"===op[index2-1]?-1:1))}))})),offsets}function offset(data,_ref){var offset=_ref.offset,placement=data.placement,_data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference,basePlacement=placement.split("-")[0],offsets=void 0;return offsets=isNumeric(+offset)?[+offset,0]:parseOffset(offset,popper,reference,basePlacement),"left"===basePlacement?(popper.top+=offsets[0],popper.left-=offsets[1]):"right"===basePlacement?(popper.top+=offsets[0],popper.left+=offsets[1]):"top"===basePlacement?(popper.left+=offsets[0],popper.top-=offsets[1]):"bottom"===basePlacement&&(popper.left+=offsets[0],popper.top+=offsets[1]),data.popper=popper,data}function preventOverflow(data,options){var boundariesElement=options.boundariesElement||getOffsetParent(data.instance.popper);data.instance.reference===boundariesElement&&(boundariesElement=getOffsetParent(boundariesElement));var transformProp=getSupportedPropertyName("transform"),popperStyles=data.instance.popper.style,top=popperStyles.top,left=popperStyles.left,transform=popperStyles[transformProp];popperStyles.top="",popperStyles.left="",popperStyles[transformProp]="";var boundaries=getBoundaries(data.instance.popper,data.instance.reference,options.padding,boundariesElement,data.positionFixed);popperStyles.top=top,popperStyles.left=left,popperStyles[transformProp]=transform,options.boundaries=boundaries;var order=options.priority,popper=data.offsets.popper,check={primary:function primary(placement){var value=popper[placement];return popper[placement]boundaries[placement]&&!options.escapeWithReference&&(value=Math.min(popper[mainSide],boundaries[placement]-("right"===placement?popper.width:popper.height))),defineProperty({},mainSide,value)}};return order.forEach((function(placement){var side=-1!==["left","top"].indexOf(placement)?"primary":"secondary";popper=_extends({},popper,check[side](placement))})),data.offsets.popper=popper,data}function shift(data){var placement=data.placement,basePlacement=placement.split("-")[0],shiftvariation=placement.split("-")[1];if(shiftvariation){var _data$offsets=data.offsets,reference=_data$offsets.reference,popper=_data$offsets.popper,isVertical=-1!==["bottom","top"].indexOf(basePlacement),side=isVertical?"left":"top",measurement=isVertical?"width":"height",shiftOffsets={start:defineProperty({},side,reference[side]),end:defineProperty({},side,reference[side]+reference[measurement]-popper[measurement])};data.offsets.popper=_extends({},popper,shiftOffsets[shiftvariation])}return data}function hide(data){if(!isModifierRequired(data.instance.modifiers,"hide","preventOverflow"))return data;var refRect=data.offsets.reference,bound=find(data.instance.modifiers,(function(modifier){return"preventOverflow"===modifier.name})).boundaries;if(refRect.bottombound.right||refRect.top>bound.bottom||refRect.right2&&void 0!==arguments[2]?arguments[2]:{};classCallCheck(this,Popper),this.scheduleUpdate=function(){return requestAnimationFrame(_this.update)},this.update=debounce(this.update.bind(this)),this.options=_extends({},Popper.Defaults,options),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=reference&&reference.jquery?reference[0]:reference,this.popper=popper&&popper.jquery?popper[0]:popper,this.options.modifiers={},Object.keys(_extends({},Popper.Defaults.modifiers,options.modifiers)).forEach((function(name){_this.options.modifiers[name]=_extends({},Popper.Defaults.modifiers[name]||{},options.modifiers?options.modifiers[name]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(name){return _extends({name:name},_this.options.modifiers[name])})).sort((function(a,b){return a.order-b.order})),this.modifiers.forEach((function(modifierOptions){modifierOptions.enabled&&isFunction(modifierOptions.onLoad)&&modifierOptions.onLoad(_this.reference,_this.popper,_this.options,modifierOptions,_this.state)})),this.update();var eventsEnabled=this.options.eventsEnabled;eventsEnabled&&this.enableEventListeners(),this.state.eventsEnabled=eventsEnabled}return createClass(Popper,[{key:"update",value:function update$$1(){return update.call(this)}},{key:"destroy",value:function destroy$$1(){return destroy.call(this)}},{key:"enableEventListeners",value:function enableEventListeners$$1(){return enableEventListeners.call(this)}},{key:"disableEventListeners",value:function disableEventListeners$$1(){return disableEventListeners.call(this)}}]),Popper}();return Popper.Utils=("undefined"!=typeof window?window:global).PopperUtils,Popper.placements=placements,Popper.Defaults=Defaults,Popper})),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=t||self).bootstrap={},t.jQuery,t.Popper)}(this,(function(t,e,n){"use strict";function i(t,e){for(var n=0;n=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};c.jQueryDetection(),e.fn.emulateTransitionEnd=l,e.event.special[c.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var h="alert",u=e.fn[h],d=function(){function t(t){this._element=t}var n=t.prototype;return n.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},n.dispose=function(){e.removeData(this._element,"bs.alert"),this._element=null},n._getRootElement=function(t){var n=c.getSelectorFromElement(t),i=!1;return n&&(i=document.querySelector(n)),i||(i=e(t).closest(".alert")[0]),i},n._triggerCloseEvent=function(t){var n=e.Event("close.bs.alert");return e(t).trigger(n),n},n._removeElement=function(t){var n=this;if(e(t).removeClass("show"),e(t).hasClass("fade")){var i=c.getTransitionDurationFromElement(t);e(t).one(c.TRANSITION_END,(function(e){return n._destroyElement(t,e)})).emulateTransitionEnd(i)}else this._destroyElement(t)},n._destroyElement=function(t){e(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.alert");o||(o=new t(this),i.data("bs.alert",o)),"close"===n&&o[n](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),t}();e(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',d._handleDismiss(new d)),e.fn[h]=d._jQueryInterface,e.fn[h].Constructor=d,e.fn[h].noConflict=function(){return e.fn[h]=u,d._jQueryInterface};var f=e.fn.button,g=function(){function t(t){this._element=t}var n=t.prototype;return n.toggle=function(){var t=!0,n=!0,i=e(this._element).closest('[data-toggle="buttons"]')[0];if(i){var o=this._element.querySelector('input:not([type="hidden"])');if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains("active"))t=!1;else{var s=i.querySelector(".active");s&&e(s).removeClass("active")}t&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains("active")),e(o).trigger("change")),o.focus(),n=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(n&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&e(this._element).toggleClass("active"))},n.dispose=function(){e.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.button");i||(i=new t(this),e(this).data("bs.button",i)),"toggle"===n&&i[n]()}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),t}();e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=t.target,i=n;if(e(n).hasClass("btn")||(n=e(n).closest(".btn")[0]),!n||n.hasAttribute("disabled")||n.classList.contains("disabled"))t.preventDefault();else{var o=n.querySelector('input:not([type="hidden"])');if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void t.preventDefault();"LABEL"===i.tagName&&o&&"checkbox"===o.type&&t.preventDefault(),g._jQueryInterface.call(e(n),"toggle")}})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=e(t.target).closest(".btn")[0];e(n).toggleClass("focus",/^focus(in)?$/.test(t.type))})),e(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var n=t.prototype;return n.next=function(){this._isSliding||this._slide("next")},n.nextWhenVisible=function(){!document.hidden&&e(this._element).is(":visible")&&"hidden"!==e(this._element).css("visibility")&&this.next()},n.prev=function(){this._isSliding||this._slide("prev")},n.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(c.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},n.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))},n.to=function(t){var n=this;this._activeElement=this._element.querySelector(".active.carousel-item");var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)e(this._element).one("slid.bs.carousel",(function(){return n.to(t)}));else{if(i===t)return this.pause(),void this.cycle();var o=t>i?"next":"prev";this._slide(o,this._items[t])}},n.dispose=function(){e(this._element).off(p),e.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},n._getConfig=function(t){return t=a(a({},v),t),c.typeCheckConfig(m,t,b),t},n._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},n._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&e(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var n=function(e){t._pointerEvent&&y[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},i=function(e){t._pointerEvent&&y[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};e(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(e(this._element).on("pointerdown.bs.carousel",(function(t){return n(t)})),e(this._element).on("pointerup.bs.carousel",(function(t){return i(t)})),this._element.classList.add("pointer-event")):(e(this._element).on("touchstart.bs.carousel",(function(t){return n(t)})),e(this._element).on("touchmove.bs.carousel",(function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),e(this._element).on("touchend.bs.carousel",(function(t){return i(t)})))}},n._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},n._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},n._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),s=this._items.length-1;if((i&&0===o||n&&o===s)&&!this._config.wrap)return e;var r=(o+("prev"===t?-1:1))%this._items.length;return-1===r?this._items[this._items.length-1]:this._items[r]},n._triggerSlideEvent=function(t,n){var i=this._getItemIndex(t),o=this._getItemIndex(this._element.querySelector(".active.carousel-item")),s=e.Event("slide.bs.carousel",{relatedTarget:t,direction:n,from:o,to:i});return e(this._element).trigger(s),s},n._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var n=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));e(n).removeClass("active");var i=this._indicatorsElement.children[this._getItemIndex(t)];i&&e(i).addClass("active")}},n._slide=function(t,n){var i,o,s,r=this,a=this._element.querySelector(".active.carousel-item"),l=this._getItemIndex(a),h=n||a&&this._getItemByDirection(t,a),u=this._getItemIndex(h),d=Boolean(this._interval);if("next"===t?(i="carousel-item-left",o="carousel-item-next",s="left"):(i="carousel-item-right",o="carousel-item-prev",s="right"),h&&e(h).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(h,s).isDefaultPrevented()&&a&&h){this._isSliding=!0,d&&this.pause(),this._setActiveIndicatorElement(h);var f=e.Event("slid.bs.carousel",{relatedTarget:h,direction:s,from:l,to:u});if(e(this._element).hasClass("slide")){e(h).addClass(o),c.reflow(h),e(a).addClass(i),e(h).addClass(i);var g=parseInt(h.getAttribute("data-interval"),10);g?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=g):this._config.interval=this._config.defaultInterval||this._config.interval;var m=c.getTransitionDurationFromElement(a);e(a).one(c.TRANSITION_END,(function(){e(h).removeClass(i+" "+o).addClass("active"),e(a).removeClass("active "+o+" "+i),r._isSliding=!1,setTimeout((function(){return e(r._element).trigger(f)}),0)})).emulateTransitionEnd(m)}else e(a).removeClass("active"),e(h).addClass("active"),this._isSliding=!1,e(this._element).trigger(f);d&&this.cycle()}},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.carousel"),o=a(a({},v),e(this).data());"object"==typeof n&&(o=a(a({},o),n));var s="string"==typeof n?n:o.slide;if(i||(i=new t(this,o),e(this).data("bs.carousel",i)),"number"==typeof n)i.to(n);else if("string"==typeof s){if(void 0===i[s])throw new TypeError('No method named "'+s+'"');i[s]()}else o.interval&&o.ride&&(i.pause(),i.cycle())}))},t._dataApiClickHandler=function(n){var i=c.getSelectorFromElement(this);if(i){var o=e(i)[0];if(o&&e(o).hasClass("carousel")){var s=a(a({},e(o).data()),e(this).data()),r=this.getAttribute("data-slide-to");r&&(s.interval=!1),t._jQueryInterface.call(e(o),s),r&&e(o).data("bs.carousel").to(r),n.preventDefault()}}},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return v}}]),t}();e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",E._dataApiClickHandler),e(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),n=0,i=t.length;n0&&(this._selector=r,this._triggerArray.push(s))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var n=t.prototype;return n.toggle=function(){e(this._element).hasClass("show")?this.hide():this.show()},n.show=function(){var n,i,o=this;if(!(this._isTransitioning||e(this._element).hasClass("show")||(this._parent&&0===(n=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof o._config.parent?t.getAttribute("data-parent")===o._config.parent:t.classList.contains("collapse")}))).length&&(n=null),n&&(i=e(n).not(this._selector).data("bs.collapse"))&&i._isTransitioning))){var s=e.Event("show.bs.collapse");if(e(this._element).trigger(s),!s.isDefaultPrevented()){n&&(t._jQueryInterface.call(e(n).not(this._selector),"hide"),i||e(n).data("bs.collapse",null));var r=this._getDimension();e(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[r]=0,this._triggerArray.length&&e(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var a="scroll"+(r[0].toUpperCase()+r.slice(1)),l=c.getTransitionDurationFromElement(this._element);e(this._element).one(c.TRANSITION_END,(function(){e(o._element).removeClass("collapsing").addClass("collapse show"),o._element.style[r]="",o.setTransitioning(!1),e(o._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(l),this._element.style[r]=this._element[a]+"px"}}},n.hide=function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass("show")){var n=e.Event("hide.bs.collapse");if(e(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",c.reflow(this._element),e(this._element).addClass("collapsing").removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var s=0;s0},i._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=a(a({},e.offsets),t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},i._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),a(a({},t),this._config.popperConfig)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.dropdown");if(i||(i=new t(this,"object"==typeof n?n:null),e(this).data("bs.dropdown",i)),"string"==typeof n){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},t._clearMenus=function(n){if(!n||3!==n.which&&("keyup"!==n.type||9===n.which))for(var i=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),o=0,s=i.length;o0&&r--,40===n.which&&rdocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:F,popperConfig:null},Y={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},$=function(){function t(t,e){if(void 0===n)throw new TypeError("Bootstrap's 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 i=t.prototype;return i.enable=function(){this._isEnabled=!0},i.disable=function(){this._isEnabled=!1},i.toggleEnabled=function(){this._isEnabled=!this._isEnabled},i.toggle=function(t){if(this._isEnabled)if(t){var n=this.constructor.DATA_KEY,i=e(t.currentTarget).data(n);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(e(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},i.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&e(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},i.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var i=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(i);var o=c.findShadowRoot(this.element),s=e.contains(null!==o?o:this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!s)return;var r=this.getTipElement(),a=c.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&e(r).addClass("fade");var l="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,h=this._getAttachment(l);this.addAttachmentClass(h);var u=this._getContainer();e(r).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(r).appendTo(u),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,this._getPopperConfig(h)),e(r).addClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().on("mouseover",null,e.noop);var d=function(){t.config.animation&&t._fixTransition();var n=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),"out"===n&&t._leave(null,t)};if(e(this.tip).hasClass("fade")){var f=c.getTransitionDurationFromElement(this.tip);e(this.tip).one(c.TRANSITION_END,d).emulateTransitionEnd(f)}else d()}},i.hide=function(t){var n=this,i=this.getTipElement(),o=e.Event(this.constructor.Event.HIDE),s=function(){"show"!==n._hoverState&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),e(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),t&&t()};if(e(this.element).trigger(o),!o.isDefaultPrevented()){if(e(i).removeClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,e(this.tip).hasClass("fade")){var r=c.getTransitionDurationFromElement(i);e(i).one(c.TRANSITION_END,s).emulateTransitionEnd(r)}else s();this._hoverState=""}},i.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},i.isWithContent=function(){return Boolean(this.getTitle())},i.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-tooltip-"+t)},i.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},i.setContent=function(){var t=this.getTipElement();this.setElementContent(e(t.querySelectorAll(".tooltip-inner")),this.getTitle()),e(t).removeClass("fade show")},i.setElementContent=function(t,n){"object"!=typeof n||!n.nodeType&&!n.jquery?this.config.html?(this.config.sanitize&&(n=H(n,this.config.whiteList,this.config.sanitizeFn)),t.html(n)):t.text(n):this.config.html?e(n).parent().is(t)||t.empty().append(n):t.text(e(n).text())},i.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},i._getPopperConfig=function(t){var e=this;return a(a({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),this.config.popperConfig)},i._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=a(a({},e.offsets),t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},i._getContainer=function(){return!1===this.config.container?document.body:c.isElement(this.config.container)?e(this.config.container):e(document).find(this.config.container)},i._getAttachment=function(t){return K[t.toUpperCase()]},i._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(n){if("click"===n)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==n){var i="hover"===n?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o="hover"===n?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(i,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},e(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=a(a({},this.config),{},{trigger:"manual",selector:""}):this._fixTitle()},i._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",""))},i._enter=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e(n.getTipElement()).hasClass("show")||"show"===n._hoverState?n._hoverState="show":(clearTimeout(n._timeout),n._hoverState="show",n.config.delay&&n.config.delay.show?n._timeout=setTimeout((function(){"show"===n._hoverState&&n.show()}),n.config.delay.show):n.show())},i._leave=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState="out",n.config.delay&&n.config.delay.hide?n._timeout=setTimeout((function(){"out"===n._hoverState&&n.hide()}),n.config.delay.hide):n.hide())},i._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},i._getConfig=function(t){var n=e(this.element).data();return Object.keys(n).forEach((function(t){-1!==V.indexOf(t)&&delete n[t]})),"number"==typeof(t=a(a(a({},this.constructor.Default),n),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),c.typeCheckConfig(U,t,this.constructor.DefaultType),t.sanitize&&(t.template=H(t.template,t.whiteList,t.sanitizeFn)),t},i._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},i._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(W);null!==n&&n.length&&t.removeClass(n.join(""))},i._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},i._fixTransition=function(){var t=this.getTipElement(),n=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.tooltip"),o="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new t(this,o),e(this).data("bs.tooltip",i)),"string"==typeof n)){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return X}},{key:"NAME",get:function(){return U}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return Y}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return z}}]),t}();e.fn[U]=$._jQueryInterface,e.fn[U].Constructor=$,e.fn[U].noConflict=function(){return e.fn[U]=M,$._jQueryInterface};var J="popover",G=e.fn[J],Z=new RegExp("(^|\\s)bs-popover\\S+","g"),tt=a(a({},$.Default),{},{placement:"right",trigger:"click",content:"",template:''}),et=a(a({},$.DefaultType),{},{content:"(string|element|function)"}),nt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},it=function(t){var n,i;function s(){return t.apply(this,arguments)||this}i=t,(n=s).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var r=s.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},r.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},r.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(t.find(".popover-body"),n),t.removeClass("fade show")},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(Z);null!==n&&n.length>0&&t.removeClass(n.join(""))},s._jQueryInterface=function(t){return this.each((function(){var n=e(this).data("bs.popover"),i="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new s(this,i),e(this).data("bs.popover",n)),"string"==typeof t)){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(s,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return tt}},{key:"NAME",get:function(){return J}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return nt}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return et}}]),s}($);e.fn[J]=it._jQueryInterface,e.fn[J].Constructor=it,e.fn[J].noConflict=function(){return e.fn[J]=G,it._jQueryInterface};var ot="scrollspy",st=e.fn[ot],rt={offset:10,method:"auto",target:""},at={offset:"number",method:"string",target:"(string|element)"},lt=function(){function t(t,n){var i=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(n),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return i._process(t)})),this.refresh(),this._process()}var n=t.prototype;return n.refresh=function(){var t=this,n=this._scrollElement===this._scrollElement.window?"offset":"position",i="auto"===this._config.method?n:this._config.method,o="position"===i?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var n,s=c.getSelectorFromElement(t);if(s&&(n=document.querySelector(s)),n){var r=n.getBoundingClientRect();if(r.width||r.height)return[e(n)[i]().top+o,s]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},n.dispose=function(){e.removeData(this._element,"bs.scrollspy"),e(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},n._getConfig=function(t){if("string"!=typeof(t=a(a({},rt),"object"==typeof t&&t?t:{})).target&&c.isElement(t.target)){var n=e(t.target).attr("id");n||(n=c.getUID(ot),e(t.target).attr("id",n)),t.target="#"+n}return c.typeCheckConfig(ot,t,at),t},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;)this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&(void 0===this._offsets[o+1]||t li > .active":".active";i=(i=e.makeArray(e(o).find(r)))[i.length-1]}var a=e.Event("hide.bs.tab",{relatedTarget:this._element}),l=e.Event("show.bs.tab",{relatedTarget:i});if(i&&e(i).trigger(a),e(this._element).trigger(l),!l.isDefaultPrevented()&&!a.isDefaultPrevented()){s&&(n=document.querySelector(s)),this._activate(this._element,o);var h=function(){var n=e.Event("hidden.bs.tab",{relatedTarget:t._element}),o=e.Event("shown.bs.tab",{relatedTarget:i});e(i).trigger(n),e(t._element).trigger(o)};n?this._activate(n,n.parentNode,h):h()}}},n.dispose=function(){e.removeData(this._element,"bs.tab"),this._element=null},n._activate=function(t,n,i){var o=this,s=(!n||"UL"!==n.nodeName&&"OL"!==n.nodeName?e(n).children(".active"):e(n).find("> li > .active"))[0],r=i&&s&&e(s).hasClass("fade"),a=function(){return o._transitionComplete(t,s,i)};if(s&&r){var l=c.getTransitionDurationFromElement(s);e(s).removeClass("show").one(c.TRANSITION_END,a).emulateTransitionEnd(l)}else a()},n._transitionComplete=function(t,n,i){if(n){e(n).removeClass("active");var o=e(n.parentNode).find("> .dropdown-menu .active")[0];o&&e(o).removeClass("active"),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(e(t).addClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),c.reflow(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&e(t.parentNode).hasClass("dropdown-menu")){var s=e(t).closest(".dropdown")[0];if(s){var r=[].slice.call(s.querySelectorAll(".dropdown-toggle"));e(r).addClass("active")}t.setAttribute("aria-expanded",!0)}i&&i()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.tab");if(o||(o=new t(this),i.data("bs.tab",o)),"string"==typeof n){if(void 0===o[n])throw new TypeError('No method named "'+n+'"');o[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),t}();e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),ht._jQueryInterface.call(e(this),"show")})),e.fn.tab=ht._jQueryInterface,e.fn.tab.Constructor=ht,e.fn.tab.noConflict=function(){return e.fn.tab=ct,ht._jQueryInterface};var ut=e.fn.toast,dt={animation:"boolean",autohide:"boolean",delay:"number"},ft={animation:!0,autohide:!0,delay:500},gt=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var n=t.prototype;return n.show=function(){var t=this,n=e.Event("show.bs.toast");if(e(this._element).trigger(n),!n.isDefaultPrevented()){this._config.animation&&this._element.classList.add("fade");var i=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),e(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),c.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var o=c.getTransitionDurationFromElement(this._element);e(this._element).one(c.TRANSITION_END,i).emulateTransitionEnd(o)}else i()}},n.hide=function(){if(this._element.classList.contains("show")){var t=e.Event("hide.bs.toast");e(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},n.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains("show")&&this._element.classList.remove("show"),e(this._element).off("click.dismiss.bs.toast"),e.removeData(this._element,"bs.toast"),this._element=null,this._config=null},n._getConfig=function(t){return t=a(a(a({},ft),e(this._element).data()),"object"==typeof t&&t?t:{}),c.typeCheckConfig("toast",t,this.constructor.DefaultType),t},n._setListeners=function(){var t=this;e(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return t.hide()}))},n._close=function(){var t=this,n=function(){t._element.classList.add("hide"),e(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var i=c.getTransitionDurationFromElement(this._element);e(this._element).one(c.TRANSITION_END,n).emulateTransitionEnd(i)}else n()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.toast");if(o||(o=new t(this,"object"==typeof n&&n),i.data("bs.toast",o)),"string"==typeof n){if(void 0===o[n])throw new TypeError('No method named "'+n+'"');o[n](this)}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"DefaultType",get:function(){return dt}},{key:"Default",get:function(){return ft}}]),t}();e.fn.toast=gt._jQueryInterface,e.fn.toast.Constructor=gt,e.fn.toast.noConflict=function(){return e.fn.toast=ut,gt._jQueryInterface},t.Alert=d,t.Button=g,t.Carousel=E,t.Collapse=D,t.Dropdown=j,t.Modal=R,t.Popover=it,t.Scrollspy=lt,t.Tab=ht,t.Toast=gt,t.Tooltip=$,t.Util=c,Object.defineProperty(t,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,(function(){"use strict";var e,i;function f(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(m(e,t))return;return 1}function r(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){for(var n=[],s=0;s>>0,s=0;sFe(e)?(r=e+1,a-Fe(e)):(r=e,a);return{year:r,dayOfYear:o}}function Ae(e,t,n){var s,i,r=Ge(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+je(i=e.year()-1,t,n):a>je(e.year(),t,n)?(s=a-je(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function je(e,t,n){var s=Ge(e,t,n),i=Ge(e+1,t,n);return(Fe(e)-s+i)/7}function Ie(e,t){return e.slice(t,7).concat(e.slice(0,t))}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),A("week",5),A("isoWeek",5),ce("w",te),ce("ww",te,Q),ce("W",te),ce("WW",te,Q),ge(["w","ww","W","WW"],(function(e,t,n,s){t[s.substr(0,1)]=Z(e)})),C("d",0,"do","day"),C("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),C("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),C("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),ce("d",te),ce("e",te),ce("E",te),ce("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ce("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ce("dddd",(function(e,t){return t.weekdaysRegex(e)})),ge(["dd","ddd","dddd"],(function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:y(n).invalidWeekday=e})),ge(["d","e","E"],(function(e,t,n,s){t[s]=Z(e)}));var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),qe=de,Be=de,Je=de;function Qe(){function e(e,t){return t.length-e.length}for(var t,n,s,i,r=[],a=[],o=[],u=[],l=0;l<7;l++)t=_([2e3,1]).day(l),n=me(this.weekdaysMin(t,"")),s=me(this.weekdaysShort(t,"")),i=me(this.weekdays(t,"")),r.push(n),a.push(s),o.push(i),u.push(n),u.push(s),u.push(i);r.sort(e),a.sort(e),o.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){C(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function et(e,t){return t._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,Xe),C("k",["kk",2],0,(function(){return this.hours()||24})),C("hmm",0,0,(function(){return""+Xe.apply(this)+T(this.minutes(),2)})),C("hmmss",0,0,(function(){return""+Xe.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)})),C("Hmm",0,0,(function(){return""+this.hours()+T(this.minutes(),2)})),C("Hmmss",0,0,(function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)})),Ke("a",!0),Ke("A",!1),L("hour","h"),A("hour",13),ce("a",et),ce("A",et),ce("H",te),ce("h",te),ce("k",te),ce("HH",te,Q),ce("hh",te,Q),ce("kk",te,Q),ce("hmm",ne),ce("hmmss",se),ce("Hmm",ne),ce("Hmmss",se),ye(["H","HH"],3),ye(["k","kk"],(function(e,t,n){var s=Z(e);t[3]=24===s?0:s})),ye(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),ye(["h","hh"],(function(e,t,n){t[3]=Z(e),y(n).bigHour=!0})),ye("hmm",(function(e,t,n){var s=e.length-2;t[3]=Z(e.substr(0,s)),t[4]=Z(e.substr(s)),y(n).bigHour=!0})),ye("hmmss",(function(e,t,n){var s=e.length-4,i=e.length-2;t[3]=Z(e.substr(0,s)),t[4]=Z(e.substr(s,2)),t[5]=Z(e.substr(i)),y(n).bigHour=!0})),ye("Hmm",(function(e,t,n){var s=e.length-2;t[3]=Z(e.substr(0,s)),t[4]=Z(e.substr(s))})),ye("Hmmss",(function(e,t,n){var s=e.length-4,i=e.length-2;t[3]=Z(e.substr(0,s)),t[4]=Z(e.substr(s,2)),t[5]=Z(e.substr(i))}));var tt=z("Hours",!0),nt,st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:Ne,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){for(var t,n,s,i,r=0;r=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s=t-1)break;t--}r++}return nt}function ut(t){var e=null;if(void 0===it[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=nt._abbr,require("./locale/"+t),lt(e)}catch(e){it[t]=null}return it[t]}function lt(e,t){var n;return e&&((n=r(t)?dt(e):ht(e,t))?nt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nt._abbr}function ht(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ut(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new x(b(s,t)),rt[e]&&rt[e].forEach((function(e){ht(e.name,e.config)})),lt(e),it[e]}function dt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nt;if(!o(e)){if(t=ut(e))return t;e=[e]}return ot(e)}function ct(e){var t,n=e._a;return n&&-2===y(e).overflow&&(t=n[1]<0||11xe(n[0],n[1])?2:n[3]<0||24je(n,r,a)?y(e)._overflowWeeks=!0:null!=u?y(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[0]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=St(e._a[0],s[0]),(e._dayOfYear>Fe(r)||0===e._dayOfYear)&&(y(e)._overflowDayOfYear=!0),n=Ve(r,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=u[t]=s[t];for(;t<7;t++)e._a[t]=u[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Ve:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,u),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(y(e).weekdayMismatch=!0)}}function Ot(e){if(e._f!==f.ISO_8601)if(e._f!==f.RFC_2822){e._a=[],y(e).empty=!0;for(var t,n,s,i,r,a,o,u=""+e._i,l=u.length,h=0,d=H(e._f,e._locale).match(N)||[],c=0;cn.valueOf():n.valueOf()"}),pn.toJSON=function(){return this.isValid()?this.toISOString():null},pn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},pn.unix=function(){return Math.floor(this.valueOf()/1e3)},pn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},pn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},pn.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},pn.isLocal=function(){return!!this.isValid()&&!this._isUTC},pn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},pn.isUtc=At,pn.isUTC=At,pn.zoneAbbr=function(){return this._isUTC?"UTC":""},pn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},pn.dates=n("dates accessor is deprecated. Use date instead.",fn),pn.months=n("months accessor is deprecated. Use month instead",Ue),pn.years=n("years accessor is deprecated. Use year instead",Le),pn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),pn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=bt(t))._a?(e=(t._isUTC?_:Tt)(t._a),this._isDSTShifted=this.isValid()&&0i[contentHeight]-i[containerHeight]-1&&(i.reach[y]="end"),diff&&(element.dispatchEvent(createEvent("ps-scroll-"+y)),diff<0?element.dispatchEvent(createEvent("ps-scroll-"+up)):diff>0&&element.dispatchEvent(createEvent("ps-scroll-"+down)),useScrollingClass&&setScrollingClassInstantly(i,y)),i.reach[y]&&(diff||forceFireReachEvent)&&element.dispatchEvent(createEvent("ps-"+y+"-reach-"+i.reach[y]))}function toInt(x){return parseInt(x,10)||0}function isEditable(el){return matches(el,"input,[contenteditable]")||matches(el,"select,[contenteditable]")||matches(el,"textarea,[contenteditable]")||matches(el,"button,[contenteditable]")}function outerWidth(element){var styles=get(element);return toInt(styles.width)+toInt(styles.paddingLeft)+toInt(styles.paddingRight)+toInt(styles.borderLeftWidth)+toInt(styles.borderRightWidth)}EventManager.prototype.eventElement=function eventElement(element){var ee=this.eventElements.filter((function(ee){return ee.element===element}))[0];return ee||(ee=new EventElement(element),this.eventElements.push(ee)),ee},EventManager.prototype.bind=function bind(element,eventName,handler){this.eventElement(element).bind(eventName,handler)},EventManager.prototype.unbind=function unbind(element,eventName,handler){var ee=this.eventElement(element);ee.unbind(eventName,handler),ee.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(ee),1)},EventManager.prototype.unbindAll=function unbindAll(){this.eventElements.forEach((function(e){return e.unbindAll()})),this.eventElements=[]},EventManager.prototype.once=function once(element,eventName,handler){var ee=this.eventElement(element),onceHandler=function(evt){ee.unbind(eventName,onceHandler),handler(evt)};ee.bind(eventName,onceHandler)};var env={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function updateGeometry(i){var element=i.element,roundedScrollTop=Math.floor(element.scrollTop),rect=element.getBoundingClientRect();i.containerWidth=Math.ceil(rect.width),i.containerHeight=Math.ceil(rect.height),i.contentWidth=element.scrollWidth,i.contentHeight=element.scrollHeight,element.contains(i.scrollbarXRail)||(queryChildren(element,cls_element.rail("x")).forEach((function(el){return remove(el)})),element.appendChild(i.scrollbarXRail)),element.contains(i.scrollbarYRail)||(queryChildren(element,cls_element.rail("y")).forEach((function(el){return remove(el)})),element.appendChild(i.scrollbarYRail)),!i.settings.suppressScrollX&&i.containerWidth+i.settings.scrollXMarginOffset=i.railXWidth-i.scrollbarXWidth&&(i.scrollbarXLeft=i.railXWidth-i.scrollbarXWidth),i.scrollbarYTop>=i.railYHeight-i.scrollbarYHeight&&(i.scrollbarYTop=i.railYHeight-i.scrollbarYHeight),updateCss(element,i),i.scrollbarXActive?element.classList.add(cls_state.active("x")):(element.classList.remove(cls_state.active("x")),i.scrollbarXWidth=0,i.scrollbarXLeft=0,element.scrollLeft=!0===i.isRtl?i.contentWidth:0),i.scrollbarYActive?element.classList.add(cls_state.active("y")):(element.classList.remove(cls_state.active("y")),i.scrollbarYHeight=0,i.scrollbarYTop=0,element.scrollTop=0)}function getThumbSize(i,thumbSize){return i.settings.minScrollbarLength&&(thumbSize=Math.max(thumbSize,i.settings.minScrollbarLength)),i.settings.maxScrollbarLength&&(thumbSize=Math.min(thumbSize,i.settings.maxScrollbarLength)),thumbSize}function updateCss(element,i){var xRailOffset={width:i.railXWidth},roundedScrollTop=Math.floor(element.scrollTop);i.isRtl?xRailOffset.left=i.negativeScrollAdjustment+element.scrollLeft+i.containerWidth-i.contentWidth:xRailOffset.left=element.scrollLeft,i.isScrollbarXUsingBottom?xRailOffset.bottom=i.scrollbarXBottom-roundedScrollTop:xRailOffset.top=i.scrollbarXTop+roundedScrollTop,set(i.scrollbarXRail,xRailOffset);var yRailOffset={top:roundedScrollTop,height:i.railYHeight};i.isScrollbarYUsingRight?i.isRtl?yRailOffset.right=i.contentWidth-(i.negativeScrollAdjustment+element.scrollLeft)-i.scrollbarYRight-i.scrollbarYOuterWidth-9:yRailOffset.right=i.scrollbarYRight-element.scrollLeft:i.isRtl?yRailOffset.left=i.negativeScrollAdjustment+element.scrollLeft+2*i.containerWidth-i.contentWidth-i.scrollbarYLeft-i.scrollbarYOuterWidth:yRailOffset.left=i.scrollbarYLeft+element.scrollLeft,set(i.scrollbarYRail,yRailOffset),set(i.scrollbarX,{left:i.scrollbarXLeft,width:i.scrollbarXWidth-i.railBorderXWidth}),set(i.scrollbarY,{top:i.scrollbarYTop,height:i.scrollbarYHeight-i.railBorderYWidth})}function clickRail(i){var element=i.element;i.event.bind(i.scrollbarY,"mousedown",(function(e){return e.stopPropagation()})),i.event.bind(i.scrollbarYRail,"mousedown",(function(e){var positionTop,direction=e.pageY-window.pageYOffset-i.scrollbarYRail.getBoundingClientRect().top>i.scrollbarYTop?1:-1;i.element.scrollTop+=direction*i.containerHeight,updateGeometry(i),e.stopPropagation()})),i.event.bind(i.scrollbarX,"mousedown",(function(e){return e.stopPropagation()})),i.event.bind(i.scrollbarXRail,"mousedown",(function(e){var positionLeft,direction=e.pageX-window.pageXOffset-i.scrollbarXRail.getBoundingClientRect().left>i.scrollbarXLeft?1:-1;i.element.scrollLeft+=direction*i.containerWidth,updateGeometry(i),e.stopPropagation()}))}function dragThumb(i){bindMouseScrollHandler(i,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),bindMouseScrollHandler(i,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])}function bindMouseScrollHandler(i,ref){var containerHeight=ref[0],contentHeight=ref[1],pageY=ref[2],railYHeight=ref[3],scrollbarY=ref[4],scrollbarYHeight=ref[5],scrollTop=ref[6],y=ref[7],scrollbarYRail=ref[8],element=i.element,startingScrollTop=null,startingMousePageY=null,scrollBy=null;function mouseMoveHandler(e){e.touches&&e.touches[0]&&(e[pageY]=e.touches[0].pageY),element[scrollTop]=startingScrollTop+scrollBy*(e[pageY]-startingMousePageY),addScrollingClass(i,y),updateGeometry(i),e.stopPropagation(),e.preventDefault()}function mouseUpHandler(){removeScrollingClass(i,y),i[scrollbarYRail].classList.remove(cls_state.clicking),i.event.unbind(i.ownerDocument,"mousemove",mouseMoveHandler)}function bindMoves(e,touchMode){startingScrollTop=element[scrollTop],touchMode&&e.touches&&(e[pageY]=e.touches[0].pageY),startingMousePageY=e[pageY],scrollBy=(i[contentHeight]-i[containerHeight])/(i[railYHeight]-i[scrollbarYHeight]),touchMode?i.event.bind(i.ownerDocument,"touchmove",mouseMoveHandler):(i.event.bind(i.ownerDocument,"mousemove",mouseMoveHandler),i.event.once(i.ownerDocument,"mouseup",mouseUpHandler),e.preventDefault()),i[scrollbarYRail].classList.add(cls_state.clicking),e.stopPropagation()}i.event.bind(i[scrollbarY],"mousedown",(function(e){bindMoves(e)})),i.event.bind(i[scrollbarY],"touchstart",(function(e){bindMoves(e,!0)}))}function keyboard(i){var element=i.element,elementHovered=function(){return matches(element,":hover")},scrollbarFocused=function(){return matches(i.scrollbarX,":focus")||matches(i.scrollbarY,":focus")};function shouldPreventDefault(deltaX,deltaY){var scrollTop=Math.floor(element.scrollTop);if(0===deltaX){if(!i.scrollbarYActive)return!1;if(0===scrollTop&&deltaY>0||scrollTop>=i.contentHeight-i.containerHeight&&deltaY<0)return!i.settings.wheelPropagation}var scrollLeft=element.scrollLeft;if(0===deltaY){if(!i.scrollbarXActive)return!1;if(0===scrollLeft&&deltaX<0||scrollLeft>=i.contentWidth-i.containerWidth&&deltaX>0)return!i.settings.wheelPropagation}return!0}i.event.bind(i.ownerDocument,"keydown",(function(e){if(!(e.isDefaultPrevented&&e.isDefaultPrevented()||e.defaultPrevented)&&(elementHovered()||scrollbarFocused())){var activeElement=document.activeElement?document.activeElement:i.ownerDocument.activeElement;if(activeElement){if("IFRAME"===activeElement.tagName)activeElement=activeElement.contentDocument.activeElement;else for(;activeElement.shadowRoot;)activeElement=activeElement.shadowRoot.activeElement;if(isEditable(activeElement))return}var deltaX=0,deltaY=0;switch(e.which){case 37:deltaX=e.metaKey?-i.contentWidth:e.altKey?-i.containerWidth:-30;break;case 38:deltaY=e.metaKey?i.contentHeight:e.altKey?i.containerHeight:30;break;case 39:deltaX=e.metaKey?i.contentWidth:e.altKey?i.containerWidth:30;break;case 40:deltaY=e.metaKey?-i.contentHeight:e.altKey?-i.containerHeight:-30;break;case 32:deltaY=e.shiftKey?i.containerHeight:-i.containerHeight;break;case 33:deltaY=i.containerHeight;break;case 34:deltaY=-i.containerHeight;break;case 36:deltaY=i.contentHeight;break;case 35:deltaY=-i.contentHeight;break;default:return}i.settings.suppressScrollX&&0!==deltaX||i.settings.suppressScrollY&&0!==deltaY||(element.scrollTop-=deltaY,element.scrollLeft+=deltaX,updateGeometry(i),shouldPreventDefault(deltaX,deltaY)&&e.preventDefault())}}))}function wheel(i){var element=i.element;function shouldPreventDefault(deltaX,deltaY){var roundedScrollTop=Math.floor(element.scrollTop),isTop=0===element.scrollTop,isBottom=roundedScrollTop+element.offsetHeight===element.scrollHeight,isLeft=0===element.scrollLeft,isRight=element.scrollLeft+element.offsetWidth===element.scrollWidth,hitsBound;return!(hitsBound=Math.abs(deltaY)>Math.abs(deltaX)?isTop||isBottom:isLeft||isRight)||!i.settings.wheelPropagation}function getDeltaFromEvent(e){var deltaX=e.deltaX,deltaY=-1*e.deltaY;return void 0!==deltaX&&void 0!==deltaY||(deltaX=-1*e.wheelDeltaX/6,deltaY=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(deltaX*=10,deltaY*=10),deltaX!=deltaX&&deltaY!=deltaY&&(deltaX=0,deltaY=e.wheelDelta),e.shiftKey?[-deltaY,-deltaX]:[deltaX,deltaY]}function shouldBeConsumedByChild(target,deltaX,deltaY){if(!env.isWebKit&&element.querySelector("select:focus"))return!0;if(!element.contains(target))return!1;for(var cursor=target;cursor&&cursor!==element;){if(cursor.classList.contains(cls_element.consuming))return!0;var style=get(cursor);if(deltaY&&style.overflowY.match(/(scroll|auto)/)){var maxScrollTop=cursor.scrollHeight-cursor.clientHeight;if(maxScrollTop>0&&(cursor.scrollTop>0&&deltaY<0||cursor.scrollTop0))return!0}if(deltaX&&style.overflowX.match(/(scroll|auto)/)){var maxScrollLeft=cursor.scrollWidth-cursor.clientWidth;if(maxScrollLeft>0&&(cursor.scrollLeft>0&&deltaX<0||cursor.scrollLeft0))return!0}cursor=cursor.parentNode}return!1}function mousewheelHandler(e){var ref=getDeltaFromEvent(e),deltaX=ref[0],deltaY=ref[1];if(!shouldBeConsumedByChild(e.target,deltaX,deltaY)){var shouldPrevent=!1;i.settings.useBothWheelAxes?i.scrollbarYActive&&!i.scrollbarXActive?(deltaY?element.scrollTop-=deltaY*i.settings.wheelSpeed:element.scrollTop+=deltaX*i.settings.wheelSpeed,shouldPrevent=!0):i.scrollbarXActive&&!i.scrollbarYActive&&(deltaX?element.scrollLeft+=deltaX*i.settings.wheelSpeed:element.scrollLeft-=deltaY*i.settings.wheelSpeed,shouldPrevent=!0):(element.scrollTop-=deltaY*i.settings.wheelSpeed,element.scrollLeft+=deltaX*i.settings.wheelSpeed),updateGeometry(i),(shouldPrevent=shouldPrevent||shouldPreventDefault(deltaX,deltaY))&&!e.ctrlKey&&(e.stopPropagation(),e.preventDefault())}}void 0!==window.onwheel?i.event.bind(element,"wheel",mousewheelHandler):void 0!==window.onmousewheel&&i.event.bind(element,"mousewheel",mousewheelHandler)}function touch(i){if(env.supportsTouch||env.supportsIePointer){var element=i.element,startOffset={},startTime=0,speed={},easingLoop=null;env.supportsTouch?(i.event.bind(element,"touchstart",touchStart),i.event.bind(element,"touchmove",touchMove),i.event.bind(element,"touchend",touchEnd)):env.supportsIePointer&&(window.PointerEvent?(i.event.bind(element,"pointerdown",touchStart),i.event.bind(element,"pointermove",touchMove),i.event.bind(element,"pointerup",touchEnd)):window.MSPointerEvent&&(i.event.bind(element,"MSPointerDown",touchStart),i.event.bind(element,"MSPointerMove",touchMove),i.event.bind(element,"MSPointerUp",touchEnd)))}function shouldPrevent(deltaX,deltaY){var scrollTop=Math.floor(element.scrollTop),scrollLeft=element.scrollLeft,magnitudeX=Math.abs(deltaX),magnitudeY=Math.abs(deltaY);if(magnitudeY>magnitudeX){if(deltaY<0&&scrollTop===i.contentHeight-i.containerHeight||deltaY>0&&0===scrollTop)return 0===window.scrollY&&deltaY>0&&env.isChrome}else if(magnitudeX>magnitudeY&&(deltaX<0&&scrollLeft===i.contentWidth-i.containerWidth||deltaX>0&&0===scrollLeft))return!0;return!0}function applyTouchMove(differenceX,differenceY){element.scrollTop-=differenceY,element.scrollLeft-=differenceX,updateGeometry(i)}function getTouch(e){return e.targetTouches?e.targetTouches[0]:e}function shouldHandle(e){return(!e.pointerType||"pen"!==e.pointerType||0!==e.buttons)&&(!(!e.targetTouches||1!==e.targetTouches.length)||!(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))}function touchStart(e){if(shouldHandle(e)){var touch=getTouch(e);startOffset.pageX=touch.pageX,startOffset.pageY=touch.pageY,startTime=(new Date).getTime(),null!==easingLoop&&clearInterval(easingLoop)}}function shouldBeConsumedByChild(target,deltaX,deltaY){if(!element.contains(target))return!1;for(var cursor=target;cursor&&cursor!==element;){if(cursor.classList.contains(cls_element.consuming))return!0;var style=get(cursor);if(deltaY&&style.overflowY.match(/(scroll|auto)/)){var maxScrollTop=cursor.scrollHeight-cursor.clientHeight;if(maxScrollTop>0&&(cursor.scrollTop>0&&deltaY<0||cursor.scrollTop0))return!0}if(deltaX&&style.overflowX.match(/(scroll|auto)/)){var maxScrollLeft=cursor.scrollWidth-cursor.clientWidth;if(maxScrollLeft>0&&(cursor.scrollLeft>0&&deltaX<0||cursor.scrollLeft0))return!0}cursor=cursor.parentNode}return!1}function touchMove(e){if(shouldHandle(e)){var touch=getTouch(e),currentOffset={pageX:touch.pageX,pageY:touch.pageY},differenceX=currentOffset.pageX-startOffset.pageX,differenceY=currentOffset.pageY-startOffset.pageY;if(shouldBeConsumedByChild(e.target,differenceX,differenceY))return;applyTouchMove(differenceX,differenceY),startOffset=currentOffset;var currentTime=(new Date).getTime(),timeGap=currentTime-startTime;timeGap>0&&(speed.x=differenceX/timeGap,speed.y=differenceY/timeGap,startTime=currentTime),shouldPrevent(differenceX,differenceY)&&e.preventDefault()}}function touchEnd(){i.settings.swipeEasing&&(clearInterval(easingLoop),easingLoop=setInterval((function(){i.isInitialized?clearInterval(easingLoop):speed.x||speed.y?Math.abs(speed.x)<.01&&Math.abs(speed.y)<.01?clearInterval(easingLoop):(applyTouchMove(30*speed.x,30*speed.y),speed.x*=.8,speed.y*=.8):clearInterval(easingLoop)}),10))}}var defaultSettings=function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},handlers={"click-rail":clickRail,"drag-thumb":dragThumb,keyboard:keyboard,wheel:wheel,touch:touch},PerfectScrollbar=function PerfectScrollbar(element,userSettings){var this$1=this;if(void 0===userSettings&&(userSettings={}),"string"==typeof element&&(element=document.querySelector(element)),!element||!element.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var key in this.element=element,element.classList.add(cls_main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},userSettings)this.settings[key]=userSettings[key];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var focus=function(){return element.classList.add(cls_state.focus)},blur=function(){return element.classList.remove(cls_state.focus)},originalScrollLeft,result;this.isRtl="rtl"===get(element).direction,!0===this.isRtl&&element.classList.add(cls_rtl),this.isNegativeScroll=(originalScrollLeft=element.scrollLeft,result=null,element.scrollLeft=-1,result=element.scrollLeft<0,element.scrollLeft=originalScrollLeft,result),this.negativeScrollAdjustment=this.isNegativeScroll?element.scrollWidth-element.clientWidth:0,this.event=new EventManager,this.ownerDocument=element.ownerDocument||document,this.scrollbarXRail=div(cls_element.rail("x")),element.appendChild(this.scrollbarXRail),this.scrollbarX=div(cls_element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",focus),this.event.bind(this.scrollbarX,"blur",blur),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var railXStyle=get(this.scrollbarXRail);this.scrollbarXBottom=parseInt(railXStyle.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=toInt(railXStyle.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=toInt(railXStyle.borderLeftWidth)+toInt(railXStyle.borderRightWidth),set(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=toInt(railXStyle.marginLeft)+toInt(railXStyle.marginRight),set(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=div(cls_element.rail("y")),element.appendChild(this.scrollbarYRail),this.scrollbarY=div(cls_element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",focus),this.event.bind(this.scrollbarY,"blur",blur),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var railYStyle=get(this.scrollbarYRail);this.scrollbarYRight=parseInt(railYStyle.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=toInt(railYStyle.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?outerWidth(this.scrollbarY):null,this.railBorderYWidth=toInt(railYStyle.borderTopWidth)+toInt(railYStyle.borderBottomWidth),set(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=toInt(railYStyle.marginTop)+toInt(railYStyle.marginBottom),set(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:element.scrollLeft<=0?"start":element.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:element.scrollTop<=0?"start":element.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach((function(handlerName){return handlers[handlerName](this$1)})),this.lastScrollTop=Math.floor(element.scrollTop),this.lastScrollLeft=element.scrollLeft,this.event.bind(this.element,"scroll",(function(e){return this$1.onScroll(e)})),updateGeometry(this)};return PerfectScrollbar.prototype.update=function update(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,set(this.scrollbarXRail,{display:"block"}),set(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=toInt(get(this.scrollbarXRail).marginLeft)+toInt(get(this.scrollbarXRail).marginRight),this.railYMarginHeight=toInt(get(this.scrollbarYRail).marginTop)+toInt(get(this.scrollbarYRail).marginBottom),set(this.scrollbarXRail,{display:"none"}),set(this.scrollbarYRail,{display:"none"}),updateGeometry(this),processScrollDiff(this,"top",0,!1,!0),processScrollDiff(this,"left",0,!1,!0),set(this.scrollbarXRail,{display:""}),set(this.scrollbarYRail,{display:""}))},PerfectScrollbar.prototype.onScroll=function onScroll(e){this.isAlive&&(updateGeometry(this),processScrollDiff(this,"top",this.element.scrollTop-this.lastScrollTop),processScrollDiff(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},PerfectScrollbar.prototype.destroy=function destroy(){this.isAlive&&(this.event.unbindAll(),remove(this.scrollbarX),remove(this.scrollbarY),remove(this.scrollbarXRail),remove(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},PerfectScrollbar.prototype.removePsClasses=function removePsClasses(){this.element.className=this.element.className.split(" ").filter((function(name){return!name.match(/^ps([-_].+|)$/)})).join(" ")},PerfectScrollbar})),function(factory){"function"==typeof define&&define.amd?define([],factory):"object"==typeof exports?module.exports=factory():window.wNumb=factory()}((function(){"use strict";var FormatOptions=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];function strReverse(a){return a.split("").reverse().join("")}function strStartsWith(input,match){return input.substring(0,match.length)===match}function strEndsWith(input,match){return input.slice(-1*match.length)===match}function throwEqualError(F,a,b){if((F[a]||F[b])&&F[a]===F[b])throw new Error(a)}function isValidNumber(input){return"number"==typeof input&&isFinite(input)}function toFixed(value,exp){return value=value.toString().split("e"),(+((value=(value=Math.round(+(value[0]+"e"+(value[1]?+value[1]+exp:exp)))).toString().split("e"))[0]+"e"+(value[1]?+value[1]-exp:-exp))).toFixed(exp)}function formatTo(decimals,thousand,mark,prefix,suffix,encoder,decoder,negativeBefore,negative,edit,undo,input){var originalInput=input,inputIsNegative,inputPieces,inputBase,inputDecimals="",output="";return encoder&&(input=encoder(input)),!!isValidNumber(input)&&(!1!==decimals&&0===parseFloat(input.toFixed(decimals))&&(input=0),input<0&&(inputIsNegative=!0,input=Math.abs(input)),!1!==decimals&&(input=toFixed(input,decimals)),-1!==(input=input.toString()).indexOf(".")?(inputBase=(inputPieces=input.split("."))[0],mark&&(inputDecimals=mark+inputPieces[1])):inputBase=input,thousand&&(inputBase=strReverse(inputBase).match(/.{1,3}/g),inputBase=strReverse(inputBase.join(strReverse(thousand)))),inputIsNegative&&negativeBefore&&(output+=negativeBefore),prefix&&(output+=prefix),inputIsNegative&&negative&&(output+=negative),output+=inputBase,output+=inputDecimals,suffix&&(output+=suffix),edit&&(output=edit(output,originalInput)),output)}function formatFrom(decimals,thousand,mark,prefix,suffix,encoder,decoder,negativeBefore,negative,edit,undo,input){var originalInput=input,inputIsNegative,output="";return undo&&(input=undo(input)),!(!input||"string"!=typeof input)&&(negativeBefore&&strStartsWith(input,negativeBefore)&&(input=input.replace(negativeBefore,""),inputIsNegative=!0),prefix&&strStartsWith(input,prefix)&&(input=input.replace(prefix,"")),negative&&strStartsWith(input,negative)&&(input=input.replace(negative,""),inputIsNegative=!0),suffix&&strEndsWith(input,suffix)&&(input=input.slice(0,-1*suffix.length)),thousand&&(input=input.split(thousand).join("")),mark&&(input=input.replace(mark,".")),inputIsNegative&&(output+="-"),""!==(output=(output+=input).replace(/[^0-9\.\-.]/g,""))&&(output=Number(output),decoder&&(output=decoder(output)),!!isValidNumber(output)&&output))}function validate(inputOptions){var i,optionName,optionValue,filteredOptions={};for(void 0===inputOptions.suffix&&(inputOptions.suffix=inputOptions.postfix),i=0;i=0&&optionValue<8))throw new Error(optionName);filteredOptions[optionName]=optionValue}else if("encoder"===optionName||"decoder"===optionName||"edit"===optionName||"undo"===optionName){if("function"!=typeof optionValue)throw new Error(optionName);filteredOptions[optionName]=optionValue}else{if("string"!=typeof optionValue)throw new Error(optionName);filteredOptions[optionName]=optionValue}return throwEqualError(filteredOptions,"mark","thousand"),throwEqualError(filteredOptions,"prefix","negative"),throwEqualError(filteredOptions,"prefix","negativeBefore"),filteredOptions}function passAll(options,method,input){var i,args=[];for(i=0;i=0&&"[object Array]"!==g(e)&&"[object Function]"===g(e.callee)},te=Q(arguments)?Q:ee,re={primitive:function(e){return null===e||"function"!=typeof e&&"object"!=typeof e},string:function(e){return"[object String]"===g(e)},regex:function(e){return"[object RegExp]"===g(e)},symbol:function(e){return"function"==typeof S.Symbol&&"symbol"==typeof e}},ne=function overrideNative(e,t,r){var n=e[t];h(e,t,r,!0),m.preserveToString(e[t],n)},oe="function"==typeof $&&"function"==typeof $.for&&re.symbol($()),ie=re.symbol($.iterator)?$.iterator:"_es6-shim iterator_";S.Set&&"function"==typeof(new S.Set)["@@iterator"]&&(ie="@@iterator"),S.Reflect||h(S,"Reflect",{},!0);var ae=S.Reflect,ue=String,fe="undefined"!=typeof document&&document?document.all:null,se=null==fe?function isNullOrUndefined(e){return null==e}:function isNullOrUndefinedAndNotDocumentAll(e){return null==e&&e!==fe},ce={Call:function Call(t,r){var n=arguments.length>2?arguments[2]:[];if(!ce.IsCallable(t))throw new TypeError(t+" is not a function");return e(t,r,n)},RequireObjectCoercible:function(e,t){if(se(e))throw new TypeError(t||"Cannot call method on "+e);return e},TypeIsObject:function(e){return null!=e&&!0!==e&&!1!==e&&("function"==typeof e||"object"==typeof e||e===fe)},ToObject:function(e,t){return Object(ce.RequireObjectCoercible(e,t))},IsCallable:d,IsConstructor:function(e){return ce.IsCallable(e)},ToInt32:function(e){return ce.ToNumber(e)>>0},ToUint32:function(e){return ce.ToNumber(e)>>>0},ToNumber:function(e){if("[object Symbol]"===g(e))throw new TypeError("Cannot convert a Symbol value to a number");return+e},ToInteger:function(e){var t=ce.ToNumber(e);return X(t)?0:0!==t&&K(t)?(t>0?1:-1)*_(k(t)):t},ToLength:function(e){var t=ce.ToInteger(e);return t<=0?0:t>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t},SameValue:function(e,t){return e===t?0!==e||1/e==1/t:X(e)&&X(t)},SameValueZero:function(e,t){return e===t||X(e)&&X(t)},IsIterable:function(e){return ce.TypeIsObject(e)&&(void 0!==e[ie]||te(e))},GetIterator:function(e){if(te(e))return new q(e,"value");var t=ce.GetMethod(e,ie);if(!ce.IsCallable(t))throw new TypeError("value is not an iterable");var r=ce.Call(t,e);if(!ce.TypeIsObject(r))throw new TypeError("bad iterator");return r},GetMethod:function(e,t){var r=ce.ToObject(e)[t];if(!se(r)){if(!ce.IsCallable(r))throw new TypeError("Method not callable: "+t);return r}},IteratorComplete:function(e){return!!e.done},IteratorClose:function(e,t){var r=ce.GetMethod(e,"return");if(void 0!==r){var n,o;try{n=ce.Call(r,e)}catch(i){o=i}if(!t){if(o)throw o;if(!ce.TypeIsObject(n))throw new TypeError("Iterator's return method returned a non-object.")}}},IteratorNext:function(e){var t=arguments.length>1?e.next(arguments[1]):e.next();if(!ce.TypeIsObject(t))throw new TypeError("bad iterator");return t},IteratorStep:function(e){var t=ce.IteratorNext(e),r;return!ce.IteratorComplete(t)&&t},Construct:function(e,t,r,n){var o=void 0===r?e:r;if(!n&&ae.construct)return ae.construct(e,t,o);var i=o.prototype;ce.TypeIsObject(i)||(i=Object.prototype);var a=O(i),u=ce.Call(e,a,t);return ce.TypeIsObject(u)?u:a},SpeciesConstructor:function(e,t){var r=e.constructor;if(void 0===r)return t;if(!ce.TypeIsObject(r))throw new TypeError("Bad constructor");var n=r[J];if(se(n))return t;if(!ce.IsConstructor(n))throw new TypeError("Bad @@species");return n},CreateHTML:function(e,t,r,n){var o=ce.ToString(e),i="<"+t,a,u,f,s;""!==r&&(i+=" "+r+'="'+ce.ToString(n).replace(/"/g,""")+'"');return i+">"+o+""},IsRegExp:function IsRegExp(e){if(!ce.TypeIsObject(e))return!1;var t=e[$.match];return void 0!==t?!!t:re.regex(e)},ToString:function ToString(e){return ue(e)}};if(s&&oe){var le=function defineWellKnownSymbol(e){if(re.symbol($[e]))return $[e];var t=$.for("Symbol."+e);return Object.defineProperty($,e,{configurable:!1,enumerable:!1,writable:!1,value:t}),t};if(!re.symbol($.search)){var pe=le("search"),ve=String.prototype.search;h(RegExp.prototype,pe,(function search(e){return ce.Call(ve,e,[this])}));var ye=function search(e){var t=ce.RequireObjectCoercible(this);if(!se(e)){var r=ce.GetMethod(e,pe);if(void 0!==r)return ce.Call(r,e,[t])}return ce.Call(ve,t,[ce.ToString(e)])};ne(String.prototype,"search",ye)}if(!re.symbol($.replace)){var he=le("replace"),be=String.prototype.replace;h(RegExp.prototype,he,(function replace(e,t){return ce.Call(be,e,[this,t])}));var ge=function replace(e,t){var r=ce.RequireObjectCoercible(this);if(!se(e)){var n=ce.GetMethod(e,he);if(void 0!==n)return ce.Call(n,e,[r,t])}return ce.Call(be,r,[ce.ToString(e),t])};ne(String.prototype,"replace",ge)}if(!re.symbol($.split)){var de=le("split"),me=String.prototype.split;h(RegExp.prototype,de,(function split(e,t){return ce.Call(me,e,[this,t])}));var Oe=function split(e,t){var r=ce.RequireObjectCoercible(this);if(!se(e)){var n=ce.GetMethod(e,de);if(void 0!==n)return ce.Call(n,e,[r,t])}return ce.Call(me,r,[ce.ToString(e),t])};ne(String.prototype,"split",Oe)}var we=re.symbol($.match),je=we&&function(){var e={};return e[$.match]=function(){return 42},42!=="a".match(e)}();if(!we||je){var Se=le("match"),Te=String.prototype.match;h(RegExp.prototype,Se,(function match(e){return ce.Call(Te,e,[this])}));var Ie=function match(e){var t=ce.RequireObjectCoercible(this);if(!se(e)){var r=ce.GetMethod(e,Se);if(void 0!==r)return ce.Call(r,e,[t])}return ce.Call(Te,t,[ce.ToString(e)])};ne(String.prototype,"match",Ie)}}var Ee=function wrapConstructor(e,t,r){m.preserveToString(t,e),Object.setPrototypeOf&&Object.setPrototypeOf(e,t),s?l(Object.getOwnPropertyNames(e),(function(n){n in W||r[n]||m.proxy(e,n,t)})):l(Object.keys(e),(function(n){n in W||r[n]||(t[n]=e[n])})),t.prototype=e.prototype,m.redefine(e.prototype,"constructor",t)},Pe=function(){return this},Ce=function(e){s&&!z(e,J)&&m.getter(e,J,Pe)},Me=function(e,t){var r=t||function iterator(){return this};h(e,ie,r),!e[ie]&&re.symbol(ie)&&(e[ie]=r)},xe=function createDataProperty(e,t,r){s?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r},Ne=function createDataPropertyOrThrow(e,t,r){if(xe(e,t,r),!ce.SameValue(e[t],r))throw new TypeError("property is nonconfigurable")},Ae=function(e,t,r,n){if(!ce.TypeIsObject(e))throw new TypeError("Constructor requires `new`: "+t.name);var o=t.prototype;ce.TypeIsObject(o)||(o=r);var i=O(o);for(var a in n)if(z(n,a)){var u=n[a];h(i,a,u,!0)}return i};if(String.fromCodePoint&&1!==String.fromCodePoint.length){var Re=String.fromCodePoint;ne(String,"fromCodePoint",(function fromCodePoint(e){return ce.Call(Re,this,arguments)}))}var _e={fromCodePoint:function fromCodePoint(e){for(var t=[],r,n=0,o=arguments.length;n1114111)throw new RangeError("Invalid code point "+r);r<65536?M(t,String.fromCharCode(r)):(r-=65536,M(t,String.fromCharCode(55296+(r>>10))),M(t,String.fromCharCode(r%1024+56320)))}return t.join("")},raw:function raw(e){var t=ce.ToObject(e,"bad callSite"),r=ce.ToObject(t.raw,"bad raw value"),n=r.length,o=ce.ToLength(n);if(o<=0)return"";for(var i=[],a=0,u,f,s,c;a=o));)f=a+1=Le)throw new RangeError("repeat count must be less than infinity and not overflow maximum string size");return ke(t,r)},startsWith:function startsWith(e){var t=ce.ToString(ce.RequireObjectCoercible(this));if(ce.IsRegExp(e))throw new TypeError('Cannot call method "startsWith" with a regex');var r=ce.ToString(e),n;arguments.length>1&&(n=arguments[1]);var o=A(ce.ToInteger(n),0);return C(t,o,o+r.length)===r},endsWith:function endsWith(e){var t=ce.ToString(ce.RequireObjectCoercible(this));if(ce.IsRegExp(e))throw new TypeError('Cannot call method "endsWith" with a regex');var r=ce.ToString(e),n=t.length,o;arguments.length>1&&(o=arguments[1]);var i=void 0===o?n:ce.ToInteger(o),a=R(A(i,0),n);return C(t,a-r.length,a)===r},includes:function includes(e){if(ce.IsRegExp(e))throw new TypeError('"includes" does not accept a RegExp');var t=ce.ToString(e),r;return arguments.length>1&&(r=arguments[1]),-1!==I(this,t,r)},codePointAt:function codePointAt(e){var t=ce.ToString(ce.RequireObjectCoercible(this)),r=ce.ToInteger(e),n=t.length;if(r>=0&&r56319||r+1===n)return o;var a=t.charCodeAt(r+1);return a<56320||a>57343?o:1024*(o-55296)+(a-56320)+65536}}};if(String.prototype.includes&&!1!=="a".includes("a",1/0)&&ne(String.prototype,"includes",Fe.includes),String.prototype.startsWith&&String.prototype.endsWith){var De=i((function(){return"/a/".startsWith(/a/)})),ze=a((function(){return!1==="abc".startsWith("a",1/0)}));De&&ze||(ne(String.prototype,"startsWith",Fe.startsWith),ne(String.prototype,"endsWith",Fe.endsWith))}if(oe){var qe=a((function(){var e=/a/;return e[$.match]=!1,"/a/".startsWith(e)}));qe||ne(String.prototype,"startsWith",Fe.startsWith);var We=a((function(){var e=/a/;return e[$.match]=!1,"/a/".endsWith(e)}));We||ne(String.prototype,"endsWith",Fe.endsWith);var Ge=a((function(){var e=/a/;return e[$.match]=!1,"/a/".includes(e)}));Ge||ne(String.prototype,"includes",Fe.includes)}b(String.prototype,Fe);var He=["\t\n\v\f\r   ᠎    ","          \u2028","\u2029\ufeff"].join(""),Ve=new RegExp("(^["+He+"]+)|(["+He+"]+$)","g"),Be=function trim(){return ce.ToString(ce.RequireObjectCoercible(this)).replace(Ve,"")},Ue=["…","​","￾"].join(""),$e=new RegExp("["+Ue+"]","g"),Je=/^[-+]0x[0-9a-f]+$/i,Xe=Ue.trim().length!==Ue.length;h(String.prototype,"trim",Be,Xe);var Ke=function(e){return{value:e,done:0===arguments.length}},Ze=function(e){ce.RequireObjectCoercible(e),this._s=ce.ToString(e),this._i=0};Ze.prototype.next=function(){var e=this._s,t=this._i;if(void 0===e||t>=e.length)return this._s=void 0,Ke();var r=e.charCodeAt(t),n,o;return o=r<55296||r>56319||t+1===e.length?1:(n=e.charCodeAt(t+1))<56320||n>57343?1:2,this._i=t+o,Ke(e.substr(t,o))},Me(Ze.prototype),Me(String.prototype,(function(){return new Ze(this)}));var Ye={from:function from(e){var r=this,n,o,i;if(arguments.length>1&&(n=arguments[1]),void 0===n)o=!1;else{if(!ce.IsCallable(n))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(i=arguments[2]),o=!0}var a=void 0!==(te(e)||ce.GetMethod(e,ie)),u,f,s;if(a){f=ce.IsConstructor(r)?Object(new r):[];var c=ce.GetIterator(e),l,p;for(s=0;!1!==(l=ce.IteratorStep(c));){p=l.value;try{o&&(p=void 0===i?n(p,s):t(n,i,p,s)),f[s]=p}catch(v){throw ce.IteratorClose(c,!0),v}s+=1}u=s}else{var y=ce.ToObject(e),h;for(u=ce.ToLength(y.length),f=ce.IsConstructor(r)?Object(new r(u)):new Array(u),s=0;s2&&(f=arguments[2]);var s=void 0===f?n:ce.ToInteger(f),c=s<0?A(n+s,0):R(s,n),l=R(c-u,n-a),p=1;for(u0;)u in r?r[a]=r[u]:delete r[a],u+=p,a+=p,l-=1;return r},fill:function fill(e){var t,r;arguments.length>1&&(t=arguments[1]),arguments.length>2&&(r=arguments[2]);var n=ce.ToObject(this),o=ce.ToLength(n.length);t=ce.ToInteger(void 0===t?0:t),r=ce.ToInteger(void 0===r?o:r);for(var i=t<0?A(o+t,0):R(t,o),a=r<0?o+r:r,u=i;u1?arguments[1]:null,i=0,a;i1?arguments[1]:null,i=0;i1&&void 0!==arguments[1]?ce.Call(it,this,arguments):t(it,this,e)}))}var at=-(Math.pow(2,32)-1),ut=function(e,r){var n={length:at};return n[r?(n.length>>>0)-1:0]=!0,a((function(){return t(e,n,(function(){throw new RangeError("should not reach here")}),[]),!0}))};if(!ut(Array.prototype.forEach)){var ft=Array.prototype.forEach;ne(Array.prototype,"forEach",(function forEach(e){return ce.Call(ft,this.length>=0?this:[],arguments)}),!0)}if(!ut(Array.prototype.map)){var st=Array.prototype.map;ne(Array.prototype,"map",(function map(e){return ce.Call(st,this.length>=0?this:[],arguments)}),!0)}if(!ut(Array.prototype.filter)){var ct=Array.prototype.filter;ne(Array.prototype,"filter",(function filter(e){return ce.Call(ct,this.length>=0?this:[],arguments)}),!0)}if(!ut(Array.prototype.some)){var lt=Array.prototype.some;ne(Array.prototype,"some",(function some(e){return ce.Call(lt,this.length>=0?this:[],arguments)}),!0)}if(!ut(Array.prototype.every)){var pt=Array.prototype.every;ne(Array.prototype,"every",(function every(e){return ce.Call(pt,this.length>=0?this:[],arguments)}),!0)}if(!ut(Array.prototype.reduce)){var vt=Array.prototype.reduce;ne(Array.prototype,"reduce",(function reduce(e){return ce.Call(vt,this.length>=0?this:[],arguments)}),!0)}if(!ut(Array.prototype.reduceRight,!0)){var yt=Array.prototype.reduceRight;ne(Array.prototype,"reduceRight",(function reduceRight(e){return ce.Call(yt,this.length>=0?this:[],arguments)}),!0)}var ht=8!==Number("0o10"),bt=2!==Number("0b10"),gt=y(Ue,(function(e){return 0===Number(e+0+e)}));if(ht||bt||gt){var dt=Number,mt=/^0b[01]+$/i,Ot=/^0o[0-7]+$/i,wt=mt.test.bind(mt),jt=Ot.test.bind(Ot),St=function(e){var t;if("function"==typeof e.valueOf&&(t=e.valueOf(),re.primitive(t)))return t;if("function"==typeof e.toString&&(t=e.toString(),re.primitive(t)))return t;throw new TypeError("No default value")},Tt=$e.test.bind($e),It=Je.test.bind(Je),Et=function(){var e=function Number(t){var r;"string"==typeof(r=arguments.length>0?re.primitive(t)?t:St(t,"number"):0)&&(r=ce.Call(Be,r),wt(r)?r=parseInt(C(r,2),2):jt(r)?r=parseInt(C(r,2),8):(Tt(r)||It(r))&&(r=NaN));var n=this,o=a((function(){return dt.prototype.valueOf.call(n),!0}));return n instanceof e&&!o?new dt(r):dt(r)};return e}();Ee(dt,Et,{}),b(Et,{NaN:dt.NaN,MAX_VALUE:dt.MAX_VALUE,MIN_VALUE:dt.MIN_VALUE,NEGATIVE_INFINITY:dt.NEGATIVE_INFINITY,POSITIVE_INFINITY:dt.POSITIVE_INFINITY}),Number=Et,m.redefine(S,"Number",Et)}var Pt=Math.pow(2,53)-1;b(Number,{MAX_SAFE_INTEGER:Pt,MIN_SAFE_INTEGER:-Pt,EPSILON:2220446049250313e-31,parseInt:S.parseInt,parseFloat:S.parseFloat,isFinite:K,isInteger:function isInteger(e){return K(e)&&ce.ToInteger(e)===e},isSafeInteger:function isSafeInteger(e){return Number.isInteger(e)&&k(e)<=Number.MAX_SAFE_INTEGER},isNaN:X}),h(Number,"parseInt",S.parseInt,Number.parseInt!==S.parseInt),1===[,1].find((function(){return!0}))&&ne(Array.prototype,"find",et.find),0!==[,1].findIndex((function(){return!0}))&&ne(Array.prototype,"findIndex",et.findIndex);var Ct=Function.bind.call(Function.bind,Object.prototype.propertyIsEnumerable),Mt=function ensureEnumerable(e,t){s&&Ct(e,t)&&Object.defineProperty(e,t,{enumerable:!1})},xt=function sliceArgs(){for(var e=Number(this),t=arguments.length,r=t-e,n=new Array(r<0?0:r),o=e;o1)return NaN;var r=k(t);return Z(t)*Y(2*r/(1-r))/2},cbrt:function cbrt(e){var t=Number(e);if(0===t)return t;var r=t<0,n;return r&&(t=-t),n=t===1/0?1/0:(t/((n=L(F(t)/3))*n)+2*n)/3,r?-n:n},clz32:function clz32(e){var t=Number(e),r=ce.ToUint32(t);return 0===r?32:Pr?ce.Call(Pr,r):31-_(F(r+.5)*Ir)},cosh:function cosh(e){var t=Number(e);if(0===t)return 1;if(X(t))return NaN;if(!T(t))return 1/0;var r=L(k(t)-1);return(r+1/(r*Tr*Tr))*(Tr/2)},expm1:function expm1(e){var t=Number(e);if(t===-1/0)return-1;if(!T(t)||0===t)return t;if(k(t)>.5)return L(t)-1;for(var r=t,n=0,o=1;n+r!==n;)n+=r,r*=t/(o+=1);return n},hypot:function hypot(e,t){for(var r=0,n=0,o=0;o0?i/n*(i/n):i}return n===1/0?1/0:n*D(r)},log2:function log2(e){return F(e)*Ir},log10:function log10(e){return F(e)*Er},log1p:Y,sign:Z,sinh:function sinh(e){var t=Number(e);if(!T(t)||0===t)return t;var r=k(t);if(r<1){var n=Math.expm1(r);return Z(t)*n*(1+1/(n+1))/2}var o=L(r-1);return Z(t)*(o-1/(o*Tr*Tr))*(Tr/2)},tanh:function tanh(e){var t=Number(e);return X(t)||0===t?t:t>=20?1:t<=-20?-1:(Math.expm1(t)-Math.expm1(-t))/(L(t)+L(-t))},trunc:function trunc(e){var t=Number(e);return t<0?-_(-t):_(t)},imul:function imul(e,t){var r=ce.ToUint32(e),n=ce.ToUint32(t),o,i=65535&r,a,u=65535&n;return i*u+((r>>>16&65535)*u+i*(n>>>16&65535)<<16>>>0)|0},fround:function fround(e){var t=Number(e);if(0===t||t===1/0||t===-1/0||X(t))return t;var r=Z(t),n=k(t);if(njr||X(i)?r*(1/0):r*i}},Mr=function withinULPDistance(e,t,r){return k(1-e/t)/Number.EPSILON<(r||8)};b(Math,Cr),h(Math,"sinh",Cr.sinh,Math.sinh(710)===1/0),h(Math,"cosh",Cr.cosh,Math.cosh(710)===1/0),h(Math,"log1p",Cr.log1p,-1e-17!==Math.log1p(-1e-17)),h(Math,"asinh",Cr.asinh,Math.asinh(-1e7)!==-Math.asinh(1e7)),h(Math,"asinh",Cr.asinh,Math.asinh(1e300)===1/0),h(Math,"atanh",Cr.atanh,0===Math.atanh(1e-300)),h(Math,"tanh",Cr.tanh,-2e-17!==Math.tanh(-2e-17)),h(Math,"acosh",Cr.acosh,Math.acosh(Number.MAX_VALUE)===1/0),h(Math,"acosh",Cr.acosh,!Mr(Math.acosh(1+Number.EPSILON),Math.sqrt(2*Number.EPSILON))),h(Math,"cbrt",Cr.cbrt,!Mr(Math.cbrt(1e-300),1e-100)),h(Math,"sinh",Cr.sinh,-2e-17!==Math.sinh(-2e-17));var xr=Math.expm1(10);h(Math,"expm1",Cr.expm1,xr>22025.465794806718||xr<22025.465794806718);var Nr=Math.round,Ar=0===Math.round(.5-Number.EPSILON/4)&&1===Math.round(Number.EPSILON/3.99-.5),Rr=mr+1,_r=2*mr-1,kr=[Rr,_r].every((function(e){return Math.round(e)===e}));h(Math,"round",(function round(e){var t=_(e),r;return e-t<.5?t:-1===t?-0:t+1}),!Ar||!kr),m.preserveToString(Math.round,Nr);var Lr=Math.imul;-5!==Math.imul(4294967295,5)&&(Math.imul=Cr.imul,m.preserveToString(Math.imul,Lr)),2!==Math.imul.length&&ne(Math,"imul",(function imul(e,t){return ce.Call(Lr,Math,arguments)}));var Fr=function(){var e=S.setTimeout;if("function"==typeof e||"object"==typeof e){ce.IsPromise=function(e){return!!ce.TypeIsObject(e)&&void 0!==e._promise};var r=function(e){if(!ce.IsConstructor(e))throw new TypeError("Bad promise constructor");var t=this,r=function(e,r){if(void 0!==t.resolve||void 0!==t.reject)throw new TypeError("Bad Promise implementation!");t.resolve=e,t.reject=r};if(t.resolve=void 0,t.reject=void 0,t.promise=new e(r),!ce.IsCallable(t.resolve)||!ce.IsCallable(t.reject))throw new TypeError("Bad promise constructor")},n;"undefined"!=typeof window&&ce.IsCallable(window.postMessage)&&(n=function(){var e=[],t="zero-timeout-message",r=function(r){M(e,r),window.postMessage(t,"*")},n=function(r){if(r.source===window&&r.data===t){if(r.stopPropagation(),0===e.length)return;var n;N(e)()}};return window.addEventListener("message",n,!0),r});var o=function(){var e=S.Promise,t=e&&e.resolve&&e.resolve();return t&&function(e){return t.then(e)}},i=ce.IsCallable(S.setImmediate)?S.setImmediate:"object"==typeof process&&process.nextTick?process.nextTick:o()||(ce.IsCallable(n)?n():function(t){e(t,0)}),a=function(e){return e},u=function(e){throw e},f=0,s=1,c=2,l=0,p=1,v=2,y={},h=function(e,t,r){i((function(){g(e,t,r)}))},g=function(e,t,r){var n,o;if(t===y)return e(r);try{n=e(r),o=t.resolve}catch(i){n=i,o=t.reject}o(n)},d=function(e,t){var r=e._promise,n=r.reactionLength;if(n>0&&(h(r.fulfillReactionHandler0,r.reactionCapability0,t),r.fulfillReactionHandler0=void 0,r.rejectReactions0=void 0,r.reactionCapability0=void 0,n>1))for(var o=1,i=0;o0&&(h(r.rejectReactionHandler0,r.reactionCapability0,t),r.fulfillReactionHandler0=void 0,r.rejectReactions0=void 0,r.reactionCapability0=void 0,n>1))for(var o=1,i=0;o2&&arguments[2]===y;i=b&&o===E?y:new r(o);var g=ce.IsCallable(e)?e:a,d=ce.IsCallable(t)?t:u,m=n._promise,O;if(0===m.state){if(0===m.reactionLength)m.fulfillReactionHandler0=g,m.rejectReactionHandler0=d,m.reactionCapability0=i;else{var w=3*(m.reactionLength-1);m[w+0]=g,m[w+1]=d,m[w+2]=i}m.reactionLength+=1}else if(1===m.state)O=m.result,h(g,i,O);else{if(2!==m.state)throw new TypeError("unexpected Promise state");O=m.result,h(d,i,O)}return i.promise}}),y=new r(E),I=T.then,E}}();if(S.Promise&&(delete S.Promise.accept,delete S.Promise.defer,delete S.Promise.prototype.chain),"function"==typeof Fr){b(S,{Promise:Fr});var Dr=w(S.Promise,(function(e){return e.resolve(42).then((function(){}))instanceof e})),zr=!i((function(){return S.Promise.reject(42).then(null,5).then(null,W)})),qr=i((function(){return S.Promise.call(3,W)})),Wr=function(e){var t=e.resolve(5);t.constructor={};var r=e.resolve(t);try{r.then(null,W).then(null,W)}catch(n){return!0}return t===r}(S.Promise),Gr=s&&function(){var e=0,t=Object.defineProperty({},"then",{get:function(){e+=1}});return Promise.resolve(t),1===e}(),Hr=function BadResolverPromise(e){var t=new Promise(e);e(3,(function(){})),this.then=t.then,this.constructor=BadResolverPromise};Hr.prototype=Promise.prototype,Hr.all=Promise.all;var Vr=a((function(){return!!Hr.all([1,2])}));if(Dr&&zr&&qr&&!Wr&&Gr&&!Vr||(Promise=Fr,ne(S,"Promise",Fr)),1!==Promise.all.length){var Br=Promise.all;ne(Promise,"all",(function all(e){return ce.Call(Br,this,arguments)}))}if(1!==Promise.race.length){var Ur=Promise.race;ne(Promise,"race",(function race(e){return ce.Call(Ur,this,arguments)}))}if(1!==Promise.resolve.length){var $r=Promise.resolve;ne(Promise,"resolve",(function resolve(e){return ce.Call($r,this,arguments)}))}if(1!==Promise.reject.length){var Jr=Promise.reject;ne(Promise,"reject",(function reject(e){return ce.Call(Jr,this,arguments)}))}Mt(Promise,"all"),Mt(Promise,"race"),Mt(Promise,"resolve"),Mt(Promise,"reject"),Ce(Promise)}var Xr=function(e){var t=n(p(e,(function(e,t){return e[t]=!0,e}),{}));return e.join(":")===t.join(":")},Kr=Xr(["z","a","bb"]),Zr=Xr(["z",1,"a","3",2]);if(s){var Yr=function fastkey(e,t){return t||Kr?se(e)?"^"+ce.ToString(e):"string"==typeof e?"$"+e:"number"==typeof e?Zr?e:"n"+e:"boolean"==typeof e?"b"+e:null:null},Qr=function emptyObject(){return Object.create?Object.create(null):{}},en=function addIterableToMap(e,n,o){if(r(o)||re.string(o))l(o,(function(e){if(!ce.TypeIsObject(e))throw new TypeError("Iterator value "+e+" is not an entry object");n.set(e[0],e[1])}));else if(o instanceof e)t(e.prototype.forEach,o,(function(e,t){n.set(t,e)}));else{var i,a;if(!se(o)){if(a=n.set,!ce.IsCallable(a))throw new TypeError("bad map");i=ce.GetIterator(o)}if(void 0!==i)for(;;){var u=ce.IteratorStep(i);if(!1===u)break;var f=u.value;try{if(!ce.TypeIsObject(f))throw new TypeError("Iterator value "+f+" is not an entry object");t(a,n,f[0],f[1])}catch(s){throw ce.IteratorClose(i,!0),s}}}},tn=function addIterableToSet(e,n,o){if(r(o)||re.string(o))l(o,(function(e){n.add(e)}));else if(o instanceof e)t(e.prototype.forEach,o,(function(e){n.add(e)}));else{var i,a;if(!se(o)){if(a=n.add,!ce.IsCallable(a))throw new TypeError("bad set");i=ce.GetIterator(o)}if(void 0!==i)for(;;){var u=ce.IteratorStep(i);if(!1===u)break;var f=u.value;try{t(a,n,f)}catch(s){throw ce.IteratorClose(i,!0),s}}}},rn={Map:function(){var e={},r=function MapEntry(e,t){this.key=e,this.value=t,this.next=null,this.prev=null};r.prototype.isRemoved=function isRemoved(){return this.key===e};var n=function isMap(e){return!!e._es6map},o=function requireMapSlot(e,t){if(!ce.TypeIsObject(e)||!n(e))throw new TypeError("Method Map.prototype."+t+" called on incompatible receiver "+ce.ToString(e))},i=function MapIterator(e,t){o(e,"[[MapIterator]]"),this.head=e._head,this.i=this.head,this.kind=t},a;Me(i.prototype={isMapIterator:!0,next:function next(){if(!this.isMapIterator)throw new TypeError("Not a MapIterator");var e=this.i,t=this.kind,r=this.head,n;if(void 0===this.i)return Ke();for(;e.isRemoved()&&e!==r;)e=e.prev;for(;e.next!==r;)if(!(e=e.next).isRemoved())return n="key"===t?e.key:"value"===t?e.value:[e.key,e.value],this.i=e,Ke(n);return this.i=void 0,Ke()}});var u=function Map(){if(!(this instanceof Map))throw new TypeError('Constructor Map requires "new"');if(this&&this._es6map)throw new TypeError("Bad construction");var e=Ae(this,Map,a,{_es6map:!0,_head:null,_map:G?new G:null,_size:0,_storage:Qr()}),t=new r(null,null);return t.next=t.prev=t,e._head=t,arguments.length>0&&en(Map,e,arguments[0]),e};return a=u.prototype,m.getter(a,"size",(function(){if(void 0===this._size)throw new TypeError("size method called on incompatible Map");return this._size})),b(a,{get:function get(e){var t;o(this,"get");var r=Yr(e,!0);if(null!==r)return(t=this._storage[r])?t.value:void 0;if(this._map)return(t=V.call(this._map,e))?t.value:void 0;for(var n=this._head,i=n;(i=i.next)!==n;)if(ce.SameValueZero(i.key,e))return i.value},has:function has(e){o(this,"has");var t=Yr(e,!0);if(null!==t)return void 0!==this._storage[t];if(this._map)return B.call(this._map,e);for(var r=this._head,n=r;(n=n.next)!==r;)if(ce.SameValueZero(n.key,e))return!0;return!1},set:function set(e,t){o(this,"set");var n=this._head,i=n,a,u=Yr(e,!0);if(null!==u){if(void 0!==this._storage[u])return this._storage[u].value=t,this;a=this._storage[u]=new r(e,t),i=n.prev}else this._map&&(B.call(this._map,e)?V.call(this._map,e).value=t:(a=new r(e,t),U.call(this._map,e,a),i=n.prev));for(;(i=i.next)!==n;)if(ce.SameValueZero(i.key,e))return i.value=t,this;return a=a||new r(e,t),ce.SameValue(-0,e)&&(a.key=0),a.next=this._head,a.prev=this._head.prev,a.prev.next=a,a.next.prev=a,this._size+=1,this},delete:function(t){o(this,"delete");var r=this._head,n=r,i=Yr(t,!0);if(null!==i){if(void 0===this._storage[i])return!1;n=this._storage[i].prev,delete this._storage[i]}else if(this._map){if(!B.call(this._map,t))return!1;n=V.call(this._map,t).prev,H.call(this._map,t)}for(;(n=n.next)!==r;)if(ce.SameValueZero(n.key,t))return n.key=e,n.value=e,n.prev.next=n.next,n.next.prev=n.prev,this._size-=1,!0;return!1},clear:function clear(){o(this,"clear"),this._map=G?new G:null,this._size=0,this._storage=Qr();for(var t=this._head,r=t,n=r.next;(r=n)!==t;)r.key=e,r.value=e,n=r.next,r.next=r.prev=t;t.next=t.prev=t},keys:function keys(){return o(this,"keys"),new i(this,"key")},values:function values(){return o(this,"values"),new i(this,"value")},entries:function entries(){return o(this,"entries"),new i(this,"key+value")},forEach:function forEach(e){o(this,"forEach");for(var r=arguments.length>1?arguments[1]:null,n=this.entries(),i=n.next();!i.done;i=n.next())r?t(e,r,i.value[1],i.value[0],this):e(i.value[1],i.value[0],this)}}),Me(a,a.entries),u}(),Set:function(){var e=function isSet(e){return e._es6set&&void 0!==e._storage},r=function requireSetSlot(t,r){if(!ce.TypeIsObject(t)||!e(t))throw new TypeError("Set.prototype."+r+" called on incompatible receiver "+ce.ToString(t))},o,i=function Set(){if(!(this instanceof Set))throw new TypeError('Constructor Set requires "new"');if(this&&this._es6set)throw new TypeError("Bad construction");var e=Ae(this,Set,o,{_es6set:!0,"[[SetData]]":null,_storage:Qr()});if(!e._es6set)throw new TypeError("bad set");return arguments.length>0&&tn(Set,e,arguments[0]),e};o=i.prototype;var a=function(e){var t=e;if("^null"===t)return null;if("^undefined"!==t){var r=t.charAt(0);return"$"===r?C(t,1):"n"===r?+C(t,1):"b"===r?"btrue"===t:+t}},u=function ensureMap(e){if(!e["[[SetData]]"]){var t=new rn.Map;e["[[SetData]]"]=t,l(n(e._storage),(function(e){var r=a(e);t.set(r,r)})),e["[[SetData]]"]=t}e._storage=null};m.getter(i.prototype,"size",(function(){return r(this,"size"),this._storage?n(this._storage).length:(u(this),this["[[SetData]]"].size)})),b(i.prototype,{has:function has(e){var t;return r(this,"has"),this._storage&&null!==(t=Yr(e))?!!this._storage[t]:(u(this),this["[[SetData]]"].has(e))},add:function add(e){var t;return r(this,"add"),this._storage&&null!==(t=Yr(e))?(this._storage[t]=!0,this):(u(this),this["[[SetData]]"].set(e,e),this)},delete:function(e){var t;if(r(this,"delete"),this._storage&&null!==(t=Yr(e))){var n=z(this._storage,t);return delete this._storage[t]&&n}return u(this),this["[[SetData]]"].delete(e)},clear:function clear(){r(this,"clear"),this._storage&&(this._storage=Qr()),this["[[SetData]]"]&&this["[[SetData]]"].clear()},values:function values(){return r(this,"values"),u(this),new f(this["[[SetData]]"].values())},entries:function entries(){return r(this,"entries"),u(this),new f(this["[[SetData]]"].entries())},forEach:function forEach(e){r(this,"forEach");var n=arguments.length>1?arguments[1]:null,o=this;u(o),this["[[SetData]]"].forEach((function(r,i){n?t(e,n,i,i,o):e(i,i,o)}))}}),h(i.prototype,"keys",i.prototype.values,!0),Me(i.prototype,i.prototype.values);var f=function SetIterator(e){this.it=e};return f.prototype={isSetIterator:!0,next:function next(){if(!this.isSetIterator)throw new TypeError("Not a SetIterator");return this.it.next()}},Me(f.prototype),i}()},nn=S.Set&&!Set.prototype.delete&&Set.prototype.remove&&Set.prototype.items&&Set.prototype.map&&Array.isArray((new Set).keys);if(nn&&(S.Set=rn.Set),S.Map||S.Set){var on=a((function(){return 2===new Map([[1,2]]).get(1)}));on||(S.Map=function Map(){if(!(this instanceof Map))throw new TypeError('Constructor Map requires "new"');var e=new G;return arguments.length>0&&en(Map,e,arguments[0]),delete e.constructor,Object.setPrototypeOf(e,S.Map.prototype),e},S.Map.prototype=O(G.prototype),h(S.Map.prototype,"constructor",S.Map,!0),m.preserveToString(S.Map,G));var an=new Map,un=function(){var e=new Map([[1,0],[2,0],[3,0],[4,0]]);return e.set(-0,e),e.get(0)===e&&e.get(-0)===e&&e.has(0)&&e.has(-0)}(),fn=an.set(1,2)===an;un&&fn||ne(Map.prototype,"set",(function set(e,r){return t(U,this,0===e?0:e,r),this})),un||(b(Map.prototype,{get:function get(e){return t(V,this,0===e?0:e)},has:function has(e){return t(B,this,0===e?0:e)}},!0),m.preserveToString(Map.prototype.get,V),m.preserveToString(Map.prototype.has,B));var sn=new Set,cn=Set.prototype.delete&&Set.prototype.add&&Set.prototype.has&&function(e){return e.delete(0),e.add(-0),!e.has(0)}(sn),ln=sn.add(1)===sn;if(!cn||!ln){var pn=Set.prototype.add;Set.prototype.add=function add(e){return t(pn,this,0===e?0:e),this},m.preserveToString(Set.prototype.add,pn)}if(!cn){var vn=Set.prototype.has;Set.prototype.has=function has(e){return t(vn,this,0===e?0:e)},m.preserveToString(Set.prototype.has,vn);var yn=Set.prototype.delete;Set.prototype.delete=function SetDelete(e){return t(yn,this,0===e?0:e)},m.preserveToString(Set.prototype.delete,yn)}var hn=w(S.Map,(function(e){var t=new e([]);return t.set(42,42),t instanceof e})),bn=Object.setPrototypeOf&&!hn,gn=function(){try{return!(S.Map()instanceof S.Map)}catch(e){return e instanceof TypeError}}();0===S.Map.length&&!bn&&gn||(S.Map=function Map(){if(!(this instanceof Map))throw new TypeError('Constructor Map requires "new"');var e=new G;return arguments.length>0&&en(Map,e,arguments[0]),delete e.constructor,Object.setPrototypeOf(e,Map.prototype),e},S.Map.prototype=G.prototype,h(S.Map.prototype,"constructor",S.Map,!0),m.preserveToString(S.Map,G));var dn=w(S.Set,(function(e){var t=new e([]);return t.add(42,42),t instanceof e})),mn=Object.setPrototypeOf&&!dn,On=function(){try{return!(S.Set()instanceof S.Set)}catch(e){return e instanceof TypeError}}();if(0!==S.Set.length||mn||!On){var wn=S.Set;S.Set=function Set(){if(!(this instanceof Set))throw new TypeError('Constructor Set requires "new"');var e=new wn;return arguments.length>0&&tn(Set,e,arguments[0]),delete e.constructor,Object.setPrototypeOf(e,Set.prototype),e},S.Set.prototype=wn.prototype,h(S.Set.prototype,"constructor",S.Set,!0),m.preserveToString(S.Set,wn)}var jn=new S.Map,Sn=!a((function(){return jn.keys().next().done}));if(("function"!=typeof S.Map.prototype.clear||0!==(new S.Set).size||0!==jn.size||"function"!=typeof S.Map.prototype.keys||"function"!=typeof S.Set.prototype.keys||"function"!=typeof S.Map.prototype.forEach||"function"!=typeof S.Set.prototype.forEach||u(S.Map)||u(S.Set)||"function"!=typeof jn.keys().next||Sn||!hn)&&b(S,{Map:rn.Map,Set:rn.Set},!0),S.Set.prototype.keys!==S.Set.prototype.values&&h(S.Set.prototype,"keys",S.Set.prototype.values,!0),Me(Object.getPrototypeOf((new S.Map).keys())),Me(Object.getPrototypeOf((new S.Set).keys())),c&&"has"!==S.Set.prototype.has.name){var Tn=S.Set.prototype.has;ne(S.Set.prototype,"has",(function has(e){return t(Tn,this,e)}))}}b(S,rn),Ce(S.Map),Ce(S.Set)}var In=function throwUnlessTargetIsObject(e){if(!ce.TypeIsObject(e))throw new TypeError("target must be an object")},En={apply:function apply(){return ce.Call(ce.Call,null,arguments)},construct:function construct(e,t){if(!ce.IsConstructor(e))throw new TypeError("First argument must be a constructor.");var r=arguments.length>2?arguments[2]:e;if(!ce.IsConstructor(r))throw new TypeError("new.target must be a constructor.");return ce.Construct(e,t,r,"internal")},deleteProperty:function deleteProperty(e,t){if(In(e),s){var r=Object.getOwnPropertyDescriptor(e,t);if(r&&!r.configurable)return!1}return delete e[t]},has:function has(e,t){return In(e),t in e}};Object.getOwnPropertyNames&&Object.assign(En,{ownKeys:function ownKeys(e){In(e);var t=Object.getOwnPropertyNames(e);return ce.IsCallable(Object.getOwnPropertySymbols)&&x(t,Object.getOwnPropertySymbols(e)),t}});var Pn=function ConvertExceptionToBoolean(e){return!i(e)};if(Object.preventExtensions&&Object.assign(En,{isExtensible:function isExtensible(e){return In(e),Object.isExtensible(e)},preventExtensions:function preventExtensions(e){return In(e),Pn((function(){return Object.preventExtensions(e)}))}}),s){var Cn=function get(e,t,r){var n=Object.getOwnPropertyDescriptor(e,t);if(!n){var o=Object.getPrototypeOf(e);if(null===o)return;return Cn(o,t,r)}return"value"in n?n.value:n.get?ce.Call(n.get,r):void 0},Mn=function set(e,r,n,o){var i=Object.getOwnPropertyDescriptor(e,r),u;if(!i){var a=Object.getPrototypeOf(e);if(null!==a)return Mn(a,r,n,o);i={value:void 0,writable:!0,enumerable:!0,configurable:!0}}return"value"in i?!!i.writable&&(!!ce.TypeIsObject(o)&&(Object.getOwnPropertyDescriptor(o,r)?ae.defineProperty(o,r,{value:n}):ae.defineProperty(o,r,{value:n,writable:!0,enumerable:!0,configurable:!0}))):!!i.set&&(t(i.set,o,n),!0)};Object.assign(En,{defineProperty:function defineProperty(e,t,r){return In(e),Pn((function(){return Object.defineProperty(e,t,r)}))},getOwnPropertyDescriptor:function getOwnPropertyDescriptor(e,t){return In(e),Object.getOwnPropertyDescriptor(e,t)},get:function get(e,t){In(e);var r=arguments.length>2?arguments[2]:e;return Cn(e,t,r)},set:function set(e,t,r){In(e);var n=arguments.length>3?arguments[3]:e;return Mn(e,t,r,n)}})}if(Object.getPrototypeOf){var xn=Object.getPrototypeOf;En.getPrototypeOf=function getPrototypeOf(e){return In(e),xn(e)}}if(Object.setPrototypeOf&&En.getPrototypeOf){var Nn=function(e,t){for(var r=t;r;){if(e===r)return!0;r=En.getPrototypeOf(r)}return!1};Object.assign(En,{setPrototypeOf:function setPrototypeOf(e,t){if(In(e),null!==t&&!ce.TypeIsObject(t))throw new TypeError("proto must be an object or null");return t===ae.getPrototypeOf(e)||!(ae.isExtensible&&!ae.isExtensible(e))&&(!Nn(e,t)&&(Object.setPrototypeOf(e,t),!0))}})}var An=function(e,t){var r;ce.IsCallable(S.Reflect[e])?a((function(){return S.Reflect[e](1),S.Reflect[e](NaN),S.Reflect[e](!0),!0}))&&ne(S.Reflect,e,t):h(S.Reflect,e,t)};Object.keys(En).forEach((function(e){An(e,En[e])}));var Rn=S.Reflect.getPrototypeOf;if(c&&Rn&&"getPrototypeOf"!==Rn.name&&ne(S.Reflect,"getPrototypeOf",(function getPrototypeOf(e){return t(Rn,S.Reflect,e)})),S.Reflect.setPrototypeOf&&a((function(){return S.Reflect.setPrototypeOf(1,{}),!0}))&&ne(S.Reflect,"setPrototypeOf",En.setPrototypeOf),S.Reflect.defineProperty&&(a((function(){var e=!S.Reflect.defineProperty(1,"test",{value:1}),t="function"!=typeof Object.preventExtensions||!S.Reflect.defineProperty(Object.preventExtensions({}),"test",{});return e&&t}))||ne(S.Reflect,"defineProperty",En.defineProperty)),S.Reflect.construct&&(a((function(){var e=function F(){};return S.Reflect.construct((function(){}),[],e)instanceof e}))||ne(S.Reflect,"construct",En.construct)),"Invalid Date"!==String(new Date(NaN))){var _n=Date.prototype.toString,kn=function toString(){var e=+this;return e!=e?"Invalid Date":ce.Call(_n,this)};ne(Date.prototype,"toString",kn)}var Ln={anchor:function anchor(e){return ce.CreateHTML(this,"a","name",e)},big:function big(){return ce.CreateHTML(this,"big","","")},blink:function blink(){return ce.CreateHTML(this,"blink","","")},bold:function bold(){return ce.CreateHTML(this,"b","","")},fixed:function fixed(){return ce.CreateHTML(this,"tt","","")},fontcolor:function fontcolor(e){return ce.CreateHTML(this,"font","color",e)},fontsize:function fontsize(e){return ce.CreateHTML(this,"font","size",e)},italics:function italics(){return ce.CreateHTML(this,"i","","")},link:function link(e){return ce.CreateHTML(this,"a","href",e)},small:function small(){return ce.CreateHTML(this,"small","","")},strike:function strike(){return ce.CreateHTML(this,"strike","","")},sub:function sub(){return ce.CreateHTML(this,"sub","","")},sup:function sub(){return ce.CreateHTML(this,"sup","","")}};l(Object.keys(Ln),(function(e){var r=String.prototype[e],n=!1;if(ce.IsCallable(r)){var o=t(r,"",' " '),i=P([],o.match(/"/g)).length;n=o!==o.toLowerCase()||i>2}else n=!0;n&&ne(String.prototype,e,Ln[e])}));var Fn=function(){if(!oe)return!1;var e="object"==typeof JSON&&"function"==typeof JSON.stringify?JSON.stringify:null;if(!e)return!1;if(void 0!==e($()))return!0;if("[null]"!==e([$()]))return!0;var t={a:$()};return t[$()]=!0,"{}"!==e(t)}(),Dn=a((function(){return!oe||"{}"===JSON.stringify(Object($()))&&"[{}]"===JSON.stringify([Object($())])}));if(Fn||!Dn){var zn=JSON.stringify;ne(JSON,"stringify",(function stringify(e){if("symbol"!=typeof e){var n;arguments.length>1&&(n=arguments[1]);var o=[e];if(r(n))o.push(n);else{var i=ce.IsCallable(n)?n:null,a=function(e,r){var n=i?t(i,this,e,r):r;if("symbol"!=typeof n)return re.symbol(n)?Nt({})(n):n};o.push(a)}return arguments.length>2&&o.push(arguments[2]),zn.apply(this,o)}}))}return S})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).FormValidation={})}(this,(function(e){"use strict";function t(e){for(var t=e.length,n=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],r=0,a=0;t--;)a+=n[r][parseInt(e.charAt(t),10)],r=1-r;return a%10==0&&a>0}function n(e){for(var t=e.length,n=5,r=0;r1&&void 0!==arguments[1]?arguments[1]:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n=e.length,r=t.length,a=Math.floor(r/2),l=0;l1?t-1:0),r=1;r=0&&this.fns[e].splice(n,1)}},on:function(e,t){(this.fns[e]=this.fns[e]||[]).push(t)}}}function h(){return{filters:{},add:function(e,t){(this.filters[e]=this.filters[e]||[]).push(t)},clear:function(){this.filters={}},execute:function(e,t,n){if(!this.filters[e]||!this.filters[e].length)return t;for(var r=t,a=this.filters[e],l=a.length,i=0;i=0?s.options.item(o).value:"";case"input":if("radio"===a||"checkbox"===a){var i=r.filter((function(e){return e.checked})).length;return 0===i?"":i+""}return n.value;default:return""}}function A(e,t){var n=Array.isArray(t)?t:[t],r=e;return n.forEach((function(e){r=r.replace("%s",e)})),r}function b(){var e=function(e){return parseFloat("".concat(e).replace(",","."))};return{validate:function(t){var n=t.value;if(""===n)return{valid:!0};var r=Object.assign({},{inclusive:!0,message:""},t.options),a=e(r.min),l=e(r.max);return r.inclusive?{message:A(t.l10n?r.message||t.l10n.between.default:r.message,["".concat(a),"".concat(l)]),valid:parseFloat(n)>=a&&parseFloat(n)<=l}:{message:A(t.l10n?r.message||t.l10n.between.notInclusive:r.message,["".concat(a),"".concat(l)]),valid:parseFloat(n)>a&&parseFloat(n)parseInt(r,10));switch(!0){case!!n&&!!r:a=A(e.l10n?e.l10n.choice.between:e.options.message,[n,r]);break;case!!n:a=A(e.l10n?e.l10n.choice.more:e.options.message,n);break;case!!r:a=A(e.l10n?e.l10n.choice.less:e.options.message,r)}return{message:a,valid:l}}}}var H={AMERICAN_EXPRESS:{length:[15],prefix:["34","37"]},DANKORT:{length:[16],prefix:["5019"]},DINERS_CLUB:{length:[14],prefix:["300","301","302","303","304","305","36"]},DINERS_CLUB_US:{length:[16],prefix:["54","55"]},DISCOVER:{length:[16],prefix:["6011","622126","622127","622128","622129","62213","62214","62215","62216","62217","62218","62219","6222","6223","6224","6225","6226","6227","6228","62290","62291","622920","622921","622922","622923","622924","622925","644","645","646","647","648","649","65"]},ELO:{length:[16],prefix:["4011","4312","4389","4514","4573","4576","5041","5066","5067","509","6277","6362","6363","650","6516","6550"]},FORBRUGSFORENINGEN:{length:[16],prefix:["600722"]},JCB:{length:[16],prefix:["3528","3529","353","354","355","356","357","358"]},LASER:{length:[16,17,18,19],prefix:["6304","6706","6771","6709"]},MAESTRO:{length:[12,13,14,15,16,17,18,19],prefix:["5018","5020","5038","5868","6304","6759","6761","6762","6763","6764","6765","6766"]},MASTERCARD:{length:[16],prefix:["51","52","53","54","55"]},SOLO:{length:[16,18,19],prefix:["6334","6767"]},UNIONPAY:{length:[16,17,18,19],prefix:["622126","622127","622128","622129","62213","62214","62215","62216","62217","62218","62219","6222","6223","6224","6225","6226","6227","6228","62290","62291","622920","622921","622922","622923","622924","622925"]},VISA:{length:[16],prefix:["4"]},VISA_ELECTRON:{length:[16],prefix:["4026","417500","4405","4508","4844","4913","4917"]}};function y(){return{validate:function(e){if(""===e.value)return{meta:{type:null},valid:!0};if(/[^0-9-\s]+/.test(e.value))return{meta:{type:null},valid:!1};var n=e.value.replace(/\D/g,"");if(!t(n))return{meta:{type:null},valid:!1};for(var r=0,a=Object.keys(H);r9999||t<=0||t>12)return!1;var a;if(n<=0||n>[31,e%400==0||e%100!=0&&e%4==0?29:28,31,30,31,30,31,31,30,31,30,31][t-1])return!1;if(!0===r){var l=new Date,i=l.getFullYear(),o=l.getMonth(),s=l.getDate();return e1){var c=i[1].split(":");s.setHours(c.length>0?parseInt(c[0],10):0),s.setMinutes(c.length>1?parseInt(c[1],10):0),s.setSeconds(c.length>2?parseInt(c[2],10):0)}return s},t=function(e,t){var n=t.replace(/Y/g,"y").replace(/M/g,"m").replace(/D/g,"d").replace(/:m/g,":M").replace(/:mm/g,":MM").replace(/:S/,":s").replace(/:SS/,":ss"),r=e.getDate(),a=r<10?"0".concat(r):r,l=e.getMonth()+1,i=l<10?"0".concat(l):l,o="".concat(e.getFullYear()).substr(2),s=e.getFullYear(),c=e.getHours()%12||12,u=c<10?"0".concat(c):c,d=e.getHours(),f=d<10?"0".concat(d):d,m=e.getMinutes(),g=m<10?"0".concat(m):m,p=e.getSeconds(),h=p<10?"0".concat(p):p,v={H:"".concat(d),HH:"".concat(f),M:"".concat(m),MM:"".concat(g),d:"".concat(r),dd:"".concat(a),h:"".concat(c),hh:"".concat(u),m:"".concat(l),mm:"".concat(i),s:"".concat(p),ss:"".concat(h),yy:"".concat(o),yyyy:"".concat(s)};return n.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMs])\1?|"[^"]*"|'[^']*'/g,(function(e){return v[e]?v[e]:e.slice(1,e.length-1)}))};return{validate:function(n){if(""===n.value)return{meta:{date:null},valid:!0};var r=Object.assign({},{format:n.element&&"date"===n.element.getAttribute("type")?"YYYY-MM-DD":"MM/DD/YYYY",message:""},n.options),a=n.l10n?n.l10n.date.default:r.message,l={message:"".concat(a),meta:{date:null},valid:!1},i=r.format.split(" "),o=i.length>1?i[1]:null,s=i.length>2?i[2]:null,c=n.value.split(" "),u=c[0],d=c.length>1?c[1]:null;if(i.length!==c.length)return l;var f=r.separator||(-1!==u.indexOf("/")?"/":-1!==u.indexOf("-")?"-":-1!==u.indexOf(".")?".":"/");if(null===f||-1===u.indexOf(f))return l;var m=u.split(f),g=i[0].split(f);if(m.length!==g.length)return l;var p=m[g.indexOf("YYYY")],h=m[g.indexOf("MM")],v=m[g.indexOf("DD")];if(!/^\d+$/.test(p)||!/^\d+$/.test(h)||!/^\d+$/.test(v)||p.length>4||h.length>2||v.length>2)return l;var b=parseInt(p,10),E=parseInt(h,10),C=parseInt(v,10);if(!F(b,E,C))return l;var V=new Date(b,E-1,C);if(o){var S=d.split(":");if(o.split(":").length!==S.length)return l;var H=S.length>0?S[0].length<=2&&/^\d+$/.test(S[0])?parseInt(S[0],10):-1:0,y=S.length>1?S[1].length<=2&&/^\d+$/.test(S[1])?parseInt(S[1],10):-1:0,I=S.length>2?S[2].length<=2&&/^\d+$/.test(S[2])?parseInt(S[2],10):-1:0;if(-1===H||-1===y||-1===I)return l;if(I<0||I>60)return l;if(H<0||H>=24||s&&H>12)return l;if(y<0||y>59)return l;V.setHours(H),V.setMinutes(y),V.setSeconds(I)}var O="function"==typeof r.min?r.min():r.min,w=O instanceof Date?O:O?e(O,g,f):V,L="function"==typeof r.max?r.max():r.max,N=L instanceof Date?L:L?e(L,g,f):V,x=O instanceof Date?t(w,r.format):O,M=L instanceof Date?t(N,r.format):L;switch(!0){case!!x&&!M:return{message:A(n.l10n?n.l10n.date.min:a,x),meta:{date:V},valid:V.getTime()>=w.getTime()};case!!M&&!x:return{message:A(n.l10n?n.l10n.date.max:a,M),meta:{date:V},valid:V.getTime()<=N.getTime()};case!!M&&!!x:return{message:A(n.l10n?n.l10n.date.range:a,[x,M]),meta:{date:V},valid:V.getTime()<=N.getTime()&&V.getTime()>=w.getTime()};default:return{message:"".concat(a),meta:{date:V},valid:!0}}}}}function O(){return{validate:function(e){var t="function"==typeof e.options.compare?e.options.compare.call(this):e.options.compare;return{valid:""===t||e.value!==t}}}}function w(){return{validate:function(e){return{valid:""===e.value||/^\d+$/.test(e.value)}}}}function L(){var e=function(e,t){for(var n=e.split(/"/),r=n.length,a=[],l="",i=0;i()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,a;if(!0===n.multiple||"true"==="".concat(n.multiple)){for(var l=n.separator||/[,;]/,i=e(t.value,l),o=i.length,s=0;sparseInt("".concat(e.options.maxFiles),10))return{meta:{error:"INVALID_MAX_FILES"},valid:!1};if(e.options.minFiles&&iparseInt("".concat(e.options.maxSize),10))return{meta:Object.assign({},{error:"INVALID_MAX_SIZE"},s),valid:!1};if(n&&-1===n.indexOf(t.toLowerCase()))return{meta:Object.assign({},{error:"INVALID_EXTENSION"},s),valid:!1};if(l[c].type&&r&&-1===r.indexOf(l[c].type.toLowerCase()))return{meta:Object.assign({},{error:"INVALID_TYPE"},s),valid:!1}}if(e.options.maxTotalSize&&o>parseInt("".concat(e.options.maxTotalSize),10))return{meta:Object.assign({},{error:"INVALID_MAX_TOTAL_SIZE",totalSize:o},s),valid:!1};if(e.options.minTotalSize&&o=n}:{message:A(e.l10n?t.message||e.l10n.greaterThan.notInclusive:t.message,"".concat(n)),valid:parseFloat(e.value)>n}}}}function M(){return{validate:function(e){var t="function"==typeof e.options.compare?e.options.compare.call(this):e.options.compare;return{valid:""===t||e.value===t}}}}function T(){return{validate:function(e){if(""===e.value)return{valid:!0};var t=Object.assign({},{decimalSeparator:".",thousandsSeparator:""},e.options),n="."===t.decimalSeparator?"\\.":t.decimalSeparator,r="."===t.thousandsSeparator?"\\.":t.thousandsSeparator,a=new RegExp("^-?[0-9]{1,3}(".concat(r,"[0-9]{3})*(").concat(n,"[0-9]+)?$")),l=new RegExp(r,"g"),i="".concat(e.value);if(!a.test(i))return{valid:!1};r&&(i=i.replace(l,"")),n&&(i=i.replace(n,"."));var o=parseFloat(i);return{valid:!isNaN(o)&&isFinite(o)&&Math.floor(o)===o}}}}function k(){return{validate:function(e){if(""===e.value)return{valid:!0};var t=Object.assign({},{ipv4:!0,ipv6:!0},e.options),n=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/([0-9]|[1-2][0-9]|3[0-2]))?$/,r=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*(\/(\d|\d\d|1[0-1]\d|12[0-8]))?$/;switch(!0){case t.ipv4&&!t.ipv6:return{message:e.l10n?t.message||e.l10n.ip.ipv4:t.message,valid:n.test(e.value)};case!t.ipv4&&t.ipv6:return{message:e.l10n?t.message||e.l10n.ip.ipv6:t.message,valid:r.test(e.value)};case t.ipv4&&t.ipv6:default:return{message:e.l10n?t.message||e.l10n.ip.default:t.message,valid:n.test(e.value)||r.test(e.value)}}}}}function R(){return{validate:function(e){if(""===e.value)return{valid:!0};var t=Object.assign({},{inclusive:!0,message:""},e.options),n=parseFloat("".concat(t.max).replace(",","."));return t.inclusive?{message:A(e.l10n?t.message||e.l10n.lessThan.default:t.message,"".concat(n)),valid:parseFloat(e.value)<=n}:{message:A(e.l10n?t.message||e.l10n.lessThan.notInclusive:t.message,"".concat(n)),valid:parseFloat(e.value)=0;n--){var r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return"".concat(t)};return{validate:function(t){var n=Object.assign({},{message:"",trim:!1,utf8Bytes:!1},t.options),r=!0===n.trim||"true"==="".concat(n.trim)?t.value.trim():t.value;if(""===r)return{valid:!0};var a=n.min?"".concat(n.min):"",l=n.max?"".concat(n.max):"",i=n.utf8Bytes?e(r):r.length,o=!0,s=t.l10n?n.message||t.l10n.stringLength.default:n.message;switch((a&&iparseInt(l,10))&&(o=!1),!0){case!!a&&!!l:s=A(t.l10n?n.message||t.l10n.stringLength.between:n.message,[a,l]);break;case!!a:s=A(t.l10n?n.message||t.l10n.stringLength.more:n.message,"".concat(parseInt(a,10)-1));break;case!!l:s=A(t.l10n?n.message||t.l10n.stringLength.less:n.message,"".concat(parseInt(l,10)+1))}return{message:s,valid:o}}}}function J(){var e={allowEmptyProtocol:!1,allowLocal:!1,protocol:"http, https, ftp"};return{validate:function(t){if(""===t.value)return{valid:!0};var n=Object.assign({},e,t.options),r=!0===n.allowLocal||"true"==="".concat(n.allowLocal),a=!0===n.allowEmptyProtocol||"true"==="".concat(n.allowEmptyProtocol),l=n.protocol.split(",").join("|").replace(/\s/g,""),i;return{valid:new RegExp("^(?:(?:"+l+")://)"+(a?"?":"")+"(?:\\S+(?::\\S*)?@)?(?:"+(r?"":"(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})")+"(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-?)*[a-z\\u00a1-\\uffff0-9])*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))"+(r?"?":"")+")(?::\\d{2,5})?(?:/[^\\s]*)?$","i").test(t.value)}}}}function W(){return{validate:function(e){return{valid:""===e.value||/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$/.test(e.value)}}}}function z(){return{validate:function(e){return{valid:""===e.value||/^[a-zA-Z]{6}[a-zA-Z0-9]{2}([a-zA-Z0-9]{3})?$/.test(e.value)}}}}function _(){var e=["hex","rgb","rgba","hsl","hsla","keyword"],t=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","transparent","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],n=function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},r=function(e){return/^hsl\((\s*(-?\d+)\s*,)(\s*(\b(0?\d{1,2}|100)\b%)\s*,)(\s*(\b(0?\d{1,2}|100)\b%)\s*)\)$/.test(e)},a=function(e){return/^hsla\((\s*(-?\d+)\s*,)(\s*(\b(0?\d{1,2}|100)\b%)\s*,){2}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(e)},l=function(e){return t.indexOf(e)>=0},i=function(e){return/^rgb\((\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*,){2}(\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*)\)$/.test(e)||/^rgb\((\s*(\b(0?\d{1,2}|100)\b%)\s*,){2}(\s*(\b(0?\d{1,2}|100)\b%)\s*)\)$/.test(e)},o=function(e){return/^rgba\((\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*,){3}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(e)||/^rgba\((\s*(\b(0?\d{1,2}|100)\b%)\s*,){3}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(e)};return{validate:function(t){if(""===t.value)return{valid:!0};var s="string"==typeof t.options.type?t.options.type.toString().replace(/s/g,"").split(","):t.options.type||e,c=!0,u=!1,d=void 0;try{for(var f=s[Symbol.iterator](),m;!(c=(m=f.next()).done);c=!0){var g,p=m.value.toLowerCase();if(-1!==e.indexOf(p)){var h=!0;switch(p){case"hex":h=n(t.value);break;case"hsl":h=r(t.value);break;case"hsla":h=a(t.value);break;case"keyword":h=l(t.value);break;case"rgb":h=i(t.value);break;case"rgba":h=o(t.value)}if(h)return{valid:!0}}}}catch(e){u=!0,d=e}finally{try{!c&&null!=f.return&&f.return()}finally{if(u)throw d}}return{valid:!1}}}}function X(){return{validate:function(e){if(""===e.value)return{valid:!0};var t=e.value.toUpperCase();if(!/^[0-9A-Z]{9}$/.test(t))return{valid:!1};for(var n=t.split("").map((function(e){var t=e.charCodeAt(0);return t>=65&&t<=90?t-65+10+"":e})),r=n.length,a=0,l=0;l9&&(i-=9),a+=i}return{valid:(a=(10-a%10)%10)===parseInt(n[r-1],10)}}}}function Q(){return{validate:function(e){if(""===e.value)return{valid:!0};if(!/^(\d{8}|\d{12}|\d{13}|\d{14})$/.test(e.value))return{valid:!1};for(var t=e.value.length,n=0,r=8===t?[3,1]:[1,3],a=0;a=65&&t<=90?t-65+10:e})).join("");for(var s=parseInt(a.substr(0,1),10),c=a.length,u=1;u31||r>12)return!1;for(var i=0,o=0;o<6;o++)i+=(7-o)*(parseInt(e.charAt(o),10)+parseInt(e.charAt(o+6),10));if((10===(i=11-i%11)||11===i)&&(i=0),i!==l)return!1;switch(t.toUpperCase()){case"BA":return 10<=a&&a<=19;case"MK":return 41<=a&&a<=49;case"ME":return 20<=a&&a<=29;case"RS":return 70<=a&&a<=99;case"SI":return 50<=a&&a<=59;default:return!0}}function re(e){return{meta:{},valid:ne(e,"BA")}}function ae(e){if(!/^\d{10}$/.test(e)&&!/^\d{6}\s\d{3}\s\d{1}$/.test(e))return{meta:{},valid:!1};var t=e.replace(/\s/g,""),n=parseInt(t.substr(0,2),10)+1900,r=parseInt(t.substr(2,2),10),a;if(r>40?(n+=100,r-=40):r>20&&(n-=100,r-=20),!F(n,r,parseInt(t.substr(4,2),10)))return{meta:{},valid:!1};for(var l=0,i=[2,4,8,5,10,9,7,3,6],o=0;o<9;o++)l+=parseInt(t.charAt(o),10)*i[o];return{meta:{},valid:"".concat(l=l%11%10)===t.substr(9,1)}}function le(e){var t=e.replace(/\D/g,"");if(!/^\d{11}$/.test(t)||/^1{11}|2{11}|3{11}|4{11}|5{11}|6{11}|7{11}|8{11}|9{11}|0{11}$/.test(t))return{meta:{},valid:!1};var n=0,r;for(r=0;r<9;r++)n+=(10-r)*parseInt(t.charAt(r),10);if((10===(n=11-n%11)||11===n)&&(n=0),"".concat(n)!==t.charAt(9))return{meta:{},valid:!1};var a=0;for(r=0;r<10;r++)a+=(11-r)*parseInt(t.charAt(r),10);return(10===(a=11-a%11)||11===a)&&(a=0),{meta:{},valid:"".concat(a)===t.charAt(10)}}function ie(e){if(!/^756[\.]{0,1}[0-9]{4}[\.]{0,1}[0-9]{4}[\.]{0,1}[0-9]{2}$/.test(e))return{meta:{},valid:!1};for(var t=e.replace(/\D/g,"").substr(3),n=t.length,r=8===n?[3,1]:[1,3],a=0,l=0;l=0;l--)a+=parseInt(t.charAt(l),10)*r[l];return(a%=11)>=2&&(a=11-a),{meta:{},valid:"".concat(a)===t.substr(n-1)}}function ue(e){if(!/^\d{9,10}$/.test(e))return{meta:{},valid:!1};var t=1900+parseInt(e.substr(0,2),10),n=parseInt(e.substr(2,2),10)%50%20,r=parseInt(e.substr(4,2),10);if(9===e.length){if(t>=1980&&(t-=100),t>1953)return{meta:{},valid:!1}}else t<1954&&(t+=100);if(!F(t,n,r))return{meta:{},valid:!1};if(10===e.length){var a=parseInt(e.substr(0,9),10)%11;return t<1985&&(a%=10),{meta:{},valid:"".concat(a)===e.substr(9,1)}}return{meta:{},valid:!0}}function de(e){if(!/^[0-9]{6}[-]{0,1}[0-9]{4}$/.test(e))return{meta:{},valid:!1};var t=e.replace(/-/g,""),n=parseInt(t.substr(0,2),10),r=parseInt(t.substr(2,2),10),a=parseInt(t.substr(4,2),10);switch(!0){case-1!=="5678".indexOf(t.charAt(6))&&a>=58:a+=1800;break;case-1!=="0123".indexOf(t.charAt(6)):case-1!=="49".indexOf(t.charAt(6))&&a>=37:a+=1900;break;default:a+=2e3}return{meta:{},valid:F(a,r,n)}}function fe(e){var t=/^[0-9]{8}[-]{0,1}[A-HJ-NP-TV-Z]$/.test(e),n=/^[XYZ][-]{0,1}[0-9]{7}[-]{0,1}[A-HJ-NP-TV-Z]$/.test(e),r=/^[A-HNPQS][-]{0,1}[0-9]{7}[-]{0,1}[0-9A-J]$/.test(e);if(!t&&!n&&!r)return{meta:{},valid:!1};var a=e.replace(/-/g,""),l,i,o=!0;if(t||n){i="DNI";var s="XYZ".indexOf(a.charAt(0));return-1!==s&&(a=s+a.substr(1)+"",i="NIE"),{meta:{type:i},valid:(l="TRWAGMYFPDXBNJZSQVHLCKE"[(l=parseInt(a.substr(0,8),10))%23])===a.substr(8,1)}}l=a.substr(1,7),i="CIF";for(var c=a[0],u=a.substr(-1),d=0,f=0;f=0)return{meta:{},valid:!1};var a=parseInt(t.substr(4,2),10),l=parseInt(t.substr(6,2),10),i=parseInt(t.substr(6,2),10);if(/^[0-9]$/.test(t.charAt(16))?a+=1900:a+=2e3,!F(a,l,i))return{meta:{},valid:!1};var o=t.charAt(10);if("H"!==o&&"M"!==o)return{meta:{},valid:!1};var s=t.substr(11,2),c;if(-1===["AS","BC","BS","CC","CH","CL","CM","CS","DF","DG","GR","GT","HG","JC","MC","MN","MS","NE","NL","NT","OC","PL","QR","QT","SL","SP","SR","TC","TL","TS","VZ","YN","ZS"].indexOf(s))return{meta:{},valid:!1};for(var u="0123456789ABCDEFGHIJKLMN&OPQRSTUVWXYZ",d=0,f=t.length,m=0;m31&&r>12)return{meta:{},valid:!1};if(9!==t&&!F(n={1:1900,2:1900,3:1800,4:1800,5:2e3,6:2e3}[t+""]+n,r,a))return{meta:{},valid:!1};for(var i=0,o=[2,7,9,1,4,6,3,5,8,2,7,9],s=e.length,c=0;c0&&(n=10-n),{meta:{},valid:"".concat(n)===e.charAt(7)}}function De(e){if(!/^[0-9]{10}[0|1][8|9][0-9]$/.test(e))return{meta:{},valid:!1};var n=parseInt(e.substr(0,2),10),r,a,l;return F(n=n>=new Date.getFullYear%100?n+1900:n+2e3,parseInt(e.substr(2,2),10),parseInt(e.substr(4,2),10))?{meta:{},valid:t(e)}:{meta:{},valid:!1}}function Ke(){var e=["AR","BA","BG","BR","CH","CL","CN","CO","CZ","DK","EE","ES","FI","FR","HK","HR","ID","IE","IL","IS","KR","LT","LV","ME","MK","MX","MY","NL","NO","PE","PL","RO","RS","SE","SI","SK","SM","TH","TR","TW","UY","ZA"];return{validate:function(t){if(""===t.value)return{valid:!0};var n=Object.assign({},{message:""},t.options),r=t.value.substr(0,2);if(r="function"==typeof n.country?n.country.call(this):n.country,-1===e.indexOf(r))return{valid:!0};var a={meta:{},valid:!0};switch(r.toLowerCase()){case"ar":a=te(t.value);break;case"ba":a=re(t.value);break;case"bg":a=ae(t.value);break;case"br":a=le(t.value);break;case"ch":a=ie(t.value);break;case"cl":a=oe(t.value);break;case"cn":a=se(t.value);break;case"co":a=ce(t.value);break;case"cz":a=ue(t.value);break;case"dk":a=de(t.value);break;case"ee":a=Ve(t.value);break;case"es":a=fe(t.value);break;case"fi":a=me(t.value);break;case"fr":a=ge(t.value);break;case"hk":a=pe(t.value);break;case"hr":a=he(t.value);break;case"id":a=ve(t.value);break;case"ie":a=Ae(t.value);break;case"il":a=be(t.value);break;case"is":a=Ee(t.value);break;case"kr":a=Ce(t.value);break;case"lt":a=Ve(t.value);break;case"lv":a=Se(t.value);break;case"me":a=He(t.value);break;case"mk":a=ye(t.value);break;case"mx":a=Fe(t.value);break;case"my":a=Ie(t.value);break;case"nl":a=Oe(t.value);break;case"no":a=we(t.value);break;case"pe":a=Le(t.value);break;case"pl":a=Ne(t.value);break;case"ro":a=xe(t.value);break;case"rs":a=Me(t.value);break;case"se":a=Te(t.value);break;case"si":a=ke(t.value);break;case"sk":a=ue(t.value);break;case"sm":a=Re(t.value);break;case"th":a=Be(t.value);break;case"tr":a=Ze(t.value);break;case"tw":a=Ge(t.value);break;case"uy":a=Pe(t.value);break;case"za":a=De(t.value)}var l=A(t.l10n?n.message||t.l10n.id.country:n.message,t.l10n?t.l10n.id.countries[r.toUpperCase()]:r.toUpperCase());return Object.assign({},{message:l},a)}}}function Ue(){return{validate:function(e){if(""===e.value)return{valid:!0};switch(!0){case/^\d{15}$/.test(e.value):case/^\d{2}-\d{6}-\d{6}-\d{1}$/.test(e.value):case/^\d{2}\s\d{6}\s\d{6}\s\d{1}$/.test(e.value):var n;return{valid:t(e.value.replace(/[^0-9]/g,""))};case/^\d{14}$/.test(e.value):case/^\d{16}$/.test(e.value):case/^\d{2}-\d{6}-\d{6}(|-\d{2})$/.test(e.value):case/^\d{2}\s\d{6}\s\d{6}(|\s\d{2})$/.test(e.value):return{valid:!0};default:return{valid:!1}}}}}function Ye(){return{validate:function(e){if(""===e.value)return{valid:!0};if(!/^IMO \d{7}$/i.test(e.value))return{valid:!1};for(var t=e.value.replace(/^.*(\d{7})$/,"$1"),n=0,r=6;r>=1;r--)n+=parseInt(t.slice(6-r,-r),10)*(r+1);return{valid:n%10===parseInt(t.charAt(6),10)}}}}function Je(){return{validate:function(e){if(""===e.value)return{meta:{type:null},valid:!0};var t;switch(!0){case/^\d{9}[\dX]$/.test(e.value):case 13===e.value.length&&/^(\d+)-(\d+)-(\d+)-([\dX])$/.test(e.value):case 13===e.value.length&&/^(\d+)\s(\d+)\s(\d+)\s([\dX])$/.test(e.value):t="ISBN10";break;case/^(978|979)\d{9}[\dX]$/.test(e.value):case 17===e.value.length&&/^(978|979)-(\d+)-(\d+)-(\d+)-([\dX])$/.test(e.value):case 17===e.value.length&&/^(978|979)\s(\d+)\s(\d+)\s(\d+)\s([\dX])$/.test(e.value):t="ISBN13";break;default:return{meta:{type:null},valid:!1}}var n=e.value.replace(/[^0-9X]/gi,"").split(""),r=n.length,a=0,l,i;switch(t){case"ISBN10":for(a=0,l=0;l57?(o-55).toString():n.charAt(i)}var s="",c=l.length,u=c%2!=0?0:1;for(i=0;i9&&(r-=9)),n+=r;return{valid:n%10==0}}}}function nt(){var e=function(e,t){var n=Math.pow(10,t),r=e*n,a,l;switch(!0){case 0===r:a=0;break;case r>0:a=1;break;case r<0:a=-1}return r%1==.5*a?(Math.floor(r)+(a>0?1:0))/n:Math.round(r)/n},t=function(t,n){if(0===n)return 1;var r="".concat(t).split("."),a="".concat(n).split("."),l=(1===r.length?0:r[1].length)+(1===a.length?0:a[1].length);return e(t-n*Math.floor(t/n),l)};return{validate:function(e){if(""===e.value)return{valid:!0};var n=parseFloat(e.value);if(isNaN(n)||!isFinite(n))return{valid:!1};var r=Object.assign({},{baseValue:0,message:"",step:1},e.options),a=t(n-r.baseValue,r.step);return{message:A(e.l10n?r.message||e.l10n.step.default:r.message,"".concat(r.step)),valid:0===a||a===r.step}}}}function rt(){return{validate:function(e){if(""===e.value)return{valid:!0};var t=Object.assign({},{message:""},e.options),n={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i},r=t.version?"".concat(t.version):"all";return{message:t.version?A(e.l10n?t.message||e.l10n.uuid.version:t.message,t.version):e.l10n?e.l10n.uuid.default:t.message,valid:null===n[r]||n[r].test(e.value)}}}}function at(e){var t=e.replace("-","");if(/^AR[0-9]{11}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{11}$/.test(t))return{meta:{},valid:!1};for(var n=[5,4,3,2,7,6,5,4,3,2],r=0,a=0;a<10;a++)r+=parseInt(t.charAt(a),10)*n[a];return 11===(r=11-r%11)&&(r=0),{meta:{},valid:"".concat(r)===t.substr(10)}}function lt(e){var t=e;if(/^ATU[0-9]{8}$/.test(t)&&(t=t.substr(2)),!/^U[0-9]{8}$/.test(t))return{meta:{},valid:!1};t=t.substr(1);for(var n=[1,2,1,2,1,2,1],r=0,a=0,l=0;l<7;l++)(a=parseInt(t.charAt(l),10)*n[l])>9&&(a=Math.floor(a/10)+a%10),r+=a;return 10===(r=10-(r+4)%10)&&(r=0),{meta:{},valid:"".concat(r)===t.substr(7,1)}}function it(e){var t=e,n;return/^BE[0]?[0-9]{9}$/.test(t)&&(t=t.substr(2)),/^[0]?[0-9]{9}$/.test(t)?(9===t.length&&(t="0".concat(t)),"0"===t.substr(1,1)?{meta:{},valid:!1}:{meta:{},valid:(parseInt(t.substr(0,8),10)+parseInt(t.substr(8,2),10))%97==0}):{meta:{},valid:!1}}function ot(e){var t=e;if(/^BG[0-9]{9,10}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{9,10}$/.test(t))return{meta:{},valid:!1};var n=0,r=0;if(9===t.length){for(r=0;r<8;r++)n+=parseInt(t.charAt(r),10)*(r+1);if(10===(n%=11))for(n=0,r=0;r<8;r++)n+=parseInt(t.charAt(r),10)*(r+3);return{meta:{},valid:"".concat(n%=10)===t.substr(8)}}var a=function(e){var t=parseInt(e.substr(0,2),10)+1900,n=parseInt(e.substr(2,2),10),r;if(n>40?(t+=100,n-=40):n>20&&(t-=100,n-=20),!F(t,n,parseInt(e.substr(4,2),10)))return!1;for(var a=[2,4,8,5,10,9,7,3,6],l=0,i=0;i<9;i++)l+=parseInt(e.charAt(i),10)*a[i];return"".concat(l=l%11%10)===e.substr(9,1)},l=function(e){for(var t=[21,19,17,13,11,9,7,3,1],n=0,r=0;r<9;r++)n+=parseInt(e.charAt(r),10)*t[r];return"".concat(n%=10)===e.substr(9,1)},i=function(e){for(var t=[4,3,2,7,6,5,4,3,2],n=0,r=0;r<9;r++)n+=parseInt(e.charAt(r),10)*t[r];return 10!=(n=11-n%11)&&(11===n&&(n=0),"".concat(n)===e.substr(9,1))};return{meta:{},valid:a(t)||l(t)||i(t)}}function st(e){if(""===e)return{meta:{},valid:!0};var t=e.replace(/[^\d]+/g,"");if(""===t||14!==t.length)return{meta:{},valid:!1};if("00000000000000"===t||"11111111111111"===t||"22222222222222"===t||"33333333333333"===t||"44444444444444"===t||"55555555555555"===t||"66666666666666"===t||"77777777777777"===t||"88888888888888"===t||"99999999999999"===t)return{meta:{},valid:!1};var n=t.length-2,r=t.substring(0,n),a=t.substring(n),l=0,i=n-7,o;for(o=n;o>=1;o--)l+=parseInt(r.charAt(n-o),10)*i--,i<2&&(i=9);var s=l%11<2?0:11-l%11;if(s!==parseInt(a.charAt(0),10))return{meta:{},valid:!1};for(n+=1,r=t.substring(0,n),l=0,i=n-7,o=n;o>=1;o--)l+=parseInt(r.charAt(n-o),10)*i--,i<2&&(i=9);return{meta:{},valid:(s=l%11<2?0:11-l%11)===parseInt(a.charAt(1),10)}}function ct(e){var t=e;if(/^CHE[0-9]{9}(MWST|TVA|IVA|TPV)?$/.test(t)&&(t=t.substr(2)),!/^E[0-9]{9}(MWST|TVA|IVA|TPV)?$/.test(t))return{meta:{},valid:!1};t=t.substr(1);for(var n=[5,4,3,2,7,6,5,4],r=0,a=0;a<8;a++)r+=parseInt(t.charAt(a),10)*n[a];return 10===(r=11-r%11)?{meta:{},valid:!1}:(11===r&&(r=0),{meta:{},valid:"".concat(r)===t.substr(8,1)})}function ut(e){var t=e;if(/^CY[0-5|9][0-9]{7}[A-Z]$/.test(t)&&(t=t.substr(2)),!/^[0-5|9][0-9]{7}[A-Z]$/.test(t))return{meta:{},valid:!1};if("12"===t.substr(0,2))return{meta:{},valid:!1};for(var n=0,r={0:1,1:0,2:5,3:7,4:9,5:13,6:15,7:17,8:19,9:21},a=0;a<8;a++){var l=parseInt(t.charAt(a),10);a%2==0&&(l=r["".concat(l)]),n+=l}return{meta:{},valid:"".concat("ABCDEFGHIJKLMNOPQRSTUVWXYZ"[n%26])===t.substr(8,1)}}function dt(e){var t=e;if(/^CZ[0-9]{8,10}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{8,10}$/.test(t))return{meta:{},valid:!1};var n=0,r=0;if(8===t.length){if("9"==="".concat(t.charAt(0)))return{meta:{},valid:!1};for(n=0,r=0;r<7;r++)n+=parseInt(t.charAt(r),10)*(8-r);return 10===(n=11-n%11)&&(n=0),11===n&&(n=1),{meta:{},valid:"".concat(n)===t.substr(7,1)}}if(9===t.length&&"6"==="".concat(t.charAt(0))){for(n=0,r=0;r<7;r++)n+=parseInt(t.charAt(r+1),10)*(8-r);return 10===(n=11-n%11)&&(n=0),11===n&&(n=1),{meta:{},valid:"".concat(n=[8,7,6,5,4,3,2,1,0,9,10][n-1])===t.substr(8,1)}}if(9===t.length||10===t.length){var a=1900+parseInt(t.substr(0,2),10),l=parseInt(t.substr(2,2),10)%50%20,i=parseInt(t.substr(4,2),10);if(9===t.length){if(a>=1980&&(a-=100),a>1953)return{meta:{},valid:!1}}else a<1954&&(a+=100);if(!F(a,l,i))return{meta:{},valid:!1};if(10===t.length){var o=parseInt(t.substr(0,9),10)%11;return a<1985&&(o%=10),{meta:{},valid:"".concat(o)===t.substr(9,1)}}return{meta:{},valid:!0}}return{meta:{},valid:!1}}function ft(e){var t=e;return/^DE[0-9]{9}$/.test(t)&&(t=t.substr(2)),/^[0-9]{9}$/.test(t)?{meta:{},valid:n(t)}:{meta:{},valid:!1}}function mt(e){var t=e;if(/^DK[0-9]{8}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{8}$/.test(t))return{meta:{},valid:!1};for(var n=0,r=[2,7,6,5,4,3,2,1],a=0;a<8;a++)n+=parseInt(t.charAt(a),10)*r[a];return{meta:{},valid:n%11==0}}function gt(e){var t=e;if(/^EE[0-9]{9}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{9}$/.test(t))return{meta:{},valid:!1};for(var n=0,r=[3,7,1,3,7,1,3,7,1],a=0;a<9;a++)n+=parseInt(t.charAt(a),10)*r[a];return{meta:{},valid:n%10==0}}function pt(e){var t=e;if(/^ES[0-9A-Z][0-9]{7}[0-9A-Z]$/.test(t)&&(t=t.substr(2)),!/^[0-9A-Z][0-9]{7}[0-9A-Z]$/.test(t))return{meta:{},valid:!1};var n=function(e){var t=parseInt(e.substr(0,8),10);return"".concat("TRWAGMYFPDXBNJZSQVHLCKE"[t%23])===e.substr(8,1)},r=function(e){var t=["XYZ".indexOf(e.charAt(0)),e.substr(1)].join(""),n="TRWAGMYFPDXBNJZSQVHLCKE"[parseInt(t,10)%23];return"".concat(n)===e.substr(8,1)},a=function(e){var t=e.charAt(0),n;if(-1!=="KLM".indexOf(t))return n=parseInt(e.substr(1,8),10),"".concat(n="TRWAGMYFPDXBNJZSQVHLCKE"[n%23])===e.substr(8,1);if(-1!=="ABCDEFGHJNPQRSUVW".indexOf(t)){for(var r=[2,1,2,1,2,1,2],a=0,l=0,i=0;i<7;i++)(l=parseInt(e.charAt(i+1),10)*r[i])>9&&(l=Math.floor(l/10)+l%10),a+=l;return 10===(a=10-a%10)&&(a=0),"".concat(a)===e.substr(8,1)||"JABCDEFGHI"[a]===e.substr(8,1)}return!1},l=t.charAt(0);return/^[0-9]$/.test(l)?{meta:{type:"DNI"},valid:n(t)}:/^[XYZ]$/.test(l)?{meta:{type:"NIE"},valid:r(t)}:{meta:{type:"CIF"},valid:a(t)}}function ht(e){var t=e;if(/^FI[0-9]{8}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{8}$/.test(t))return{meta:{},valid:!1};for(var n=[7,9,10,5,8,4,2,1],r=0,a=0;a<8;a++)r+=parseInt(t.charAt(a),10)*n[a];return{meta:{},valid:r%11==0}}function vt(e){var n=e;if(/^FR[0-9A-Z]{2}[0-9]{9}$/.test(n)&&(n=n.substr(2)),!/^[0-9A-Z]{2}[0-9]{9}$/.test(n))return{meta:{},valid:!1};if(!t(n.substr(2)))return{meta:{},valid:!1};if(/^[0-9]{2}$/.test(n.substr(0,2)))return{meta:{},valid:n.substr(0,2)==="".concat(parseInt(n.substr(2)+"12",10)%97)};var r="0123456789ABCDEFGHJKLMNPQRSTUVWXYZ",a;return a=/^[0-9]$/.test(n.charAt(0))?24*r.indexOf(n.charAt(0))+r.indexOf(n.charAt(1))-10:34*r.indexOf(n.charAt(0))+r.indexOf(n.charAt(1))-100,{meta:{},valid:(parseInt(n.substr(2),10)+1+Math.floor(a/11))%11==a%11}}function At(e){var t=e;if((/^GB[0-9]{9}$/.test(t)||/^GB[0-9]{12}$/.test(t)||/^GBGD[0-9]{3}$/.test(t)||/^GBHA[0-9]{3}$/.test(t)||/^GB(GD|HA)8888[0-9]{5}$/.test(t))&&(t=t.substr(2)),!(/^[0-9]{9}$/.test(t)||/^[0-9]{12}$/.test(t)||/^GD[0-9]{3}$/.test(t)||/^HA[0-9]{3}$/.test(t)||/^(GD|HA)8888[0-9]{5}$/.test(t)))return{meta:{},valid:!1};var n=t.length;if(5===n){var r=t.substr(0,2),a=parseInt(t.substr(2),10);return{meta:{},valid:"GD"===r&&a<500||"HA"===r&&a>=500}}if(11===n&&("GD8888"===t.substr(0,6)||"HA8888"===t.substr(0,6)))return"GD"===t.substr(0,2)&&parseInt(t.substr(6,3),10)>=500||"HA"===t.substr(0,2)&&parseInt(t.substr(6,3),10)<500?{meta:{},valid:!1}:{meta:{},valid:parseInt(t.substr(6,3),10)%97===parseInt(t.substr(9,2),10)};if(9===n||12===n){for(var l=[8,7,6,5,4,3,2,10,1],i=0,o=0;o<9;o++)i+=parseInt(t.charAt(o),10)*l[o];var s;return i%=97,{meta:{},valid:parseInt(t.substr(0,3),10)>=100?0===i||42===i||55===i:0===i}}return{meta:{},valid:!0}}function bt(e){var t=e;if(/^(GR|EL)[0-9]{9}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{9}$/.test(t))return{meta:{},valid:!1};8===t.length&&(t="0".concat(t));for(var n=[256,128,64,32,16,8,4,2],r=0,a=0;a<8;a++)r+=parseInt(t.charAt(a),10)*n[a];return{meta:{},valid:"".concat(r=r%11%10)===t.substr(8,1)}}function Et(e){var t=e;return/^HR[0-9]{11}$/.test(t)&&(t=t.substr(2)),/^[0-9]{11}$/.test(t)?{meta:{},valid:n(t)}:{meta:{},valid:!1}}function Ct(e){var t=e;if(/^HU[0-9]{8}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{8}$/.test(t))return{meta:{},valid:!1};for(var n=[9,7,3,1,9,7,3,1],r=0,a=0;a<8;a++)r+=parseInt(t.charAt(a),10)*n[a];return{meta:{},valid:r%10==0}}function Vt(e){var t=e;if(/^IE[0-9][0-9A-Z\*\+][0-9]{5}[A-Z]{1,2}$/.test(t)&&(t=t.substr(2)),!/^[0-9][0-9A-Z\*\+][0-9]{5}[A-Z]{1,2}$/.test(t))return{meta:{},valid:!1};var n=function(e){for(var t=e;t.length<7;)t="0".concat(t);for(var n="WABCDEFGHIJKLMNOPQRSTUV",r=0,a=0;a<7;a++)r+=parseInt(t.charAt(a),10)*(8-a);return r+=9*n.indexOf(t.substr(7)),n[r%23]};return/^[0-9]+$/.test(t.substr(0,7))?{meta:{},valid:t.charAt(7)===n("".concat(t.substr(0,7)).concat(t.substr(8)))}:-1!=="ABCDEFGHIJKLMNOPQRSTUVWXYZ+*".indexOf(t.charAt(1))?{meta:{},valid:t.charAt(7)===n("".concat(t.substr(2,5)).concat(t.substr(0,1)))}:{meta:{},valid:!0}}function St(e){var t=e;return/^IS[0-9]{5,6}$/.test(t)&&(t=t.substr(2)),{meta:{},valid:/^[0-9]{5,6}$/.test(t)}}function Ht(e){var n=e;if(/^IT[0-9]{11}$/.test(n)&&(n=n.substr(2)),!/^[0-9]{11}$/.test(n))return{meta:{},valid:!1};if(0===parseInt(n.substr(0,7),10))return{meta:{},valid:!1};var r=parseInt(n.substr(7,3),10);return r<1||r>201&&999!==r&&888!==r?{meta:{},valid:!1}:{meta:{},valid:t(n)}}function yt(e){var t=e;if(/^LT([0-9]{7}1[0-9]|[0-9]{10}1[0-9])$/.test(t)&&(t=t.substr(2)),!/^([0-9]{7}1[0-9]|[0-9]{10}1[0-9])$/.test(t))return{meta:{},valid:!1};var n=t.length,r=0,a;for(a=0;a3){for(a=0,l=[9,1,4,8,3,10,2,5,7,6,1],i=0;i9&&(r=0),{meta:{},valid:"".concat(r)===t.substr(8,1)}}function Lt(e){var t=e;if(/^NO[0-9]{9}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{9}$/.test(t))return{meta:{},valid:!1};for(var n=[3,2,7,6,5,4,3,2],r=0,a=0;a<8;a++)r+=parseInt(t.charAt(a),10)*n[a];return 11===(r=11-r%11)&&(r=0),{meta:{},valid:"".concat(r)===t.substr(8,1)}}function Nt(e){var t=e;if(/^PL[0-9]{10}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{10}$/.test(t))return{meta:{},valid:!1};for(var n=[6,5,7,2,3,4,5,6,7,-1],r=0,a=0;a<10;a++)r+=parseInt(t.charAt(a),10)*n[a];return{meta:{},valid:r%11==0}}function xt(e){var t=e;if(/^PT[0-9]{9}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{9}$/.test(t))return{meta:{},valid:!1};for(var n=[9,8,7,6,5,4,3,2],r=0,a=0;a<8;a++)r+=parseInt(t.charAt(a),10)*n[a];return(r=11-r%11)>9&&(r=0),{meta:{},valid:"".concat(r)===t.substr(8,1)}}function Mt(e){var t=e;if(/^RO[1-9][0-9]{1,9}$/.test(t)&&(t=t.substr(2)),!/^[1-9][0-9]{1,9}$/.test(t))return{meta:{},valid:!1};for(var n=t.length,r=[7,5,3,2,1,7,5,3,2].slice(10-n),a=0,l=0;l9&&(a%=10),{meta:{},valid:"".concat(a)===t.substr(9,1)}}if(12===t.length){var l=[7,2,4,10,3,5,9,4,6,8,0],i=[3,7,2,4,10,3,5,9,4,6,8,0],o=0,s=0;for(n=0;n<11;n++)o+=parseInt(t.charAt(n),10)*l[n],s+=parseInt(t.charAt(n),10)*i[n];return(o%=11)>9&&(o%=10),(s%=11)>9&&(s%=10),{meta:{},valid:"".concat(o)===t.substr(10,1)&&"".concat(s)===t.substr(11,1)}}return{meta:{},valid:!0}}function Rt(e){var n=e;return/^SE[0-9]{10}01$/.test(n)&&(n=n.substr(2)),/^[0-9]{10}01$/.test(n)?{meta:{},valid:t(n=n.substr(0,10))}:{meta:{},valid:!1}}function Bt(e){var t=e.match(/^(SI)?([1-9][0-9]{7})$/);if(!t)return{meta:{},valid:!1};for(var n=t[1]?e.substr(2):e,r=[8,7,6,5,4,3,2],a=0,l=0;l<7;l++)a+=parseInt(n.charAt(l),10)*r[l];return 10===(a=11-a%11)&&(a=0),{meta:{},valid:"".concat(a)===n.substr(7,1)}}function Zt(e){var t=e;return/^SK[1-9][0-9][(2-4)|(6-9)][0-9]{7}$/.test(t)&&(t=t.substr(2)),/^[1-9][0-9][(2-4)|(6-9)][0-9]{7}$/.test(t)?{meta:{},valid:parseInt(t,10)%11==0}:{meta:{},valid:!1}}function Gt(e){var t=e;if(/^VE[VEJPG][0-9]{9}$/.test(t)&&(t=t.substr(2)),!/^[VEJPG][0-9]{9}$/.test(t))return{meta:{},valid:!1};for(var n,r=[3,2,7,6,5,4,3,2],a={E:8,G:20,J:12,P:16,V:4}[t.charAt(0)],l=0;l<8;l++)a+=parseInt(t.charAt(l+1),10)*r[l];return(11===(a=11-a%11)||10===a)&&(a=0),{meta:{},valid:"".concat(a)===t.substr(9,1)}}function Pt(e){var t=e;return/^ZA4[0-9]{9}$/.test(t)&&(t=t.substr(2)),{meta:{},valid:/^4[0-9]{9}$/.test(t)}}function Dt(){var e=["AR","AT","BE","BG","BR","CH","CY","CZ","DE","DK","EE","EL","ES","FI","FR","GB","GR","HR","HU","IE","IS","IT","LT","LU","LV","MT","NL","NO","PL","PT","RO","RU","RS","SE","SK","SI","VE","ZA"];return{validate:function(t){var n=t.value;if(""===n)return{valid:!0};var r=Object.assign({},{message:""},t.options),a=n.substr(0,2);if(a="function"==typeof r.country?r.country.call(this):r.country,-1===e.indexOf(a))return{valid:!0};var l={meta:{},valid:!0};switch(a.toLowerCase()){case"ar":l=at(n);break;case"at":l=lt(n);break;case"be":l=it(n);break;case"bg":l=ot(n);break;case"br":l=st(n);break;case"ch":l=ct(n);break;case"cy":l=ut(n);break;case"cz":l=dt(n);break;case"de":l=ft(n);break;case"dk":l=mt(n);break;case"ee":l=gt(n);break;case"el":l=bt(n);break;case"es":l=pt(n);break;case"fi":l=ht(n);break;case"fr":l=vt(n);break;case"gb":l=At(n);break;case"gr":l=bt(n);break;case"hr":l=Et(n);break;case"hu":l=Ct(n);break;case"ie":l=Vt(n);break;case"is":l=St(n);break;case"it":l=Ht(n);break;case"lt":l=yt(n);break;case"lu":l=Ft(n);break;case"lv":l=It(n);break;case"mt":l=Ot(n);break;case"nl":l=wt(n);break;case"no":l=Lt(n);break;case"pl":l=Nt(n);break;case"pt":l=xt(n);break;case"ro":l=Mt(n);break;case"rs":l=Tt(n);break;case"ru":l=kt(n);break;case"se":l=Rt(n);break;case"si":l=Bt(n);break;case"sk":l=Zt(n);break;case"ve":l=Gt(n);break;case"za":l=Pt(n)}var i=A(t.l10n?r.message||t.l10n.vat.country:r.message,t.l10n?t.l10n.vat.countries[a.toUpperCase()]:a.toUpperCase());return Object.assign({},{message:i},l)}}}function Kt(){return{validate:function(e){if(""===e.value)return{valid:!0};if(!/^[a-hj-npr-z0-9]{8}[0-9xX][a-hj-npr-z0-9]{8}$/i.test(e.value))return{valid:!1};for(var t=e.value.toUpperCase(),n={A:1,B:2,C:3,D:4,E:5,F:6,G:7,H:8,J:1,K:2,L:3,M:4,N:5,P:7,R:9,S:2,T:3,U:4,V:5,W:6,X:7,Y:8,Z:9,0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9},r=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],a=t.length,l=0,i=0;i1?n-1:0),a=1;a=0}function on(e,t){for(var n=e;n&&!ln(n,t);)n=n.parentElement;return n}var sn=function(e){function t(e){var n;return i(this,t),(n=g(this,d(t).call(this,e))).messages=new Map,n.defaultContainer=document.createElement("div"),n.opts=Object.assign({},{container:function(e,t){return n.defaultContainer}},e),n.elementIgnoredHandler=n.onElementIgnored.bind(m(n)),n.fieldAddedHandler=n.onFieldAdded.bind(m(n)),n.fieldRemovedHandler=n.onFieldRemoved.bind(m(n)),n.validatorValidatedHandler=n.onValidatorValidated.bind(m(n)),n.validatorNotValidatedHandler=n.onValidatorNotValidated.bind(m(n)),n}return u(t,e),s(t,[{key:"install",value:function(){this.core.getFormElement().appendChild(this.defaultContainer),this.core.on("core.element.ignored",this.elementIgnoredHandler).on("core.field.added",this.fieldAddedHandler).on("core.field.removed",this.fieldRemovedHandler).on("core.validator.validated",this.validatorValidatedHandler).on("core.validator.notvalidated",this.validatorNotValidatedHandler)}},{key:"uninstall",value:function(){this.core.getFormElement().removeChild(this.defaultContainer),this.messages.forEach((function(e){return e.parentNode.removeChild(e)})),this.messages.clear(),this.core.off("core.element.ignored",this.elementIgnoredHandler).off("core.field.added",this.fieldAddedHandler).off("core.field.removed",this.fieldRemovedHandler).off("core.validator.validated",this.validatorValidatedHandler).off("core.validator.notvalidated",this.validatorNotValidatedHandler)}},{key:"onFieldAdded",value:function(e){var t=this,n=e.elements;n&&(n.forEach((function(e){var n=t.messages.get(e);n&&(n.parentNode.removeChild(n),t.messages.delete(e))})),this.prepareFieldContainer(e.field,n))}},{key:"onFieldRemoved",value:function(e){var t=this;if(e.elements.length&&e.field){var n=e.elements[0].getAttribute("type"),r;("radio"===n||"checkbox"===n?[e.elements[0]]:e.elements).forEach((function(e){if(t.messages.has(e)){var n=t.messages.get(e);n.parentNode.removeChild(n),t.messages.delete(e)}}))}}},{key:"prepareFieldContainer",value:function(e,t){var n=this;if(t.length){var r=t[0].getAttribute("type");"radio"===r||"checkbox"===r?this.prepareElementContainer(e,t[0],t):t.forEach((function(r){return n.prepareElementContainer(e,r,t)}))}}},{key:"prepareElementContainer",value:function(e,t,n){var r;switch(!0){case"string"==typeof this.opts.container:var a=this.opts.container;a="#"===a.charAt(0)?'[id="'.concat(a.substring(1),'"]'):a,r=this.core.getFormElement().querySelector(a);break;default:r=this.opts.container(e,t)}var l=document.createElement("div");r.appendChild(l),an(l,{"fv-plugins-message-container":!0}),this.core.emit("plugins.message.placed",{element:t,elements:n,field:e,messageElement:l}),this.messages.set(t,l)}},{key:"getMessage",value:function(e){return"string"==typeof e.message?e.message:e.message[this.core.getLocale()]}},{key:"onValidatorValidated",value:function(e){var t=e.elements,n=e.element.getAttribute("type"),r="radio"===n||"checkbox"===n?t[0]:e.element;if(this.messages.has(r)){var a=this.messages.get(r),l=a.querySelector('[data-field="'.concat(e.field,'"][data-validator="').concat(e.validator,'"]'));if(l||e.result.valid)l&&!e.result.valid?(l.innerHTML=this.getMessage(e.result),this.core.emit("plugins.message.displayed",{element:e.element,field:e.field,message:e.result.message,messageElement:l,meta:e.result.meta,validator:e.validator})):l&&e.result.valid&&a.removeChild(l);else{var i=document.createElement("div");i.innerHTML=this.getMessage(e.result),i.setAttribute("data-field",e.field),i.setAttribute("data-validator",e.validator),this.opts.clazz&&an(i,c({},this.opts.clazz,!0)),a.appendChild(i),this.core.emit("plugins.message.displayed",{element:e.element,field:e.field,message:e.result.message,messageElement:i,meta:e.result.meta,validator:e.validator})}}}},{key:"onValidatorNotValidated",value:function(e){var t=e.elements,n=e.element.getAttribute("type"),r="radio"===n||"checkbox"===n?t[0]:e.element;if(this.messages.has(r)){var a=this.messages.get(r),l=a.querySelector('[data-field="'.concat(e.field,'"][data-validator="').concat(e.validator,'"]'));l&&a.removeChild(l)}}},{key:"onElementIgnored",value:function(e){var t=e.elements,n=e.element.getAttribute("type"),r="radio"===n||"checkbox"===n?t[0]:e.element;if(this.messages.has(r)){var a=this.messages.get(r),l;[].slice.call(a.querySelectorAll('[data-field="'.concat(e.field,'"]'))).forEach((function(e){a.removeChild(e)}))}}}],[{key:"getClosestContainer",value:function(e,t,n){for(var r=e;r&&r!==t&&(r=r.parentElement,!n.test(r.className)););return r}}]),t}(zt),cn=function(e){function t(e){var n;return i(this,t),(n=g(this,d(t).call(this,e))).results=new Map,n.containers=new Map,n.opts=Object.assign({},{defaultMessageContainer:!0,eleInvalidClass:"",eleValidClass:"",rowClasses:"",rowValidatingClass:""},e),n.elementIgnoredHandler=n.onElementIgnored.bind(m(n)),n.elementValidatingHandler=n.onElementValidating.bind(m(n)),n.elementValidatedHandler=n.onElementValidated.bind(m(n)),n.elementNotValidatedHandler=n.onElementNotValidated.bind(m(n)),n.iconPlacedHandler=n.onIconPlaced.bind(m(n)),n.fieldAddedHandler=n.onFieldAdded.bind(m(n)),n.fieldRemovedHandler=n.onFieldRemoved.bind(m(n)),n}return u(t,e),s(t,[{key:"install",value:function(){var e,t=this;an(this.core.getFormElement(),(c(e={},this.opts.formClass,!0),c(e,"fv-plugins-framework",!0),e)),this.core.on("core.element.ignored",this.elementIgnoredHandler).on("core.element.validating",this.elementValidatingHandler).on("core.element.validated",this.elementValidatedHandler).on("core.element.notvalidated",this.elementNotValidatedHandler).on("plugins.icon.placed",this.iconPlacedHandler).on("core.field.added",this.fieldAddedHandler).on("core.field.removed",this.fieldRemovedHandler),this.opts.defaultMessageContainer&&this.core.registerPlugin("___frameworkMessage",new sn({clazz:this.opts.messageClass,container:function(e,n){var r,a=on(n,"string"==typeof t.opts.rowSelector?t.opts.rowSelector:t.opts.rowSelector(e,n));return sn.getClosestContainer(n,a,t.opts.rowPattern)}}))}},{key:"uninstall",value:function(){var e;this.results.clear(),this.containers.clear(),an(this.core.getFormElement(),(c(e={},this.opts.formClass,!1),c(e,"fv-plugins-framework",!1),e)),this.core.off("core.element.ignored",this.elementIgnoredHandler).off("core.element.validating",this.elementValidatingHandler).off("core.element.validated",this.elementValidatedHandler).off("core.element.notvalidated",this.elementNotValidatedHandler).off("plugins.icon.placed",this.iconPlacedHandler).off("core.field.added",this.fieldAddedHandler).off("core.field.removed",this.fieldRemovedHandler)}},{key:"onIconPlaced",value:function(e){}},{key:"onFieldAdded",value:function(e){var t=this,n=e.elements;n&&(n.forEach((function(e){var n=t.containers.get(e),r;n&&(an(n,(c(r={},t.opts.rowInvalidClass,!1),c(r,t.opts.rowValidatingClass,!1),c(r,t.opts.rowValidClass,!1),c(r,"fv-plugins-icon-container",!1),r)),t.containers.delete(e))})),this.prepareFieldContainer(e.field,n))}},{key:"onFieldRemoved",value:function(e){var t=this;e.elements.forEach((function(e){var n=t.containers.get(e),r;n&&an(n,(c(r={},t.opts.rowInvalidClass,!1),c(r,t.opts.rowValidatingClass,!1),c(r,t.opts.rowValidClass,!1),r))}))}},{key:"prepareFieldContainer",value:function(e,t){var n=this;if(t.length){var r=t[0].getAttribute("type");"radio"===r||"checkbox"===r?this.prepareElementContainer(e,t[0]):t.forEach((function(t){return n.prepareElementContainer(e,t)}))}}},{key:"prepareElementContainer",value:function(e,t){var n,r=on(t,"string"==typeof this.opts.rowSelector?this.opts.rowSelector:this.opts.rowSelector(e,t)),a;r!==t&&(an(r,(c(a={},this.opts.rowClasses,!0),c(a,"fv-plugins-icon-container",!0),a)),this.containers.set(t,r))}},{key:"onElementValidating",value:function(e){var t=e.elements,n=e.element.getAttribute("type"),r="radio"===n||"checkbox"===n?t[0]:e.element,a=this.containers.get(r),l;a&&an(a,(c(l={},this.opts.rowInvalidClass,!1),c(l,this.opts.rowValidatingClass,!0),c(l,this.opts.rowValidClass,!1),l))}},{key:"onElementNotValidated",value:function(e){this.removeClasses(e.element,e.elements)}},{key:"onElementIgnored",value:function(e){this.removeClasses(e.element,e.elements)}},{key:"removeClasses",value:function(e,t){var n,r=e.getAttribute("type"),a="radio"===r||"checkbox"===r?t[0]:e;an(a,(c(n={},this.opts.eleValidClass,!1),c(n,this.opts.eleInvalidClass,!1),n));var l=this.containers.get(a),i;l&&an(l,(c(i={},this.opts.rowInvalidClass,!1),c(i,this.opts.rowValidatingClass,!1),c(i,this.opts.rowValidClass,!1),i))}},{key:"onElementValidated",value:function(e){var t,n=this,r=e.elements,a=e.element.getAttribute("type"),l="radio"===a||"checkbox"===a?r[0]:e.element;an(l,(c(t={},this.opts.eleValidClass,e.valid),c(t,this.opts.eleInvalidClass,!e.valid),t));var i=this.containers.get(l);if(i)if(e.valid){this.results.delete(l);var s=!0,u;if(this.containers.forEach((function(e,t){e===i&&!1===n.results.get(t)&&(s=!1)})),s)an(i,(c(u={},this.opts.rowInvalidClass,!1),c(u,this.opts.rowValidatingClass,!1),c(u,this.opts.rowValidClass,!0),u))}else{var o;this.results.set(l,!1),an(i,(c(o={},this.opts.rowInvalidClass,!0),c(o,this.opts.rowValidatingClass,!1),c(o,this.opts.rowValidClass,!1),o))}}}]),t}(zt),un=function(e){function t(e){var n;return i(this,t),(n=g(this,d(t).call(this,e))).icons=new Map,n.opts=Object.assign({},{invalid:"fv-plugins-icon--invalid",onPlaced:function(){},onSet:function(){},valid:"fv-plugins-icon--valid",validating:"fv-plugins-icon--validating"},e),n.elementValidatingHandler=n.onElementValidating.bind(m(n)),n.elementValidatedHandler=n.onElementValidated.bind(m(n)),n.elementNotValidatedHandler=n.onElementNotValidated.bind(m(n)),n.elementIgnoredHandler=n.onElementIgnored.bind(m(n)),n.fieldAddedHandler=n.onFieldAdded.bind(m(n)),n}return u(t,e),s(t,[{key:"install",value:function(){this.core.on("core.element.validating",this.elementValidatingHandler).on("core.element.validated",this.elementValidatedHandler).on("core.element.notvalidated",this.elementNotValidatedHandler).on("core.element.ignored",this.elementIgnoredHandler).on("core.field.added",this.fieldAddedHandler)}},{key:"uninstall",value:function(){this.icons.forEach((function(e){return e.parentNode.removeChild(e)})),this.icons.clear(),this.core.off("core.element.validating",this.elementValidatingHandler).off("core.element.validated",this.elementValidatedHandler).off("core.element.notvalidated",this.elementNotValidatedHandler).off("core.element.ignored",this.elementIgnoredHandler).off("core.field.added",this.fieldAddedHandler)}},{key:"onFieldAdded",value:function(e){var t=this,n=e.elements;n&&(n.forEach((function(e){var n=t.icons.get(e);n&&(n.parentNode.removeChild(n),t.icons.delete(e))})),this.prepareFieldIcon(e.field,n))}},{key:"prepareFieldIcon",value:function(e,t){var n=this;if(t.length){var r=t[0].getAttribute("type");"radio"===r||"checkbox"===r?this.prepareElementIcon(e,t[0]):t.forEach((function(t){return n.prepareElementIcon(e,t)}))}}},{key:"prepareElementIcon",value:function(e,t){var n=document.createElement("i");n.setAttribute("data-field",e),t.parentNode.insertBefore(n,t.nextSibling),an(n,{"fv-plugins-icon":!0});var r={classes:{invalid:this.opts.invalid,valid:this.opts.valid,validating:this.opts.validating},element:t,field:e,iconElement:n};this.core.emit("plugins.icon.placed",r),this.opts.onPlaced(r),this.icons.set(t,n)}},{key:"onElementValidating",value:function(e){var t,n=this.setClasses(e.field,e.element,e.elements,(c(t={},this.opts.invalid,!1),c(t,this.opts.valid,!1),c(t,this.opts.validating,!0),t)),r={element:e.element,field:e.field,iconElement:n,status:"Validating"};this.core.emit("plugins.icon.set",r),this.opts.onSet(r)}},{key:"onElementValidated",value:function(e){var t,n=this.setClasses(e.field,e.element,e.elements,(c(t={},this.opts.invalid,!e.valid),c(t,this.opts.valid,e.valid),c(t,this.opts.validating,!1),t)),r={element:e.element,field:e.field,iconElement:n,status:e.valid?"Valid":"Invalid"};this.core.emit("plugins.icon.set",r),this.opts.onSet(r)}},{key:"onElementNotValidated",value:function(e){var t,n=this.setClasses(e.field,e.element,e.elements,(c(t={},this.opts.invalid,!1),c(t,this.opts.valid,!1),c(t,this.opts.validating,!1),t)),r={element:e.element,field:e.field,iconElement:n,status:"NotValidated"};this.core.emit("plugins.icon.set",r),this.opts.onSet(r)}},{key:"onElementIgnored",value:function(e){var t,n=this.setClasses(e.field,e.element,e.elements,(c(t={},this.opts.invalid,!1),c(t,this.opts.valid,!1),c(t,this.opts.validating,!1),t)),r={element:e.element,field:e.field,iconElement:n,status:"Ignored"};this.core.emit("plugins.icon.set",r),this.opts.onSet(r)}},{key:"setClasses",value:function(e,t,n,r){var a=t.getAttribute("type"),l="radio"===a||"checkbox"===a?n[0]:t;if(this.icons.has(l)){var i=this.icons.get(l);return an(i,r),i}return null}}]),t}(zt),dn=function(e){function t(e){var n;return i(this,t),(n=g(this,d(t).call(this,e))).invalidFields=new Map,n.opts=Object.assign({},{enabled:!0},e),n.validatorHandler=n.onValidatorValidated.bind(m(n)),n.shouldValidateFilter=n.shouldValidate.bind(m(n)),n.fieldAddedHandler=n.onFieldAdded.bind(m(n)),n.elementNotValidatedHandler=n.onElementNotValidated.bind(m(n)),n.elementValidatingHandler=n.onElementValidating.bind(m(n)),n}return u(t,e),s(t,[{key:"install",value:function(){this.core.on("core.validator.validated",this.validatorHandler).on("core.field.added",this.fieldAddedHandler).on("core.element.notvalidated",this.elementNotValidatedHandler).on("core.element.validating",this.elementValidatingHandler).registerFilter("field-should-validate",this.shouldValidateFilter)}},{key:"uninstall",value:function(){this.invalidFields.clear(),this.core.off("core.validator.validated",this.validatorHandler).off("core.field.added",this.fieldAddedHandler).off("core.element.notvalidated",this.elementNotValidatedHandler).off("core.element.validating",this.elementValidatingHandler).deregisterFilter("field-should-validate",this.shouldValidateFilter)}},{key:"shouldValidate",value:function(e,t,n,r){var a;return!((!0===this.opts.enabled||!0===this.opts.enabled[e])&&this.invalidFields.has(t)&&!!this.invalidFields.get(t).length&&-1===this.invalidFields.get(t).indexOf(r))}},{key:"onValidatorValidated",value:function(e){var t=this.invalidFields.has(e.element)?this.invalidFields.get(e.element):[],n=t.indexOf(e.validator);e.result.valid&&n>=0?t.splice(n,1):!e.result.valid&&-1===n&&t.push(e.validator),this.invalidFields.set(e.element,t)}},{key:"onFieldAdded",value:function(e){e.elements&&this.clearInvalidFields(e.elements)}},{key:"onElementNotValidated",value:function(e){this.clearInvalidFields(e.elements)}},{key:"onElementValidating",value:function(e){this.clearInvalidFields(e.elements)}},{key:"clearInvalidFields",value:function(e){var t=this;e.forEach((function(e){return t.invalidFields.delete(e)}))}}]),t}(zt),fn=function(e){function t(e){var n;return i(this,t),(n=g(this,d(t).call(this,e))).isFormValid=!1,n.opts=Object.assign({},{aspNetButton:!1,selector:'[type="submit"]:not([formnovalidate])'},e),n.submitHandler=n.handleSubmitEvent.bind(m(n)),n.buttonClickHandler=n.handleClickEvent.bind(m(n)),n}return u(t,e),s(t,[{key:"install",value:function(){var e=this;if(this.core.getFormElement()instanceof HTMLFormElement){var t=this.core.getFormElement();this.selectorButtons=[].slice.call(t.querySelectorAll(this.opts.selector)),this.submitButtons=[].slice.call(t.querySelectorAll('[type="submit"]')),t.setAttribute("novalidate","novalidate"),t.addEventListener("submit",this.submitHandler),this.hiddenClickedEle=document.createElement("input"),this.hiddenClickedEle.setAttribute("type","hidden"),t.appendChild(this.hiddenClickedEle),this.submitButtons.forEach((function(t){t.addEventListener("click",e.buttonClickHandler)}))}}},{key:"uninstall",value:function(){var e=this,t=this.core.getFormElement();t instanceof HTMLFormElement&&t.removeEventListener("submit",this.submitHandler),this.submitButtons.forEach((function(t){t.removeEventListener("click",e.buttonClickHandler)})),this.hiddenClickedEle.parentElement.removeChild(this.hiddenClickedEle)}},{key:"handleSubmitEvent",value:function(e){this.validateForm(e)}},{key:"handleClickEvent",value:function(e){var t=e.currentTarget;if(t instanceof HTMLElement&&-1!==this.selectorButtons.indexOf(t)&&(!this.opts.aspNetButton||!0!==this.isFormValid)){var n;this.core.getFormElement().removeEventListener("submit",this.submitHandler),this.clickedButton=e.target;var r=this.clickedButton.getAttribute("name"),a=this.clickedButton.getAttribute("value");r&&a&&(this.hiddenClickedEle.setAttribute("name",r),this.hiddenClickedEle.setAttribute("value",a)),this.validateForm(e)}}},{key:"validateForm",value:function(e){var t=this;e.preventDefault(),this.core.validate().then((function(e){"Valid"===e&&t.opts.aspNetButton&&!t.isFormValid&&t.clickedButton&&(t.isFormValid=!0,t.clickedButton.removeEventListener("click",t.buttonClickHandler),t.clickedButton.click())}))}}]),t}(zt),mn=function(e){function t(e){var n;return i(this,t),(n=g(this,d(t).call(this,e))).messages=new Map,n.opts=Object.assign({},{placement:"top",trigger:"click"},e),n.iconPlacedHandler=n.onIconPlaced.bind(m(n)),n.validatorValidatedHandler=n.onValidatorValidated.bind(m(n)),n.elementValidatedHandler=n.onElementValidated.bind(m(n)),n.documentClickHandler=n.onDocumentClicked.bind(m(n)),n}return u(t,e),s(t,[{key:"install",value:function(){this.tip=document.createElement("div"),an(this.tip,c({"fv-plugins-tooltip":!0},"fv-plugins-tooltip--".concat(this.opts.placement),!0)),document.body.appendChild(this.tip),this.core.on("plugins.icon.placed",this.iconPlacedHandler).on("core.validator.validated",this.validatorValidatedHandler).on("core.element.validated",this.elementValidatedHandler),"click"===this.opts.trigger&&document.addEventListener("click",this.documentClickHandler)}},{key:"uninstall",value:function(){this.messages.clear(),document.body.removeChild(this.tip),this.core.off("plugins.icon.placed",this.iconPlacedHandler).off("core.validator.validated",this.validatorValidatedHandler).off("core.element.validated",this.elementValidatedHandler),"click"===this.opts.trigger&&document.removeEventListener("click",this.documentClickHandler)}},{key:"onIconPlaced",value:function(e){var t=this;switch(an(e.iconElement,{"fv-plugins-tooltip-icon":!0}),this.opts.trigger){case"hover":e.iconElement.addEventListener("mouseenter",(function(n){return t.show(e.element,n)})),e.iconElement.addEventListener("mouseleave",(function(e){return t.hide()}));break;case"click":default:e.iconElement.addEventListener("click",(function(n){return t.show(e.element,n)}))}}},{key:"onValidatorValidated",value:function(e){if(!e.result.valid){var t=e.elements,n=e.element.getAttribute("type"),r="radio"===n||"checkbox"===n?t[0]:e.element,a="string"==typeof e.result.message?e.result.message:e.result.message[this.core.getLocale()];this.messages.set(r,a)}}},{key:"onElementValidated",value:function(e){if(e.valid){var t=e.elements,n=e.element.getAttribute("type"),r="radio"===n||"checkbox"===n?t[0]:e.element;this.messages.delete(r)}}},{key:"onDocumentClicked",value:function(e){this.hide()}},{key:"show",value:function(e,t){if(t.preventDefault(),t.stopPropagation(),this.messages.has(e)){an(this.tip,{"fv-plugins-tooltip--hide":!1}),this.tip.innerHTML=''.concat(this.messages.get(e),"");var n,r=t.target.getBoundingClientRect(),a=0,l=0,i,o;switch(this.opts.placement){case"top":default:a=r.top-r.height,l=r.left+r.width/2-this.tip.clientWidth/2;break;case"top-left":a=r.top-r.height,l=r.left;break;case"top-right":a=r.top-r.height,l=r.left+r.width-this.tip.clientWidth;break;case"bottom":a=r.top+r.height,l=r.left+r.width/2-this.tip.clientWidth/2;break;case"bottom-left":a=r.top+r.height,l=r.left;break;case"bottom-right":a=r.top+r.height,l=r.left+r.width-this.tip.clientWidth;break;case"left":a=r.top+r.height/2-this.tip.clientHeight/2,l=r.left-this.tip.clientWidth;break;case"right":a=r.top+r.height/2-this.tip.clientHeight/2,l=r.left+r.width}a+=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,l+=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0,this.tip.setAttribute("style","top: ".concat(a,"px; left: ").concat(l,"px"))}}},{key:"hide",value:function(){an(this.tip,{"fv-plugins-tooltip--hide":!0})}}]),t}(zt),gn=function(e){function t(e){var n;i(this,t),(n=g(this,d(t).call(this,e))).handlers=[],n.timers=new Map,n.ieVersion=function(){for(var e=3,t=document.createElement("div"),n=t.all||[];t.innerHTML="\x3c!--[if gt IE "+ ++e+"]>
4?e:document.documentMode}();var r=document.createElement("div");return n.defaultEvent=9!==n.ieVersion&&"oninput"in r?"input":"keyup",n.opts=Object.assign({},{delay:0,event:n.defaultEvent,threshold:0},e),n.fieldAddedHandler=n.onFieldAdded.bind(m(n)),n.fieldRemovedHandler=n.onFieldRemoved.bind(m(n)),n}return u(t,e),s(t,[{key:"install",value:function(){this.core.on("core.field.added",this.fieldAddedHandler).on("core.field.removed",this.fieldRemovedHandler)}},{key:"uninstall",value:function(){this.handlers.forEach((function(e){return e.element.removeEventListener(e.event,e.handler)})),this.handlers=[],this.timers.forEach((function(e){return window.clearTimeout(e)})),this.timers.clear(),this.core.off("core.field.added",this.fieldAddedHandler).off("core.field.removed",this.fieldRemovedHandler)}},{key:"prepareHandler",value:function(e,t){var n=this;t.forEach((function(t){var r=[];switch(!0){case!!n.opts.event&&!1===n.opts.event[e]:r=[];break;case!!n.opts.event&&!!n.opts.event[e]:r=n.opts.event[e].split(" ");break;case"string"==typeof n.opts.event&&n.opts.event!==n.defaultEvent:r=n.opts.event.split(" ");break;default:var i=t.getAttribute("type"),l=t.tagName.toLowerCase(),a;r=["radio"===i||"checkbox"===i||"file"===i||"select"===l?"change":n.ieVersion>=10&&t.getAttribute("placeholder")?"keyup":n.defaultEvent]}r.forEach((function(r){var a=function(r){return n.handleEvent(r,e,t)};n.handlers.push({element:t,event:r,field:e,handler:a}),t.addEventListener(r,a)}))}))}},{key:"handleEvent",value:function(e,t,n){var r=this;if(this.exceedThreshold(t,n)&&this.core.executeFilter("plugins-trigger-should-validate",!0,[t,n])){var a=function(){return r.core.validateElement(t,n).then((function(a){r.core.emit("plugins.trigger.executed",{element:n,event:e,field:t})}))},l=this.opts.delay[t]||this.opts.delay;if(0===l)a();else{var i=this.timers.get(n);i&&window.clearTimeout(i),this.timers.set(n,window.setTimeout(a,1e3*l))}}}},{key:"onFieldAdded",value:function(e){this.handlers.filter((function(t){return t.field===e.field})).forEach((function(e){return e.element.removeEventListener(e.event,e.handler)})),this.prepareHandler(e.field,e.elements)}},{key:"onFieldRemoved",value:function(e){this.handlers.filter((function(t){return t.field===e.field&&e.elements.indexOf(t.element)>=0})).forEach((function(e){return e.element.removeEventListener(e.event,e.handler)}))}},{key:"exceedThreshold",value:function(e,t){var n=0!==this.opts.threshold[e]&&0!==this.opts.threshold&&(this.opts.threshold[e]||this.opts.threshold);if(!n)return!0;var r=t.getAttribute("type"),a;return-1!==["button","checkbox","file","hidden","image","radio","reset","submit"].indexOf(r)||this.core.getElementValue(e,t).length>=n}}]),t}(zt),pn={Alias:Xt,Aria:Qt,Declarative:qt,DefaultSubmit:$t,Dependency:jt,Excluded:en,FieldStatus:tn,Framework:cn,Icon:un,Message:sn,Sequence:dn,SubmitButton:fn,Tooltip:mn,Trigger:gn};function hn(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )".concat(t,"( |$)"),"gi").test(e.className)}var vn={call:C,classSet:an,closest:on,fetch:D,format:A,hasClass:hn,isValidDate:F},An={};e.Plugin=zt,e.algorithms=l,e.filters=_t,e.formValidation=Wt,e.locales=An,e.plugins=pn,e.utils=vn,e.validators=Yt,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):((e=e||self).FormValidation=e.FormValidation||{},e.FormValidation.plugins=e.FormValidation.plugins||{},e.FormValidation.plugins.Bootstrap=n())}(this,(function(){"use strict";function e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function n(e,n){for(var t=0;t');title&&$m.append("

"+title+"

"),message&&$m.append("

"+message+"

"),void 0===timeout&&(timeout=3e3);var callBlock=function(opts){opts=opts||{},$.blockUI({message:$m,fadeIn:void 0!==opts.fadeIn?opts.fadeIn:700,fadeOut:void 0!==opts.fadeOut?opts.fadeOut:1e3,timeout:void 0!==opts.timeout?opts.timeout:timeout,centerY:!1,showOverlay:!1,onUnblock:onClose,css:$.blockUI.defaults.growlCSS})};callBlock();var nonmousedOpacity=$m.css("opacity");$m.mouseover((function(){callBlock({fadeIn:0,timeout:3e4});var displayBlock=$(".blockMsg");displayBlock.stop(),displayBlock.fadeTo(300,1)})).mouseout((function(){$(".blockMsg").fadeOut(1e3)}))},$.fn.block=function(opts){if(this[0]===window)return $.blockUI(opts),this;var fullOpts=$.extend({},$.blockUI.defaults,opts||{});return this.each((function(){var $el=$(this);fullOpts.ignoreIfBlocked&&$el.data("blockUI.isBlocked")||$el.unblock({fadeOut:0})})),this.each((function(){"static"==$.css(this,"position")&&(this.style.position="relative",$(this).data("blockUI.static",!0)),this.style.zoom=1,install(this,opts)}))},$.fn.unblock=function(opts){return this[0]===window?($.unblockUI(opts),this):this.each((function(){remove(this,opts)}))},$.blockUI.version=2.7,$.blockUI.defaults={message:"

Please wait...

",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var pageBlock=null,pageBlockEls=[];function install(el,opts){var css,themedCSS,full=el==window,msg=opts&&void 0!==opts.message?opts.message:void 0;if(!(opts=$.extend({},$.blockUI.defaults,opts||{})).ignoreIfBlocked||!$(el).data("blockUI.isBlocked")){if(opts.overlayCSS=$.extend({},$.blockUI.defaults.overlayCSS,opts.overlayCSS||{}),css=$.extend({},$.blockUI.defaults.css,opts.css||{}),opts.onOverlayClick&&(opts.overlayCSS.cursor="pointer"),themedCSS=$.extend({},$.blockUI.defaults.themedCSS,opts.themedCSS||{}),msg=void 0===msg?opts.message:msg,full&&pageBlock&&remove(window,{fadeOut:0}),msg&&"string"!=typeof msg&&(msg.parentNode||msg.jquery)){var node=msg.jquery?msg[0]:msg,data={};$(el).data("blockUI.history",data),data.el=node,data.parent=node.parentNode,data.display=node.style.display,data.position=node.style.position,data.parent&&data.parent.removeChild(node)}$(el).data("blockUI.onUnblock",opts.onUnblock);var z=opts.baseZ,lyr1,lyr2,lyr3,s;lyr1=msie||opts.forceIframe?$(''):$(''),lyr2=opts.theme?$(''):$(''),opts.theme&&full?(s='"):opts.theme?(s='"):s=full?'':'',lyr3=$(s),msg&&(opts.theme?(lyr3.css(themedCSS),lyr3.addClass("ui-widget-content")):lyr3.css(css)),opts.theme||lyr2.css(opts.overlayCSS),lyr2.css("position",full?"fixed":"absolute"),(msie||opts.forceIframe)&&lyr1.css("opacity",0);var layers=[lyr1,lyr2,lyr3],$par=$(full?"body":el);$.each(layers,(function(){this.appendTo($par)})),opts.theme&&opts.draggable&&$.fn.draggable&&lyr3.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var expr=setExpr&&(!$.support.boxModel||$("object,embed",full?null:el).length>0);if(ie6||expr){if(full&&opts.allowBodyStretch&&$.support.boxModel&&$("html,body").css("height","100%"),(ie6||!$.support.boxModel)&&!full)var t=sz(el,"borderTopWidth"),l=sz(el,"borderLeftWidth"),fixT=t?"(0 - "+t+")":0,fixL=l?"(0 - "+l+")":0;$.each(layers,(function(i,o){var s=o[0].style;if(s.position="absolute",i<2)full?s.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+opts.quirksmodeOffsetHack+') + "px"'):s.setExpression("height",'this.parentNode.offsetHeight + "px"'),full?s.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):s.setExpression("width",'this.parentNode.offsetWidth + "px"'),fixL&&s.setExpression("left",fixL),fixT&&s.setExpression("top",fixT);else if(opts.centerY)full&&s.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),s.marginTop=0;else if(!opts.centerY&&full){var top,expression="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(opts.css&&opts.css.top?parseInt(opts.css.top,10):0)+') + "px"';s.setExpression("top",expression)}}))}if(msg&&(opts.theme?lyr3.find(".ui-widget-content").append(msg):lyr3.append(msg),(msg.jquery||msg.nodeType)&&$(msg).show()),(msie||opts.forceIframe)&&opts.showOverlay&&lyr1.show(),opts.fadeIn){var cb=opts.onBlock?opts.onBlock:noOp,cb1=opts.showOverlay&&!msg?cb:noOp,cb2=msg?cb:noOp;opts.showOverlay&&lyr2._fadeIn(opts.fadeIn,cb1),msg&&lyr3._fadeIn(opts.fadeIn,cb2)}else opts.showOverlay&&lyr2.show(),msg&&lyr3.show(),opts.onBlock&&opts.onBlock.bind(lyr3)();if(bind(1,el,opts),full?(pageBlock=lyr3[0],pageBlockEls=$(opts.focusableElements,pageBlock),opts.focusInput&&setTimeout(focus,20)):center(lyr3[0],opts.centerX,opts.centerY),opts.timeout){var to=setTimeout((function(){full?$.unblockUI(opts):$(el).unblock(opts)}),opts.timeout);$(el).data("blockUI.timeout",to)}}}function remove(el,opts){var count,full=el==window,$el=$(el),data=$el.data("blockUI.history"),to=$el.data("blockUI.timeout"),els;to&&(clearTimeout(to),$el.removeData("blockUI.timeout")),opts=$.extend({},$.blockUI.defaults,opts||{}),bind(0,el,opts),null===opts.onUnblock&&(opts.onUnblock=$el.data("blockUI.onUnblock"),$el.removeData("blockUI.onUnblock")),els=full?$("body").children().filter(".blockUI").add("body > .blockUI"):$el.find(">.blockUI"),opts.cursorReset&&(els.length>1&&(els[1].style.cursor=opts.cursorReset),els.length>2&&(els[2].style.cursor=opts.cursorReset)),full&&(pageBlock=pageBlockEls=null),opts.fadeOut?(count=els.length,els.stop().fadeOut(opts.fadeOut,(function(){0==--count&&reset(els,data,opts,el)}))):reset(els,data,opts,el)}function reset(els,data,opts,el){var $el=$(el);if(!$el.data("blockUI.isBlocked")){els.each((function(i,o){this.parentNode&&this.parentNode.removeChild(this)})),data&&data.el&&(data.el.style.display=data.display,data.el.style.position=data.position,data.el.style.cursor="default",data.parent&&data.parent.appendChild(data.el),$el.removeData("blockUI.history")),$el.data("blockUI.static")&&$el.css("position","static"),"function"==typeof opts.onUnblock&&opts.onUnblock(el,opts);var body=$(document.body),w=body.width(),cssW=body[0].style.width;body.width(w-1).width(w),body[0].style.width=cssW}}function bind(b,el,opts){var full=el==window,$el=$(el);if((b||(!full||pageBlock)&&(full||$el.data("blockUI.isBlocked")))&&($el.data("blockUI.isBlocked",b),full&&opts.bindEvents&&(!b||opts.showOverlay))){var events="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";b?$(document).bind(events,opts,handler):$(document).unbind(events,handler)}}function handler(e){if("keydown"===e.type&&e.keyCode&&9==e.keyCode&&pageBlock&&e.data.constrainTabKey){var els=pageBlockEls,fwd=!e.shiftKey&&e.target===els[els.length-1],back=e.shiftKey&&e.target===els[0];if(fwd||back)return setTimeout((function(){focus(back)}),10),!1}var opts=e.data,target=$(e.target);return target.hasClass("blockOverlay")&&opts.onOverlayClick&&opts.onOverlayClick(e),target.parents("div."+opts.blockMsgClass).length>0||0===target.parents().children().filter("div.blockUI").length}function focus(back){if(pageBlockEls){var e=pageBlockEls[!0===back?pageBlockEls.length-1:0];e&&e.focus()}}function center(el,x,y){var p=el.parentNode,s=el.style,l=(p.offsetWidth-el.offsetWidth)/2-sz(p,"borderLeftWidth"),t=(p.offsetHeight-el.offsetHeight)/2-sz(p,"borderTopWidth");x&&(s.left=l>0?l+"px":"0"),y&&(s.top=t>0?t+"px":"0")}function sz(el,p){return parseInt($.css(el,p),10)||0}}"function"==typeof define&&define.amd?define(["jquery"],setup):"object"==typeof exports?setup(require("jquery")):setup(jQuery)}(),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}((function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a,b){return a.getUTCFullYear()===b.getUTCFullYear()&&a.getUTCMonth()===b.getUTCMonth()&&a.getUTCDate()===b.getUTCDate()}function f(c,d){return function(){return d!==b&&a.fn.datepicker.deprecated(d),this[c].apply(this,arguments)}}function g(a){return a&&!isNaN(a.getTime())}function h(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");for(var i in c=new RegExp("^"+c.toLowerCase()),f)c.test(i)&&(g[e=i.replace(h,d)]=f[i]);return g}function i(b){var c={};if(q[b]||(b=b.split("-")[0],q[b])){var d=q[b];return a.each(p,(function(a,b){b in d&&(c[b]=d[b])})),c}}var j=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;c]/g)||[]).length<=0||a(c).length>0)}catch(a){return!1}},_process_options:function(b){this._o=a.extend({},this._o,b);var e=this.o=a.extend({},this._o),f=e.language;q[f]||(f=f.split("-")[0],q[f]||(f=o.language)),e.language=f,e.startView=this._resolveViewName(e.startView),e.minViewMode=this._resolveViewName(e.minViewMode),e.maxViewMode=this._resolveViewName(e.maxViewMode),e.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,e.startView)),!0!==e.multidate&&(e.multidate=Number(e.multidate)||!1,!1!==e.multidate&&(e.multidate=Math.max(0,e.multidate))),e.multidateSeparator=String(e.multidateSeparator),e.weekStart%=7,e.weekEnd=(e.weekStart+6)%7;var g=r.parseFormat(e.format);e.startDate!==-1/0&&(e.startDate?e.startDate instanceof Date?e.startDate=this._local_to_utc(this._zero_time(e.startDate)):e.startDate=r.parseDate(e.startDate,g,e.language,e.assumeNearbyYear):e.startDate=-1/0),e.endDate!==1/0&&(e.endDate?e.endDate instanceof Date?e.endDate=this._local_to_utc(this._zero_time(e.endDate)):e.endDate=r.parseDate(e.endDate,g,e.language,e.assumeNearbyYear):e.endDate=1/0),e.daysOfWeekDisabled=this._resolveDaysOfWeek(e.daysOfWeekDisabled||[]),e.daysOfWeekHighlighted=this._resolveDaysOfWeek(e.daysOfWeekHighlighted||[]),e.datesDisabled=e.datesDisabled||[],a.isArray(e.datesDisabled)||(e.datesDisabled=e.datesDisabled.split(",")),e.datesDisabled=a.map(e.datesDisabled,(function(a){return r.parseDate(a,g,e.language,e.assumeNearbyYear)}));var h=String(e.orientation).toLowerCase().split(/\s+/g),i=e.orientation.toLowerCase();if(h=a.grep(h,(function(a){return/^auto|left|right|top|bottom$/.test(a)})),e.orientation={x:"auto",y:"auto"},i&&"auto"!==i)if(1===h.length)switch(h[0]){case"top":case"bottom":e.orientation.y=h[0];break;case"left":case"right":e.orientation.x=h[0]}else i=a.grep(h,(function(a){return/^left|right$/.test(a)})),e.orientation.x=i[0]||"auto",i=a.grep(h,(function(a){return/^top|bottom$/.test(a)})),e.orientation.y=i[0]||"auto";if(e.defaultViewDate instanceof Date||"string"==typeof e.defaultViewDate)e.defaultViewDate=r.parseDate(e.defaultViewDate,g,e.language,e.assumeNearbyYear);else if(e.defaultViewDate){var j=e.defaultViewDate.year||(new Date).getFullYear(),k=e.defaultViewDate.month||0,l=e.defaultViewDate.day||1;e.defaultViewDate=c(j,k,l)}else e.defaultViewDate=d()},_applyEvents:function(a){for(var c,d,e,f=0;fe?(this.picker.addClass("datepicker-orient-right"),m+=l-b):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var o,p=this.o.orientation.y;if("auto"===p&&(p=(o=-f+n-c)<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+p),"top"===p?n-=c+parseInt(this.picker.css("padding-top")):n+=k,this.o.rtl){var q=e-(m+l);this.picker.css({top:n,right:q,zIndex:i})}else this.picker.css({top:n,left:m,zIndex:i});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var b=this.dates.copy(),c=[],d=!1;return arguments.length?(a.each(arguments,a.proxy((function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)}),this)),d=!0):(c=(c=this.isInput?this.element.val():this.element.data("date")||this.inputField.val())&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy((function(a){return r.parseDate(a,this.o.format,this.o.language,this.o.assumeNearbyYear)}),this)),c=a.grep(c,a.proxy((function(a){return!this.dateWithinRange(a)||!a}),this),!0),this.dates.replace(c),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDatethis.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),d?(this.setValue(),this.element.change()):this.dates.length&&String(b)!==String(this.dates)&&d&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&b.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var b=this.o.weekStart,c="";for(this.o.calendarWeeks&&(c+=' ');b";c+="",this.picker.find(".datepicker-days thead").append(c)}},fillMonths:function(){for(var a,b=this._utc_to_local(this.viewDate),c="",d=0;d<12;d++)c+=''+q[this.o.language].monthsShort[d]+"";this.picker.find(".datepicker-months td").html(c)},setRange:function(b){b&&b.length?this.range=a.map(b,(function(a){return a.valueOf()})):delete this.range,this.fill()},getClassNames:function(b){var c=[],f=this.viewDate.getUTCFullYear(),g=this.viewDate.getUTCMonth(),h=d();return b.getUTCFullYear()f||b.getUTCFullYear()===f&&b.getUTCMonth()>g)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&e(b,h)&&c.push("today"),-1!==this.dates.contains(b)&&c.push("active"),this.dateWithinRange(b)||c.push("disabled"),this.dateIsDisabled(b)&&c.push("disabled","disabled-date"),-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekHighlighted)&&c.push("highlighted"),this.range&&(b>this.range[0]&&bh)&&j.push("disabled"),t===r&&j.push("focused"),i!==a.noop&&((l=i(new Date(t,0,1)))===b?l={}:"boolean"==typeof l?l={enabled:l}:"string"==typeof l&&(l={classes:l}),!1===l.enabled&&j.push("disabled"),l.classes&&(j=j.concat(l.classes.split(/\s+/))),l.tooltip&&(k=l.tooltip)),m+='"+t+"";o.find(".datepicker-switch").text(p+"-"+q),o.find("td").html(m)},fill:function(){var e,f,g=new Date(this.viewDate),h=g.getUTCFullYear(),i=g.getUTCMonth(),j=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,k=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,m=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,n=q[this.o.language].today||q.en.today||"",o=q[this.o.language].clear||q.en.clear||"",p=q[this.o.language].titleFormat||q.en.titleFormat,s=d(),t=(!0===this.o.todayBtn||"linked"===this.o.todayBtn)&&s>=this.o.startDate&&s<=this.o.endDate&&!this.weekOfDateIsDisabled(s);if(!isNaN(h)&&!isNaN(i)){this.picker.find(".datepicker-days .datepicker-switch").text(r.formatDate(g,p,this.o.language)),this.picker.find("tfoot .today").text(n).css("display",t?"table-cell":"none"),this.picker.find("tfoot .clear").text(o).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var u=c(h,i,0),v=u.getUTCDate();u.setUTCDate(v-(u.getUTCDay()-this.o.weekStart+7)%7);var w=new Date(u);u.getUTCFullYear()<100&&w.setUTCFullYear(u.getUTCFullYear()),w.setUTCDate(w.getUTCDate()+42),w=w.valueOf();for(var x,y,z=[];u.valueOf()"),this.o.calendarWeeks)){var A=new Date(+u+(this.o.weekStart-x-7)%7*864e5),B=new Date(Number(A)+(11-A.getUTCDay())%7*864e5),C=new Date(Number(C=c(B.getUTCFullYear(),0,1))+(11-C.getUTCDay())%7*864e5),D=(B-C)/864e5/7+1;z.push(''+D+"")}(y=this.getClassNames(u)).push("day");var E=u.getUTCDate();this.o.beforeShowDay!==a.noop&&((f=this.o.beforeShowDay(this._utc_to_local(u)))===b?f={}:"boolean"==typeof f?f={enabled:f}:"string"==typeof f&&(f={classes:f}),!1===f.enabled&&y.push("disabled"),f.classes&&(y=y.concat(f.classes.split(/\s+/))),f.tooltip&&(e=f.tooltip),f.content&&(E=f.content)),y=a.isFunction(a.uniqueSort)?a.uniqueSort(y):a.unique(y),z.push(''+E+""),e=null,x===this.o.weekEnd&&z.push(""),u.setUTCDate(u.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(z.join(""));var F=q[this.o.language].monthsTitle||q.en.monthsTitle||"Months",G=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?F:h).end().find("tbody span").removeClass("active");if(a.each(this.dates,(function(a,b){b.getUTCFullYear()===h&&G.eq(b.getUTCMonth()).addClass("active")})),(hl)&&G.addClass("disabled"),h===j&&G.slice(0,k).addClass("disabled"),h===l&&G.slice(m+1).addClass("disabled"),this.o.beforeShowMonth!==a.noop){var H=this;a.each(G,(function(c,d){var e=new Date(h,c,1),f=H.o.beforeShowMonth(e);f===b?f={}:"boolean"==typeof f?f={enabled:f}:"string"==typeof f&&(f={classes:f}),!1!==f.enabled||a(d).hasClass("disabled")||a(d).addClass("disabled"),f.classes&&a(d).addClass(f.classes),f.tooltip&&a(d).prop("title",f.tooltip)}))}this._fill_yearsView(".datepicker-years","year",10,h,j,l,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,h,j,l,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,h,j,l,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var a,b,c=new Date(this.viewDate),d=c.getUTCFullYear(),e=c.getUTCMonth(),f=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,g=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,h=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,i=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,j=1;switch(this.viewMode){case 4:j*=10;case 3:j*=10;case 2:j*=10;case 1:a=Math.floor(d/j)*j<=f,b=Math.floor(d/j)*j+j>h;break;case 0:a=d<=f&&e<=g,b=d>=h&&e>=i}this.picker.find(".prev").toggleClass("disabled",a),this.picker.find(".next").toggleClass("disabled",b)}},click:function(b){var e,f,g,h;b.preventDefault(),b.stopPropagation(),(e=a(b.target)).hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),e.hasClass("today")&&!e.hasClass("day")&&(this.setViewMode(0),this._setDate(d(),"linked"===this.o.todayBtn?null:"view")),e.hasClass("clear")&&this.clearDates(),e.hasClass("disabled")||(e.hasClass("month")||e.hasClass("year")||e.hasClass("decade")||e.hasClass("century"))&&(this.viewDate.setUTCDate(1),f=1,1===this.viewMode?(h=e.parent().find("span").index(e),g=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(h)):(h=0,g=Number(e.text()),this.viewDate.setUTCFullYear(g)),this._trigger(r.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(c(g,h,1)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(b){var c,d=a(b.currentTarget).data("date"),e=new Date(d);this.o.updateViewDate&&(e.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),e.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(e)},navArrowsClick:function(b){var c,d=a(b.currentTarget).hasClass("prev")?-1:1;0!==this.viewMode&&(d*=12*r.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,d),this._trigger(r.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a||this.dates.clear(),-1!==b?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(b):!1===this.o.multidate?(this.dates.clear(),this.dates.push(a)):this.dates.push(a),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),(!b&&this.o.updateViewDate||"view"===b)&&(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),b&&"view"===b||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||b&&"date"!==b||this.hide()},moveDay:function(a,b){var c=new Date(a);return c.setUTCDate(a.getUTCDate()+b),c},moveWeek:function(a,b){return this.moveDay(a,7*b)},moveMonth:function(a,b){if(!g(a))return this.o.defaultViewDate;if(!b)return a;var c,d,e=new Date(a.valueOf()),f=e.getUTCDate(),h=e.getUTCMonth(),i=Math.abs(b);if(b=b>0?1:-1,1===i)d=-1===b?function(){return e.getUTCMonth()===h}:function(){return e.getUTCMonth()!==c},c=h+b,e.setUTCMonth(c),c=(c+12)%12;else{for(var j=0;j0},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(this.picker.is(":visible")){var b,c,d=!1,e=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault(),a.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;b=37===a.keyCode||38===a.keyCode?-1:1,0===this.viewMode?a.ctrlKey?(c=this.moveAvailableDate(e,b,"moveYear"))&&this._trigger("changeYear",this.viewDate):a.shiftKey?(c=this.moveAvailableDate(e,b,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===a.keyCode||39===a.keyCode?c=this.moveAvailableDate(e,b,"moveDay"):this.weekOfDateIsDisabled(e)||(c=this.moveAvailableDate(e,b,"moveWeek")):1===this.viewMode?(38!==a.keyCode&&40!==a.keyCode||(b*=4),c=this.moveAvailableDate(e,b,"moveMonth")):2===this.viewMode&&(38!==a.keyCode&&40!==a.keyCode||(b*=4),c=this.moveAvailableDate(e,b,"moveYear")),c&&(this.focusDate=this.viewDate=c,this.setValue(),this.fill(),a.preventDefault());break;case 13:if(!this.o.forceParse)break;e=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(e),d=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),a.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}d&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))}else 40!==a.keyCode&&27!==a.keyCode||(this.show(),a.stopPropagation())},setViewMode:function(a){this.viewMode=a,this.picker.children("div").hide().filter(".datepicker-"+r.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var l=function(b,c){a.data(b,"datepicker",this),this.element=a(b),this.inputs=a.map(c.inputs,(function(a){return a.jquery?a[0]:a})),delete c.inputs,this.keepEmptyValues=c.keepEmptyValues,delete c.keepEmptyValues,n.call(a(this.inputs),c).on("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,(function(b){return a.data(b,"datepicker")})),this.updateDates()};l.prototype={updateDates:function(){this.dates=a.map(this.pickers,(function(a){return a.getUTCDate()})),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,(function(a){return a.valueOf()}));a.each(this.pickers,(function(a,c){c.setRange(b)}))},clearDates:function(){a.each(this.pickers,(function(a,b){b.clearDates()}))},dateUpdated:function(c){if(!this.updating){this.updating=!0;var d=a.data(c.target,"datepicker");if(d!==b){var e=d.getUTCDate(),f=this.keepEmptyValues,g=a.inArray(c.target,this.inputs),h=g-1,i=g+1,j=this.inputs.length;if(-1!==g){if(a.each(this.pickers,(function(a,b){b.getUTCDate()||b!==d&&f||b.setUTCDate(e)})),e=0&&ethis.dates[i])for(;ithis.dates[i];)this.pickers[i++].setUTCDate(e);this.updateDates(),delete this.updating}}}},destroy:function(){a.map(this.pickers,(function(a){a.destroy()})),a(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:f("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var m=a.fn.datepicker,n=function(c){var d=Array.apply(null,arguments),e;if(d.shift(),this.each((function(){var b=a(this),f=b.data("datepicker"),g="object"==typeof c&&c;if(!f){var j=h(this,"date"),m,n=i(a.extend({},o,j,g).language),p=a.extend({},o,n,j,g);b.hasClass("input-daterange")||p.inputs?(a.extend(p,{inputs:p.inputs||b.find("input").toArray()}),f=new l(this,p)):f=new k(this,p),b.data("datepicker",f)}"string"==typeof c&&"function"==typeof f[c]&&(e=f[c].apply(f,d))})),e===b||e instanceof k||e instanceof l)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+c+" function)");return e};a.fn.datepicker=n;var o=a.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:a.noop,beforeShowMonth:a.noop,beforeShowYear:a.noop,beforeShowDecade:a.noop,beforeShowCentury:a.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"«",rightArrow:"»"},showWeekDays:!0},p=a.fn.datepicker.locale_opts=["format","rtl","weekStart"];a.fn.datepicker.Constructor=k;var q=a.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},r={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(a){if("function"==typeof a.toValue&&"function"==typeof a.toDisplay)return a;var b=a.replace(this.validParts,"\0").split("\0"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(c,e,f,g){function h(a,b){return!0===b&&(b=10),a<100&&(a+=2e3)>(new Date).getFullYear()+b&&(a-=100),a}function i(){var a=this.slice(0,j[n].length),b=j[n].slice(0,a.length);return a.toLowerCase()===b.toLowerCase()}if(!c)return b;if(c instanceof Date)return c;if("string"==typeof e&&(e=r.parseFormat(e)),e.toValue)return e.toValue(c,e,f);var j,l,m,n,o,p={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},s={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(c in s&&(c=s[c]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(c)){for(j=c.match(/([\-+]\d+)([dmwy])/gi),c=new Date,n=0;n'+o.templates.leftArrow+''+o.templates.rightArrow+"",contTemplate:'',footTemplate:''};r.template='
'+r.headTemplate+""+r.footTemplate+'
'+r.headTemplate+r.contTemplate+r.footTemplate+'
'+r.headTemplate+r.contTemplate+r.footTemplate+'
'+r.headTemplate+r.contTemplate+r.footTemplate+'
'+r.headTemplate+r.contTemplate+r.footTemplate+"
",a.fn.datepicker.DPGlobal=r,a.fn.datepicker.noConflict=function(){return a.fn.datepicker=m,this},a.fn.datepicker.version="1.9.0",a.fn.datepicker.deprecated=function(a){var b=window.console;b&&b.warn&&b.warn("DEPRECATED: "+a)},a(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',(function(b){var c=a(this);c.data("datepicker")||(b.preventDefault(),n.call(c,"show"))})),a((function(){n.call(a('[data-provide="datepicker-inline"]'))}))})),$.fn.datepicker.defaults.zIndexOffset=10,function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}((function(d,f){function a(){var q,k,p,l,j,n,m,o;if((p=(null!=(m=(k=(new Date).toString()).split("(")[1])?m.slice(0,-1):0)||k.split(" "))instanceof Array){n=[];for(var l=0,j=p.length;lthis.endDate?o.push("disabled"):Math.floor(this.date.getUTCMinutes()/this.minuteStep)===Math.floor(n.getUTCMinutes()/this.minuteStep)&&o.push("active"),o.concat(p||[])},this.onRenderYear=function(o){var q=(j.onRenderYear||function(){return[]})(o),p=["year"];"string"==typeof q&&(q=[q]),this.date.getUTCFullYear()===o.getUTCFullYear()&&p.push("active");var n=o.getUTCFullYear(),r=this.endDate.getUTCFullYear();return(or)&&p.push("disabled"),p.concat(q||[])},this.onRenderMonth=function(n){var p=(j.onRenderMonth||function(){return[]})(n),o;return"string"==typeof p&&(p=[p]),["month"].concat(p||[])},this.startDate=new Date(-8639968443048e3),this.endDate=new Date(8639968443048e3),this.datesDisabled=[],this.daysOfWeekDisabled=[],this.setStartDate(j.startDate||this.element.data("date-startdate")),this.setEndDate(j.endDate||this.element.data("date-enddate")),this.setDatesDisabled(j.datesDisabled||this.element.data("date-dates-disabled")),this.setDaysOfWeekDisabled(j.daysOfWeekDisabled||this.element.data("date-days-of-week-disabled")),this.setMinutesDisabled(j.minutesDisabled||this.element.data("date-minute-disabled")),this.setHoursDisabled(j.hoursDisabled||this.element.data("date-hour-disabled")),this.fillDow(),this.fillMonths(),this.update(),this.showMode(),this.isInline&&this.show()};g.prototype={constructor:g,_events:[],_attachEvents:function(){this._detachEvents(),this.isInput?this._events=[[this.element,{focus:d.proxy(this.show,this),keyup:d.proxy(this.update,this),keydown:d.proxy(this.keydown,this)}]]:this.component&&this.hasInput?(this._events=[[this.element.find("input"),{focus:d.proxy(this.show,this),keyup:d.proxy(this.update,this),keydown:d.proxy(this.keydown,this)}],[this.component,{click:d.proxy(this.show,this)}]],this.componentReset&&this._events.push([this.componentReset,{click:d.proxy(this.reset,this)}])):this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:d.proxy(this.show,this)}]];for(var j=0,k,l;j=this.startDate&&i<=this.endDate?(this.date=i,this.setValue(),this.viewDate=this.date,this.fill()):this.element.trigger({type:"outOfRange",date:i,startDate:this.startDate,endDate:this.endDate})},setFormat:function(j){var i;this.format=c.parseFormat(j,this.formatType),this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&i.val()&&this.setValue()},setValue:function(){var i=this.getFormattedDate();this.isInput?this.element.val(i):(this.component&&this.element.find("input").val(i),this.element.data("date",i)),this.linkField&&d("#"+this.linkField).val(this.getFormattedDate(this.linkFormat))},getFormattedDate:function(i){return i=i||this.format,c.formatDate(this.date,i,this.language,this.formatType,this.timezone)},setStartDate:function(i){this.startDate=i||this.startDate,8639968443048e3!==this.startDate.valueOf()&&(this.startDate=c.parseDate(this.startDate,this.format,this.language,this.formatType,this.timezone)),this.update(),this.updateNavArrows()},setEndDate:function(i){this.endDate=i||this.endDate,8639968443048e3!==this.endDate.valueOf()&&(this.endDate=c.parseDate(this.endDate,this.format,this.language,this.formatType,this.timezone)),this.update(),this.updateNavArrows()},setDatesDisabled:function(j){this.datesDisabled=j||[],d.isArray(this.datesDisabled)||(this.datesDisabled=this.datesDisabled.split(/,\s*/));var i=this;this.datesDisabled=d.map(this.datesDisabled,(function(k){return c.parseDate(k,i.format,i.language,i.formatType,i.timezone).toDateString()})),this.update(),this.updateNavArrows()},setTitle:function(i,j){return this.picker.find(i).find("th:eq(1)").text(!1===this.title?j:this.title)},setDaysOfWeekDisabled:function(i){this.daysOfWeekDisabled=i||[],d.isArray(this.daysOfWeekDisabled)||(this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/)),this.daysOfWeekDisabled=d.map(this.daysOfWeekDisabled,(function(j){return parseInt(j,10)})),this.update(),this.updateNavArrows()},setMinutesDisabled:function(i){this.minutesDisabled=i||[],d.isArray(this.minutesDisabled)||(this.minutesDisabled=this.minutesDisabled.split(/,\s*/)),this.minutesDisabled=d.map(this.minutesDisabled,(function(j){return parseInt(j,10)})),this.update(),this.updateNavArrows()},setHoursDisabled:function(i){this.hoursDisabled=i||[],d.isArray(this.hoursDisabled)||(this.hoursDisabled=this.hoursDisabled.split(/,\s*/)),this.hoursDisabled=d.map(this.hoursDisabled,(function(j){return parseInt(j,10)})),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){if(!this.zIndex){var j=0;d("div").each((function(){var o=parseInt(d(this).css("zIndex"),10);o>j&&(j=o)})),this.zIndex=j+10}var n,m,l,k;k=this.container instanceof d?this.container.offset():d(this.container).offset(),this.component?(l=(n=this.component.offset()).left,"bottom-left"!==this.pickerPosition&&"top-left"!==this.pickerPosition||(l+=this.component.outerWidth()-this.picker.outerWidth())):(l=(n=this.element.offset()).left,"bottom-left"!==this.pickerPosition&&"top-left"!==this.pickerPosition||(l+=this.element.outerWidth()-this.picker.outerWidth()));var i=document.body.clientWidth||window.innerWidth;l+220>i&&(l=i-220),m="top-left"===this.pickerPosition||"top-right"===this.pickerPosition?n.top-this.picker.outerHeight():n.top+this.height,m-=k.top,l-=k.left,this.picker.css({top:m,left:l,zIndex:this.zIndex})}},hour_minute:"^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]",update:function(){var i,j=!1;arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof Date)?(i=arguments[0],j=!0):"string"==typeof(i=(this.isInput?this.element.val():this.element.find("input").val())||this.element.data("date")||this.initialDate)&&(i=i.replace(/^\s+|\s+$/g,"")),i||(i=new Date,j=!1),"string"==typeof i&&(new RegExp(this.hour_minute).test(i)||new RegExp(this.hour_minute+":[0-5][0-9]").test(i))&&(i=this.getDate()),this.date=c.parseDate(i,this.format,this.language,this.formatType,this.timezone),j&&this.setValue(),this.datethis.endDate?this.viewDate=new Date(this.endDate):this.viewDate=new Date(this.date),this.fill()},fillDow:function(){for(var i=this.weekStart,j="";i'+e[this.language].daysMin[i++%7]+"";j+="",this.picker.find(".datetimepicker-days thead").append(j)},fillMonths:function(){for(var l="",m=new Date(this.viewDate),k=0;k<12;k++){var j;m.setUTCMonth(k),l+=''+e[this.language].monthsShort[k]+""}this.picker.find(".datetimepicker-months td").html(l)},fill:function(){if(this.date&&this.viewDate){var E=new Date(this.viewDate),t=E.getUTCFullYear(),G=E.getUTCMonth(),n=E.getUTCDate(),A=E.getUTCHours(),w=this.startDate.getUTCFullYear(),B=this.startDate.getUTCMonth(),p=this.endDate.getUTCFullYear(),x=this.endDate.getUTCMonth()+1,q=new h(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.date.getUTCDate()).valueOf(),D=new Date;if(this.setTitle(".datetimepicker-days",e[this.language].months[G]+" "+t),"time"===this.formatViewType){var k=this.getFormattedDate();this.setTitle(".datetimepicker-hours",k),this.setTitle(".datetimepicker-minutes",k)}else this.setTitle(".datetimepicker-hours",n+" "+e[this.language].months[G]+" "+t),this.setTitle(".datetimepicker-minutes",n+" "+e[this.language].months[G]+" "+t);this.picker.find("tfoot th.today").text(e[this.language].today||e.en.today).toggle(!1!==this.todayBtn),this.picker.find("tfoot th.clear").text(e[this.language].clear||e.en.clear).toggle(!1!==this.clearBtn),this.updateNavArrows(),this.fillMonths();var I=h(t,G-1,28,0,0,0,0),z=c.getDaysInMonth(I.getUTCFullYear(),I.getUTCMonth());I.setUTCDate(z),I.setUTCDate(z-(I.getUTCDay()-this.weekStart+7)%7);var j=new Date(I);j.setUTCDate(j.getUTCDate()+42),j=j.valueOf();for(var r=[],F;I.valueOf()"),F=this.onRenderDay(I),I.getUTCFullYear()t||I.getUTCFullYear()===t&&I.getUTCMonth()>G)&&F.push("new"),this.todayHighlight&&I.getUTCFullYear()===D.getFullYear()&&I.getUTCMonth()===D.getMonth()&&I.getUTCDate()===D.getDate()&&F.push("today"),I.valueOf()===q&&F.push("active"),(I.valueOf()+864e5<=this.startDate||I.valueOf()>this.endDate||-1!==d.inArray(I.getUTCDay(),this.daysOfWeekDisabled)||-1!==d.inArray(I.toDateString(),this.datesDisabled))&&F.push("disabled"),r.push(''+I.getUTCDate()+""),I.getUTCDay()===this.weekEnd&&r.push(""),I.setUTCDate(I.getUTCDate()+1);this.picker.find(".datetimepicker-days tbody").empty().append(r.join("")),r=[];var u="",C="",s="",l=this.hoursDisabled||[];E=new Date(this.viewDate);for(var y=0;y<24;y++){E.setUTCHours(y),F=this.onRenderHour(E),-1!==l.indexOf(y)&&F.push("disabled");var v=h(t,G,n,y);v.valueOf()+36e5<=this.startDate||v.valueOf()>this.endDate?F.push("disabled"):A===y&&F.push("active"),this.showMeridian&&2===e[this.language].meridiem.length?((C=y<12?e[this.language].meridiem[0]:e[this.language].meridiem[1])!==s&&(""!==s&&r.push(""),r.push('
'+C.toUpperCase()+"")),s=C,u=y%12?y%12:12,y<12?F.push("hour_am"):F.push("hour_pm"),r.push(''+u+""),23===y&&r.push("
")):(u=y+":00",r.push(''+u+""))}this.picker.find(".datetimepicker-hours td").html(r.join("")),r=[],u="",C="",s="";var m=this.minutesDisabled||[];E=new Date(this.viewDate);for(var y=0;y<60;y+=this.minuteStep)-1===m.indexOf(y)&&(E.setUTCMinutes(y),E.setUTCSeconds(0),F=this.onRenderMinute(E),this.showMeridian&&2===e[this.language].meridiem.length?((C=A<12?e[this.language].meridiem[0]:e[this.language].meridiem[1])!==s&&(""!==s&&r.push(""),r.push('
'+C.toUpperCase()+"")),s=C,u=A%12?A%12:12,r.push(''+u+":"+(y<10?"0"+y:y)+""),59===y&&r.push("
")):(u=y+":00",r.push(''+A+":"+(y<10?"0"+y:y)+"")));this.picker.find(".datetimepicker-minutes td").html(r.join(""));var J=this.date.getUTCFullYear(),o=this.setTitle(".datetimepicker-months",t).end().find(".month").removeClass("active");J===t&&o.eq(this.date.getUTCMonth()).addClass("active"),(tp)&&o.addClass("disabled"),t===w&&o.slice(0,B).addClass("disabled"),t===p&&o.slice(x).addClass("disabled"),r="",t=10*parseInt(t/10,10);var H=this.setTitle(".datetimepicker-years",t+"-"+(t+9)).end().find("td");t-=1,E=new Date(this.viewDate);for(var y=-1;y<11;y++)E.setUTCFullYear(t),F=this.onRenderYear(E),-1!==y&&10!==y||F.push(b),r+=''+t+"",t+=1;H.html(r),this.place()}},updateNavArrows:function(){var m=new Date(this.viewDate),k=m.getUTCFullYear(),l=m.getUTCMonth(),j=m.getUTCDate(),i=m.getUTCHours();switch(this.viewMode){case 0:k<=this.startDate.getUTCFullYear()&&l<=this.startDate.getUTCMonth()&&j<=this.startDate.getUTCDate()&&i<=this.startDate.getUTCHours()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),k>=this.endDate.getUTCFullYear()&&l>=this.endDate.getUTCMonth()&&j>=this.endDate.getUTCDate()&&i>=this.endDate.getUTCHours()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:k<=this.startDate.getUTCFullYear()&&l<=this.startDate.getUTCMonth()&&j<=this.startDate.getUTCDate()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),k>=this.endDate.getUTCFullYear()&&l>=this.endDate.getUTCMonth()&&j>=this.endDate.getUTCDate()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 2:k<=this.startDate.getUTCFullYear()&&l<=this.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),k>=this.endDate.getUTCFullYear()&&l>=this.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 3:case 4:k<=this.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),k>=this.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}},mousewheel:function(j){if(j.preventDefault(),j.stopPropagation(),!this.wheelPause){this.wheelPause=!0;var i,l=j.originalEvent.wheelDelta,k=l>0?1:0===l?0:-1;this.wheelViewModeNavigationInverseDirection&&(k=-k),this.showMode(k),setTimeout(d.proxy((function(){this.wheelPause=!1}),this),this.wheelViewModeNavigationDelay)}},click:function(m){m.stopPropagation(),m.preventDefault();var n=d(m.target).closest("span, td, th, legend");if(n.is("."+this.icontype)&&(n=d(n).parent().closest("span, td, th, legend")),1===n.length){if(n.is(".disabled"))return void this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var i=c.modes[this.viewMode].navStep*("prev"===n[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,i);break;case 1:this.viewDate=this.moveDate(this.viewDate,i);break;case 2:this.viewDate=this.moveMonth(this.viewDate,i);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,i)}this.fill(),this.element.trigger({type:n[0].className+":"+this.convertViewModeText(this.viewMode),date:this.viewDate,startDate:this.startDate,endDate:this.endDate});break;case"clear":this.reset(),this.autoclose&&this.hide();break;case"today":var j=new Date;(j=h(j.getFullYear(),j.getMonth(),j.getDate(),j.getHours(),j.getMinutes(),j.getSeconds(),0))this.endDate&&(j=this.endDate),this.viewMode=this.startViewMode,this.showMode(0),this._setDate(j),this.fill(),this.autoclose&&this.hide()}break;case"span":if(!n.is(".disabled")){var p=this.viewDate.getUTCFullYear(),o=this.viewDate.getUTCMonth(),q=this.viewDate.getUTCDate(),r=this.viewDate.getUTCHours(),k=this.viewDate.getUTCMinutes(),s=this.viewDate.getUTCSeconds();if(n.is(".month")?(this.viewDate.setUTCDate(1),o=n.parent().find("span").index(n),q=this.viewDate.getUTCDate(),this.viewDate.setUTCMonth(o),this.element.trigger({type:"changeMonth",date:this.viewDate}),this.viewSelect>=3&&this._setDate(h(p,o,q,r,k,s,0))):n.is(".year")?(this.viewDate.setUTCDate(1),p=parseInt(n.text(),10)||0,this.viewDate.setUTCFullYear(p),this.element.trigger({type:"changeYear",date:this.viewDate}),this.viewSelect>=4&&this._setDate(h(p,o,q,r,k,s,0))):n.is(".hour")?(r=parseInt(n.text(),10)||0,(n.hasClass("hour_am")||n.hasClass("hour_pm"))&&(12===r&&n.hasClass("hour_am")?r=0:12!==r&&n.hasClass("hour_pm")&&(r+=12)),this.viewDate.setUTCHours(r),this.element.trigger({type:"changeHour",date:this.viewDate}),this.viewSelect>=1&&this._setDate(h(p,o,q,r,k,s,0))):n.is(".minute")&&(k=parseInt(n.text().substr(n.text().indexOf(":")+1),10)||0,this.viewDate.setUTCMinutes(k),this.element.trigger({type:"changeMinute",date:this.viewDate}),this.viewSelect>=0&&this._setDate(h(p,o,q,r,k,s,0))),0!==this.viewMode){var l=this.viewMode;this.showMode(-1),this.fill(),l===this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide()}break;case"td":if(n.is(".day")&&!n.is(".disabled")){var q=parseInt(n.text(),10)||1,p=this.viewDate.getUTCFullYear(),o=this.viewDate.getUTCMonth(),r=this.viewDate.getUTCHours(),k=this.viewDate.getUTCMinutes(),s=this.viewDate.getUTCSeconds();n.is(".old")?0===o?(o=11,p-=1):o-=1:n.is(".new")&&(11===o?(o=0,p+=1):o+=1),this.viewDate.setUTCFullYear(p),this.viewDate.setUTCMonth(o,q),this.element.trigger({type:"changeDay",date:this.viewDate}),this.viewSelect>=2&&this._setDate(h(p,o,q,r,k,s,0))}var l=this.viewMode;this.showMode(-1),this.fill(),l===this.viewMode&&this.autoclose&&this.hide()}}},_setDate:function(i,k){var j;k&&"date"!==k||(this.date=i),k&&"view"!==k||(this.viewDate=i),this.fill(),this.setValue(),this.isInput?j=this.element:this.component&&(j=this.element.find("input")),j&&j.change(),this.element.trigger({type:"changeDate",date:this.getDate()}),null===i&&(this.date=this.viewDate)},moveMinute:function(j,i){if(!i)return j;var k=new Date(j.valueOf());return k.setUTCMinutes(k.getUTCMinutes()+i*this.minuteStep),k},moveHour:function(j,i){if(!i)return j;var k=new Date(j.valueOf());return k.setUTCHours(k.getUTCHours()+i),k},moveDate:function(j,i){if(!i)return j;var k=new Date(j.valueOf());return k.setUTCDate(k.getUTCDate()+i),k},moveMonth:function(j,k){if(!k)return j;var n=new Date(j.valueOf()),r=n.getUTCDate(),o=n.getUTCMonth(),m=Math.abs(k),q,p;if(k=k>0?1:-1,1===m)p=-1===k?function(){return n.getUTCMonth()===o}:function(){return n.getUTCMonth()!==q},q=o+k,n.setUTCMonth(q),(q<0||q>11)&&(q=(q+12)%12);else{for(var l=0;l=this.startDate&&i<=this.endDate},keydown:function(o){if(this.picker.is(":not(:visible)"))27===o.keyCode&&this.show();else{var k=!1,j,i,n,l;switch(o.keyCode){case 27:this.hide(),o.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation)break;j=37===o.keyCode?-1:1;var m=this.viewMode;o.ctrlKey?m+=2:o.shiftKey&&(m+=1),4===m?(i=this.moveYear(this.date,j),n=this.moveYear(this.viewDate,j)):3===m?(i=this.moveMonth(this.date,j),n=this.moveMonth(this.viewDate,j)):2===m?(i=this.moveDate(this.date,j),n=this.moveDate(this.viewDate,j)):1===m?(i=this.moveHour(this.date,j),n=this.moveHour(this.viewDate,j)):0===m&&(i=this.moveMinute(this.date,j),n=this.moveMinute(this.viewDate,j)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=n,this.setValue(),this.update(),o.preventDefault(),k=!0);break;case 38:case 40:if(!this.keyboardNavigation)break;j=38===o.keyCode?-1:1,m=this.viewMode,o.ctrlKey?m+=2:o.shiftKey&&(m+=1),4===m?(i=this.moveYear(this.date,j),n=this.moveYear(this.viewDate,j)):3===m?(i=this.moveMonth(this.date,j),n=this.moveMonth(this.viewDate,j)):2===m?(i=this.moveDate(this.date,7*j),n=this.moveDate(this.viewDate,7*j)):1===m?this.showMeridian?(i=this.moveHour(this.date,6*j),n=this.moveHour(this.viewDate,6*j)):(i=this.moveHour(this.date,4*j),n=this.moveHour(this.viewDate,4*j)):0===m&&(i=this.moveMinute(this.date,4*j),n=this.moveMinute(this.viewDate,4*j)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=n,this.setValue(),this.update(),o.preventDefault(),k=!0);break;case 13:if(0!==this.viewMode){var p=this.viewMode;this.showMode(-1),this.fill(),p===this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide();o.preventDefault();break;case 9:this.hide()}if(k)this.isInput?l=this.element:this.component&&(l=this.element.find("input")),l&&l.change(),this.element.trigger({type:"changeDate",date:this.getDate()})}},showMode:function(i){if(i){var j=Math.max(0,Math.min(c.modes.length-1,this.viewMode+i));j>=this.minView&&j<=this.maxView&&(this.element.trigger({type:"changeMode",date:this.viewDate,oldViewMode:this.viewMode,newViewMode:j}),this.viewMode=j)}this.picker.find(">div").hide().filter(".datetimepicker-"+c.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()},reset:function(){this._setDate(null,"date")},convertViewModeText:function(i){switch(i){case 4:return"decade";case 3:return"year";case 2:return"month";case 1:return"day";case 0:return"hour"}}};var b=d.fn.datetimepicker;d.fn.datetimepicker=function(k){var i=Array.apply(null,arguments),j;return i.shift(),this.each((function(){var n=d(this),m=n.data("datetimepicker"),l="object"==typeof k&&k;if(m||n.data("datetimepicker",m=new g(this,d.extend({},d.fn.datetimepicker.defaults,l))),"string"==typeof k&&"function"==typeof m[k]&&(j=m[k].apply(m,i))!==f)return!1})),j!==f?j:this},d.fn.datetimepicker.defaults={},d.fn.datetimepicker.Constructor=g;var e=d.fn.datetimepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["am","pm"],suffix:["st","nd","rd","th"],today:"Today",clear:"Clear"}},c={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(i){return i%4==0&&i%100!=0||i%400==0},getDaysInMonth:function(i,j){return[31,c.isLeapYear(i)?29:28,31,30,31,30,31,31,30,31,30,31][j]},getDefaultFormat:function(i,j){if("standard"===i)return"input"===j?"yyyy-mm-dd hh:ii":"yyyy-mm-dd hh:ii:ss";if("php"===i)return"input"===j?"Y-m-d H:i":"Y-m-d H:i:s";throw new Error("Invalid format type.")},validParts:function(i){if("standard"===i)return/t|hh?|HH?|p|P|z|Z|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;if("php"===i)return/[dDjlNwzFmMnStyYaABgGhHis]/g;throw new Error("Invalid format type.")},nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,parseFormat:function(l,j){var i=l.replace(this.validParts(j),"\0").split("\0"),k=l.match(this.validParts(j));if(!i||!i.length||!k||0===k.length)throw new Error("Invalid date format.");return{separators:i,parts:k}},parseDate:function(A,y,v,j,r){if(A instanceof Date){var u=new Date(A.valueOf()-6e4*A.getTimezoneOffset());return u.setMilliseconds(0),u}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(A)&&(y=this.parseFormat("yyyy-mm-dd",j)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(A)&&(y=this.parseFormat("yyyy-mm-dd hh:ii",j)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(A)&&(y=this.parseFormat("yyyy-mm-dd hh:ii:ss",j)),/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(A)){var l=/([-+]\d+)([dmwy])/,q=A.match(/([-+]\d+)([dmwy])/g),t,p;A=new Date;for(var x=0;x',headTemplateV3:' ',contTemplate:'',footTemplate:''};c.template='
'+c.headTemplate+c.contTemplate+c.footTemplate+'
'+c.headTemplate+c.contTemplate+c.footTemplate+'
'+c.headTemplate+""+c.footTemplate+'
'+c.headTemplate+c.contTemplate+c.footTemplate+'
'+c.headTemplate+c.contTemplate+c.footTemplate+"
",c.templateV3='
'+c.headTemplateV3+c.contTemplate+c.footTemplate+'
'+c.headTemplateV3+c.contTemplate+c.footTemplate+'
'+c.headTemplateV3+""+c.footTemplate+'
'+c.headTemplateV3+c.contTemplate+c.footTemplate+'
'+c.headTemplateV3+c.contTemplate+c.footTemplate+"
",d.fn.datetimepicker.DPGlobal=c,d.fn.datetimepicker.noConflict=function(){return d.fn.datetimepicker=b,this},d(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api",'[data-provide="datetimepicker"]',(function(j){var i=d(this);i.data("datetimepicker")||(j.preventDefault(),i.datetimepicker("show"))})),d((function(){d('[data-provide="datetimepicker-inline"]').datetimepicker()}))})),function(a,b,c){"use strict";var d=function(b,c){this.widget="",this.$element=a(b),this.defaultTime=c.defaultTime,this.disableFocus=c.disableFocus,this.disableMousewheel=c.disableMousewheel,this.isOpen=c.isOpen,this.minuteStep=c.minuteStep,this.modalBackdrop=c.modalBackdrop,this.orientation=c.orientation,this.secondStep=c.secondStep,this.snapToStep=c.snapToStep,this.showInputs=c.showInputs,this.showMeridian=c.showMeridian,this.showSeconds=c.showSeconds,this.template=c.template,this.appendWidgetTo=c.appendWidgetTo,this.showWidgetOnAddonClick=c.showWidgetOnAddonClick,this.icons=c.icons,this.maxHours=c.maxHours,this.explicitMode=c.explicitMode,this.handleDocumentClick=function(a){var b=a.data.scope;b.$element.parent().find(a.target).length||b.$widget.is(a.target)||b.$widget.find(a.target).length||b.hideWidget()},this._init()};d.prototype={constructor:d,_init:function(){var b=this;this.showWidgetOnAddonClick&&this.$element.parent().hasClass("input-group")&&this.$element.parent().hasClass("bootstrap-timepicker")?(this.$element.parent(".input-group.bootstrap-timepicker").find(".input-group-addon").on({"click.timepicker":a.proxy(this.showWidget,this)}),this.$element.on({"focus.timepicker":a.proxy(this.highlightUnit,this),"click.timepicker":a.proxy(this.highlightUnit,this),"keydown.timepicker":a.proxy(this.elementKeydown,this),"blur.timepicker":a.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":a.proxy(this.mousewheel,this)})):this.template?this.$element.on({"focus.timepicker":a.proxy(this.showWidget,this),"click.timepicker":a.proxy(this.showWidget,this),"blur.timepicker":a.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":a.proxy(this.mousewheel,this)}):this.$element.on({"focus.timepicker":a.proxy(this.highlightUnit,this),"click.timepicker":a.proxy(this.highlightUnit,this),"keydown.timepicker":a.proxy(this.elementKeydown,this),"blur.timepicker":a.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":a.proxy(this.mousewheel,this)}),!1!==this.template?this.$widget=a(this.getTemplate()).on("click",a.proxy(this.widgetClick,this)):this.$widget=!1,this.showInputs&&!1!==this.$widget&&this.$widget.find("input").each((function(){a(this).on({"click.timepicker":function(){a(this).select()},"keydown.timepicker":a.proxy(b.widgetKeydown,b),"keyup.timepicker":a.proxy(b.widgetKeyup,b)})})),this.setDefaultTime(this.defaultTime)},blurElement:function(){this.highlightedUnit=null,this.updateFromElementVal()},clear:function(){this.hour="",this.minute="",this.second="",this.meridian="",this.$element.val("")},decrementHour:function(){if(this.showMeridian)if(1===this.hour)this.hour=12;else{if(12===this.hour)return this.hour--,this.toggleMeridian();if(0===this.hour)return this.hour=11,this.toggleMeridian();this.hour--}else this.hour<=0?this.hour=this.maxHours-1:this.hour--},decrementMinute:function(a){var b;0>(b=a?this.minute-a:this.minute-this.minuteStep)?(this.decrementHour(),this.minute=b+60):this.minute=b},decrementSecond:function(){var a=this.second-this.secondStep;0>a?(this.decrementMinute(!0),this.second=a+60):this.second=a},elementKeydown:function(a){switch(a.which){case 9:if(a.shiftKey){if("hour"===this.highlightedUnit){this.hideWidget();break}this.highlightPrevUnit()}else{if(this.showMeridian&&"meridian"===this.highlightedUnit||this.showSeconds&&"second"===this.highlightedUnit||!this.showMeridian&&!this.showSeconds&&"minute"===this.highlightedUnit){this.hideWidget();break}this.highlightNextUnit()}a.preventDefault(),this.updateFromElementVal();break;case 27:this.updateFromElementVal();break;case 37:a.preventDefault(),this.highlightPrevUnit(),this.updateFromElementVal();break;case 38:switch(a.preventDefault(),this.highlightedUnit){case"hour":this.incrementHour(),this.highlightHour();break;case"minute":this.incrementMinute(),this.highlightMinute();break;case"second":this.incrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update();break;case 39:a.preventDefault(),this.highlightNextUnit(),this.updateFromElementVal();break;case 40:switch(a.preventDefault(),this.highlightedUnit){case"hour":this.decrementHour(),this.highlightHour();break;case"minute":this.decrementMinute(),this.highlightMinute();break;case"second":this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update()}},getCursorPosition:function(){var a=this.$element.get(0);if("selectionStart"in a)return a.selectionStart;if(c.selection){a.focus();var b=c.selection.createRange(),d=c.selection.createRange().text.length;return b.moveStart("character",-a.value.length),b.text.length-d}},getTemplate:function(){var a,b,c,d,e,f;switch(this.showInputs?(b='',c='',d='',e=''):(b='',c='',d='',e=''),f=''+(this.showSeconds?'':"")+(this.showMeridian?'':"")+" "+(this.showSeconds?'":"")+(this.showMeridian?'":"")+''+(this.showSeconds?'':"")+(this.showMeridian?'':"")+"
   
"+b+' :'+c+":'+d+" '+e+"
  
",this.template){case"modal":a='';break;case"dropdown":a='"}return a},getTime:function(){return""===this.hour?"":this.hour+":"+(1===this.minute.toString().length?"0"+this.minute:this.minute)+(this.showSeconds?":"+(1===this.second.toString().length?"0"+this.second:this.second):"")+(this.showMeridian?" "+this.meridian:"")},hideWidget:function(){!1!==this.isOpen&&(this.$element.trigger({type:"hide.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),"modal"===this.template&&this.$widget.modal?this.$widget.modal("hide"):this.$widget.removeClass("open"),a(c).off("mousedown.timepicker, touchend.timepicker",this.handleDocumentClick),this.isOpen=!1,this.$widget.detach())},highlightUnit:function(){this.position=this.getCursorPosition(),this.position>=0&&this.position<=2?this.highlightHour():this.position>=3&&this.position<=5?this.highlightMinute():this.position>=6&&this.position<=8?this.showSeconds?this.highlightSecond():this.highlightMeridian():this.position>=9&&this.position<=11&&this.highlightMeridian()},highlightNextUnit:function(){switch(this.highlightedUnit){case"hour":this.highlightMinute();break;case"minute":this.showSeconds?this.highlightSecond():this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"second":this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"meridian":this.highlightHour()}},highlightPrevUnit:function(){switch(this.highlightedUnit){case"hour":this.showMeridian?this.highlightMeridian():this.showSeconds?this.highlightSecond():this.highlightMinute();break;case"minute":this.highlightHour();break;case"second":this.highlightMinute();break;case"meridian":this.showSeconds?this.highlightSecond():this.highlightMinute()}},highlightHour:function(){var a=this.$element.get(0),b=this;this.highlightedUnit="hour",a.setSelectionRange&&setTimeout((function(){b.hour<10?a.setSelectionRange(0,1):a.setSelectionRange(0,2)}),0)},highlightMinute:function(){var a=this.$element.get(0),b=this;this.highlightedUnit="minute",a.setSelectionRange&&setTimeout((function(){b.hour<10?a.setSelectionRange(2,4):a.setSelectionRange(3,5)}),0)},highlightSecond:function(){var a=this.$element.get(0),b=this;this.highlightedUnit="second",a.setSelectionRange&&setTimeout((function(){b.hour<10?a.setSelectionRange(5,7):a.setSelectionRange(6,8)}),0)},highlightMeridian:function(){var a=this.$element.get(0),b=this;this.highlightedUnit="meridian",a.setSelectionRange&&(this.showSeconds?setTimeout((function(){b.hour<10?a.setSelectionRange(8,10):a.setSelectionRange(9,11)}),0):setTimeout((function(){b.hour<10?a.setSelectionRange(5,7):a.setSelectionRange(6,8)}),0))},incrementHour:function(){if(this.showMeridian){if(11===this.hour)return this.hour++,this.toggleMeridian();12===this.hour&&(this.hour=0)}return this.hour===this.maxHours-1?void(this.hour=0):void this.hour++},incrementMinute:function(a){var b;(b=a?this.minute+a:this.minute+this.minuteStep-this.minute%this.minuteStep)>59?(this.incrementHour(),this.minute=b-60):this.minute=b},incrementSecond:function(){var a=this.second+this.secondStep-this.second%this.secondStep;a>59?(this.incrementMinute(!0),this.second=a-60):this.second=a},mousewheel:function(b){if(!this.disableMousewheel){b.preventDefault(),b.stopPropagation();var c=b.originalEvent.wheelDelta||-b.originalEvent.detail,d=null;switch("mousewheel"===b.type?d=-1*b.originalEvent.wheelDelta:"DOMMouseScroll"===b.type&&(d=40*b.originalEvent.detail),d&&(b.preventDefault(),a(this).scrollTop(d+a(this).scrollTop())),this.highlightedUnit){case"minute":c>0?this.incrementMinute():this.decrementMinute(),this.highlightMinute();break;case"second":c>0?this.incrementSecond():this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian();break;default:c>0?this.incrementHour():this.decrementHour(),this.highlightHour()}return!1}},changeToNearestStep:function(a,b){return a%b==0?a:Math.round(a%b/b)?(a+(b-a%b))%60:a-a%b},place:function(){if(!this.isInline){var c=this.$widget.outerWidth(),d=this.$widget.outerHeight(),e=10,f=a(b).width(),g=a(b).height(),h=a(b).scrollTop(),i=parseInt(this.$element.parents().filter((function(){return"auto"!==a(this).css("z-index")})).first().css("z-index"),10)+10,j=this.component?this.component.parent().offset():this.$element.offset(),k=this.component?this.component.outerHeight(!0):this.$element.outerHeight(!1),l=this.component?this.component.outerWidth(!0):this.$element.outerWidth(!1),m=j.left,n=j.top;this.$widget.removeClass("timepicker-orient-top timepicker-orient-bottom timepicker-orient-right timepicker-orient-left"),"auto"!==this.orientation.x?(this.$widget.addClass("timepicker-orient-"+this.orientation.x),"right"===this.orientation.x&&(m-=c-l)):(this.$widget.addClass("timepicker-orient-left"),j.left<0?m-=j.left-e:j.left+c>f&&(m=f-c-e));var o,p,q=this.orientation.y;"auto"===q&&(o=-h+j.top-d,p=h+g-(j.top+k+d),q=Math.max(o,p)===p?"top":"bottom"),this.$widget.addClass("timepicker-orient-"+q),"top"===q?n+=k:n-=d+parseInt(this.$widget.css("padding-top"),10),this.$widget.css({top:n,left:m,zIndex:i})}},remove:function(){a("document").off(".timepicker"),this.$widget&&this.$widget.remove(),delete this.$element.data().timepicker},setDefaultTime:function(a){if(this.$element.val())this.updateFromElementVal();else if("current"===a){var b=new Date,c=b.getHours(),d=b.getMinutes(),e=b.getSeconds(),f="AM";0!==e&&(60===(e=Math.ceil(b.getSeconds()/this.secondStep)*this.secondStep)&&(d+=1,e=0)),0!==d&&(60===(d=Math.ceil(b.getMinutes()/this.minuteStep)*this.minuteStep)&&(c+=1,d=0)),this.showMeridian&&(0===c?c=12:c>=12?(c>12&&(c-=12),f="PM"):f="AM"),this.hour=c,this.minute=d,this.second=e,this.meridian=f,this.update()}else!1===a?(this.hour=0,this.minute=0,this.second=0,this.meridian="AM"):this.setTime(a)},setTime:function(a,b){if(a){var c,d,e,f,g,h;if("object"==typeof a&&a.getMonth)e=a.getHours(),f=a.getMinutes(),g=a.getSeconds(),this.showMeridian&&(h="AM",e>12&&(h="PM",e%=12),12===e&&(h="PM"));else{if((c=(/a/i.test(a)?1:0)+(/p/i.test(a)?2:0))>2)return void this.clear();if(e=(d=a.replace(/[^0-9\:]/g,"").split(":"))[0]?d[0].toString():d.toString(),this.explicitMode&&e.length>2&&e.length%2!=0)return void this.clear();f=d[1]?d[1].toString():"",g=d[2]?d[2].toString():"",e.length>4&&(g=e.slice(-2),e=e.slice(0,-2)),e.length>2&&(f=e.slice(-2),e=e.slice(0,-2)),f.length>2&&(g=f.slice(-2),f=f.slice(0,-2)),e=parseInt(e,10),f=parseInt(f,10),g=parseInt(g,10),isNaN(e)&&(e=0),isNaN(f)&&(f=0),isNaN(g)&&(g=0),g>59&&(g=59),f>59&&(f=59),e>=this.maxHours&&(e=this.maxHours-1),this.showMeridian?(e>12&&(c=2,e-=12),c||(c=1),0===e&&(e=12),h=1===c?"AM":"PM"):12>e&&2===c?e+=12:e>=this.maxHours?e=this.maxHours-1:(0>e||12===e&&1===c)&&(e=0)}this.hour=e,this.snapToStep?(this.minute=this.changeToNearestStep(f,this.minuteStep),this.second=this.changeToNearestStep(g,this.secondStep)):(this.minute=f,this.second=g),this.meridian=h,this.update(b)}else this.clear()},showWidget:function(){this.isOpen||this.$element.is(":disabled")||(this.$widget.appendTo(this.appendWidgetTo),a(c).on("mousedown.timepicker, touchend.timepicker",{scope:this},this.handleDocumentClick),this.$element.trigger({type:"show.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),this.place(),this.disableFocus&&this.$element.blur(),""===this.hour&&(this.defaultTime?this.setDefaultTime(this.defaultTime):this.setTime("0:0:0")),"modal"===this.template&&this.$widget.modal?this.$widget.modal("show").on("hidden",a.proxy(this.hideWidget,this)):!1===this.isOpen&&this.$widget.addClass("open"),this.isOpen=!0)},toggleMeridian:function(){this.meridian="AM"===this.meridian?"PM":"AM"},update:function(a){this.updateElement(),a||this.updateWidget(),this.$element.trigger({type:"changeTime.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}})},updateElement:function(){this.$element.val(this.getTime()).change()},updateFromElementVal:function(){this.setTime(this.$element.val())},updateWidget:function(){if(!1!==this.$widget){var a=this.hour,b=1===this.minute.toString().length?"0"+this.minute:this.minute,c=1===this.second.toString().length?"0"+this.second:this.second;this.showInputs?(this.$widget.find("input.bootstrap-timepicker-hour").val(a),this.$widget.find("input.bootstrap-timepicker-minute").val(b),this.showSeconds&&this.$widget.find("input.bootstrap-timepicker-second").val(c),this.showMeridian&&this.$widget.find("input.bootstrap-timepicker-meridian").val(this.meridian)):(this.$widget.find("span.bootstrap-timepicker-hour").text(a),this.$widget.find("span.bootstrap-timepicker-minute").text(b),this.showSeconds&&this.$widget.find("span.bootstrap-timepicker-second").text(c),this.showMeridian&&this.$widget.find("span.bootstrap-timepicker-meridian").text(this.meridian))}},updateFromWidgetInputs:function(){if(!1!==this.$widget){var a=this.$widget.find("input.bootstrap-timepicker-hour").val()+":"+this.$widget.find("input.bootstrap-timepicker-minute").val()+(this.showSeconds?":"+this.$widget.find("input.bootstrap-timepicker-second").val():"")+(this.showMeridian?this.$widget.find("input.bootstrap-timepicker-meridian").val():"");this.setTime(a,!0)}},widgetClick:function(b){b.stopPropagation(),b.preventDefault();var c=a(b.target),d=c.closest("a").data("action");d&&this[d](),this.update(),c.is("input")&&c.get(0).setSelectionRange(0,2)},widgetKeydown:function(b){var c=a(b.target),d=c.attr("class").replace("bootstrap-timepicker-","");switch(b.which){case 9:if(b.shiftKey){if("hour"===d)return this.hideWidget()}else if(this.showMeridian&&"meridian"===d||this.showSeconds&&"second"===d||!this.showMeridian&&!this.showSeconds&&"minute"===d)return this.hideWidget();break;case 27:this.hideWidget();break;case 38:switch(b.preventDefault(),d){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),c.get(0).setSelectionRange(0,2);break;case 40:switch(b.preventDefault(),d){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),c.get(0).setSelectionRange(0,2)}},widgetKeyup:function(a){(65===a.which||77===a.which||80===a.which||46===a.which||8===a.which||a.which>=48&&a.which<=57||a.which>=96&&a.which<=105)&&this.updateFromWidgetInputs()}},a.fn.timepicker=function(b){var c=Array.apply(null,arguments);return c.shift(),this.each((function(){var e=a(this),f=e.data("timepicker"),g="object"==typeof b&&b;f||e.data("timepicker",f=new d(this,a.extend({},a.fn.timepicker.defaults,g,a(this).data()))),"string"==typeof b&&f[b].apply(f,c)}))},a.fn.timepicker.defaults={defaultTime:"current",disableFocus:!1,disableMousewheel:!1,isOpen:!1,minuteStep:15,modalBackdrop:!1,orientation:{x:"auto",y:"auto"},secondStep:15,snapToStep:!1,showSeconds:!1,showInputs:!0,showMeridian:!0,template:"dropdown",appendWidgetTo:"body",showWidgetOnAddonClick:!0,icons:{up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down"},maxHours:24,explicitMode:!1},a.fn.timepicker.Constructor=d,a(c).on("focus.timepicker.data-api click.timepicker.data-api",'[data-provide="timepicker"]',(function(b){var c=a(this);c.data("timepicker")||(b.preventDefault(),c.timepicker())}))}(jQuery,window,document),$.fn.timepicker.defaults=$.extend(!0,{},$.fn.timepicker.defaults,{icons:{up:"ki ki-arrow-up",down:"ki ki-arrow-down"}}), /** * @version: 3.1 * @author: Dan Grossman http://www.dangrossman.info/ * @copyright: Copyright (c) 2012-2019 Dan Grossman. All rights reserved. * @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php * @website: http://www.daterangepicker.com/ */ function(root,factory){if("function"==typeof define&&define.amd)define(["moment","jquery"],(function(moment,jquery){return jquery.fn||(jquery.fn={}),"function"!=typeof moment&&moment.hasOwnProperty("default")&&(moment=moment.default),factory(moment,jquery)}));else if("object"==typeof module&&module.exports){var jQuery="undefined"!=typeof window?window.jQuery:void 0;jQuery||(jQuery=require("jquery")).fn||(jQuery.fn={});var moment="undefined"!=typeof window&&void 0!==window.moment?window.moment:require("moment");module.exports=factory(moment,jQuery)}else root.daterangepicker=factory(root.moment,root.jQuery)}(this,(function(moment,$){var DateRangePicker=function(element,options,cb){if(this.parentEl="body",this.element=$(element),this.startDate=moment().startOf("day"),this.endDate=moment().endOf("day"),this.minDate=!1,this.maxDate=!1,this.maxSpan=!1,this.autoApply=!1,this.singleDatePicker=!1,this.showDropdowns=!1,this.minYear=moment().subtract(100,"year").format("YYYY"),this.maxYear=moment().add(100,"year").format("YYYY"),this.showWeekNumbers=!1,this.showISOWeekNumbers=!1,this.showCustomRangeLabel=!0,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.linkedCalendars=!0,this.autoUpdateInput=!0,this.alwaysShowCalendars=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.drops="down",this.element.hasClass("dropup")&&(this.drops="up"),this.buttonClasses="btn btn-sm",this.applyButtonClasses="btn-primary",this.cancelButtonClasses="btn-default",this.locale={direction:"ltr",format:moment.localeData().longDateFormat("L"),separator:" - ",applyLabel:"Apply",cancelLabel:"Cancel",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:moment.weekdaysMin(),monthNames:moment.monthsShort(),firstDay:moment.localeData().firstDayOfWeek()},this.callback=function(){},this.isShowing=!1,this.leftCalendar={},this.rightCalendar={},"object"==typeof options&&null!==options||(options={}),"string"==typeof(options=$.extend(this.element.data(),options)).template||options.template instanceof $||(options.template='
'),this.parentEl=options.parentEl&&$(options.parentEl).length?$(options.parentEl):$(this.parentEl),this.container=$(options.template).appendTo(this.parentEl),"object"==typeof options.locale&&("string"==typeof options.locale.direction&&(this.locale.direction=options.locale.direction),"string"==typeof options.locale.format&&(this.locale.format=options.locale.format),"string"==typeof options.locale.separator&&(this.locale.separator=options.locale.separator),"object"==typeof options.locale.daysOfWeek&&(this.locale.daysOfWeek=options.locale.daysOfWeek.slice()),"object"==typeof options.locale.monthNames&&(this.locale.monthNames=options.locale.monthNames.slice()),"number"==typeof options.locale.firstDay&&(this.locale.firstDay=options.locale.firstDay),"string"==typeof options.locale.applyLabel&&(this.locale.applyLabel=options.locale.applyLabel),"string"==typeof options.locale.cancelLabel&&(this.locale.cancelLabel=options.locale.cancelLabel),"string"==typeof options.locale.weekLabel&&(this.locale.weekLabel=options.locale.weekLabel),"string"==typeof options.locale.customRangeLabel)){var elem;(elem=document.createElement("textarea")).innerHTML=options.locale.customRangeLabel;var rangeHtml=elem.value;this.locale.customRangeLabel=rangeHtml}if(this.container.addClass(this.locale.direction),"string"==typeof options.startDate&&(this.startDate=moment(options.startDate,this.locale.format)),"string"==typeof options.endDate&&(this.endDate=moment(options.endDate,this.locale.format)),"string"==typeof options.minDate&&(this.minDate=moment(options.minDate,this.locale.format)),"string"==typeof options.maxDate&&(this.maxDate=moment(options.maxDate,this.locale.format)),"object"==typeof options.startDate&&(this.startDate=moment(options.startDate)),"object"==typeof options.endDate&&(this.endDate=moment(options.endDate)),"object"==typeof options.minDate&&(this.minDate=moment(options.minDate)),"object"==typeof options.maxDate&&(this.maxDate=moment(options.maxDate)),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),"string"==typeof options.applyButtonClasses&&(this.applyButtonClasses=options.applyButtonClasses),"string"==typeof options.applyClass&&(this.applyButtonClasses=options.applyClass),"string"==typeof options.cancelButtonClasses&&(this.cancelButtonClasses=options.cancelButtonClasses),"string"==typeof options.cancelClass&&(this.cancelButtonClasses=options.cancelClass),"object"==typeof options.maxSpan&&(this.maxSpan=options.maxSpan),"object"==typeof options.dateLimit&&(this.maxSpan=options.dateLimit),"string"==typeof options.opens&&(this.opens=options.opens),"string"==typeof options.drops&&(this.drops=options.drops),"boolean"==typeof options.showWeekNumbers&&(this.showWeekNumbers=options.showWeekNumbers),"boolean"==typeof options.showISOWeekNumbers&&(this.showISOWeekNumbers=options.showISOWeekNumbers),"string"==typeof options.buttonClasses&&(this.buttonClasses=options.buttonClasses),"object"==typeof options.buttonClasses&&(this.buttonClasses=options.buttonClasses.join(" ")),"boolean"==typeof options.showDropdowns&&(this.showDropdowns=options.showDropdowns),"number"==typeof options.minYear&&(this.minYear=options.minYear),"number"==typeof options.maxYear&&(this.maxYear=options.maxYear),"boolean"==typeof options.showCustomRangeLabel&&(this.showCustomRangeLabel=options.showCustomRangeLabel),"boolean"==typeof options.singleDatePicker&&(this.singleDatePicker=options.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),"boolean"==typeof options.timePicker&&(this.timePicker=options.timePicker),"boolean"==typeof options.timePickerSeconds&&(this.timePickerSeconds=options.timePickerSeconds),"number"==typeof options.timePickerIncrement&&(this.timePickerIncrement=options.timePickerIncrement),"boolean"==typeof options.timePicker24Hour&&(this.timePicker24Hour=options.timePicker24Hour),"boolean"==typeof options.autoApply&&(this.autoApply=options.autoApply),"boolean"==typeof options.autoUpdateInput&&(this.autoUpdateInput=options.autoUpdateInput),"boolean"==typeof options.linkedCalendars&&(this.linkedCalendars=options.linkedCalendars),"function"==typeof options.isInvalidDate&&(this.isInvalidDate=options.isInvalidDate),"function"==typeof options.isCustomDate&&(this.isCustomDate=options.isCustomDate),"boolean"==typeof options.alwaysShowCalendars&&(this.alwaysShowCalendars=options.alwaysShowCalendars),0!=this.locale.firstDay)for(var iterator=this.locale.firstDay;iterator>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),iterator--;var start,end,range;if(void 0===options.startDate&&void 0===options.endDate&&$(this.element).is(":text")){var val=$(this.element).val(),split=val.split(this.locale.separator);start=end=null,2==split.length?(start=moment(split[0],this.locale.format),end=moment(split[1],this.locale.format)):this.singleDatePicker&&""!==val&&(start=moment(val,this.locale.format),end=moment(val,this.locale.format)),null!==start&&null!==end&&(this.setStartDate(start),this.setEndDate(end))}if("object"==typeof options.ranges){for(range in options.ranges){start="string"==typeof options.ranges[range][0]?moment(options.ranges[range][0],this.locale.format):moment(options.ranges[range][0]),end="string"==typeof options.ranges[range][1]?moment(options.ranges[range][1],this.locale.format):moment(options.ranges[range][1]),this.minDate&&start.isBefore(this.minDate)&&(start=this.minDate.clone());var maxDate=this.maxDate;if(this.maxSpan&&maxDate&&start.clone().add(this.maxSpan).isAfter(maxDate)&&(maxDate=start.clone().add(this.maxSpan)),maxDate&&end.isAfter(maxDate)&&(end=maxDate.clone()),!(this.minDate&&end.isBefore(this.minDate,this.timepicker?"minute":"day")||maxDate&&start.isAfter(maxDate,this.timepicker?"minute":"day"))){var elem;(elem=document.createElement("textarea")).innerHTML=range;var rangeHtml=elem.value;this.ranges[rangeHtml]=[start,end]}}var list="
    ";for(range in this.ranges)list+='
  • '+range+"
  • ";this.showCustomRangeLabel&&(list+='
  • '+this.locale.customRangeLabel+"
  • "),list+="
",this.container.find(".ranges").prepend(list)}"function"==typeof cb&&(this.callback=cb),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"),this.container.find(".calendar-time").hide()),this.timePicker&&this.autoApply&&(this.autoApply=!1),this.autoApply&&this.container.addClass("auto-apply"),"object"==typeof options.ranges&&this.container.addClass("show-ranges"),this.singleDatePicker&&(this.container.addClass("single"),this.container.find(".drp-calendar.left").addClass("single"),this.container.find(".drp-calendar.left").show(),this.container.find(".drp-calendar.right").hide(),!this.timePicker&&this.autoApply&&this.container.addClass("auto-apply")),(void 0===options.ranges&&!this.singleDatePicker||this.alwaysShowCalendars)&&this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses),this.applyButtonClasses.length&&this.container.find(".applyBtn").addClass(this.applyButtonClasses),this.cancelButtonClasses.length&&this.container.find(".cancelBtn").addClass(this.cancelButtonClasses),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".drp-calendar").on("click.daterangepicker",".prev",$.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",$.proxy(this.clickNext,this)).on("mousedown.daterangepicker","td.available",$.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",$.proxy(this.hoverDate,this)).on("change.daterangepicker","select.yearselect",$.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.monthselect",$.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",$.proxy(this.timeChanged,this)),this.container.find(".ranges").on("click.daterangepicker","li",$.proxy(this.clickRange,this)),this.container.find(".drp-buttons").on("click.daterangepicker","button.applyBtn",$.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",$.proxy(this.clickCancel,this)),this.element.is("input")||this.element.is("button")?this.element.on({"click.daterangepicker":$.proxy(this.show,this),"focus.daterangepicker":$.proxy(this.show,this),"keyup.daterangepicker":$.proxy(this.elementChanged,this),"keydown.daterangepicker":$.proxy(this.keydown,this)}):(this.element.on("click.daterangepicker",$.proxy(this.toggle,this)),this.element.on("keydown.daterangepicker",$.proxy(this.toggle,this))),this.updateElement()};return DateRangePicker.prototype={constructor:DateRangePicker,setStartDate:function(startDate){"string"==typeof startDate&&(this.startDate=moment(startDate,this.locale.format)),"object"==typeof startDate&&(this.startDate=moment(startDate)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.isShowing||this.updateElement(),this.updateMonthsInView()},setEndDate:function(endDate){"string"==typeof endDate&&(this.endDate=moment(endDate,this.locale.format)),"object"==typeof endDate&&(this.endDate=moment(endDate)),this.timePicker||(this.endDate=this.endDate.endOf("day")),this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),this.maxSpan&&this.startDate.clone().add(this.maxSpan).isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.maxSpan)),this.previousRightTime=this.endDate.clone(),this.container.find(".drp-selected").html(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.isShowing||this.updateElement(),this.updateMonthsInView()},isInvalidDate:function(){return!1},isCustomDate:function(){return!1},updateView:function(){this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"),this.endDate?this.container.find(".right .calendar-time select").prop("disabled",!1).removeClass("disabled"):this.container.find(".right .calendar-time select").prop("disabled",!0).addClass("disabled")),this.endDate&&this.container.find(".drp-selected").html(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.updateMonthsInView(),this.updateCalendars(),this.updateFormInputs()},updateMonthsInView:function(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.startDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM")))return;this.leftCalendar.month=this.startDate.clone().date(2),this.linkedCalendars||this.endDate.month()==this.startDate.month()&&this.endDate.year()==this.startDate.year()?this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"):this.rightCalendar.month=this.endDate.clone().date(2)}else this.leftCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"));this.maxDate&&this.linkedCalendars&&!this.singleDatePicker&&this.rightCalendar.month>this.maxDate&&(this.rightCalendar.month=this.maxDate.clone().date(2),this.leftCalendar.month=this.maxDate.clone().date(2).subtract(1,"month"))},updateCalendars:function(){if(this.timePicker){var hour,minute,second,ampm,ampm;if(this.endDate){if(hour=parseInt(this.container.find(".left .hourselect").val(),10),minute=parseInt(this.container.find(".left .minuteselect").val(),10),isNaN(minute)&&(minute=parseInt(this.container.find(".left .minuteselect option:last").val(),10)),second=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,!this.timePicker24Hour)"PM"===(ampm=this.container.find(".left .ampmselect").val())&&hour<12&&(hour+=12),"AM"===ampm&&12===hour&&(hour=0)}else if(hour=parseInt(this.container.find(".right .hourselect").val(),10),minute=parseInt(this.container.find(".right .minuteselect").val(),10),isNaN(minute)&&(minute=parseInt(this.container.find(".right .minuteselect option:last").val(),10)),second=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,!this.timePicker24Hour)"PM"===(ampm=this.container.find(".right .ampmselect").val())&&hour<12&&(hour+=12),"AM"===ampm&&12===hour&&(hour=0);this.leftCalendar.month.hour(hour).minute(minute).second(second),this.rightCalendar.month.hour(hour).minute(minute).second(second)}this.renderCalendar("left"),this.renderCalendar("right"),this.container.find(".ranges li").removeClass("active"),null!=this.endDate&&this.calculateChosenLabel()},renderCalendar:function(side){var calendar,month=(calendar="left"==side?this.leftCalendar:this.rightCalendar).month.month(),year=calendar.month.year(),hour=calendar.month.hour(),minute=calendar.month.minute(),second=calendar.month.second(),daysInMonth=moment([year,month]).daysInMonth(),firstDay=moment([year,month,1]),lastDay=moment([year,month,daysInMonth]),lastMonth=moment(firstDay).subtract(1,"month").month(),lastYear=moment(firstDay).subtract(1,"month").year(),daysInLastMonth=moment([lastYear,lastMonth]).daysInMonth(),dayOfWeek=firstDay.day(),calendar;(calendar=[]).firstDay=firstDay,calendar.lastDay=lastDay;for(var i=0;i<6;i++)calendar[i]=[];var startDay=daysInLastMonth-dayOfWeek+this.locale.firstDay+1;startDay>daysInLastMonth&&(startDay-=7),dayOfWeek==this.locale.firstDay&&(startDay=daysInLastMonth-6);for(var curDate=moment([lastYear,lastMonth,startDay,12,minute,second]),col,row,i=0,col=0,row=0;i<42;i++,col++,curDate=moment(curDate).add(24,"hour"))i>0&&col%7==0&&(col=0,row++),calendar[row][col]=curDate.clone().hour(hour).minute(minute).second(second),curDate.hour(12),this.minDate&&calendar[row][col].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&calendar[row][col].isBefore(this.minDate)&&"left"==side&&(calendar[row][col]=this.minDate.clone()),this.maxDate&&calendar[row][col].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&calendar[row][col].isAfter(this.maxDate)&&"right"==side&&(calendar[row][col]=this.maxDate.clone());"left"==side?this.leftCalendar.calendar=calendar:this.rightCalendar.calendar=calendar;var minDate="left"==side?this.minDate:this.startDate,maxDate=this.maxDate,selected="left"==side?this.startDate:this.endDate,arrow="ltr"==this.locale.direction?{left:"chevron-left",right:"chevron-right"}:{left:"chevron-right",right:"chevron-left"},html='';html+="",html+="",(this.showWeekNumbers||this.showISOWeekNumbers)&&(html+=""),minDate&&!minDate.isBefore(calendar.firstDay)||this.linkedCalendars&&"left"!=side?html+="":html+='';var dateHtml=this.locale.monthNames[calendar[1][1].month()]+calendar[1][1].format(" YYYY");if(this.showDropdowns){for(var currentMonth=calendar[1][1].month(),currentYear=calendar[1][1].year(),maxYear=maxDate&&maxDate.year()||this.maxYear,minYear=minDate&&minDate.year()||this.minYear,inMinYear=currentYear==minYear,inMaxYear=currentYear==maxYear,monthHtml='";for(var yearHtml='")}if(html+='",maxDate&&!maxDate.isAfter(calendar.lastDay)||this.linkedCalendars&&"right"!=side&&!this.singleDatePicker?html+="":html+='',html+="",html+="",(this.showWeekNumbers||this.showISOWeekNumbers)&&(html+='"),$.each(this.locale.daysOfWeek,(function(index,dayOfWeek){html+=""})),html+="",html+="",html+="",null==this.endDate&&this.maxSpan){var maxLimit=this.startDate.clone().add(this.maxSpan).endOf("day");maxDate&&!maxLimit.isBefore(maxDate)||(maxDate=maxLimit)}for(var row=0;row<6;row++){html+="",this.showWeekNumbers?html+='":this.showISOWeekNumbers&&(html+='");for(var col=0;col<7;col++){var classes=[];calendar[row][col].isSame(new Date,"day")&&classes.push("today"),calendar[row][col].isoWeekday()>5&&classes.push("weekend"),calendar[row][col].month()!=calendar[1][1].month()&&classes.push("off","ends"),this.minDate&&calendar[row][col].isBefore(this.minDate,"day")&&classes.push("off","disabled"),maxDate&&calendar[row][col].isAfter(maxDate,"day")&&classes.push("off","disabled"),this.isInvalidDate(calendar[row][col])&&classes.push("off","disabled"),calendar[row][col].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&classes.push("active","start-date"),null!=this.endDate&&calendar[row][col].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&classes.push("active","end-date"),null!=this.endDate&&calendar[row][col]>this.startDate&&calendar[row][col]'+calendar[row][col].date()+""}html+=""}html+="",html+="
'+dateHtml+"
'+this.locale.weekLabel+""+dayOfWeek+"
'+calendar[row][0].week()+"'+calendar[row][0].isoWeek()+"
",this.container.find(".drp-calendar."+side+" .calendar-table").html(html)},renderTimePicker:function(side){if("right"!=side||this.endDate){var html,selected,minDate,maxDate=this.maxDate;if(!this.maxSpan||this.maxDate&&!this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate)||(maxDate=this.startDate.clone().add(this.maxSpan)),"left"==side)selected=this.startDate.clone(),minDate=this.minDate;else if("right"==side){selected=this.endDate.clone(),minDate=this.startDate;var timeSelector=this.container.find(".drp-calendar.right .calendar-time");if(""!=timeSelector.html()&&(selected.hour(isNaN(selected.hour())?timeSelector.find(".hourselect option:selected").val():selected.hour()),selected.minute(isNaN(selected.minute())?timeSelector.find(".minuteselect option:selected").val():selected.minute()),selected.second(isNaN(selected.second())?timeSelector.find(".secondselect option:selected").val():selected.second()),!this.timePicker24Hour)){var ampm=timeSelector.find(".ampmselect option:selected").val();"PM"===ampm&&selected.hour()<12&&selected.hour(selected.hour()+12),"AM"===ampm&&12===selected.hour()&&selected.hour(0)}selected.isBefore(this.startDate)&&(selected=this.startDate.clone()),maxDate&&selected.isAfter(maxDate)&&(selected=maxDate.clone())}html=' ",html+=': ",this.timePickerSeconds){html+=': "}if(!this.timePicker24Hour){html+='"}this.container.find(".drp-calendar."+side+" .calendar-time").html(html)}},updateFormInputs:function(){this.singleDatePicker||this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate))?this.container.find("button.applyBtn").prop("disabled",!1):this.container.find("button.applyBtn").prop("disabled",!0)},move:function(){var parentOffset={top:0,left:0},containerTop,drops=this.drops,parentRightEdge=$(window).width();switch(this.parentEl.is("body")||(parentOffset={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},parentRightEdge=this.parentEl[0].clientWidth+this.parentEl.offset().left),drops){case"auto":(containerTop=this.element.offset().top+this.element.outerHeight()-parentOffset.top)+this.container.outerHeight()>=this.parentEl[0].scrollHeight&&(containerTop=this.element.offset().top-this.container.outerHeight()-parentOffset.top,drops="up");break;case"up":containerTop=this.element.offset().top-this.container.outerHeight()-parentOffset.top;break;default:containerTop=this.element.offset().top+this.element.outerHeight()-parentOffset.top}this.container.css({top:0,left:0,right:"auto"});var containerWidth=this.container.outerWidth();if(this.container.toggleClass("drop-up","up"==drops),"left"==this.opens){var containerRight=parentRightEdge-this.element.offset().left-this.element.outerWidth();containerWidth+containerRight>$(window).width()?this.container.css({top:containerTop,right:"auto",left:9}):this.container.css({top:containerTop,right:containerRight,left:"auto"})}else if("center"==this.opens){var containerLeft;(containerLeft=this.element.offset().left-parentOffset.left+this.element.outerWidth()/2-containerWidth/2)<0?this.container.css({top:containerTop,right:"auto",left:9}):containerLeft+containerWidth>$(window).width()?this.container.css({top:containerTop,left:"auto",right:0}):this.container.css({top:containerTop,left:containerLeft,right:"auto"})}else{var containerLeft;(containerLeft=this.element.offset().left-parentOffset.left)+containerWidth>$(window).width()?this.container.css({top:containerTop,left:"auto",right:0}):this.container.css({top:containerTop,left:containerLeft,right:"auto"})}},show:function(e){this.isShowing||(this._outsideClickProxy=$.proxy((function(e){this.outsideClick(e)}),this),$(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),$(window).on("resize.daterangepicker",$.proxy((function(e){this.move(e)}),this)),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.previousRightTime=this.endDate.clone(),this.updateView(),this.container.show(),this.move(),this.element.trigger("show.daterangepicker",this),this.isShowing=!0)},hide:function(e){this.isShowing&&(this.endDate||(this.startDate=this.oldStartDate.clone(),this.endDate=this.oldEndDate.clone()),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.callback(this.startDate.clone(),this.endDate.clone(),this.chosenLabel),this.updateElement(),$(document).off(".daterangepicker"),$(window).off(".daterangepicker"),this.container.hide(),this.element.trigger("hide.daterangepicker",this),this.isShowing=!1)},toggle:function(e){this.isShowing?this.hide():this.show()},outsideClick:function(e){var target=$(e.target);"focusin"==e.type||target.closest(this.element).length||target.closest(this.container).length||target.closest(".calendar-table").length||(this.hide(),this.element.trigger("outsideClick.daterangepicker",this))},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},clickRange:function(e){var label=e.target.getAttribute("data-range-key");if(this.chosenLabel=label,label==this.locale.customRangeLabel)this.showCalendars();else{var dates=this.ranges[label];this.startDate=dates[0],this.endDate=dates[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.alwaysShowCalendars||this.hideCalendars(),this.clickApply()}},clickPrev:function(e){var cal;$(e.target).parents(".drp-calendar").hasClass("left")?(this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&this.rightCalendar.month.subtract(1,"month")):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(e){var cal;$(e.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&this.leftCalendar.month.add(1,"month")),this.updateCalendars()},hoverDate:function(e){if($(e.target).hasClass("available")){var title=$(e.target).attr("data-title"),row=title.substr(1,1),col=title.substr(3,1),cal,date=$(e.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.calendar[row][col]:this.rightCalendar.calendar[row][col],leftCalendar=this.leftCalendar,rightCalendar=this.rightCalendar,startDate=this.startDate;this.endDate||this.container.find(".drp-calendar tbody td").each((function(index,el){if(!$(el).hasClass("week")){var title=$(el).attr("data-title"),row=title.substr(1,1),col=title.substr(3,1),cal,dt=$(el).parents(".drp-calendar").hasClass("left")?leftCalendar.calendar[row][col]:rightCalendar.calendar[row][col];dt.isAfter(startDate)&&dt.isBefore(date)||dt.isSame(date,"day")?$(el).addClass("in-range"):$(el).removeClass("in-range")}}))}},clickDate:function(e){if($(e.target).hasClass("available")){var title=$(e.target).attr("data-title"),row=title.substr(1,1),col=title.substr(3,1),cal,date=$(e.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.calendar[row][col]:this.rightCalendar.calendar[row][col];if(this.endDate||date.isBefore(this.startDate,"day")){if(this.timePicker){var hour=parseInt(this.container.find(".left .hourselect").val(),10),ampm;if(!this.timePicker24Hour)"PM"===(ampm=this.container.find(".left .ampmselect").val())&&hour<12&&(hour+=12),"AM"===ampm&&12===hour&&(hour=0);var minute=parseInt(this.container.find(".left .minuteselect").val(),10);isNaN(minute)&&(minute=parseInt(this.container.find(".left .minuteselect option:last").val(),10));var second=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0;date=date.clone().hour(hour).minute(minute).second(second)}this.endDate=null,this.setStartDate(date.clone())}else if(!this.endDate&&date.isBefore(this.startDate))this.setEndDate(this.startDate.clone());else{if(this.timePicker){var hour=parseInt(this.container.find(".right .hourselect").val(),10),ampm;if(!this.timePicker24Hour)"PM"===(ampm=this.container.find(".right .ampmselect").val())&&hour<12&&(hour+=12),"AM"===ampm&&12===hour&&(hour=0);var minute=parseInt(this.container.find(".right .minuteselect").val(),10);isNaN(minute)&&(minute=parseInt(this.container.find(".right .minuteselect option:last").val(),10));var second=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0;date=date.clone().hour(hour).minute(minute).second(second)}this.setEndDate(date.clone()),this.autoApply&&(this.calculateChosenLabel(),this.clickApply())}this.singleDatePicker&&(this.setEndDate(this.startDate),!this.timePicker&&this.autoApply&&this.clickApply()),this.updateView(),e.stopPropagation()}},calculateChosenLabel:function(){var customRange=!0,i=0;for(var range in this.ranges){if(this.timePicker){var format=this.timePickerSeconds?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD HH:mm";if(this.startDate.format(format)==this.ranges[range][0].format(format)&&this.endDate.format(format)==this.ranges[range][1].format(format)){customRange=!1,this.chosenLabel=this.container.find(".ranges li:eq("+i+")").addClass("active").attr("data-range-key");break}}else if(this.startDate.format("YYYY-MM-DD")==this.ranges[range][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[range][1].format("YYYY-MM-DD")){customRange=!1,this.chosenLabel=this.container.find(".ranges li:eq("+i+")").addClass("active").attr("data-range-key");break}i++}customRange&&(this.showCustomRangeLabel?this.chosenLabel=this.container.find(".ranges li:last").addClass("active").attr("data-range-key"):this.chosenLabel=null,this.showCalendars())},clickApply:function(e){this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(e){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.hide(),this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(e){var isLeft=$(e.target).closest(".drp-calendar").hasClass("left"),leftOrRight=isLeft?"left":"right",cal=this.container.find(".drp-calendar."+leftOrRight),month=parseInt(cal.find(".monthselect").val(),10),year=cal.find(".yearselect").val();isLeft||(yearthis.maxDate.year()||year==this.maxDate.year()&&month>this.maxDate.month())&&(month=this.maxDate.month(),year=this.maxDate.year()),isLeft?(this.leftCalendar.month.month(month).year(year),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month.month(month).year(year),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month"))),this.updateCalendars()},timeChanged:function(e){var cal=$(e.target).closest(".drp-calendar"),isLeft=cal.hasClass("left"),hour=parseInt(cal.find(".hourselect").val(),10),minute=parseInt(cal.find(".minuteselect").val(),10);isNaN(minute)&&(minute=parseInt(cal.find(".minuteselect option:last").val(),10));var second=this.timePickerSeconds?parseInt(cal.find(".secondselect").val(),10):0;if(!this.timePicker24Hour){var ampm=cal.find(".ampmselect").val();"PM"===ampm&&hour<12&&(hour+=12),"AM"===ampm&&12===hour&&(hour=0)}if(isLeft){var start=this.startDate.clone();start.hour(hour),start.minute(minute),start.second(second),this.setStartDate(start),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")==start.format("YYYY-MM-DD")&&this.endDate.isBefore(start)&&this.setEndDate(start.clone())}else if(this.endDate){var end=this.endDate.clone();end.hour(hour),end.minute(minute),end.second(second),this.setEndDate(end)}this.updateCalendars(),this.updateFormInputs(),this.renderTimePicker("left"),this.renderTimePicker("right")},elementChanged:function(){if(this.element.is("input")&&this.element.val().length){var dateString=this.element.val().split(this.locale.separator),start=null,end=null;2===dateString.length&&(start=moment(dateString[0],this.locale.format),end=moment(dateString[1],this.locale.format)),(this.singleDatePicker||null===start||null===end)&&(end=start=moment(this.element.val(),this.locale.format)),start.isValid()&&end.isValid()&&(this.setStartDate(start),this.setEndDate(end),this.updateView())}},keydown:function(e){9!==e.keyCode&&13!==e.keyCode||this.hide(),27===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.hide())},updateElement:function(){if(this.element.is("input")&&this.autoUpdateInput){var newValue=this.startDate.format(this.locale.format);this.singleDatePicker||(newValue+=this.locale.separator+this.endDate.format(this.locale.format)),newValue!==this.element.val()&&this.element.val(newValue).trigger("change")}},remove:function(){this.container.remove(),this.element.off(".daterangepicker"),this.element.removeData()}},$.fn.daterangepicker=function(options,callback){var implementOptions=$.extend(!0,{},$.fn.daterangepicker.defaultOptions,options);return this.each((function(){var el=$(this);el.data("daterangepicker")&&el.data("daterangepicker").remove(),el.data("daterangepicker",new DateRangePicker(el,implementOptions,callback))})),this},DateRangePicker})),function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):"object"==typeof module&&module.exports?module.exports=function(root,jQuery){return void 0===jQuery&&(jQuery="undefined"!=typeof window?require("jquery"):require("jquery")(root)),factory(jQuery),jQuery}:factory(jQuery)}((function($){"use strict";var _currentSpinnerId=0;$.fn.TouchSpin=function(options){var defaults={min:0,max:100,initval:"",replacementval:"",firstclickvalueifempty:null,step:1,decimals:0,stepinterval:100,forcestepdivisibility:"round",stepintervaldelay:500,verticalbuttons:!1,verticalup:"+",verticaldown:"-",verticalupclass:"",verticaldownclass:"",prefix:"",postfix:"",prefix_extraclass:"",postfix_extraclass:"",booster:!0,boostat:10,maxboostedstep:!1,mousewheel:!0,buttondown_class:"btn btn-primary",buttonup_class:"btn btn-primary",buttondown_txt:"-",buttonup_txt:"+",callback_before_calculation:function(value){return value},callback_after_calculation:function(value){return value}},attributeMap={min:"min",max:"max",initval:"init-val",replacementval:"replacement-val",firstclickvalueifempty:"first-click-value-if-empty",step:"step",decimals:"decimals",stepinterval:"step-interval",verticalbuttons:"vertical-buttons",verticalupclass:"vertical-up-class",verticaldownclass:"vertical-down-class",forcestepdivisibility:"force-step-divisibility",stepintervaldelay:"step-interval-delay",prefix:"prefix",postfix:"postfix",prefix_extraclass:"prefix-extra-class",postfix_extraclass:"postfix-extra-class",booster:"booster",boostat:"boostat",maxboostedstep:"max-boosted-step",mousewheel:"mouse-wheel",buttondown_class:"button-down-class",buttonup_class:"button-up-class",buttondown_txt:"button-down-txt",buttonup_txt:"button-up-txt"};return this.each((function(){var settings,originalinput=$(this),originalinput_data=originalinput.data(),_detached_prefix,_detached_postfix,container,elements,value,downSpinTimer,upSpinTimer,downDelayTimeout,upDelayTimeout,spincount=0,spinning=!1;function init(){originalinput.data("alreadyinitialized")||(originalinput.data("alreadyinitialized",!0),_currentSpinnerId+=1,originalinput.data("spinnerid",_currentSpinnerId),originalinput.is("input")?(_initSettings(),_setInitval(),_checkValue(),_buildHtml(),_initElements(),_hideEmptyPrefixPostfix(),_bindEvents(),_bindEventsInterface()):console.log("Must be an input."))}function _setInitval(){""!==settings.initval&&""===originalinput.val()&&originalinput.val(settings.initval)}function changeSettings(newsettings){_updateSettings(newsettings),_checkValue();var value=elements.input.val();""!==value&&(value=Number(settings.callback_before_calculation(elements.input.val())),elements.input.val(settings.callback_after_calculation(Number(value).toFixed(settings.decimals))))}function _initSettings(){settings=$.extend({},defaults,originalinput_data,_parseAttributes(),options)}function _parseAttributes(){var data={};return $.each(attributeMap,(function(key,value){var attrName="bts-"+value;originalinput.is("[data-"+attrName+"]")&&(data[key]=originalinput.data(attrName))})),data}function _destroy(){var $parent=originalinput.parent();stopSpin(),originalinput.off(".touchspin"),$parent.hasClass("bootstrap-touchspin-injected")?(originalinput.siblings().remove(),originalinput.unwrap()):($(".bootstrap-touchspin-injected",$parent).remove(),$parent.removeClass("bootstrap-touchspin")),originalinput.data("alreadyinitialized",!1)}function _updateSettings(newsettings){var $postfix,$prefix;(settings=$.extend({},settings,newsettings),newsettings.postfix)&&(0===originalinput.parent().find(".bootstrap-touchspin-postfix").length&&_detached_postfix.insertAfter(originalinput),originalinput.parent().find(".bootstrap-touchspin-postfix .input-group-text").text(newsettings.postfix));newsettings.prefix&&(0===originalinput.parent().find(".bootstrap-touchspin-prefix").length&&_detached_prefix.insertBefore(originalinput),originalinput.parent().find(".bootstrap-touchspin-prefix .input-group-text").text(newsettings.prefix));_hideEmptyPrefixPostfix()}function _buildHtml(){var initval=originalinput.val(),parentelement=originalinput.parent();""!==initval&&(initval=settings.callback_after_calculation(Number(initval).toFixed(settings.decimals))),originalinput.data("initvalue",initval).val(initval),originalinput.addClass("form-control"),parentelement.hasClass("input-group")?_advanceInputGroup(parentelement):_buildInputGroup()}function _advanceInputGroup(parentelement){parentelement.addClass("bootstrap-touchspin");var prev=originalinput.prev(),next=originalinput.next(),downhtml,uphtml,prefixhtml=''+settings.prefix+"",postfixhtml=''+settings.postfix+"";prev.hasClass("input-group-btn")||prev.hasClass("input-group-prepend")?(downhtml='",prev.append(downhtml)):(downhtml='",$(downhtml).insertBefore(originalinput)),next.hasClass("input-group-btn")||next.hasClass("input-group-append")?(uphtml='",next.prepend(uphtml)):(uphtml='",$(uphtml).insertAfter(originalinput)),$(prefixhtml).insertBefore(originalinput),$(postfixhtml).insertAfter(originalinput),container=parentelement}function _buildInputGroup(){var html,inputGroupSize="";originalinput.hasClass("input-sm")&&(inputGroupSize="input-group-sm"),originalinput.hasClass("input-lg")&&(inputGroupSize="input-group-lg"),html=settings.verticalbuttons?'
'+settings.prefix+''+settings.postfix+'
":'
'+settings.prefix+''+settings.postfix+'
",container=$(html).insertBefore(originalinput),$(".bootstrap-touchspin-prefix",container).after(originalinput),originalinput.hasClass("input-sm")?container.addClass("input-group-sm"):originalinput.hasClass("input-lg")&&container.addClass("input-group-lg")}function _initElements(){elements={down:$(".bootstrap-touchspin-down",container),up:$(".bootstrap-touchspin-up",container),input:$("input",container),prefix:$(".bootstrap-touchspin-prefix",container).addClass(settings.prefix_extraclass),postfix:$(".bootstrap-touchspin-postfix",container).addClass(settings.postfix_extraclass)}}function _hideEmptyPrefixPostfix(){""===settings.prefix&&(_detached_prefix=elements.prefix.detach()),""===settings.postfix&&(_detached_postfix=elements.postfix.detach())}function _bindEvents(){originalinput.on("keydown.touchspin",(function(ev){var code=ev.keyCode||ev.which;38===code?("up"!==spinning&&(upOnce(),startUpSpin()),ev.preventDefault()):40===code&&("down"!==spinning&&(downOnce(),startDownSpin()),ev.preventDefault())})),originalinput.on("keyup.touchspin",(function(ev){var code=ev.keyCode||ev.which;38===code?stopSpin():40===code&&stopSpin()})),originalinput.on("blur.touchspin",(function(){_checkValue(),originalinput.val(settings.callback_after_calculation(originalinput.val()))})),elements.down.on("keydown",(function(ev){var code=ev.keyCode||ev.which;32!==code&&13!==code||("down"!==spinning&&(downOnce(),startDownSpin()),ev.preventDefault())})),elements.down.on("keyup.touchspin",(function(ev){var code=ev.keyCode||ev.which;32!==code&&13!==code||stopSpin()})),elements.up.on("keydown.touchspin",(function(ev){var code=ev.keyCode||ev.which;32!==code&&13!==code||("up"!==spinning&&(upOnce(),startUpSpin()),ev.preventDefault())})),elements.up.on("keyup.touchspin",(function(ev){var code=ev.keyCode||ev.which;32!==code&&13!==code||stopSpin()})),elements.down.on("mousedown.touchspin",(function(ev){elements.down.off("touchstart.touchspin"),originalinput.is(":disabled")||(downOnce(),startDownSpin(),ev.preventDefault(),ev.stopPropagation())})),elements.down.on("touchstart.touchspin",(function(ev){elements.down.off("mousedown.touchspin"),originalinput.is(":disabled")||(downOnce(),startDownSpin(),ev.preventDefault(),ev.stopPropagation())})),elements.up.on("mousedown.touchspin",(function(ev){elements.up.off("touchstart.touchspin"),originalinput.is(":disabled")||(upOnce(),startUpSpin(),ev.preventDefault(),ev.stopPropagation())})),elements.up.on("touchstart.touchspin",(function(ev){elements.up.off("mousedown.touchspin"),originalinput.is(":disabled")||(upOnce(),startUpSpin(),ev.preventDefault(),ev.stopPropagation())})),elements.up.on("mouseup.touchspin mouseout.touchspin touchleave.touchspin touchend.touchspin touchcancel.touchspin",(function(ev){spinning&&(ev.stopPropagation(),stopSpin())})),elements.down.on("mouseup.touchspin mouseout.touchspin touchleave.touchspin touchend.touchspin touchcancel.touchspin",(function(ev){spinning&&(ev.stopPropagation(),stopSpin())})),elements.down.on("mousemove.touchspin touchmove.touchspin",(function(ev){spinning&&(ev.stopPropagation(),ev.preventDefault())})),elements.up.on("mousemove.touchspin touchmove.touchspin",(function(ev){spinning&&(ev.stopPropagation(),ev.preventDefault())})),originalinput.on("mousewheel.touchspin DOMMouseScroll.touchspin",(function(ev){if(settings.mousewheel&&originalinput.is(":focus")){var delta=ev.originalEvent.wheelDelta||-ev.originalEvent.deltaY||-ev.originalEvent.detail;ev.stopPropagation(),ev.preventDefault(),delta<0?downOnce():upOnce()}}))}function _bindEventsInterface(){originalinput.on("touchspin.destroy",(function(){_destroy()})),originalinput.on("touchspin.uponce",(function(){stopSpin(),upOnce()})),originalinput.on("touchspin.downonce",(function(){stopSpin(),downOnce()})),originalinput.on("touchspin.startupspin",(function(){startUpSpin()})),originalinput.on("touchspin.startdownspin",(function(){startDownSpin()})),originalinput.on("touchspin.stopspin",(function(){stopSpin()})),originalinput.on("touchspin.updatesettings",(function(e,newsettings){changeSettings(newsettings)}))}function _forcestepdivisibility(value){switch(settings.forcestepdivisibility){case"round":return(Math.round(value/settings.step)*settings.step).toFixed(settings.decimals);case"floor":return(Math.floor(value/settings.step)*settings.step).toFixed(settings.decimals);case"ceil":return(Math.ceil(value/settings.step)*settings.step).toFixed(settings.decimals);default:return value.toFixed(settings.decimals)}}function _checkValue(){var val,parsedval,returnval;""!==(val=settings.callback_before_calculation(originalinput.val()))?settings.decimals>0&&"."===val||(parsedval=parseFloat(val),isNaN(parsedval)&&(parsedval=""!==settings.replacementval?settings.replacementval:0),returnval=parsedval,parsedval.toString()!==val&&(returnval=parsedval),null!==settings.min&&parsedvalsettings.max&&(returnval=settings.max),returnval=_forcestepdivisibility(returnval),Number(val).toString()!==returnval.toString()&&(originalinput.val(returnval),originalinput.trigger("change"))):""!==settings.replacementval&&(originalinput.val(settings.replacementval),originalinput.trigger("change"))}function _getBoostedStep(){if(settings.booster){var boosted=Math.pow(2,Math.floor(spincount/settings.boostat))*settings.step;return settings.maxboostedstep&&boosted>settings.maxboostedstep&&(boosted=settings.maxboostedstep,value=Math.round(value/boosted)*boosted),Math.max(settings.step,boosted)}return settings.step}function valueIfIsNaN(){return"number"==typeof settings.firstclickvalueifempty?settings.firstclickvalueifempty:(settings.min+settings.max)/2}function upOnce(){_checkValue();var initvalue=value=parseFloat(settings.callback_before_calculation(elements.input.val())),boostedstep;isNaN(value)?value=valueIfIsNaN():(boostedstep=_getBoostedStep(),value+=boostedstep),null!==settings.max&&value>settings.max&&(value=settings.max,originalinput.trigger("touchspin.on.max"),stopSpin()),elements.input.val(settings.callback_after_calculation(Number(value).toFixed(settings.decimals))),initvalue!==value&&originalinput.trigger("change")}function downOnce(){_checkValue();var initvalue=value=parseFloat(settings.callback_before_calculation(elements.input.val())),boostedstep;isNaN(value)?value=valueIfIsNaN():(boostedstep=_getBoostedStep(),value-=boostedstep),null!==settings.min&&valuethreshold&&(output=!1),output}function remainingChars(input,maxlength){var length;return maxlength-inputLength(input)}function showRemaining(currentInput,indicator){indicator.css({display:"block"}),currentInput.trigger("maxlength.shown")}function hideRemaining(currentInput,indicator){options.alwaysShow||(indicator.css({display:"none"}),currentInput.trigger("maxlength.hidden"))}function updateMaxLengthHTML(currentInputText,maxLengthThisInput,typedChars){var output="";return options.message?output="function"==typeof options.message?options.message(currentInputText,maxLengthThisInput):options.message.replace("%charsTyped%",typedChars).replace("%charsRemaining%",maxLengthThisInput-typedChars).replace("%charsTotal%",maxLengthThisInput):(options.preText&&(output+=options.preText),options.showCharsTyped?output+=typedChars:output+=maxLengthThisInput-typedChars,options.showMaxLength&&(output+=options.separator+maxLengthThisInput),options.postText&&(output+=options.postText)),output}function manageRemainingVisibility(remaining,currentInput,maxLengthCurrentInput,maxLengthIndicator){maxLengthIndicator&&(maxLengthIndicator.html(updateMaxLengthHTML(currentInput.val(),maxLengthCurrentInput,maxLengthCurrentInput-remaining)),remaining>0?charsLeftThreshold(currentInput,options.threshold,maxLengthCurrentInput)?showRemaining(currentInput,maxLengthIndicator.removeClass(options.limitReachedClass).addClass(options.warningClass)):hideRemaining(currentInput,maxLengthIndicator):showRemaining(currentInput,maxLengthIndicator.removeClass(options.warningClass).addClass(options.limitReachedClass))),options.customMaxAttribute&&(remaining<0?currentInput.addClass("overmax"):currentInput.removeClass("overmax"))}function getPosition(currentInput){var el=currentInput[0];return $.extend({},"function"==typeof el.getBoundingClientRect?el.getBoundingClientRect():{width:el.offsetWidth,height:el.offsetHeight},currentInput.offset())}function placeWithCSS(placement,maxLengthIndicator){if(placement&&maxLengthIndicator){var POSITION_KEYS=["top","bottom","left","right","position"],cssPos={};$.each(POSITION_KEYS,(function(i,key){var val=options.placement[key];void 0!==val&&(cssPos[key]=val)})),maxLengthIndicator.css(cssPos)}}function place(currentInput,maxLengthIndicator){var pos=getPosition(currentInput);if("function"!==$.type(options.placement))if($.isPlainObject(options.placement))placeWithCSS(options.placement,maxLengthIndicator);else{var inputOuter=currentInput.outerWidth(),outerWidth=maxLengthIndicator.outerWidth(),actualWidth=maxLengthIndicator.width(),actualHeight=maxLengthIndicator.height();switch(options.appendToParent&&(pos.top-=currentInput.parent().offset().top,pos.left-=currentInput.parent().offset().left),options.placement){case"bottom":maxLengthIndicator.css({top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2});break;case"top":maxLengthIndicator.css({top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2});break;case"left":maxLengthIndicator.css({top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth});break;case"right":maxLengthIndicator.css({top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width});break;case"bottom-right":maxLengthIndicator.css({top:pos.top+pos.height,left:pos.left+pos.width});break;case"top-right":maxLengthIndicator.css({top:pos.top-actualHeight,left:pos.left+inputOuter});break;case"top-left":maxLengthIndicator.css({top:pos.top-actualHeight,left:pos.left-outerWidth});break;case"bottom-left":maxLengthIndicator.css({top:pos.top+currentInput.outerHeight(),left:pos.left-outerWidth});break;case"centered-right":maxLengthIndicator.css({top:pos.top+actualHeight/2,left:pos.left+inputOuter-outerWidth-3});break;case"bottom-right-inside":maxLengthIndicator.css({top:pos.top+pos.height,left:pos.left+pos.width-outerWidth});break;case"top-right-inside":maxLengthIndicator.css({top:pos.top-actualHeight,left:pos.left+inputOuter-outerWidth});break;case"top-left-inside":maxLengthIndicator.css({top:pos.top-actualHeight,left:pos.left});break;case"bottom-left-inside":maxLengthIndicator.css({top:pos.top+currentInput.outerHeight(),left:pos.left})}}else options.placement(currentInput,maxLengthIndicator,pos)}function isPlacementMutable(){return"bottom-right-inside"===options.placement||"top-right-inside"===options.placement||"function"==typeof options.placement||options.message&&"function"==typeof options.message}function getMaxLength(currentInput){var max=currentInput.attr("maxlength")||options.customMaxAttribute;if(options.customMaxAttribute&&!options.allowOverMax){var custom=currentInput.attr(options.customMaxAttribute);(!max||custom').css({display:"none",position:"absolute",whiteSpace:"nowrap",zIndex:options.zIndex}).html(maxlengthContent)),currentInput.is("textarea")&&(currentInput.data("maxlenghtsizex",currentInput.outerWidth()),currentInput.data("maxlenghtsizey",currentInput.outerHeight()),currentInput.mouseup((function(){currentInput.outerWidth()===currentInput.data("maxlenghtsizex")&¤tInput.outerHeight()===currentInput.data("maxlenghtsizey")||place(currentInput,maxLengthIndicator),currentInput.data("maxlenghtsizex",currentInput.outerWidth()),currentInput.data("maxlenghtsizey",currentInput.outerHeight())}))),options.appendToParent?(currentInput.parent().append(maxLengthIndicator),currentInput.parent().css("position","relative")):documentBody.append(maxLengthIndicator),manageRemainingVisibility(remainingChars(currentInput,getMaxLength(currentInput)),currentInput,maxLengthCurrentInput,maxLengthIndicator),place(currentInput,maxLengthIndicator)}$(window).resize((function(){maxLengthIndicator&&place(currentInput,maxLengthIndicator)})),options.showOnReady?currentInput.ready((function(){firstInit()})):currentInput.focus((function(){firstInit()})),currentInput.on("maxlength.reposition",(function(){place(currentInput,maxLengthIndicator)})),currentInput.on("destroyed",(function(){maxLengthIndicator&&maxLengthIndicator.remove()})),currentInput.on("blur",(function(){maxLengthIndicator&&!options.showOnReady&&maxLengthIndicator.remove()})),currentInput.on("input",(function(){var maxlength=getMaxLength(currentInput),remaining=remainingChars(currentInput,maxlength),output=!0;return options.validate&&remaining<0?(truncateChars(currentInput,maxlength),output=!1):manageRemainingVisibility(remaining,currentInput,maxLengthCurrentInput,maxLengthIndicator),isPlacementMutable()&&place(currentInput,maxLengthIndicator),output}))}))}})}(jQuery),function(a){"use strict";function c(c){return this.each((function(){var d=a(this),e=d.data("multiselectsplitter"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("multiselectsplitter",e=new b(this,f)),"string"==typeof c&&e[c]())}))}var b=function(a,b){this.init("multiselectsplitter",a,b)};b.DEFAULTS={selectSize:null,maxSelectSize:null,clearOnFirstChange:!1,onlySameGroup:!1,groupCounter:!1,maximumSelected:null,afterInitialize:null,maximumAlert:function(a){alert("Only "+a+" values can be selected")},createFirstSelect:function(a,b){return""},createSecondSelect:function(a,b){return""},template:'
\x3c!-- Add the extra clearfix for only the required viewport --\x3e
'},b.prototype.init=function(c,d,e){var f=this;f.type=c,f.last$ElementSelected=[],f.initialized=!1,f.$element=a(d),f.$element.hide(),f.options=a.extend({},b.DEFAULTS,e),f.$element.after(f.options.template),f.$wrapper=f.$element.next("div[data-multiselectsplitter-wrapper-selector]"),f.$firstSelect=a("select[data-multiselectsplitter-firstselect-selector]",f.$wrapper),f.$secondSelect=a("select[data-multiselectsplitter-secondselect-selector]",f.$wrapper);var g=0,h=0;if(0!=f.$element.find("optgroup").length){f.$element.find("optgroup").each((function(){var b=a(this).attr("label"),c=a(f.options.createFirstSelect(b,f.$element));c.val(b),c.attr("data-current-label",c.text()),f.$firstSelect.append(c);var d=a(this).find("option").length;d>h&&(h=d),g++}));var i=Math.max(g,h);i=Math.min(i,10),f.options.selectSize?i=f.options.selectSize:f.options.maxSelectSize&&(i=Math.min(i,f.options.maxSelectSize)),f.$firstSelect.attr("size",i),f.$secondSelect.attr("size",i),f.$element.attr("multiple")&&f.$secondSelect.attr("multiple","multiple"),f.$element.is(":disabled")&&f.disable(),f.$firstSelect.on("change",a.proxy(f.updateParentCategory,f)),f.$secondSelect.on("click change",a.proxy(f.updateChildCategory,f)),f.update=function(){if(!(f.$element.find("option").length<1)){var b,a=f.$element.find("option:selected:first");b=a.length?a.parent().attr("label"):f.$element.find("option:first").parent().attr("label"),f.$firstSelect.find('option[value="'+b+'"]').prop("selected",!0),f.$firstSelect.trigger("change")}},f.update(),f.initialized=!0,f.options.afterInitialize&&f.options.afterInitialize(f.$firstSelect,f.$secondSelect)}},b.prototype.disable=function(){this.$secondSelect.prop("disabled",!0),this.$firstSelect.prop("disabled",!0)},b.prototype.enable=function(){this.$secondSelect.prop("disabled",!1),this.$firstSelect.prop("disabled",!1)},b.prototype.createSecondSelect=function(){var b=this;b.$secondSelect.empty(),a.each(b.$element.find('optgroup[label="'+b.$firstSelect.val()+'"] option'),(function(c,d){var e=a(this).val(),f=a(this).text(),g=a(b.options.createSecondSelect(f,b.$firstSelect));g.val(e),a.each(b.$element.find("option:selected"),(function(b,c){a(c).val()==e&&g.prop("selected",!0)})),b.$secondSelect.append(g)}))},b.prototype.updateParentCategory=function(){var a=this;a.last$ElementSelected=a.$element.find("option:selected"),a.options.clearOnFirstChange&&a.initialized&&a.$element.find("option:selected").prop("selected",!1),a.createSecondSelect(),a.checkSelected(),a.updateCounter()},b.prototype.updateCounter=function(){var b=this;b.$element.attr("multiple")&&b.options.groupCounter&&a.each(b.$firstSelect.find("option"),(function(c,d){var e=a(d).val(),f=a(d).data("currentLabel"),g=b.$element.find('optgroup[label="'+e+'"] option:selected').length;g>0&&(f+=" ("+g+")"),a(d).html(f)}))},b.prototype.checkSelected=function(){var b=this;if(b.$element.attr("multiple")&&b.options.maximumSelected){var c=0,d;if(!((c="function"==typeof b.options.maximumSelected?b.options.maximumSelected(b.$firstSelect,b.$secondSelect):b.options.maximumSelected)<1))if(b.$element.find("option:selected").length>c){b.$firstSelect.find("option:selected").prop("selected",!1),b.$secondSelect.find("option:selected").prop("selected",!1),b.initialized?(b.$element.find("option:selected").prop("selected",!1),b.last$ElementSelected.prop("selected",!0)):a.each(b.$element.find("option:selected"),(function(b,d){b>c-1&&a(d).prop("selected",!1)}));var e=b.last$ElementSelected.first().parent().attr("label");b.$firstSelect.find('option[value="'+e+'"]').prop("selected",!0),b.createSecondSelect(),b.options.maximumAlert(c)}}},b.prototype.basicUpdateChildCategory=function(b,c){var d=this;d.last$ElementSelected=d.$element.find("option:selected");var e=d.$secondSelect.val();a.isArray(e)||(e=[e]);var f=d.$firstSelect.val(),g=!1;d.$element.attr("multiple")?d.options.onlySameGroup?a.each(d.$element.find("option:selected"),(function(b,c){if(a(c).parent().attr("label")!=f)return g=!0,!1})):c||(g=!0):g=!0,g?d.$element.find("option:selected").prop("selected",!1):a.each(d.$element.find("option:selected"),(function(b,c){f==a(c).parent().attr("label")&&-1==a.inArray(a(c).val(),e)&&a(c).prop("selected",!1)})),a.each(e,(function(a,b){d.$element.find('option[value="'+b+'"]').prop("selected",!0)})),d.checkSelected(),d.updateCounter(),d.$element.trigger("change")},b.prototype.updateChildCategory=function(b){"change"==b.type?this.timeOut=setTimeout(a.proxy((function(){this.basicUpdateChildCategory(b,b.ctrlKey)}),this),10):"click"==b.type&&(clearTimeout(this.timeOut),this.basicUpdateChildCategory(b,b.ctrlKey))},b.prototype.destroy=function(){this.$wrapper.remove(),this.$element.removeData(this.type),this.$element.show()},a.fn.multiselectsplitter=c,a.fn.multiselectsplitter.Constructor=b,a.fn.multiselectsplitter.VERSION="1.0.1"}(jQuery), /*! * Bootstrap-select v1.13.17 (https://developer.snapappointments.com/bootstrap-select) * * Copyright 2012-2020 SnapAppointments, LLC * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) */ function(root,factory){void 0===root&&void 0!==window&&(root=window),"function"==typeof define&&define.amd?define(["jquery"],(function(a0){return factory(a0)})):"object"==typeof module&&module.exports?module.exports=factory(require("jquery")):factory(root.jQuery)}(this,(function(jQuery){!function($){"use strict";var DISALLOWED_ATTRIBUTES=["sanitize","whiteList","sanitizeFn"],uriAttrs=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],ARIA_ATTRIBUTE_PATTERN,DefaultWhitelist={"*":["class","dir","id","lang","role","tabindex","style",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},SAFE_URL_PATTERN=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,DATA_URL_PATTERN=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function allowedAttribute(attr,allowedAttributeList){var attrName=attr.nodeName.toLowerCase();if(-1!==$.inArray(attrName,allowedAttributeList))return-1===$.inArray(attrName,uriAttrs)||Boolean(attr.nodeValue.match(SAFE_URL_PATTERN)||attr.nodeValue.match(DATA_URL_PATTERN));for(var regExp=$(allowedAttributeList).filter((function(index,value){return value instanceof RegExp})),i=0,l=regExp.length;i1?arguments[1]:void 0,pos=position?Number(position):0;pos!=pos&&(pos=0);var start=Math.min(Math.max(pos,0),stringLength);if(searchLength+start>stringLength)return!1;for(var index=-1;++index]+>/g,"")),normalize&&(string=normalizeToBase(string)),string=string.toUpperCase(),searchSuccess="contains"===method?string.indexOf(searchString)>=0:string.startsWith(searchString)))break}return searchSuccess}function toInteger(value){return parseInt(value,10)||0}$.fn.triggerNative=function(eventName){var el=this[0],event;el.dispatchEvent?(EventIsSupported?event=new Event(eventName,{bubbles:!0}):(event=document.createEvent("Event")).initEvent(eventName,!0,!1),el.dispatchEvent(event)):el.fireEvent?((event=document.createEventObject()).eventType=eventName,el.fireEvent("on"+eventName,event)):this.trigger(eventName)};var deburredLetters={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboMarksExtendedRange="\\u1ab0-\\u1aff",rsComboMarksSupplementRange="\\u1dc0-\\u1dff",rsComboRange,rsCombo,reComboMark=RegExp("["+"\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff"+"]","g");function deburrLetter(key){return deburredLetters[key]}function normalizeToBase(string){return(string=string.toString())&&string.replace(reLatin,deburrLetter).replace(reComboMark,"")}var escapeMap,createEscaper,htmlEscape=function(map){var escaper=function(match){return map[match]},source="(?:"+Object.keys(map).join("|")+")",testRegexp=RegExp(source),replaceRegexp=RegExp(source,"g");return function(string){return string=null==string?"":""+string,testRegexp.test(string)?string.replace(replaceRegexp,escaper):string}}({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"}),keyCodeMap={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},keyCodes_ESCAPE=27,keyCodes_ENTER=13,keyCodes_SPACE=32,keyCodes_TAB=9,keyCodes_ARROW_UP=38,keyCodes_ARROW_DOWN=40,version={success:!1,major:"3"};try{version.full=($.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split("."),version.major=version.full[0],version.success=!0}catch(err){}var selectId=0,EVENT_KEY=".bs.select",classNames={DISABLED:"disabled",DIVIDER:"divider",SHOW:"open",DROPUP:"dropup",MENU:"dropdown-menu",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",BUTTONCLASS:"btn-default",POPOVERHEADER:"popover-title",ICONBASE:"glyphicon",TICKICON:"glyphicon-ok"},Selector={MENU:"."+classNames.MENU},elementTemplates={div:document.createElement("div"),span:document.createElement("span"),i:document.createElement("i"),subtext:document.createElement("small"),a:document.createElement("a"),li:document.createElement("li"),whitespace:document.createTextNode(" "),fragment:document.createDocumentFragment()};elementTemplates.noResults=elementTemplates.li.cloneNode(!1),elementTemplates.noResults.className="no-results",elementTemplates.a.setAttribute("role","option"),elementTemplates.a.className="dropdown-item",elementTemplates.subtext.className="text-muted",elementTemplates.text=elementTemplates.span.cloneNode(!1),elementTemplates.text.className="text",elementTemplates.checkMark=elementTemplates.span.cloneNode(!1);var REGEXP_ARROW=new RegExp(keyCodes_ARROW_UP+"|"+keyCodes_ARROW_DOWN),REGEXP_TAB_OR_ESCAPE=new RegExp("^"+keyCodes_TAB+"$|"+keyCodes_ESCAPE),generateOption={li:function(content,classes,optgroup){var li=elementTemplates.li.cloneNode(!1);return content&&(1===content.nodeType||11===content.nodeType?li.appendChild(content):li.innerHTML=content),void 0!==classes&&""!==classes&&(li.className=classes),null!=optgroup&&li.classList.add("optgroup-"+optgroup),li},a:function(text,classes,inline){var a=elementTemplates.a.cloneNode(!0);return text&&(11===text.nodeType?a.appendChild(text):a.insertAdjacentHTML("beforeend",text)),void 0!==classes&&""!==classes&&a.classList.add.apply(a.classList,classes.split(/\s+/)),inline&&a.setAttribute("style",inline),a},text:function(options,useFragment){var textElement=elementTemplates.text.cloneNode(!1),subtextElement,iconElement;if(options.content)textElement.innerHTML=options.content;else{if(textElement.textContent=options.text,options.icon){var whitespace=elementTemplates.whitespace.cloneNode(!1);(iconElement=(!0===useFragment?elementTemplates.i:elementTemplates.span).cloneNode(!1)).className=this.options.iconBase+" "+options.icon,elementTemplates.fragment.appendChild(iconElement),elementTemplates.fragment.appendChild(whitespace)}options.subtext&&((subtextElement=elementTemplates.subtext.cloneNode(!1)).textContent=options.subtext,textElement.appendChild(subtextElement))}if(!0===useFragment)for(;textElement.childNodes.length>0;)elementTemplates.fragment.appendChild(textElement.childNodes[0]);else elementTemplates.fragment.appendChild(textElement);return elementTemplates.fragment},label:function(options){var textElement=elementTemplates.text.cloneNode(!1),subtextElement,iconElement;if(textElement.innerHTML=options.display,options.icon){var whitespace=elementTemplates.whitespace.cloneNode(!1);(iconElement=elementTemplates.span.cloneNode(!1)).className=this.options.iconBase+" "+options.icon,elementTemplates.fragment.appendChild(iconElement),elementTemplates.fragment.appendChild(whitespace)}return options.subtext&&((subtextElement=elementTemplates.subtext.cloneNode(!1)).textContent=options.subtext,textElement.appendChild(subtextElement)),elementTemplates.fragment.appendChild(textElement),elementTemplates.fragment}};function showNoResults(searchMatch,searchValue){searchMatch.length||(elementTemplates.noResults.innerHTML=this.options.noneResultsText.replace("{0}",'"'+htmlEscape(searchValue)+'"'),this.$menuInner[0].firstChild.appendChild(elementTemplates.noResults))}var Selectpicker=function(element,options){var that=this;valHooks.useDefault||($.valHooks.select.set=valHooks._set,valHooks.useDefault=!0),this.$element=$(element),this.$newElement=null,this.$button=null,this.$menu=null,this.options=options,this.selectpicker={main:{},search:{},current:{},view:{},isSearching:!1,keydown:{keyHistory:"",resetKeyHistory:{start:function(){return setTimeout((function(){that.selectpicker.keydown.keyHistory=""}),800)}}}},this.sizeInfo={},null===this.options.title&&(this.options.title=this.$element.attr("title"));var winPad=this.options.windowPadding;"number"==typeof winPad&&(this.options.windowPadding=[winPad,winPad,winPad,winPad]),this.val=Selectpicker.prototype.val,this.render=Selectpicker.prototype.render,this.refresh=Selectpicker.prototype.refresh,this.setStyle=Selectpicker.prototype.setStyle,this.selectAll=Selectpicker.prototype.selectAll,this.deselectAll=Selectpicker.prototype.deselectAll,this.destroy=Selectpicker.prototype.destroy,this.remove=Selectpicker.prototype.remove,this.show=Selectpicker.prototype.show,this.hide=Selectpicker.prototype.hide,this.init()};function Plugin(option){var args=arguments,_option=option,value;if([].shift.apply(args),!version.success){try{version.full=($.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split(".")}catch(err){Selectpicker.BootstrapVersion?version.full=Selectpicker.BootstrapVersion.split(" ")[0].split("."):(version.full=[version.major,"0","0"],console.warn("There was an issue retrieving Bootstrap's version. Ensure Bootstrap is being loaded before bootstrap-select and there is no namespace collision. If loading Bootstrap asynchronously, the version may need to be manually specified via $.fn.selectpicker.Constructor.BootstrapVersion.",err))}version.major=version.full[0],version.success=!0}if("4"===version.major){var toUpdate=[];Selectpicker.DEFAULTS.style===classNames.BUTTONCLASS&&toUpdate.push({name:"style",className:"BUTTONCLASS"}),Selectpicker.DEFAULTS.iconBase===classNames.ICONBASE&&toUpdate.push({name:"iconBase",className:"ICONBASE"}),Selectpicker.DEFAULTS.tickIcon===classNames.TICKICON&&toUpdate.push({name:"tickIcon",className:"TICKICON"}),classNames.DIVIDER="dropdown-divider",classNames.SHOW="show",classNames.BUTTONCLASS="btn-light",classNames.POPOVERHEADER="popover-header",classNames.ICONBASE="",classNames.TICKICON="bs-ok-default";for(var i=0;i'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0,virtualScroll:600,display:!1,sanitize:!0,sanitizeFn:null,whiteList:DefaultWhitelist},Selectpicker.prototype={constructor:Selectpicker,init:function(){var that=this,id=this.$element.attr("id");selectId++,this.selectId="bs-select-"+selectId,this.$element[0].classList.add("bs-select-hidden"),this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$element[0].classList.contains("show-tick")&&(this.options.showTick=!0),this.$newElement=this.createDropdown(),this.buildData(),this.$element.after(this.$newElement).prependTo(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(Selector.MENU),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element[0].classList.remove("bs-select-hidden"),!0===this.options.dropdownAlignRight&&this.$menu[0].classList.add(classNames.MENURIGHT),void 0!==id&&this.$button.attr("data-id",id),this.checkDisabled(),this.clickListener(),this.options.liveSearch?(this.liveSearchListener(),this.focusedParent=this.$searchbox[0]):this.focusedParent=this.$menuInner[0],this.setStyle(),this.render(),this.setWidth(),this.options.container?this.selectPosition():this.$element.on("hide.bs.select",(function(){if(that.isVirtual()){var menuInner=that.$menuInner[0],emptyMenu=menuInner.firstChild.cloneNode(!1);menuInner.replaceChild(emptyMenu,menuInner.firstChild),menuInner.scrollTop=0}})),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(e){that.$element.trigger("hide.bs.select",e)},"hidden.bs.dropdown":function(e){that.$element.trigger("hidden.bs.select",e)},"show.bs.dropdown":function(e){that.$element.trigger("show.bs.select",e)},"shown.bs.dropdown":function(e){that.$element.trigger("shown.bs.select",e)}}),that.$element[0].hasAttribute("required")&&this.$element.on("invalid.bs.select",(function(){that.$button[0].classList.add("bs-invalid"),that.$element.on("shown.bs.select.invalid",(function(){that.$element.val(that.$element.val()).off("shown.bs.select.invalid")})).on("rendered.bs.select",(function(){this.validity.valid&&that.$button[0].classList.remove("bs-invalid"),that.$element.off("rendered.bs.select")})),that.$button.on("blur.bs.select",(function(){that.$element.trigger("focus").trigger("blur"),that.$button.off("blur.bs.select")}))})),setTimeout((function(){that.buildList(),that.$element.trigger("loaded.bs.select")}))},createDropdown:function(){var showTick=this.multiple||this.options.showTick?" show-tick":"",multiselectable=this.multiple?' aria-multiselectable="true"':"",inputGroup="",autofocus=this.autofocus?" autofocus":"";version.major<4&&this.$element.parent().hasClass("input-group")&&(inputGroup=" input-group-btn");var drop,header="",searchbox="",actionsbox="",donebutton="";return this.options.header&&(header='
'+this.options.header+"
"),this.options.liveSearch&&(searchbox=''),this.multiple&&this.options.actionsBox&&(actionsbox='
"),this.multiple&&this.options.doneButton&&(donebutton='
"),drop='",$(drop)},setPositionData:function(){this.selectpicker.view.canHighlight=[],this.selectpicker.view.size=0;for(var i=0;i=this.options.virtualScroll||!0===this.options.virtualScroll},createView:function(isSearching,setSize,refresh){var that=this,scrollTop=0,active=[],selected,prevActive;if(this.selectpicker.isSearching=isSearching,this.selectpicker.current=isSearching?this.selectpicker.search:this.selectpicker.main,this.setPositionData(),setSize)if(refresh)scrollTop=this.$menuInner[0].scrollTop;else if(!that.multiple){var element=that.$element[0],selectedIndex=(element.options[element.selectedIndex]||{}).liIndex;if("number"==typeof selectedIndex&&!1!==that.options.size){var selectedData=that.selectpicker.main.data[selectedIndex],position=selectedData&&selectedData.position;position&&(scrollTop=position-(that.sizeInfo.menuInnerHeight+that.sizeInfo.liHeight)/2)}}function scroll(scrollTop,init){var size=that.selectpicker.current.elements.length,chunks=[],chunkSize,chunkCount,firstChunk,lastChunk,currentChunk,prevPositions,positionIsDifferent,previousElements,menuIsDifferent=!0,isVirtual=that.isVirtual();that.selectpicker.view.scrollTop=scrollTop,chunkSize=Math.ceil(that.sizeInfo.menuInnerHeight/that.sizeInfo.liHeight*1.5),chunkCount=Math.round(size/chunkSize)||1;for(var i=0;isize-1?0:that.selectpicker.current.data[size-1].position-that.selectpicker.current.data[that.selectpicker.view.position1-1].position,menuInner.firstChild.style.marginTop=marginTop+"px",menuInner.firstChild.style.marginBottom=marginBottom+"px"):(menuInner.firstChild.style.marginTop=0,menuInner.firstChild.style.marginBottom=0),menuInner.firstChild.appendChild(menuFragment),!0===isVirtual&&that.sizeInfo.hasScrollBar){var menuInnerInnerWidth=menuInner.firstChild.offsetWidth;if(init&&menuInnerInnerWidththat.sizeInfo.selectWidth)menuInner.firstChild.style.minWidth=that.sizeInfo.menuInnerInnerWidth+"px";else if(menuInnerInnerWidth>that.sizeInfo.menuInnerInnerWidth){that.$menu[0].style.minWidth=0;var actualMenuWidth=menuInner.firstChild.offsetWidth;actualMenuWidth>that.sizeInfo.menuInnerInnerWidth&&(that.sizeInfo.menuInnerInnerWidth=actualMenuWidth,menuInner.firstChild.style.minWidth=that.sizeInfo.menuInnerInnerWidth+"px"),that.$menu[0].style.minWidth=""}}}if(that.prevActiveIndex=that.activeIndex,that.options.liveSearch){if(isSearching&&init){var index=0,newActive;that.selectpicker.view.canHighlight[index]||(index=1+that.selectpicker.view.canHighlight.slice(1).indexOf(!0)),newActive=that.selectpicker.view.visibleElements[index],that.defocusItem(that.selectpicker.view.currentActive),that.activeIndex=(that.selectpicker.current.data[index]||{}).index,that.focusItem(newActive)}}else that.$menuInner.trigger("focus")}scroll(scrollTop,!0),this.$menuInner.off("scroll.createView").on("scroll.createView",(function(e,updateValue){that.noScroll||scroll(this.scrollTop,updateValue),that.noScroll=!1})),$(window).off("resize.bs.select."+this.selectId+".createView").on("resize.bs.select."+this.selectId+".createView",(function(){var isActive;that.$newElement.hasClass(classNames.SHOW)&&scroll(that.$menuInner[0].scrollTop)}))},focusItem:function(li,liData,noStyle){if(li){liData=liData||this.selectpicker.main.data[this.activeIndex];var a=li.firstChild;a&&(a.setAttribute("aria-setsize",this.selectpicker.view.size),a.setAttribute("aria-posinset",liData.posinset),!0!==noStyle&&(this.focusedParent.setAttribute("aria-activedescendant",a.id),li.classList.add("active"),a.classList.add("active")))}},defocusItem:function(li){li&&(li.classList.remove("active"),li.firstChild&&li.firstChild.classList.remove("active"))},setPlaceholder:function(){var that=this,updateIndex=!1;if(this.options.title&&!this.multiple){this.selectpicker.view.titleOption||(this.selectpicker.view.titleOption=document.createElement("option")),updateIndex=!0;var element=this.$element[0],selectTitleOption=!1,titleNotAppended=!this.selectpicker.view.titleOption.parentNode,selectedIndex=element.selectedIndex,selectedOption=element.options[selectedIndex],navigation=window.performance&&window.performance.getEntriesByType("navigation");titleNotAppended&&(this.selectpicker.view.titleOption.className="bs-title-option",this.selectpicker.view.titleOption.value="",selectTitleOption=!selectedOption||0===selectedIndex&&!1===selectedOption.defaultSelected&&void 0===this.$element.data("selected")),(titleNotAppended||0!==this.selectpicker.view.titleOption.index)&&element.insertBefore(this.selectpicker.view.titleOption,element.firstChild),selectTitleOption&&navigation.length&&"back_forward"!==navigation[0].type?element.selectedIndex=0:"complete"!==document.readyState&&window.addEventListener("pageshow",(function(){that.selectpicker.view.displayedValue!==element.value&&that.render()}))}return updateIndex},buildData:function(){var optionSelector=':not([hidden]):not([data-hidden="true"])',mainData=[],optID=0,startIndex=this.setPlaceholder()?1:0;this.options.hideDisabled&&(optionSelector+=":not(:disabled)");var selectOptions=this.$element[0].querySelectorAll("select > *"+optionSelector);function addDivider(config){var previousData=mainData[mainData.length-1];previousData&&"divider"===previousData.type&&(previousData.optID||config.optID)||((config=config||{}).type="divider",mainData.push(config))}function addOption(option,config){if((config=config||{}).divider="true"===option.getAttribute("data-divider"),config.divider)addDivider({optID:config.optID});else{var liIndex=mainData.length,cssText=option.style.cssText,inlineStyle=cssText?htmlEscape(cssText):"",optionClass=(option.className||"")+(config.optgroupClass||"");config.optID&&(optionClass="opt "+optionClass),config.optionClass=optionClass.trim(),config.inlineStyle=inlineStyle,config.text=option.textContent,config.content=option.getAttribute("data-content"),config.tokens=option.getAttribute("data-tokens"),config.subtext=option.getAttribute("data-subtext"),config.icon=option.getAttribute("data-icon"),option.liIndex=liIndex,config.display=config.content||config.text,config.type="option",config.index=liIndex,config.option=option,config.selected=!!option.selected,config.disabled=config.disabled||!!option.disabled,mainData.push(config)}}function addOptgroup(index,selectOptions){var optgroup=selectOptions[index],previous=!(index-1widestOptionLength&&(widestOptionLength=combinedLength,that.selectpicker.view.widestOption=mainElements[mainElements.length-1])}!that.options.showTick&&!that.multiple||elementTemplates.checkMark.parentNode||(elementTemplates.checkMark.className=this.options.iconBase+" "+that.options.tickIcon+" check-mark",elementTemplates.a.appendChild(elementTemplates.checkMark));for(var len=selectData.length,i=0;i li")},render:function(){var that=this,element=this.$element[0],placeholderSelected=this.setPlaceholder()&&0===element.selectedIndex,selectedOptions=getSelectedOptions(element,this.options.hideDisabled),selectedCount=selectedOptions.length,button=this.$button[0],buttonInner=button.querySelector(".filter-option-inner-inner"),multipleSeparator=document.createTextNode(this.options.multipleSeparator),titleFragment=elementTemplates.fragment.cloneNode(!1),showCount,countMax,hasContent=!1;if(button.classList.toggle("bs-placeholder",this.multiple?!selectedCount:!getSelectValues(element,selectedOptions)),this.multiple||1!==selectedOptions.length||(this.selectpicker.view.displayedValue=getSelectValues(element,selectedOptions)),"static"===this.options.selectedTextFormat)titleFragment=generateOption.text.call(this,{text:this.options.title},!0);else if((showCount=this.multiple&&-1!==this.options.selectedTextFormat.indexOf("count")&&selectedCount>1)&&(showCount=(countMax=this.options.selectedTextFormat.split(">")).length>1&&selectedCount>countMax[1]||1===countMax.length&&selectedCount>=2),!1===showCount){if(!placeholderSelected){for(var selectedIndex=0;selectedIndex0&&titleFragment.appendChild(multipleSeparator.cloneNode(!1)),option.title?titleOptions.text=option.title:thisData&&(thisData.content&&this.options.showContent?(titleOptions.content=thisData.content.toString(),hasContent=!0):(this.options.showIcon&&(titleOptions.icon=thisData.icon),this.options.showSubtext&&!this.multiple&&thisData.subtext&&(titleOptions.subtext=" "+thisData.subtext),titleOptions.text=option.textContent.trim())),titleFragment.appendChild(generateOption.text.call(this,titleOptions,!0))}selectedCount>49&&titleFragment.appendChild(document.createTextNode("..."))}}else{var optionSelector=':not([hidden]):not([data-hidden="true"]):not([data-divider="true"])';this.options.hideDisabled&&(optionSelector+=":not(:disabled)");var totalCount=this.$element[0].querySelectorAll("select > option"+optionSelector+", optgroup"+optionSelector+" option"+optionSelector).length,tr8nText="function"==typeof this.options.countSelectedText?this.options.countSelectedText(selectedCount,totalCount):this.options.countSelectedText;titleFragment=generateOption.text.call(this,{text:tr8nText.replace("{0}",selectedCount.toString()).replace("{1}",totalCount.toString())},!0)}if(null==this.options.title&&(this.options.title=this.$element.attr("title")),titleFragment.childNodes.length||(titleFragment=generateOption.text.call(this,{text:void 0!==this.options.title?this.options.title:this.options.noneSelectedText},!0)),button.title=titleFragment.textContent.replace(/<[^>]*>?/g,"").trim(),this.options.sanitize&&hasContent&&sanitizeHtml([titleFragment],this.options.whiteList,this.options.sanitizeFn),buttonInner.innerHTML="",buttonInner.appendChild(titleFragment),version.major<4&&this.$newElement[0].classList.contains("bs3-has-addon")){var filterExpand=button.querySelector(".filter-expand"),clone=buttonInner.cloneNode(!0);clone.className="filter-expand",filterExpand?button.replaceChild(clone,filterExpand):button.appendChild(clone)}this.$element.trigger("rendered.bs.select")},setStyle:function(newStyle,status){var button=this.$button[0],newElement=this.$newElement[0],style=this.options.style.trim(),buttonClass;this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,"")),version.major<4&&(newElement.classList.add("bs3"),newElement.parentNode.classList&&newElement.parentNode.classList.contains("input-group")&&(newElement.previousElementSibling||newElement.nextElementSibling)&&(newElement.previousElementSibling||newElement.nextElementSibling).classList.contains("input-group-addon")&&newElement.classList.add("bs3-has-addon")),buttonClass=newStyle?newStyle.trim():style,"add"==status?buttonClass&&button.classList.add.apply(button.classList,buttonClass.split(" ")):"remove"==status?buttonClass&&button.classList.remove.apply(button.classList,buttonClass.split(" ")):(style&&button.classList.remove.apply(button.classList,style.split(" ")),buttonClass&&button.classList.add.apply(button.classList,buttonClass.split(" ")))},liHeight:function(refresh){if(refresh||!1!==this.options.size&&!Object.keys(this.sizeInfo).length){var newElement=elementTemplates.div.cloneNode(!1),menu=elementTemplates.div.cloneNode(!1),menuInner=elementTemplates.div.cloneNode(!1),menuInnerInner=document.createElement("ul"),divider=elementTemplates.li.cloneNode(!1),dropdownHeader=elementTemplates.li.cloneNode(!1),li,a=elementTemplates.a.cloneNode(!1),text=elementTemplates.span.cloneNode(!1),header=this.options.header&&this.$menu.find("."+classNames.POPOVERHEADER).length>0?this.$menu.find("."+classNames.POPOVERHEADER)[0].cloneNode(!0):null,search=this.options.liveSearch?elementTemplates.div.cloneNode(!1):null,actions=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,doneButton=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null,firstOption=this.$element.find("option")[0];if(this.sizeInfo.selectWidth=this.$newElement[0].offsetWidth,text.className="text",a.className="dropdown-item "+(firstOption?firstOption.className:""),newElement.className=this.$menu[0].parentNode.className+" "+classNames.SHOW,newElement.style.width=0,"auto"===this.options.width&&(menu.style.minWidth=0),menu.className=classNames.MENU+" "+classNames.SHOW,menuInner.className="inner "+classNames.SHOW,menuInnerInner.className=classNames.MENU+" inner "+("4"===version.major?classNames.SHOW:""),divider.className=classNames.DIVIDER,dropdownHeader.className="dropdown-header",text.appendChild(document.createTextNode("​")),this.selectpicker.current.data.length)for(var i=0;ithis.sizeInfo.menuExtras.vert&&estimate+this.sizeInfo.menuExtras.vert+50>this.sizeInfo.selectOffsetBot,!0===this.selectpicker.isSearching&&(isDropup=this.selectpicker.dropup),this.$newElement.toggleClass(classNames.DROPUP,isDropup),this.selectpicker.dropup=isDropup),"auto"===this.options.size)_minHeight=this.selectpicker.current.elements.length>3?3*this.sizeInfo.liHeight+this.sizeInfo.menuExtras.vert-2:0,menuHeight=this.sizeInfo.selectOffsetBot-this.sizeInfo.menuExtras.vert,minHeight=_minHeight+headerHeight+searchHeight+actionsHeight+doneButtonHeight,menuInnerMinHeight=Math.max(_minHeight-menuPadding.vert,0),this.$newElement.hasClass(classNames.DROPUP)&&(menuHeight=this.sizeInfo.selectOffsetTop-this.sizeInfo.menuExtras.vert),maxHeight=menuHeight,menuInnerHeight=menuHeight-headerHeight-searchHeight-actionsHeight-doneButtonHeight-menuPadding.vert;else if(this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size){for(var i=0;ithis.sizeInfo.menuInnerHeight&&(this.sizeInfo.hasScrollBar=!0,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth+this.sizeInfo.scrollBarWidth),"auto"===this.options.dropdownAlignRight&&this.$menu.toggleClass(classNames.MENURIGHT,this.sizeInfo.selectOffsetLeft>this.sizeInfo.selectOffsetRight&&this.sizeInfo.selectOffsetRightthis.options.size&&$window.off("resize.bs.select."+this.selectId+".setMenuSize scroll"+EVENT_KEY+"."+this.selectId+".setMenuSize")}this.createView(!1,!0,refresh)},setWidth:function(){var that=this;"auto"===this.options.width?requestAnimationFrame((function(){that.$menu.css("min-width","0"),that.$element.on("loaded.bs.select",(function(){that.liHeight(),that.setMenuSize();var $selectClone=that.$newElement.clone().appendTo("body"),btnWidth=$selectClone.css("width","auto").children("button").outerWidth();$selectClone.remove(),that.sizeInfo.selectWidth=Math.max(that.sizeInfo.totalMenuWidth,btnWidth),that.$newElement.css("width",that.sizeInfo.selectWidth+"px")}))})):"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width","")),this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement[0].classList.remove("fit-width")},selectPosition:function(){this.$bsContainer=$('
');var that=this,$container=$(this.options.container),pos,containerPos,actualHeight,getPlacement=function($element){var containerPosition={},display=that.options.display||!!$.fn.dropdown.Constructor.Default&&$.fn.dropdown.Constructor.Default.display;that.$bsContainer.addClass($element.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass(classNames.DROPUP,$element.hasClass(classNames.DROPUP)),pos=$element.offset(),$container.is("body")?containerPos={top:0,left:0}:((containerPos=$container.offset()).top+=parseInt($container.css("borderTopWidth"))-$container.scrollTop(),containerPos.left+=parseInt($container.css("borderLeftWidth"))-$container.scrollLeft()),actualHeight=$element.hasClass(classNames.DROPUP)?0:$element[0].offsetHeight,(version.major<4||"static"===display)&&(containerPosition.top=pos.top-containerPos.top+actualHeight,containerPosition.left=pos.left-containerPos.left),containerPosition.width=$element[0].offsetWidth,that.$bsContainer.css(containerPosition)};this.$button.on("click.bs.dropdown.data-api",(function(){that.isDisabled()||(getPlacement(that.$newElement),that.$bsContainer.appendTo(that.options.container).toggleClass(classNames.SHOW,!that.$button.hasClass(classNames.SHOW)).append(that.$menu))})),$(window).off("resize.bs.select."+this.selectId+" scroll"+EVENT_KEY+"."+this.selectId).on("resize.bs.select."+this.selectId+" scroll"+EVENT_KEY+"."+this.selectId,(function(){var isActive;that.$newElement.hasClass(classNames.SHOW)&&getPlacement(that.$newElement)})),this.$element.on("hide.bs.select",(function(){that.$menu.data("height",that.$menu.height()),that.$bsContainer.detach()}))},setOptionStatus:function(selectedOnly){var that=this;if(this.noScroll=!1,this.selectpicker.view.visibleElements&&this.selectpicker.view.visibleElements.length)for(var i=0;i3&&!that.dropdown&&(that.dropdown=that.$button.data("bs.dropdown"),that.dropdown._menu=that.$menu[0])})),this.$button.on("click.bs.dropdown.data-api",(function(){that.$newElement.hasClass(classNames.SHOW)||that.setSize()})),this.$element.on("shown.bs.select",(function(){that.$menuInner[0].scrollTop!==that.selectpicker.view.scrollTop&&(that.$menuInner[0].scrollTop=that.selectpicker.view.scrollTop),version.major>3?requestAnimationFrame(checkPopperExists):setFocus()})),this.$menuInner.on("mouseenter","li a",(function(e){var hoverLi=this.parentElement,position0=that.isVirtual()?that.selectpicker.view.position0:0,index=Array.prototype.indexOf.call(hoverLi.parentElement.children,hoverLi),hoverData=that.selectpicker.current.data[index+position0];that.focusItem(hoverLi,hoverData,!0)})),this.$menuInner.on("click","li a",(function(e,retainActive){var $this=$(this),element=that.$element[0],position0=that.isVirtual()?that.selectpicker.view.position0:0,clickedData=that.selectpicker.current.data[$this.parent().index()+position0],clickedIndex=clickedData.index,prevValue=getSelectValues(element),prevIndex=element.selectedIndex,prevOption=element.options[prevIndex],triggerChange=!0;if(that.multiple&&1!==that.options.maxOptions&&e.stopPropagation(),e.preventDefault(),!that.isDisabled()&&!$this.parent().hasClass(classNames.DISABLED)){var option=clickedData.option,$option=$(option),state=option.selected,$optgroup=$option.parent("optgroup"),$optgroupOptions=$optgroup.find("option"),maxOptions=that.options.maxOptions,maxOptionsGrp=$optgroup.data("maxOptions")||!1;if(clickedIndex===that.activeIndex&&(retainActive=!0),retainActive||(that.prevActiveIndex=that.activeIndex,that.activeIndex=void 0),that.multiple){if(option.selected=!state,that.setSelected(clickedIndex,!state),$this.trigger("blur"),!1!==maxOptions||!1!==maxOptionsGrp){var maxReached=maxOptions
');maxOptionsArr[2]&&(maxTxt=maxTxt.replace("{var}",maxOptionsArr[2][maxOptions>1?0:1]),maxTxtGrp=maxTxtGrp.replace("{var}",maxOptionsArr[2][maxOptionsGrp>1?0:1])),option.selected=!1,that.$menu.append($notify),maxOptions&&maxReached&&($notify.append($("
"+maxTxt+"
")),triggerChange=!1,that.$element.trigger("maxReached.bs.select")),maxOptionsGrp&&maxReachedGrp&&($notify.append($("
"+maxTxtGrp+"
")),triggerChange=!1,that.$element.trigger("maxReachedGrp.bs.select")),setTimeout((function(){that.setSelected(clickedIndex,!1)}),10),$notify[0].classList.add("fadeOut"),setTimeout((function(){$notify.remove()}),1050)}}}else prevOption&&(prevOption.selected=!1),option.selected=!0,that.setSelected(clickedIndex,!0);!that.multiple||that.multiple&&1===that.options.maxOptions?that.$button.trigger("focus"):that.options.liveSearch&&that.$searchbox.trigger("focus"),triggerChange&&(that.multiple||prevIndex!==element.selectedIndex)&&(changedArguments=[option.index,$option.prop("selected"),prevValue],that.$element.triggerNative("change"))}})),this.$menu.on("click","li."+classNames.DISABLED+" a, ."+classNames.POPOVERHEADER+", ."+classNames.POPOVERHEADER+" :not(.close)",(function(e){e.currentTarget==this&&(e.preventDefault(),e.stopPropagation(),that.options.liveSearch&&!$(e.target).hasClass("close")?that.$searchbox.trigger("focus"):that.$button.trigger("focus"))})),this.$menuInner.on("click",".divider, .dropdown-header",(function(e){e.preventDefault(),e.stopPropagation(),that.options.liveSearch?that.$searchbox.trigger("focus"):that.$button.trigger("focus")})),this.$menu.on("click","."+classNames.POPOVERHEADER+" .close",(function(){that.$button.trigger("click")})),this.$searchbox.on("click",(function(e){e.stopPropagation()})),this.$menu.on("click",".actions-btn",(function(e){that.options.liveSearch?that.$searchbox.trigger("focus"):that.$button.trigger("focus"),e.preventDefault(),e.stopPropagation(),$(this).hasClass("bs-select-all")?that.selectAll():that.deselectAll()})),this.$button.on("focus.bs.select",(function(e){var tabindex=that.$element[0].getAttribute("tabindex");void 0!==tabindex&&e.originalEvent&&e.originalEvent.isTrusted&&(this.setAttribute("tabindex",tabindex),that.$element[0].setAttribute("tabindex",-1),that.selectpicker.view.tabindex=tabindex)})).on("blur.bs.select",(function(e){void 0!==that.selectpicker.view.tabindex&&e.originalEvent&&e.originalEvent.isTrusted&&(that.$element[0].setAttribute("tabindex",that.selectpicker.view.tabindex),this.setAttribute("tabindex",-1),that.selectpicker.view.tabindex=void 0)})),this.$element.on("change.bs.select",(function(){that.render(),that.$element.trigger("changed.bs.select",changedArguments),changedArguments=null})).on("focus.bs.select",(function(){that.options.mobile||that.$button.trigger("focus")}))},liveSearchListener:function(){var that=this;this.$button.on("click.bs.dropdown.data-api",(function(){that.$searchbox.val()&&that.$searchbox.val("")})),this.$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api",(function(e){e.stopPropagation()})),this.$searchbox.on("input propertychange",(function(){var searchValue=that.$searchbox.val();if(that.selectpicker.search.elements=[],that.selectpicker.search.data=[],searchValue){var i,searchMatch=[],q=searchValue.toUpperCase(),cache={},cacheArr=[],searchStyle=that._searchStyle(),normalizeSearch=that.options.liveSearchNormalize;normalizeSearch&&(q=normalizeToBase(q));for(var i=0;i0&&(cache[li.headerIndex-1]=!0,cacheArr.push(li.headerIndex-1)),cache[li.headerIndex]=!0,cacheArr.push(li.headerIndex),cache[li.lastIndex+1]=!0),cache[i]&&"optgroup-label"!==li.type&&cacheArr.push(i)}for(var i=0,cacheLen=cacheArr.length;i=112&&e.which<=123))if(!(isActive=that.$newElement.hasClass(classNames.SHOW))&&(isArrowKey||e.which>=48&&e.which<=57||e.which>=96&&e.which<=105||e.which>=65&&e.which<=90)&&(that.$button.trigger("click.bs.dropdown.data-api"),that.options.liveSearch))that.$searchbox.trigger("focus");else{if(e.which===keyCodes_ESCAPE&&isActive&&(e.preventDefault(),that.$button.trigger("click.bs.dropdown.data-api").trigger("focus")),isArrowKey){if(!$items.length)return;-1!==(index=(liActive=that.selectpicker.main.elements[that.activeIndex])?Array.prototype.indexOf.call(liActive.parentElement.children,liActive):-1)&&that.defocusItem(liActive),e.which===keyCodes_ARROW_UP?(-1!==index&&index--,index+position0<0&&(index+=$items.length),that.selectpicker.view.canHighlight[index+position0]||-1===(index=that.selectpicker.view.canHighlight.slice(0,index+position0).lastIndexOf(!0)-position0)&&(index=$items.length-1)):(e.which===keyCodes_ARROW_DOWN||downOnTab)&&(++index+position0>=that.selectpicker.view.canHighlight.length&&(index=0),that.selectpicker.view.canHighlight[index+position0]||(index=index+1+that.selectpicker.view.canHighlight.slice(index+position0+1).indexOf(!0))),e.preventDefault();var liActiveIndex=position0+index;e.which===keyCodes_ARROW_UP?0===position0&&index===$items.length-1?(that.$menuInner[0].scrollTop=that.$menuInner[0].scrollHeight,liActiveIndex=that.selectpicker.current.elements.length-1):updateScroll=(offset=(activeLi=that.selectpicker.current.data[liActiveIndex]).position-activeLi.height)scrollTop),liActive=that.selectpicker.current.elements[liActiveIndex],that.activeIndex=that.selectpicker.current.data[liActiveIndex].index,that.focusItem(liActive),that.selectpicker.view.currentActive=liActive,updateScroll&&(that.$menuInner[0].scrollTop=offset),that.options.liveSearch?that.$searchbox.trigger("focus"):$this.trigger("focus")}else if(!$this.is("input")&&!REGEXP_TAB_OR_ESCAPE.test(e.which)||e.which===keyCodes_SPACE&&that.selectpicker.keydown.keyHistory){var searchMatch,matches=[],keyHistory;e.preventDefault(),that.selectpicker.keydown.keyHistory+=keyCodeMap[e.which],that.selectpicker.keydown.resetKeyHistory.cancel&&clearTimeout(that.selectpicker.keydown.resetKeyHistory.cancel),that.selectpicker.keydown.resetKeyHistory.cancel=that.selectpicker.keydown.resetKeyHistory.start(),keyHistory=that.selectpicker.keydown.keyHistory,/^(.)\1+$/.test(keyHistory)&&(keyHistory=keyHistory.charAt(0));for(var i=0;i0?(offset=activeLi.position-activeLi.height,updateScroll=!0):(offset=activeLi.position-that.sizeInfo.menuInnerHeight,updateScroll=activeLi.position>scrollTop+that.sizeInfo.menuInnerHeight),liActive=that.selectpicker.main.elements[searchMatch],that.activeIndex=matches[matchIndex],that.focusItem(liActive),liActive&&liActive.firstChild.focus(),updateScroll&&(that.$menuInner[0].scrollTop=offset),$this.trigger("focus")}}isActive&&(e.which===keyCodes_SPACE&&!that.selectpicker.keydown.keyHistory||e.which===keyCodes_ENTER||e.which===keyCodes_TAB&&that.options.selectOnTab)&&(e.which!==keyCodes_SPACE&&e.preventDefault(),that.options.liveSearch&&e.which===keyCodes_SPACE||(that.$menuInner.find(".active a").trigger("click",!0),$this.trigger("focus"),that.options.liveSearch||(e.preventDefault(),$(document).data("spaceSelect",!0))))}},mobile:function(){this.options.mobile=!0,this.$element[0].classList.add("mobile-device")},refresh:function(){var config=$.extend({},this.options,this.$element.data());this.options=config,this.checkDisabled(),this.buildData(),this.setStyle(),this.render(),this.buildList(),this.setWidth(),this.setSize(!0),this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(EVENT_KEY).removeData("selectpicker").removeClass("bs-select-hidden selectpicker"),$(window).off(".bs.select."+this.selectId)}};var old=$.fn.selectpicker;function keydownHandler(){if($.fn.dropdown){var bootstrapKeydown=$.fn.dropdown.Constructor._dataApiKeydownHandler||$.fn.dropdown.Constructor.prototype.keydown;return bootstrapKeydown.apply(this,arguments)}}$.fn.selectpicker=Plugin,$.fn.selectpicker.Constructor=Selectpicker,$.fn.selectpicker.noConflict=function(){return $.fn.selectpicker=old,this},$(document).off("keydown.bs.dropdown.data-api").on("keydown.bs.dropdown.data-api",':not(.bootstrap-select) > [data-toggle="dropdown"]',keydownHandler).on("keydown.bs.dropdown.data-api",":not(.bootstrap-select) > .dropdown-menu",keydownHandler).on("keydown.bs.select",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',Selectpicker.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',(function(e){e.stopPropagation()})),$(window).on("load.bs.select.data-api",(function(){$(".selectpicker").each((function(){var $selectpicker=$(this);Plugin.call($selectpicker,$selectpicker.data())}))}))}(jQuery)})), /** * bootstrap-switch - Turn checkboxes and radio buttons into toggle switches. * * @version v3.3.4 * @homepage https://bttstrp.github.io/bootstrap-switch * @author Mattia Larentis (http://larentis.eu) * @license Apache-2.0 */ function(global,factory){if("function"==typeof define&&define.amd)define(["jquery"],factory);else if("undefined"!=typeof exports)factory(require("jquery"));else{var mod={exports:{}};factory(global.jquery),global.bootstrapSwitch=mod.exports}}(this,(function(_jquery){"use strict";var _jquery2=_interopRequireDefault(_jquery);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _extends=Object.assign||function(target){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,BootstrapSwitch),this.$element=$(element),this.options=$.extend({},$.fn.bootstrapSwitch.defaults,this._getElementOptions(),options),this.prevOptions={},this.$wrapper=$("
",{class:function _class(){var classes=[];return classes.push(_this.options.state?"on":"off"),_this.options.size&&classes.push(_this.options.size),_this.options.disabled&&classes.push("disabled"),_this.options.readonly&&classes.push("readonly"),_this.options.indeterminate&&classes.push("indeterminate"),_this.options.inverse&&classes.push("inverse"),_this.$element.attr("id")&&classes.push("id-"+_this.$element.attr("id")),classes.map(_this._getClass.bind(_this)).concat([_this.options.baseClass],_this._getClasses(_this.options.wrapperClass)).join(" ")}}),this.$container=$("
",{class:this._getClass("container")}),this.$on=$("",{html:this.options.onText,class:this._getClass("handle-on")+" "+this._getClass(this.options.onColor)}),this.$off=$("",{html:this.options.offText,class:this._getClass("handle-off")+" "+this._getClass(this.options.offColor)}),this.$label=$("",{html:this.options.labelText,class:this._getClass("label")}),this.$element.on("init.bootstrapSwitch",this.options.onInit.bind(this,element)),this.$element.on("switchChange.bootstrapSwitch",(function(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];!1===_this.options.onSwitchChange.apply(element,args)&&(_this.$element.is(":radio")?$('[name="'+_this.$element.attr("name")+'"]').trigger("previousState.bootstrapSwitch",!0):_this.$element.trigger("previousState.bootstrapSwitch",!0))})),this.$container=this.$element.wrap(this.$container).parent(),this.$wrapper=this.$container.wrap(this.$wrapper).parent(),this.$element.before(this.options.inverse?this.$off:this.$on).before(this.$label).before(this.options.inverse?this.$on:this.$off),this.options.indeterminate&&this.$element.prop("indeterminate",!0),this._init(),this._elementHandlers(),this._handleHandlers(),this._labelHandlers(),this._formHandler(),this._externalLabelHandler(),this.$element.trigger("init.bootstrapSwitch",this.options.state)}return _createClass(BootstrapSwitch,[{key:"setPrevOptions",value:function setPrevOptions(){this.prevOptions=_extends({},this.options)}},{key:"state",value:function state(value,skip){return void 0===value?this.options.state:this.options.disabled||this.options.readonly||this.options.state&&!this.options.radioAllOff&&this.$element.is(":radio")?this.$element:(this.$element.is(":radio")?$('[name="'+this.$element.attr("name")+'"]').trigger("setPreviousOptions.bootstrapSwitch"):this.$element.trigger("setPreviousOptions.bootstrapSwitch"),this.options.indeterminate&&this.indeterminate(!1),this.$element.prop("checked",Boolean(value)).trigger("change.bootstrapSwitch",skip),this.$element)}},{key:"toggleState",value:function toggleState(skip){return this.options.disabled||this.options.readonly?this.$element:this.options.indeterminate?(this.indeterminate(!1),this.state(!0)):this.$element.prop("checked",!this.options.state).trigger("change.bootstrapSwitch",skip)}},{key:"size",value:function size(value){return void 0===value?this.options.size:(null!=this.options.size&&this.$wrapper.removeClass(this._getClass(this.options.size)),value&&this.$wrapper.addClass(this._getClass(value)),this._width(),this._containerPosition(),this.options.size=value,this.$element)}},{key:"animate",value:function animate(value){return void 0===value?this.options.animate:this.options.animate===Boolean(value)?this.$element:this.toggleAnimate()}},{key:"toggleAnimate",value:function toggleAnimate(){return this.options.animate=!this.options.animate,this.$wrapper.toggleClass(this._getClass("animate")),this.$element}},{key:"disabled",value:function disabled(value){return void 0===value?this.options.disabled:this.options.disabled===Boolean(value)?this.$element:this.toggleDisabled()}},{key:"toggleDisabled",value:function toggleDisabled(){return this.options.disabled=!this.options.disabled,this.$element.prop("disabled",this.options.disabled),this.$wrapper.toggleClass(this._getClass("disabled")),this.$element}},{key:"readonly",value:function readonly(value){return void 0===value?this.options.readonly:this.options.readonly===Boolean(value)?this.$element:this.toggleReadonly()}},{key:"toggleReadonly",value:function toggleReadonly(){return this.options.readonly=!this.options.readonly,this.$element.prop("readonly",this.options.readonly),this.$wrapper.toggleClass(this._getClass("readonly")),this.$element}},{key:"indeterminate",value:function indeterminate(value){return void 0===value?this.options.indeterminate:this.options.indeterminate===Boolean(value)?this.$element:this.toggleIndeterminate()}},{key:"toggleIndeterminate",value:function toggleIndeterminate(){return this.options.indeterminate=!this.options.indeterminate,this.$element.prop("indeterminate",this.options.indeterminate),this.$wrapper.toggleClass(this._getClass("indeterminate")),this._containerPosition(),this.$element}},{key:"inverse",value:function inverse(value){return void 0===value?this.options.inverse:this.options.inverse===Boolean(value)?this.$element:this.toggleInverse()}},{key:"toggleInverse",value:function toggleInverse(){this.$wrapper.toggleClass(this._getClass("inverse"));var $on=this.$on.clone(!0),$off=this.$off.clone(!0);return this.$on.replaceWith($off),this.$off.replaceWith($on),this.$on=$off,this.$off=$on,this.options.inverse=!this.options.inverse,this.$element}},{key:"onColor",value:function onColor(value){return void 0===value?this.options.onColor:(this.options.onColor&&this.$on.removeClass(this._getClass(this.options.onColor)),this.$on.addClass(this._getClass(value)),this.options.onColor=value,this.$element)}},{key:"offColor",value:function offColor(value){return void 0===value?this.options.offColor:(this.options.offColor&&this.$off.removeClass(this._getClass(this.options.offColor)),this.$off.addClass(this._getClass(value)),this.options.offColor=value,this.$element)}},{key:"onText",value:function onText(value){return void 0===value?this.options.onText:(this.$on.html(value),this._width(),this._containerPosition(),this.options.onText=value,this.$element)}},{key:"offText",value:function offText(value){return void 0===value?this.options.offText:(this.$off.html(value),this._width(),this._containerPosition(),this.options.offText=value,this.$element)}},{key:"labelText",value:function labelText(value){return void 0===value?this.options.labelText:(this.$label.html(value),this._width(),this.options.labelText=value,this.$element)}},{key:"handleWidth",value:function handleWidth(value){return void 0===value?this.options.handleWidth:(this.options.handleWidth=value,this._width(),this._containerPosition(),this.$element)}},{key:"labelWidth",value:function labelWidth(value){return void 0===value?this.options.labelWidth:(this.options.labelWidth=value,this._width(),this._containerPosition(),this.$element)}},{key:"baseClass",value:function baseClass(value){return this.options.baseClass}},{key:"wrapperClass",value:function wrapperClass(value){return void 0===value?this.options.wrapperClass:(value||(value=$.fn.bootstrapSwitch.defaults.wrapperClass),this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" ")),this.$wrapper.addClass(this._getClasses(value).join(" ")),this.options.wrapperClass=value,this.$element)}},{key:"radioAllOff",value:function radioAllOff(value){if(void 0===value)return this.options.radioAllOff;var val=Boolean(value);return this.options.radioAllOff===val?this.$element:(this.options.radioAllOff=val,this.$element)}},{key:"onInit",value:function onInit(value){return void 0===value?this.options.onInit:(value||(value=$.fn.bootstrapSwitch.defaults.onInit),this.options.onInit=value,this.$element)}},{key:"onSwitchChange",value:function onSwitchChange(value){return void 0===value?this.options.onSwitchChange:(value||(value=$.fn.bootstrapSwitch.defaults.onSwitchChange),this.options.onSwitchChange=value,this.$element)}},{key:"destroy",value:function destroy(){var $form=this.$element.closest("form");return $form.length&&$form.off("reset.bootstrapSwitch").removeData("bootstrap-switch"),this.$container.children().not(this.$element).remove(),this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch"),this.$element}},{key:"_getElementOptions",value:function _getElementOptions(){return{state:this.$element.is(":checked"),size:this.$element.data("size"),animate:this.$element.data("animate"),disabled:this.$element.is(":disabled"),readonly:this.$element.is("[readonly]"),indeterminate:this.$element.data("indeterminate"),inverse:this.$element.data("inverse"),radioAllOff:this.$element.data("radio-all-off"),onColor:this.$element.data("on-color"),offColor:this.$element.data("off-color"),onText:this.$element.data("on-text"),offText:this.$element.data("off-text"),labelText:this.$element.data("label-text"),handleWidth:this.$element.data("handle-width"),labelWidth:this.$element.data("label-width"),baseClass:this.$element.data("base-class"),wrapperClass:this.$element.data("wrapper-class")}}},{key:"_width",value:function _width(){var _this2=this,$handles=this.$on.add(this.$off).add(this.$label).css("width",""),handleWidth="auto"===this.options.handleWidth?Math.round(Math.max(this.$on.width(),this.$off.width())):this.options.handleWidth;return $handles.width(handleWidth),this.$label.width((function(index,width){return"auto"!==_this2.options.labelWidth?_this2.options.labelWidth:width0&&void 0!==arguments[0]?arguments[0]:this.options.state,callback=arguments[1];this.$container.css("margin-left",(function(){var values=[0,"-"+_this3._handleWidth+"px"];return _this3.options.indeterminate?"-"+_this3._handleWidth/2+"px":state?_this3.options.inverse?values[1]:values[0]:_this3.options.inverse?values[0]:values[1]}))}},{key:"_init",value:function _init(){var _this4=this,init=function init(){_this4.setPrevOptions(),_this4._width(),_this4._containerPosition(),setTimeout((function(){if(_this4.options.animate)return _this4.$wrapper.addClass(_this4._getClass("animate"))}),50)};if(this.$wrapper.is(":visible"))init();else var initInterval=window.setInterval((function(){if(_this4.$wrapper.is(":visible"))return init(),window.clearInterval(initInterval)}),50)}},{key:"_elementHandlers",value:function _elementHandlers(){var _this5=this;return this.$element.on({"setPreviousOptions.bootstrapSwitch":this.setPrevOptions.bind(this),"previousState.bootstrapSwitch":function previousStateBootstrapSwitch(){_this5.options=_this5.prevOptions,_this5.options.indeterminate&&_this5.$wrapper.addClass(_this5._getClass("indeterminate")),_this5.$element.prop("checked",_this5.options.state).trigger("change.bootstrapSwitch",!0)},"change.bootstrapSwitch":function changeBootstrapSwitch(event,skip){event.preventDefault(),event.stopImmediatePropagation();var state=_this5.$element.is(":checked");_this5._containerPosition(state),state!==_this5.options.state&&(_this5.options.state=state,_this5.$wrapper.toggleClass(_this5._getClass("off")).toggleClass(_this5._getClass("on")),skip||(_this5.$element.is(":radio")&&$('[name="'+_this5.$element.attr("name")+'"]').not(_this5.$element).prop("checked",!1).trigger("change.bootstrapSwitch",!0),_this5.$element.trigger("switchChange.bootstrapSwitch",[state])))},"focus.bootstrapSwitch":function focusBootstrapSwitch(event){event.preventDefault(),_this5.$wrapper.addClass(_this5._getClass("focused"))},"blur.bootstrapSwitch":function blurBootstrapSwitch(event){event.preventDefault(),_this5.$wrapper.removeClass(_this5._getClass("focused"))},"keydown.bootstrapSwitch":function keydownBootstrapSwitch(event){!event.which||_this5.options.disabled||_this5.options.readonly||37!==event.which&&39!==event.which||(event.preventDefault(),event.stopImmediatePropagation(),_this5.state(39===event.which))}})}},{key:"_handleHandlers",value:function _handleHandlers(){var _this6=this;return this.$on.on("click.bootstrapSwitch",(function(event){return event.preventDefault(),event.stopPropagation(),_this6.state(!1),_this6.$element.trigger("focus.bootstrapSwitch")})),this.$off.on("click.bootstrapSwitch",(function(event){return event.preventDefault(),event.stopPropagation(),_this6.state(!0),_this6.$element.trigger("focus.bootstrapSwitch")}))}},{key:"_labelHandlers",value:function _labelHandlers(){var _this7=this,handlers={click:function click(event){event.stopPropagation()},"mousedown.bootstrapSwitch touchstart.bootstrapSwitch":function mousedownBootstrapSwitchTouchstartBootstrapSwitch(event){_this7._dragStart||_this7.options.disabled||_this7.options.readonly||(event.preventDefault(),event.stopPropagation(),_this7._dragStart=(event.pageX||event.originalEvent.touches[0].pageX)-parseInt(_this7.$container.css("margin-left"),10),_this7.options.animate&&_this7.$wrapper.removeClass(_this7._getClass("animate")),_this7.$element.trigger("focus.bootstrapSwitch"))},"mousemove.bootstrapSwitch touchmove.bootstrapSwitch":function mousemoveBootstrapSwitchTouchmoveBootstrapSwitch(event){if(null!=_this7._dragStart){var difference=(event.pageX||event.originalEvent.touches[0].pageX)-_this7._dragStart;event.preventDefault(),difference<-_this7._handleWidth||difference>0||(_this7._dragEnd=difference,_this7.$container.css("margin-left",_this7._dragEnd+"px"))}},"mouseup.bootstrapSwitch touchend.bootstrapSwitch":function mouseupBootstrapSwitchTouchendBootstrapSwitch(event){if(_this7._dragStart){if(event.preventDefault(),_this7.options.animate&&_this7.$wrapper.addClass(_this7._getClass("animate")),_this7._dragEnd){var state=_this7._dragEnd>-_this7._handleWidth/2;_this7._dragEnd=!1,_this7.state(_this7.options.inverse?!state:state)}else _this7.state(!_this7.options.state);_this7._dragStart=!1}},"mouseleave.bootstrapSwitch":function mouseleaveBootstrapSwitch(){_this7.$label.trigger("mouseup.bootstrapSwitch")}};this.$label.on(handlers)}},{key:"_externalLabelHandler",value:function _externalLabelHandler(){var _this8=this,$externalLabel=this.$element.closest("label");$externalLabel.on("click",(function(event){event.preventDefault(),event.stopImmediatePropagation(),event.target===$externalLabel[0]&&_this8.toggleState()}))}},{key:"_formHandler",value:function _formHandler(){var $form=this.$element.closest("form");$form.data("bootstrap-switch")||$form.on("reset.bootstrapSwitch",(function(){window.setTimeout((function(){$form.find("input").filter((function(){return $(this).data("bootstrap-switch")})).each((function(){return $(this).bootstrapSwitch("state",this.checked)}))}),1)})).data("bootstrap-switch",!0)}},{key:"_getClass",value:function _getClass(name){return this.options.baseClass+"-"+name}},{key:"_getClasses",value:function _getClasses(classes){return $.isArray(classes)?classes.map(this._getClass.bind(this)):[this._getClass(classes)]}}]),BootstrapSwitch}();$.fn.bootstrapSwitch=function(option){for(var _len2=arguments.length,args=Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++)args[_key2-1]=arguments[_key2];function reducer(ret,next){var $this=$(next),existingData=$this.data("bootstrap-switch"),data=existingData||new BootstrapSwitch(next,option);return existingData||$this.data("bootstrap-switch",data),"string"==typeof option?data[option].apply(data,args):ret}return Array.prototype.reduce.call(this,reducer,this)},$.fn.bootstrapSwitch.Constructor=BootstrapSwitch,$.fn.bootstrapSwitch.defaults={state:!0,size:null,animate:!0,disabled:!1,readonly:!1,indeterminate:!1,inverse:!1,radioAllOff:!1,onColor:"primary",offColor:"default",onText:"ON",offText:"OFF",labelText:" ",handleWidth:"auto",labelWidth:"auto",baseClass:"bootstrap-switch",wrapperClass:"wrapper",onInit:function onInit(){},onSwitchChange:function onSwitchChange(){}}})),function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):"object"==typeof module&&module.exports?module.exports=function(root,jQuery){return void 0===jQuery&&(jQuery="undefined"!=typeof window?require("jquery"):require("jquery")(root)),factory(jQuery),jQuery}:factory(jQuery)}((function(jQuery){var S2=function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var S2=jQuery.fn.select2.amd;var S2,factory;return function(){ /** * @license almond 0.3.3 Copyright jQuery Foundation and other contributors. * Released under MIT license, http://github.com/requirejs/almond/LICENSE */ var requirejs,require,define;S2&&S2.requirejs||(S2?require=S2:S2={},function(undef){var main,req,makeMap,handlers,defined={},waiting={},config={},defining={},hasOwn=Object.prototype.hasOwnProperty,aps=[].slice,jsSuffixRegExp=/\.js$/;function hasProp(obj,prop){return hasOwn.call(obj,prop)}function normalize(name,baseName){var nameParts,nameSegment,mapValue,foundMap,lastIndex,foundI,foundStarMap,starI,i,j,part,normalizedBaseParts,baseParts=baseName&&baseName.split("/"),map=config.map,starMap=map&&map["*"]||{};if(name){for(lastIndex=(name=name.split("/")).length-1,config.nodeIdCompat&&jsSuffixRegExp.test(name[lastIndex])&&(name[lastIndex]=name[lastIndex].replace(jsSuffixRegExp,"")),"."===name[0].charAt(0)&&baseParts&&(name=(normalizedBaseParts=baseParts.slice(0,baseParts.length-1)).concat(name)),i=0;i0&&(name.splice(i-1,2),i-=2)}name=name.join("/")}if((baseParts||starMap)&&map){for(i=(nameParts=name.split("/")).length;i>0;i-=1){if(nameSegment=nameParts.slice(0,i).join("/"),baseParts)for(j=baseParts.length;j>0;j-=1)if((mapValue=map[baseParts.slice(0,j).join("/")])&&(mapValue=mapValue[nameSegment])){foundMap=mapValue,foundI=i;break}if(foundMap)break;!foundStarMap&&starMap&&starMap[nameSegment]&&(foundStarMap=starMap[nameSegment],starI=i)}!foundMap&&foundStarMap&&(foundMap=foundStarMap,foundI=starI),foundMap&&(nameParts.splice(0,foundI,foundMap),name=nameParts.join("/"))}return name}function makeRequire(relName,forceSync){return function(){var args=aps.call(arguments,0);return"string"!=typeof args[0]&&1===args.length&&args.push(null),req.apply(undef,args.concat([relName,forceSync]))}}function makeNormalize(relName){return function(name){return normalize(name,relName)}}function makeLoad(depName){return function(value){defined[depName]=value}}function callDep(name){if(hasProp(waiting,name)){var args=waiting[name];delete waiting[name],defining[name]=!0,main.apply(undef,args)}if(!hasProp(defined,name)&&!hasProp(defining,name))throw new Error("No "+name);return defined[name]}function splitPrefix(name){var prefix,index=name?name.indexOf("!"):-1;return index>-1&&(prefix=name.substring(0,index),name=name.substring(index+1,name.length)),[prefix,name]}function makeRelParts(relName){return relName?splitPrefix(relName):[]}function makeConfig(name){return function(){return config&&config.config&&config.config[name]||{}}}makeMap=function(name,relParts){var plugin,parts=splitPrefix(name),prefix=parts[0],relResourceName=relParts[1];return name=parts[1],prefix&&(plugin=callDep(prefix=normalize(prefix,relResourceName))),prefix?name=plugin&&plugin.normalize?plugin.normalize(name,makeNormalize(relResourceName)):normalize(name,relResourceName):(prefix=(parts=splitPrefix(name=normalize(name,relResourceName)))[0],name=parts[1],prefix&&(plugin=callDep(prefix))),{f:prefix?prefix+"!"+name:name,n:name,pr:prefix,p:plugin}},handlers={require:function(name){return makeRequire(name)},exports:function(name){var e=defined[name];return void 0!==e?e:defined[name]={}},module:function(name){return{id:name,uri:"",exports:defined[name],config:makeConfig(name)}}},main=function(name,deps,callback,relName){var cjsModule,depName,ret,map,i,relParts,args=[],callbackType=typeof callback,usingExports;if(relParts=makeRelParts(relName=relName||name),"undefined"===callbackType||"function"===callbackType){for(deps=!deps.length&&callback.length?["require","exports","module"]:deps,i=0;i0&&(unshift.call(arguments,SuperClass.prototype.constructor),calledConstructor=DecoratorClass.prototype.constructor),calledConstructor.apply(this,arguments)}function ctr(){this.constructor=DecoratedClass}DecoratorClass.displayName=SuperClass.displayName,DecoratedClass.prototype=new ctr;for(var m=0;m":">",'"':""","'":"'","/":"/"};return"string"!=typeof markup?markup:String(markup).replace(/[&<>"'\/\\]/g,(function(match){return replaceMap[match]}))},Utils.appendMany=function($element,$nodes){if("1.7"===$.fn.jquery.substr(0,3)){var $jqNodes=$();$.map($nodes,(function(node){$jqNodes=$jqNodes.add(node)})),$nodes=$jqNodes}$element.append($nodes)},Utils.__cache={};var id=0;return Utils.GetUniqueElementId=function(element){var select2Id=element.getAttribute("data-select2-id");return null==select2Id&&(element.id?(select2Id=element.id,element.setAttribute("data-select2-id",select2Id)):(element.setAttribute("data-select2-id",++id),select2Id=id.toString())),select2Id},Utils.StoreData=function(element,name,value){var id=Utils.GetUniqueElementId(element);Utils.__cache[id]||(Utils.__cache[id]={}),Utils.__cache[id][name]=value},Utils.GetData=function(element,name){var id=Utils.GetUniqueElementId(element);return name?Utils.__cache[id]&&null!=Utils.__cache[id][name]?Utils.__cache[id][name]:$(element).data(name):Utils.__cache[id]},Utils.RemoveData=function(element){var id=Utils.GetUniqueElementId(element);null!=Utils.__cache[id]&&delete Utils.__cache[id],element.removeAttribute("data-select2-id")},Utils})),S2.define("select2/results",["jquery","./utils"],(function($,Utils){function Results($element,options,dataAdapter){this.$element=$element,this.data=dataAdapter,this.options=options,Results.__super__.constructor.call(this)}return Utils.Extend(Results,Utils.Observable),Results.prototype.render=function(){var $results=$('
    ');return this.options.get("multiple")&&$results.attr("aria-multiselectable","true"),this.$results=$results,$results},Results.prototype.clear=function(){this.$results.empty()},Results.prototype.displayMessage=function(params){var escapeMarkup=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var $message=$(''),message=this.options.get("translations").get(params.message);$message.append(escapeMarkup(message(params.args))),$message[0].className+=" select2-results__message",this.$results.append($message)},Results.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},Results.prototype.append=function(data){this.hideLoading();var $options=[];if(null!=data.results&&0!==data.results.length){data.results=this.sort(data.results);for(var d=0;d0?$selected.first().trigger("mouseenter"):$options.first().trigger("mouseenter"),this.ensureHighlightVisible()},Results.prototype.setClasses=function(){var self=this;this.data.current((function(selected){var selectedIds=$.map(selected,(function(s){return s.id.toString()})),$options;self.$results.find(".select2-results__option[aria-selected]").each((function(){var $option=$(this),item=Utils.GetData(this,"data"),id=""+item.id;null!=item.element&&item.element.selected||null==item.element&&$.inArray(id,selectedIds)>-1?$option.attr("aria-selected","true"):$option.attr("aria-selected","false")}))}))},Results.prototype.showLoading=function(params){this.hideLoading();var loadingMore,loading={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(params)},$loading=this.option(loading);$loading.className+=" loading-results",this.$results.prepend($loading)},Results.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},Results.prototype.option=function(data){var option=document.createElement("li");option.className="select2-results__option";var attrs={role:"option","aria-selected":"false"},matches=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var attr in(null!=data.element&&matches.call(data.element,":disabled")||null==data.element&&data.disabled)&&(delete attrs["aria-selected"],attrs["aria-disabled"]="true"),null==data.id&&delete attrs["aria-selected"],null!=data._resultId&&(option.id=data._resultId),data.title&&(option.title=data.title),data.children&&(attrs.role="group",attrs["aria-label"]=data.text,delete attrs["aria-selected"]),attrs){var val=attrs[attr];option.setAttribute(attr,val)}if(data.children){var $option=$(option),label=document.createElement("strong");label.className="select2-results__group";var $label=$(label);this.template(data,label);for(var $children=[],c=0;c",{class:"select2-results__options select2-results__options--nested"});$childrenContainer.append($children),$option.append(label),$option.append($childrenContainer)}else this.template(data,option);return Utils.StoreData(option,"data",data),option},Results.prototype.bind=function(container,$container){var self=this,id=container.id+"-results";this.$results.attr("id",id),container.on("results:all",(function(params){self.clear(),self.append(params.data),container.isOpen()&&(self.setClasses(),self.highlightFirstItem())})),container.on("results:append",(function(params){self.append(params.data),container.isOpen()&&self.setClasses()})),container.on("query",(function(params){self.hideMessages(),self.showLoading(params)})),container.on("select",(function(){container.isOpen()&&(self.setClasses(),self.options.get("scrollAfterSelect")&&self.highlightFirstItem())})),container.on("unselect",(function(){container.isOpen()&&(self.setClasses(),self.options.get("scrollAfterSelect")&&self.highlightFirstItem())})),container.on("open",(function(){self.$results.attr("aria-expanded","true"),self.$results.attr("aria-hidden","false"),self.setClasses(),self.ensureHighlightVisible()})),container.on("close",(function(){self.$results.attr("aria-expanded","false"),self.$results.attr("aria-hidden","true"),self.$results.removeAttr("aria-activedescendant")})),container.on("results:toggle",(function(){var $highlighted=self.getHighlightedResults();0!==$highlighted.length&&$highlighted.trigger("mouseup")})),container.on("results:select",(function(){var $highlighted=self.getHighlightedResults();if(0!==$highlighted.length){var data=Utils.GetData($highlighted[0],"data");"true"==$highlighted.attr("aria-selected")?self.trigger("close",{}):self.trigger("select",{data:data})}})),container.on("results:previous",(function(){var $highlighted=self.getHighlightedResults(),$options=self.$results.find("[aria-selected]"),currentIndex=$options.index($highlighted);if(!(currentIndex<=0)){var nextIndex=currentIndex-1;0===$highlighted.length&&(nextIndex=0);var $next=$options.eq(nextIndex);$next.trigger("mouseenter");var currentOffset=self.$results.offset().top,nextTop=$next.offset().top,nextOffset=self.$results.scrollTop()+(nextTop-currentOffset);0===nextIndex?self.$results.scrollTop(0):nextTop-currentOffset<0&&self.$results.scrollTop(nextOffset)}})),container.on("results:next",(function(){var $highlighted=self.getHighlightedResults(),$options=self.$results.find("[aria-selected]"),currentIndex,nextIndex=$options.index($highlighted)+1;if(!(nextIndex>=$options.length)){var $next=$options.eq(nextIndex);$next.trigger("mouseenter");var currentOffset=self.$results.offset().top+self.$results.outerHeight(!1),nextBottom=$next.offset().top+$next.outerHeight(!1),nextOffset=self.$results.scrollTop()+nextBottom-currentOffset;0===nextIndex?self.$results.scrollTop(0):nextBottom>currentOffset&&self.$results.scrollTop(nextOffset)}})),container.on("results:focus",(function(params){params.element.addClass("select2-results__option--highlighted")})),container.on("results:message",(function(params){self.displayMessage(params)})),$.fn.mousewheel&&this.$results.on("mousewheel",(function(e){var top=self.$results.scrollTop(),bottom=self.$results.get(0).scrollHeight-top+e.deltaY,isAtTop=e.deltaY>0&&top-e.deltaY<=0,isAtBottom=e.deltaY<0&&bottom<=self.$results.height();isAtTop?(self.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):isAtBottom&&(self.$results.scrollTop(self.$results.get(0).scrollHeight-self.$results.height()),e.preventDefault(),e.stopPropagation())})),this.$results.on("mouseup",".select2-results__option[aria-selected]",(function(evt){var $this=$(this),data=Utils.GetData(this,"data");"true"!==$this.attr("aria-selected")?self.trigger("select",{originalEvent:evt,data:data}):self.options.get("multiple")?self.trigger("unselect",{originalEvent:evt,data:data}):self.trigger("close",{})})),this.$results.on("mouseenter",".select2-results__option[aria-selected]",(function(evt){var data=Utils.GetData(this,"data");self.getHighlightedResults().removeClass("select2-results__option--highlighted"),self.trigger("results:focus",{data:data,element:$(this)})}))},Results.prototype.getHighlightedResults=function(){var $highlighted;return this.$results.find(".select2-results__option--highlighted")},Results.prototype.destroy=function(){this.$results.remove()},Results.prototype.ensureHighlightVisible=function(){var $highlighted=this.getHighlightedResults();if(0!==$highlighted.length){var $options,currentIndex=this.$results.find("[aria-selected]").index($highlighted),currentOffset=this.$results.offset().top,nextTop=$highlighted.offset().top,nextOffset=this.$results.scrollTop()+(nextTop-currentOffset),offsetDelta=nextTop-currentOffset;nextOffset-=2*$highlighted.outerHeight(!1),currentIndex<=2?this.$results.scrollTop(0):(offsetDelta>this.$results.outerHeight()||offsetDelta<0)&&this.$results.scrollTop(nextOffset)}},Results.prototype.template=function(result,container){var template=this.options.get("templateResult"),escapeMarkup=this.options.get("escapeMarkup"),content=template(result,container);null==content?container.style.display="none":"string"==typeof content?container.innerHTML=escapeMarkup(content):$(container).append(content)},Results})),S2.define("select2/keys",[],(function(){var KEYS;return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}})),S2.define("select2/selection/base",["jquery","../utils","../keys"],(function($,Utils,KEYS){function BaseSelection($element,options){this.$element=$element,this.options=options,BaseSelection.__super__.constructor.call(this)}return Utils.Extend(BaseSelection,Utils.Observable),BaseSelection.prototype.render=function(){var $selection=$('');return this._tabindex=0,null!=Utils.GetData(this.$element[0],"old-tabindex")?this._tabindex=Utils.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),$selection.attr("title",this.$element.attr("title")),$selection.attr("tabindex",this._tabindex),$selection.attr("aria-disabled","false"),this.$selection=$selection,$selection},BaseSelection.prototype.bind=function(container,$container){var self=this,resultsId=container.id+"-results";this.container=container,this.$selection.on("focus",(function(evt){self.trigger("focus",evt)})),this.$selection.on("blur",(function(evt){self._handleBlur(evt)})),this.$selection.on("keydown",(function(evt){self.trigger("keypress",evt),evt.which===KEYS.SPACE&&evt.preventDefault()})),container.on("results:focus",(function(params){self.$selection.attr("aria-activedescendant",params.data._resultId)})),container.on("selection:update",(function(params){self.update(params.data)})),container.on("open",(function(){self.$selection.attr("aria-expanded","true"),self.$selection.attr("aria-owns",resultsId),self._attachCloseHandler(container)})),container.on("close",(function(){self.$selection.attr("aria-expanded","false"),self.$selection.removeAttr("aria-activedescendant"),self.$selection.removeAttr("aria-owns"),self.$selection.trigger("focus"),self._detachCloseHandler(container)})),container.on("enable",(function(){self.$selection.attr("tabindex",self._tabindex),self.$selection.attr("aria-disabled","false")})),container.on("disable",(function(){self.$selection.attr("tabindex","-1"),self.$selection.attr("aria-disabled","true")}))},BaseSelection.prototype._handleBlur=function(evt){var self=this;window.setTimeout((function(){document.activeElement==self.$selection[0]||$.contains(self.$selection[0],document.activeElement)||self.trigger("blur",evt)}),1)},BaseSelection.prototype._attachCloseHandler=function(container){$(document.body).on("mousedown.select2."+container.id,(function(e){var $target,$select=$(e.target).closest(".select2"),$all;$(".select2.select2-container--open").each((function(){var $element;this!=$select[0]&&Utils.GetData(this,"element").select2("close")}))}))},BaseSelection.prototype._detachCloseHandler=function(container){$(document.body).off("mousedown.select2."+container.id)},BaseSelection.prototype.position=function($selection,$container){var $selectionContainer;$container.find(".selection").append($selection)},BaseSelection.prototype.destroy=function(){this._detachCloseHandler(this.container)},BaseSelection.prototype.update=function(data){throw new Error("The `update` method must be defined in child classes.")},BaseSelection.prototype.isEnabled=function(){return!this.isDisabled()},BaseSelection.prototype.isDisabled=function(){return this.options.get("disabled")},BaseSelection})),S2.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function($,BaseSelection,Utils,KEYS){function SingleSelection(){SingleSelection.__super__.constructor.apply(this,arguments)}return Utils.Extend(SingleSelection,BaseSelection),SingleSelection.prototype.render=function(){var $selection=SingleSelection.__super__.render.call(this);return $selection.addClass("select2-selection--single"),$selection.html(''),$selection},SingleSelection.prototype.bind=function(container,$container){var self=this;SingleSelection.__super__.bind.apply(this,arguments);var id=container.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",id).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",id),this.$selection.on("mousedown",(function(evt){1===evt.which&&self.trigger("toggle",{originalEvent:evt})})),this.$selection.on("focus",(function(evt){})),this.$selection.on("blur",(function(evt){})),container.on("focus",(function(evt){container.isOpen()||self.$selection.trigger("focus")}))},SingleSelection.prototype.clear=function(){var $rendered=this.$selection.find(".select2-selection__rendered");$rendered.empty(),$rendered.removeAttr("title")},SingleSelection.prototype.display=function(data,container){var template=this.options.get("templateSelection"),escapeMarkup;return this.options.get("escapeMarkup")(template(data,container))},SingleSelection.prototype.selectionContainer=function(){return $("")},SingleSelection.prototype.update=function(data){if(0!==data.length){var selection=data[0],$rendered=this.$selection.find(".select2-selection__rendered"),formatted=this.display(selection,$rendered);$rendered.empty().append(formatted);var title=selection.title||selection.text;title?$rendered.attr("title",title):$rendered.removeAttr("title")}else this.clear()},SingleSelection})),S2.define("select2/selection/multiple",["jquery","./base","../utils"],(function($,BaseSelection,Utils){function MultipleSelection($element,options){MultipleSelection.__super__.constructor.apply(this,arguments)}return Utils.Extend(MultipleSelection,BaseSelection),MultipleSelection.prototype.render=function(){var $selection=MultipleSelection.__super__.render.call(this);return $selection.addClass("select2-selection--multiple"),$selection.html('
      '),$selection},MultipleSelection.prototype.bind=function(container,$container){var self=this;MultipleSelection.__super__.bind.apply(this,arguments),this.$selection.on("click",(function(evt){self.trigger("toggle",{originalEvent:evt})})),this.$selection.on("click",".select2-selection__choice__remove",(function(evt){if(!self.isDisabled()){var $remove,$selection=$(this).parent(),data=Utils.GetData($selection[0],"data");self.trigger("unselect",{originalEvent:evt,data:data})}}))},MultipleSelection.prototype.clear=function(){var $rendered=this.$selection.find(".select2-selection__rendered");$rendered.empty(),$rendered.removeAttr("title")},MultipleSelection.prototype.display=function(data,container){var template=this.options.get("templateSelection"),escapeMarkup;return this.options.get("escapeMarkup")(template(data,container))},MultipleSelection.prototype.selectionContainer=function(){var $container;return $('
    • ×
    • ')},MultipleSelection.prototype.update=function(data){if(this.clear(),0!==data.length){for(var $selections=[],d=0;d1||singlePlaceholder)return decorated.call(this,data);this.clear();var $placeholder=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append($placeholder)},Placeholder})),S2.define("select2/selection/allowClear",["jquery","../keys","../utils"],(function($,KEYS,Utils){function AllowClear(){}return AllowClear.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",(function(evt){self._handleClear(evt)})),container.on("keypress",(function(evt){self._handleKeyboardClear(evt,container)}))},AllowClear.prototype._handleClear=function(_,evt){if(!this.isDisabled()){var $clear=this.$selection.find(".select2-selection__clear");if(0!==$clear.length){evt.stopPropagation();var data=Utils.GetData($clear[0],"data"),previousVal=this.$element.val();this.$element.val(this.placeholder.id);var unselectData={data:data};if(this.trigger("clear",unselectData),unselectData.prevented)this.$element.val(previousVal);else{for(var d=0;d0||0===data.length)){var removeAll=this.options.get("translations").get("removeAllItems"),$remove=$('×');Utils.StoreData($remove[0],"data",data),this.$selection.find(".select2-selection__rendered").prepend($remove)}},AllowClear})),S2.define("select2/selection/search",["jquery","../utils","../keys"],(function($,Utils,KEYS){function Search(decorated,$element,options){decorated.call(this,$element,options)}return Search.prototype.render=function(decorated){var $search=$('');this.$searchContainer=$search,this.$search=$search.find("input");var $rendered=decorated.call(this);return this._transferTabIndex(),$rendered},Search.prototype.bind=function(decorated,container,$container){var self=this,resultsId=container.id+"-results";decorated.call(this,container,$container),container.on("open",(function(){self.$search.attr("aria-controls",resultsId),self.$search.trigger("focus")})),container.on("close",(function(){self.$search.val(""),self.$search.removeAttr("aria-controls"),self.$search.removeAttr("aria-activedescendant"),self.$search.trigger("focus")})),container.on("enable",(function(){self.$search.prop("disabled",!1),self._transferTabIndex()})),container.on("disable",(function(){self.$search.prop("disabled",!0)})),container.on("focus",(function(evt){self.$search.trigger("focus")})),container.on("results:focus",(function(params){params.data._resultId?self.$search.attr("aria-activedescendant",params.data._resultId):self.$search.removeAttr("aria-activedescendant")})),this.$selection.on("focusin",".select2-search--inline",(function(evt){self.trigger("focus",evt)})),this.$selection.on("focusout",".select2-search--inline",(function(evt){self._handleBlur(evt)})),this.$selection.on("keydown",".select2-search--inline",(function(evt){var key;if(evt.stopPropagation(),self.trigger("keypress",evt),self._keyUpPrevented=evt.isDefaultPrevented(),evt.which===KEYS.BACKSPACE&&""===self.$search.val()){var $previousChoice=self.$searchContainer.prev(".select2-selection__choice");if($previousChoice.length>0){var item=Utils.GetData($previousChoice[0],"data");self.searchRemoveChoice(item),evt.preventDefault()}}})),this.$selection.on("click",".select2-search--inline",(function(evt){self.$search.val()&&evt.stopPropagation()}));var msie=document.documentMode,disableInputEvents=msie&&msie<=11;this.$selection.on("input.searchcheck",".select2-search--inline",(function(evt){disableInputEvents?self.$selection.off("input.search input.searchcheck"):self.$selection.off("keyup.search")})),this.$selection.on("keyup.search input.search",".select2-search--inline",(function(evt){if(disableInputEvents&&"input"===evt.type)self.$selection.off("input.search input.searchcheck");else{var key=evt.which;key!=KEYS.SHIFT&&key!=KEYS.CTRL&&key!=KEYS.ALT&&key!=KEYS.TAB&&self.handleSearch(evt)}}))},Search.prototype._transferTabIndex=function(decorated){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},Search.prototype.createPlaceholder=function(decorated,placeholder){this.$search.attr("placeholder",placeholder.text)},Search.prototype.update=function(decorated,data){var searchHadFocus=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),decorated.call(this,data),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),searchHadFocus&&this.$search.trigger("focus")},Search.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var input=this.$search.val();this.trigger("query",{term:input})}this._keyUpPrevented=!1},Search.prototype.searchRemoveChoice=function(decorated,item){this.trigger("unselect",{data:item}),this.$search.val(item.text),this.handleSearch()},Search.prototype.resizeSearch=function(){this.$search.css("width","25px");var width="",minimumWidth;""!==this.$search.attr("placeholder")?width=this.$selection.find(".select2-selection__rendered").width():width=.75*(this.$search.val().length+1)+"em";this.$search.css("width",width)},Search})),S2.define("select2/selection/eventRelay",["jquery"],(function($){function EventRelay(){}return EventRelay.prototype.bind=function(decorated,container,$container){var self=this,relayEvents=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],preventableEvents=["opening","closing","selecting","unselecting","clearing"];decorated.call(this,container,$container),container.on("*",(function(name,params){if(-1!==$.inArray(name,relayEvents)){params=params||{};var evt=$.Event("select2:"+name,{params:params});self.$element.trigger(evt),-1!==$.inArray(name,preventableEvents)&&(params.prevented=evt.isDefaultPrevented())}}))},EventRelay})),S2.define("select2/translation",["jquery","require"],(function($,require){function Translation(dict){this.dict=dict||{}}return Translation.prototype.all=function(){return this.dict},Translation.prototype.get=function(key){return this.dict[key]},Translation.prototype.extend=function(translation){this.dict=$.extend({},translation.all(),this.dict)},Translation._cache={},Translation.loadPath=function(path){if(!(path in Translation._cache)){var translations=require(path);Translation._cache[path]=translations}return new Translation(Translation._cache[path])},Translation})),S2.define("select2/diacritics",[],(function(){var diacritics;return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}})),S2.define("select2/data/base",["../utils"],(function(Utils){function BaseAdapter($element,options){BaseAdapter.__super__.constructor.call(this)}return Utils.Extend(BaseAdapter,Utils.Observable),BaseAdapter.prototype.current=function(callback){throw new Error("The `current` method must be defined in child classes.")},BaseAdapter.prototype.query=function(params,callback){throw new Error("The `query` method must be defined in child classes.")},BaseAdapter.prototype.bind=function(container,$container){},BaseAdapter.prototype.destroy=function(){},BaseAdapter.prototype.generateResultId=function(container,data){var id=container.id+"-result-";return id+=Utils.generateChars(4),null!=data.id?id+="-"+data.id.toString():id+="-"+Utils.generateChars(4),id},BaseAdapter})),S2.define("select2/data/select",["./base","../utils","jquery"],(function(BaseAdapter,Utils,$){function SelectAdapter($element,options){this.$element=$element,this.options=options,SelectAdapter.__super__.constructor.call(this)}return Utils.Extend(SelectAdapter,BaseAdapter),SelectAdapter.prototype.current=function(callback){var data=[],self=this;this.$element.find(":selected").each((function(){var $option=$(this),option=self.item($option);data.push(option)})),callback(data)},SelectAdapter.prototype.select=function(data){var self=this;if(data.selected=!0,$(data.element).is("option"))return data.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current((function(currentData){var val=[];(data=[data]).push.apply(data,currentData);for(var d=0;d=0){var $existingOption=$existing.filter(onlyItem(item)),existingData=this.item($existingOption),newData=$.extend(!0,{},item,existingData),$newOption=this.option(newData);$existingOption.replaceWith($newOption)}else{var $option=this.option(item);if(item.children){var $children=this.convertToOptions(item.children);Utils.appendMany($option,$children)}$options.push($option)}}return $options},ArrayAdapter})),S2.define("select2/data/ajax",["./array","../utils","jquery"],(function(ArrayAdapter,Utils,$){function AjaxAdapter($element,options){this.ajaxOptions=this._applyDefaults(options.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),AjaxAdapter.__super__.constructor.call(this,$element,options)}return Utils.Extend(AjaxAdapter,ArrayAdapter),AjaxAdapter.prototype._applyDefaults=function(options){var defaults={data:function(params){return $.extend({},params,{q:params.term})},transport:function(params,success,failure){var $request=$.ajax(params);return $request.then(success),$request.fail(failure),$request}};return $.extend({},defaults,options,!0)},AjaxAdapter.prototype.processResults=function(results){return results},AjaxAdapter.prototype.query=function(params,callback){var matches=[],self=this;null!=this._request&&($.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var options=$.extend({type:"GET"},this.ajaxOptions);function request(){var $request=options.transport(options,(function(data){var results=self.processResults(data,params);self.options.get("debug")&&window.console&&console.error&&(results&&results.results&&$.isArray(results.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),callback(results)}),(function(){"status"in $request&&(0===$request.status||"0"===$request.status)||self.trigger("results:message",{message:"errorLoading"})}));self._request=$request}"function"==typeof options.url&&(options.url=options.url.call(this.$element,params)),"function"==typeof options.data&&(options.data=options.data.call(this.$element,params)),this.ajaxOptions.delay&&null!=params.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(request,this.ajaxOptions.delay)):request()},AjaxAdapter})),S2.define("select2/data/tags",["jquery"],(function($){function Tags(decorated,$element,options){var tags=options.get("tags"),createTag=options.get("createTag");void 0!==createTag&&(this.createTag=createTag);var insertTag=options.get("insertTag");if(void 0!==insertTag&&(this.insertTag=insertTag),decorated.call(this,$element,options),$.isArray(tags))for(var t=0;t0&¶ms.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:params.term,params:params}}):decorated.call(this,params,callback)},MaximumInputLength})),S2.define("select2/data/maximumSelectionLength",[],(function(){function MaximumSelectionLength(decorated,$e,options){this.maximumSelectionLength=options.get("maximumSelectionLength"),decorated.call(this,$e,options)}return MaximumSelectionLength.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container),container.on("select",(function(){self._checkIfMaximumSelected()}))},MaximumSelectionLength.prototype.query=function(decorated,params,callback){var self=this;this._checkIfMaximumSelected((function(){decorated.call(self,params,callback)}))},MaximumSelectionLength.prototype._checkIfMaximumSelected=function(_,successCallback){var self=this;this.current((function(currentData){var count=null!=currentData?currentData.length:0;self.maximumSelectionLength>0&&count>=self.maximumSelectionLength?self.trigger("results:message",{message:"maximumSelected",args:{maximum:self.maximumSelectionLength}}):successCallback&&successCallback()}))},MaximumSelectionLength})),S2.define("select2/dropdown",["jquery","./utils"],(function($,Utils){function Dropdown($element,options){this.$element=$element,this.options=options,Dropdown.__super__.constructor.call(this)}return Utils.Extend(Dropdown,Utils.Observable),Dropdown.prototype.render=function(){var $dropdown=$('');return $dropdown.attr("dir",this.options.get("dir")),this.$dropdown=$dropdown,$dropdown},Dropdown.prototype.bind=function(){},Dropdown.prototype.position=function($dropdown,$container){},Dropdown.prototype.destroy=function(){this.$dropdown.remove()},Dropdown})),S2.define("select2/dropdown/search",["jquery","../utils"],(function($,Utils){function Search(){}return Search.prototype.render=function(decorated){var $rendered=decorated.call(this),$search=$('');return this.$searchContainer=$search,this.$search=$search.find("input"),$rendered.prepend($search),$rendered},Search.prototype.bind=function(decorated,container,$container){var self=this,resultsId=container.id+"-results";decorated.call(this,container,$container),this.$search.on("keydown",(function(evt){self.trigger("keypress",evt),self._keyUpPrevented=evt.isDefaultPrevented()})),this.$search.on("input",(function(evt){$(this).off("keyup")})),this.$search.on("keyup input",(function(evt){self.handleSearch(evt)})),container.on("open",(function(){self.$search.attr("tabindex",0),self.$search.attr("aria-controls",resultsId),self.$search.trigger("focus"),window.setTimeout((function(){self.$search.trigger("focus")}),0)})),container.on("close",(function(){self.$search.attr("tabindex",-1),self.$search.removeAttr("aria-controls"),self.$search.removeAttr("aria-activedescendant"),self.$search.val(""),self.$search.trigger("blur")})),container.on("focus",(function(){container.isOpen()||self.$search.trigger("focus")})),container.on("results:all",(function(params){var showSearch;null!=params.query.term&&""!==params.query.term||(self.showSearch(params)?self.$searchContainer.removeClass("select2-search--hide"):self.$searchContainer.addClass("select2-search--hide"))})),container.on("results:focus",(function(params){params.data._resultId?self.$search.attr("aria-activedescendant",params.data._resultId):self.$search.removeAttr("aria-activedescendant")}))},Search.prototype.handleSearch=function(evt){if(!this._keyUpPrevented){var input=this.$search.val();this.trigger("query",{term:input})}this._keyUpPrevented=!1},Search.prototype.showSearch=function(_,params){return!0},Search})),S2.define("select2/dropdown/hidePlaceholder",[],(function(){function HidePlaceholder(decorated,$element,options,dataAdapter){this.placeholder=this.normalizePlaceholder(options.get("placeholder")),decorated.call(this,$element,options,dataAdapter)}return HidePlaceholder.prototype.append=function(decorated,data){data.results=this.removePlaceholder(data.results),decorated.call(this,data)},HidePlaceholder.prototype.normalizePlaceholder=function(_,placeholder){return"string"==typeof placeholder&&(placeholder={id:"",text:placeholder}),placeholder},HidePlaceholder.prototype.removePlaceholder=function(_,data){for(var modifiedData=data.slice(0),d=data.length-1;d>=0;d--){var item=data[d];this.placeholder.id===item.id&&modifiedData.splice(d,1)}return modifiedData},HidePlaceholder})),S2.define("select2/dropdown/infiniteScroll",["jquery"],(function($){function InfiniteScroll(decorated,$element,options,dataAdapter){this.lastParams={},decorated.call(this,$element,options,dataAdapter),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return InfiniteScroll.prototype.append=function(decorated,data){this.$loadingMore.remove(),this.loading=!1,decorated.call(this,data),this.showLoadingMore(data)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},InfiniteScroll.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container),container.on("query",(function(params){self.lastParams=params,self.loading=!0})),container.on("query:append",(function(params){self.lastParams=params,self.loading=!0})),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},InfiniteScroll.prototype.loadMoreIfNeeded=function(){var isLoadMoreVisible=$.contains(document.documentElement,this.$loadingMore[0]),currentOffset,loadingMoreOffset;!this.loading&&isLoadMoreVisible&&(this.$results.offset().top+this.$results.outerHeight(!1)+50>=this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)&&this.loadMore())},InfiniteScroll.prototype.loadMore=function(){this.loading=!0;var params=$.extend({},{page:1},this.lastParams);params.page++,this.trigger("query:append",params)},InfiniteScroll.prototype.showLoadingMore=function(_,data){return data.pagination&&data.pagination.more},InfiniteScroll.prototype.createLoadingMore=function(){var $option=$('
    • '),message=this.options.get("translations").get("loadingMore");return $option.html(message(this.lastParams)),$option},InfiniteScroll})),S2.define("select2/dropdown/attachBody",["jquery","../utils"],(function($,Utils){function AttachBody(decorated,$element,options){this.$dropdownParent=$(options.get("dropdownParent")||document.body),decorated.call(this,$element,options)}return AttachBody.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container),container.on("open",(function(){self._showDropdown(),self._attachPositioningHandler(container),self._bindContainerResultHandlers(container)})),container.on("close",(function(){self._hideDropdown(),self._detachPositioningHandler(container)})),this.$dropdownContainer.on("mousedown",(function(evt){evt.stopPropagation()}))},AttachBody.prototype.destroy=function(decorated){decorated.call(this),this.$dropdownContainer.remove()},AttachBody.prototype.position=function(decorated,$dropdown,$container){$dropdown.attr("class",$container.attr("class")),$dropdown.removeClass("select2"),$dropdown.addClass("select2-container--open"),$dropdown.css({position:"absolute",top:-999999}),this.$container=$container},AttachBody.prototype.render=function(decorated){var $container=$(""),$dropdown=decorated.call(this);return $container.append($dropdown),this.$dropdownContainer=$container,$container},AttachBody.prototype._hideDropdown=function(decorated){this.$dropdownContainer.detach()},AttachBody.prototype._bindContainerResultHandlers=function(decorated,container){if(!this._containerResultsHandlersBound){var self=this;container.on("results:all",(function(){self._positionDropdown(),self._resizeDropdown()})),container.on("results:append",(function(){self._positionDropdown(),self._resizeDropdown()})),container.on("results:message",(function(){self._positionDropdown(),self._resizeDropdown()})),container.on("select",(function(){self._positionDropdown(),self._resizeDropdown()})),container.on("unselect",(function(){self._positionDropdown(),self._resizeDropdown()})),this._containerResultsHandlersBound=!0}},AttachBody.prototype._attachPositioningHandler=function(decorated,container){var self=this,scrollEvent="scroll.select2."+container.id,resizeEvent="resize.select2."+container.id,orientationEvent="orientationchange.select2."+container.id,$watchers=this.$container.parents().filter(Utils.hasScroll);$watchers.each((function(){Utils.StoreData(this,"select2-scroll-position",{x:$(this).scrollLeft(),y:$(this).scrollTop()})})),$watchers.on(scrollEvent,(function(ev){var position=Utils.GetData(this,"select2-scroll-position");$(this).scrollTop(position.y)})),$(window).on(scrollEvent+" "+resizeEvent+" "+orientationEvent,(function(e){self._positionDropdown(),self._resizeDropdown()}))},AttachBody.prototype._detachPositioningHandler=function(decorated,container){var scrollEvent="scroll.select2."+container.id,resizeEvent="resize.select2."+container.id,orientationEvent="orientationchange.select2."+container.id,$watchers;this.$container.parents().filter(Utils.hasScroll).off(scrollEvent),$(window).off(scrollEvent+" "+resizeEvent+" "+orientationEvent)},AttachBody.prototype._positionDropdown=function(){var $window=$(window),isCurrentlyAbove=this.$dropdown.hasClass("select2-dropdown--above"),isCurrentlyBelow=this.$dropdown.hasClass("select2-dropdown--below"),newDirection=null,offset=this.$container.offset();offset.bottom=offset.top+this.$container.outerHeight(!1);var container={height:this.$container.outerHeight(!1)};container.top=offset.top,container.bottom=offset.top+container.height;var dropdown_height=this.$dropdown.outerHeight(!1),viewport_top=$window.scrollTop(),viewport_bottom=$window.scrollTop()+$window.height(),enoughRoomAbove=viewport_topoffset.bottom+dropdown_height,css={left:offset.left,top:container.bottom},$offsetParent=this.$dropdownParent;"static"===$offsetParent.css("position")&&($offsetParent=$offsetParent.offsetParent());var parentOffset={top:0,left:0};($.contains(document.body,$offsetParent[0])||$offsetParent[0].isConnected)&&(parentOffset=$offsetParent.offset()),css.top-=parentOffset.top,css.left-=parentOffset.left,isCurrentlyAbove||isCurrentlyBelow||(newDirection="below"),enoughRoomBelow||!enoughRoomAbove||isCurrentlyAbove?!enoughRoomAbove&&enoughRoomBelow&&isCurrentlyAbove&&(newDirection="below"):newDirection="above",("above"==newDirection||isCurrentlyAbove&&"below"!==newDirection)&&(css.top=container.top-parentOffset.top-dropdown_height),null!=newDirection&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+newDirection),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+newDirection)),this.$dropdownContainer.css(css)},AttachBody.prototype._resizeDropdown=function(){var css={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(css.minWidth=css.width,css.position="relative",css.width="auto"),this.$dropdown.css(css)},AttachBody.prototype._showDropdown=function(decorated){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},AttachBody})),S2.define("select2/dropdown/minimumResultsForSearch",[],(function(){function countResults(data){for(var count=0,d=0;d0&&(options.dataAdapter=Utils.Decorate(options.dataAdapter,MinimumInputLength)),options.maximumInputLength>0&&(options.dataAdapter=Utils.Decorate(options.dataAdapter,MaximumInputLength)),options.maximumSelectionLength>0&&(options.dataAdapter=Utils.Decorate(options.dataAdapter,MaximumSelectionLength)),options.tags&&(options.dataAdapter=Utils.Decorate(options.dataAdapter,Tags)),null==options.tokenSeparators&&null==options.tokenizer||(options.dataAdapter=Utils.Decorate(options.dataAdapter,Tokenizer)),null!=options.query){var Query=require(options.amdBase+"compat/query");options.dataAdapter=Utils.Decorate(options.dataAdapter,Query)}if(null!=options.initSelection){var InitSelection=require(options.amdBase+"compat/initSelection");options.dataAdapter=Utils.Decorate(options.dataAdapter,InitSelection)}}if(null==options.resultsAdapter&&(options.resultsAdapter=ResultsList,null!=options.ajax&&(options.resultsAdapter=Utils.Decorate(options.resultsAdapter,InfiniteScroll)),null!=options.placeholder&&(options.resultsAdapter=Utils.Decorate(options.resultsAdapter,HidePlaceholder)),options.selectOnClose&&(options.resultsAdapter=Utils.Decorate(options.resultsAdapter,SelectOnClose))),null==options.dropdownAdapter){if(options.multiple)options.dropdownAdapter=Dropdown;else{var SearchableDropdown=Utils.Decorate(Dropdown,DropdownSearch);options.dropdownAdapter=SearchableDropdown}if(0!==options.minimumResultsForSearch&&(options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,MinimumResultsForSearch)),options.closeOnSelect&&(options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,CloseOnSelect)),null!=options.dropdownCssClass||null!=options.dropdownCss||null!=options.adaptDropdownCssClass){var DropdownCSS=require(options.amdBase+"compat/dropdownCss");options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,DropdownCSS)}options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,AttachBody)}if(null==options.selectionAdapter){if(options.multiple?options.selectionAdapter=MultipleSelection:options.selectionAdapter=SingleSelection,null!=options.placeholder&&(options.selectionAdapter=Utils.Decorate(options.selectionAdapter,Placeholder)),options.allowClear&&(options.selectionAdapter=Utils.Decorate(options.selectionAdapter,AllowClear)),options.multiple&&(options.selectionAdapter=Utils.Decorate(options.selectionAdapter,SelectionSearch)),null!=options.containerCssClass||null!=options.containerCss||null!=options.adaptContainerCssClass){var ContainerCSS=require(options.amdBase+"compat/containerCss");options.selectionAdapter=Utils.Decorate(options.selectionAdapter,ContainerCSS)}options.selectionAdapter=Utils.Decorate(options.selectionAdapter,EventRelay)}options.language=this._resolveLanguage(options.language),options.language.push("en");for(var uniqueLanguages=[],l=0;l0){for(var match=$.extend(!0,{},data),c=data.children.length-1;c>=0;c--){var child,matches;null==matcher(params,data.children[c])&&match.children.splice(c,1)}return match.children.length>0?match:matcher(params,match)}var original=stripDiacritics(data.text).toUpperCase(),term=stripDiacritics(params.term).toUpperCase();return original.indexOf(term)>-1?data:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:Utils.escapeMarkup,language:{},matcher:matcher,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(data){return data},templateResult:function(result){return result.text},templateSelection:function(selection){return selection.text},theme:"default",width:"resolve"}},Defaults.prototype.applyFromElement=function(options,$element){var optionLanguage=options.language,defaultLanguage=this.defaults.language,elementLanguage=$element.prop("lang"),parentLanguage=$element.closest("[lang]").prop("lang"),languages=Array.prototype.concat.call(this._resolveLanguage(elementLanguage),this._resolveLanguage(optionLanguage),this._resolveLanguage(defaultLanguage),this._resolveLanguage(parentLanguage));return options.language=languages,options},Defaults.prototype._resolveLanguage=function(language){if(!language)return[];if($.isEmptyObject(language))return[];if($.isPlainObject(language))return[language];var languages;languages=$.isArray(language)?language:[language];for(var resolvedLanguages=[],l=0;l0){var languageParts,baseLanguage=languages[l].split("-")[0];resolvedLanguages.push(baseLanguage)}return resolvedLanguages},Defaults.prototype._processTranslations=function(languages,debug){for(var translations=new Translation,l=0;l-1||($.isPlainObject(this.options[key])?$.extend(this.options[key],data[key]):this.options[key]=data[key]);return this},Options.prototype.get=function(key){return this.options[key]},Options.prototype.set=function(key,val){this.options[key]=val},Options})),S2.define("select2/core",["jquery","./options","./utils","./keys"],(function($,Options,Utils,KEYS){var Select2=function($element,options){null!=Utils.GetData($element[0],"select2")&&Utils.GetData($element[0],"select2").destroy(),this.$element=$element,this.id=this._generateId($element),options=options||{},this.options=new Options(options,$element),Select2.__super__.constructor.call(this);var tabindex=$element.attr("tabindex")||0;Utils.StoreData($element[0],"old-tabindex",tabindex),$element.attr("tabindex","-1");var DataAdapter=this.options.get("dataAdapter");this.dataAdapter=new DataAdapter($element,this.options);var $container=this.render();this._placeContainer($container);var SelectionAdapter=this.options.get("selectionAdapter");this.selection=new SelectionAdapter($element,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,$container);var DropdownAdapter=this.options.get("dropdownAdapter");this.dropdown=new DropdownAdapter($element,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,$container);var ResultsAdapter=this.options.get("resultsAdapter");this.results=new ResultsAdapter($element,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var self=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current((function(initialData){self.trigger("selection:update",{data:initialData})})),$element.addClass("select2-hidden-accessible"),$element.attr("aria-hidden","true"),this._syncAttributes(),Utils.StoreData($element[0],"select2",this),$element.data("select2",this)};return Utils.Extend(Select2,Utils.Observable),Select2.prototype._generateId=function($element){var id="";return id="select2-"+(id=(id=null!=$element.attr("id")?$element.attr("id"):null!=$element.attr("name")?$element.attr("name")+"-"+Utils.generateChars(2):Utils.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,""))},Select2.prototype._placeContainer=function($container){$container.insertAfter(this.$element);var width=this._resolveWidth(this.$element,this.options.get("width"));null!=width&&$container.css("width",width)},Select2.prototype._resolveWidth=function($element,method){var WIDTH=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i,computedStyle;if("resolve"==method){var styleWidth=this._resolveWidth($element,"style");return null!=styleWidth?styleWidth:this._resolveWidth($element,"element")}if("element"==method){var elementWidth=$element.outerWidth(!1);return elementWidth<=0?"auto":elementWidth+"px"}if("style"==method){var style=$element.attr("style");if("string"!=typeof style)return null;for(var attrs=style.split(";"),i=0,l=attrs.length;i=1)return matches[1]}return null}return"computedstyle"==method?window.getComputedStyle($element[0]).width:method},Select2.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},Select2.prototype._registerDomEvents=function(){var self=this;this.$element.on("change.select2",(function(){self.dataAdapter.current((function(data){self.trigger("selection:update",{data:data})}))})),this.$element.on("focus.select2",(function(evt){self.trigger("focus",evt)})),this._syncA=Utils.bind(this._syncAttributes,this),this._syncS=Utils.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var observer=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=observer?(this._observer=new observer((function(mutations){self._syncA(),self._syncS(null,mutations)})),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",self._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",self._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",self._syncS,!1))},Select2.prototype._registerDataEvents=function(){var self=this;this.dataAdapter.on("*",(function(name,params){self.trigger(name,params)}))},Select2.prototype._registerSelectionEvents=function(){var self=this,nonRelayEvents=["toggle","focus"];this.selection.on("toggle",(function(){self.toggleDropdown()})),this.selection.on("focus",(function(params){self.focus(params)})),this.selection.on("*",(function(name,params){-1===$.inArray(name,nonRelayEvents)&&self.trigger(name,params)}))},Select2.prototype._registerDropdownEvents=function(){var self=this;this.dropdown.on("*",(function(name,params){self.trigger(name,params)}))},Select2.prototype._registerResultsEvents=function(){var self=this;this.results.on("*",(function(name,params){self.trigger(name,params)}))},Select2.prototype._registerEvents=function(){var self=this;this.on("open",(function(){self.$container.addClass("select2-container--open")})),this.on("close",(function(){self.$container.removeClass("select2-container--open")})),this.on("enable",(function(){self.$container.removeClass("select2-container--disabled")})),this.on("disable",(function(){self.$container.addClass("select2-container--disabled")})),this.on("blur",(function(){self.$container.removeClass("select2-container--focus")})),this.on("query",(function(params){self.isOpen()||self.trigger("open",{}),this.dataAdapter.query(params,(function(data){self.trigger("results:all",{data:data,query:params})}))})),this.on("query:append",(function(params){this.dataAdapter.query(params,(function(data){self.trigger("results:append",{data:data,query:params})}))})),this.on("keypress",(function(evt){var key=evt.which;self.isOpen()?key===KEYS.ESC||key===KEYS.TAB||key===KEYS.UP&&evt.altKey?(self.close(evt),evt.preventDefault()):key===KEYS.ENTER?(self.trigger("results:select",{}),evt.preventDefault()):key===KEYS.SPACE&&evt.ctrlKey?(self.trigger("results:toggle",{}),evt.preventDefault()):key===KEYS.UP?(self.trigger("results:previous",{}),evt.preventDefault()):key===KEYS.DOWN&&(self.trigger("results:next",{}),evt.preventDefault()):(key===KEYS.ENTER||key===KEYS.SPACE||key===KEYS.DOWN&&evt.altKey)&&(self.open(),evt.preventDefault())}))},Select2.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},Select2.prototype._isChangeMutation=function(evt,mutations){var changed=!1,self=this;if(!evt||!evt.target||"OPTION"===evt.target.nodeName||"OPTGROUP"===evt.target.nodeName){if(mutations)if(mutations.addedNodes&&mutations.addedNodes.length>0)for(var n=0;n0?changed=!0:$.isArray(mutations)&&$.each(mutations,(function(evt,mutation){if(self._isChangeMutation(evt,mutation))return changed=!0,!1}));else changed=!0;return changed}},Select2.prototype._syncSubtree=function(evt,mutations){var changed=this._isChangeMutation(evt,mutations),self=this;changed&&this.dataAdapter.current((function(currentData){self.trigger("selection:update",{data:currentData})}))},Select2.prototype.trigger=function(name,args){var actualTrigger=Select2.__super__.trigger,preTriggerMap={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===args&&(args={}),name in preTriggerMap){var preTriggerName=preTriggerMap[name],preTriggerArgs={prevented:!1,name:name,args:args};if(actualTrigger.call(this,preTriggerName,preTriggerArgs),preTriggerArgs.prevented)return void(args.prevented=!0)}actualTrigger.call(this,name,args)},Select2.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},Select2.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},Select2.prototype.close=function(evt){this.isOpen()&&this.trigger("close",{originalEvent:evt})},Select2.prototype.isEnabled=function(){return!this.isDisabled()},Select2.prototype.isDisabled=function(){return this.options.get("disabled")},Select2.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},Select2.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},Select2.prototype.focus=function(data){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},Select2.prototype.enable=function(args){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=args&&0!==args.length||(args=[!0]);var disabled=!args[0];this.$element.prop("disabled",disabled)},Select2.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var data=[];return this.dataAdapter.current((function(currentData){data=currentData})),data},Select2.prototype.val=function(args){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==args||0===args.length)return this.$element.val();var newVal=args[0];$.isArray(newVal)&&(newVal=$.map(newVal,(function(obj){return obj.toString()}))),this.$element.val(newVal).trigger("input").trigger("change")},Select2.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",Utils.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),Utils.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},Select2.prototype.render=function(){var $container=$('');return $container.attr("dir",this.options.get("dir")),this.$container=$container,this.$container.addClass("select2-container--"+this.options.get("theme")),Utils.StoreData($container[0],"element",this.$element),$container},Select2})),S2.define("select2/compat/utils",["jquery"],(function($){function syncCssClasses($dest,$src,adapter){var classes,replacements=[],adapted;(classes=$.trim($dest.attr("class")))&&$((classes=""+classes).split(/\s+/)).each((function(){0===this.indexOf("select2-")&&replacements.push(this)})),(classes=$.trim($src.attr("class")))&&$((classes=""+classes).split(/\s+/)).each((function(){0!==this.indexOf("select2-")&&null!=(adapted=adapter(this))&&replacements.push(adapted)})),$dest.attr("class",replacements.join(" "))}return{syncCssClasses:syncCssClasses}})),S2.define("select2/compat/containerCss",["jquery","./utils"],(function($,CompatUtils){function _containerAdapter(clazz){return null}function ContainerCSS(){}return ContainerCSS.prototype.render=function(decorated){var $container=decorated.call(this),containerCssClass=this.options.get("containerCssClass")||"";$.isFunction(containerCssClass)&&(containerCssClass=containerCssClass(this.$element));var containerCssAdapter=this.options.get("adaptContainerCssClass");if(containerCssAdapter=containerCssAdapter||_containerAdapter,-1!==containerCssClass.indexOf(":all:")){containerCssClass=containerCssClass.replace(":all:","");var _cssAdapter=containerCssAdapter;containerCssAdapter=function(clazz){var adapted=_cssAdapter(clazz);return null!=adapted?adapted+" "+clazz:clazz}}var containerCss=this.options.get("containerCss")||{};return $.isFunction(containerCss)&&(containerCss=containerCss(this.$element)),CompatUtils.syncCssClasses($container,this.$element,containerCssAdapter),$container.css(containerCss),$container.addClass(containerCssClass),$container},ContainerCSS})),S2.define("select2/compat/dropdownCss",["jquery","./utils"],(function($,CompatUtils){function _dropdownAdapter(clazz){return null}function DropdownCSS(){}return DropdownCSS.prototype.render=function(decorated){var $dropdown=decorated.call(this),dropdownCssClass=this.options.get("dropdownCssClass")||"";$.isFunction(dropdownCssClass)&&(dropdownCssClass=dropdownCssClass(this.$element));var dropdownCssAdapter=this.options.get("adaptDropdownCssClass");if(dropdownCssAdapter=dropdownCssAdapter||_dropdownAdapter,-1!==dropdownCssClass.indexOf(":all:")){dropdownCssClass=dropdownCssClass.replace(":all:","");var _cssAdapter=dropdownCssAdapter;dropdownCssAdapter=function(clazz){var adapted=_cssAdapter(clazz);return null!=adapted?adapted+" "+clazz:clazz}}var dropdownCss=this.options.get("dropdownCss")||{};return $.isFunction(dropdownCss)&&(dropdownCss=dropdownCss(this.$element)),CompatUtils.syncCssClasses($dropdown,this.$element,dropdownCssAdapter),$dropdown.css(dropdownCss),$dropdown.addClass(dropdownCssClass),$dropdown},DropdownCSS})),S2.define("select2/compat/initSelection",["jquery"],(function($){function InitSelection(decorated,$element,options){options.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=options.get("initSelection"),this._isInitialized=!1,decorated.call(this,$element,options)}return InitSelection.prototype.current=function(decorated,callback){var self=this;this._isInitialized?decorated.call(this,callback):this.initSelection.call(null,this.$element,(function(data){self._isInitialized=!0,$.isArray(data)||(data=[data]),callback(data)}))},InitSelection})),S2.define("select2/compat/inputData",["jquery","../utils"],(function($,Utils){function InputData(decorated,$element,options){this._currentData=[],this._valueSeparator=options.get("valueSeparator")||",","hidden"===$element.prop("type")&&options.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `
      ');var fields=Dropzone.createElement(fieldsString);return"FORM"!==this.element.tagName?(form=Dropzone.createElement('
      '))).appendChild(fields):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=form?form:fields}},{key:"getExistingFallback",value:function getExistingFallback(){for(var getFallback=function getFallback(elements){var _iteratorNormalCompletion12=!0,_didIteratorError12=!1,_iteratorError12=void 0;try{for(var _iterator12=elements[Symbol.iterator](),_step12;!(_iteratorNormalCompletion12=(_step12=_iterator12.next()).done);_iteratorNormalCompletion12=!0){var el=_step12.value;if(/(^| )fallback($| )/.test(el.className))return el}}catch(err){_didIteratorError12=!0,_iteratorError12=err}finally{try{_iteratorNormalCompletion12||null==_iterator12.return||_iterator12.return()}finally{if(_didIteratorError12)throw _iteratorError12}}},_i2=0,_arr=["div","form"];_i2<_arr.length;_i2++){var tagName=_arr[_i2],fallback;if(fallback=getFallback(this.element.getElementsByTagName(tagName)))return fallback}}},{key:"setupEventListeners",value:function setupEventListeners(){return this.listeners.map((function(elementListeners){return function(){var result=[];for(var event in elementListeners.events){var listener=elementListeners.events[event];result.push(elementListeners.element.addEventListener(event,listener,!1))}return result}()}))}},{key:"removeEventListeners",value:function removeEventListeners(){return this.listeners.map((function(elementListeners){return function(){var result=[];for(var event in elementListeners.events){var listener=elementListeners.events[event];result.push(elementListeners.element.removeEventListener(event,listener,!1))}return result}()}))}},{key:"disable",value:function disable(){var _this4=this;return this.clickableElements.forEach((function(element){return element.classList.remove("dz-clickable")})),this.removeEventListeners(),this.disabled=!0,this.files.map((function(file){return _this4.cancelUpload(file)}))}},{key:"enable",value:function enable(){return delete this.disabled,this.clickableElements.forEach((function(element){return element.classList.add("dz-clickable")})),this.setupEventListeners()}},{key:"filesize",value:function filesize(size){var selectedSize=0,selectedUnit="b";if(size>0){for(var units=["tb","gb","mb","kb","b"],i=0;i=Math.pow(this.options.filesizeBase,4-i)/10){selectedSize=size/Math.pow(this.options.filesizeBase,4-i),selectedUnit=unit;break}}selectedSize=Math.round(10*selectedSize)/10}return"".concat(selectedSize," ").concat(this.options.dictFileSizeUnits[selectedUnit])}},{key:"_updateMaxFilesReachedClass",value:function _updateMaxFilesReachedClass(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function drop(e){if(e.dataTransfer){this.emit("drop",e);for(var files=[],i=0;i0){var _iteratorNormalCompletion15=!0,_didIteratorError15=!1,_iteratorError15=void 0;try{for(var _iterator15=entries[Symbol.iterator](),_step15;!(_iteratorNormalCompletion15=(_step15=_iterator15.next()).done);_iteratorNormalCompletion15=!0){var entry=_step15.value;entry.isFile?entry.file((function(file){if(!_this6.options.ignoreHiddenFiles||"."!==file.name.substring(0,1))return file.fullPath="".concat(path,"/").concat(file.name),_this6.addFile(file)})):entry.isDirectory&&_this6._addFilesFromDirectory(entry,"".concat(path,"/").concat(entry.name))}}catch(err){_didIteratorError15=!0,_iteratorError15=err}finally{try{_iteratorNormalCompletion15||null==_iterator15.return||_iterator15.return()}finally{if(_didIteratorError15)throw _iteratorError15}}readEntries()}return null}),errorHandler)}()}},{key:"accept",value:function accept(file,done){this.options.maxFilesize&&file.size>1024*this.options.maxFilesize*1024?done(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(file.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):Dropzone.isValidFile(file,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",file)):this.options.accept.call(this,file,done):done(this.options.dictInvalidFileType)}},{key:"addFile",value:function addFile(file){var _this7=this;file.upload={uuid:Dropzone.uuidv4(),progress:0,total:file.size,bytesSent:0,filename:this._renameFile(file)},this.files.push(file),file.status=Dropzone.ADDED,this.emit("addedfile",file),this._enqueueThumbnail(file),this.accept(file,(function(error){error?(file.accepted=!1,_this7._errorProcessing([file],error)):(file.accepted=!0,_this7.options.autoQueue&&_this7.enqueueFile(file)),_this7._updateMaxFilesReachedClass()}))}},{key:"enqueueFiles",value:function enqueueFiles(files){var _iteratorNormalCompletion16=!0,_didIteratorError16=!1,_iteratorError16=void 0;try{for(var _iterator16=files[Symbol.iterator](),_step16;!(_iteratorNormalCompletion16=(_step16=_iterator16.next()).done);_iteratorNormalCompletion16=!0){var file=_step16.value;this.enqueueFile(file)}}catch(err){_didIteratorError16=!0,_iteratorError16=err}finally{try{_iteratorNormalCompletion16||null==_iterator16.return||_iterator16.return()}finally{if(_didIteratorError16)throw _iteratorError16}}return null}},{key:"enqueueFile",value:function enqueueFile(file){var _this8=this;if(file.status!==Dropzone.ADDED||!0!==file.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(file.status=Dropzone.QUEUED,this.options.autoProcessQueue)return setTimeout((function(){return _this8.processQueue()}),0)}},{key:"_enqueueThumbnail",value:function _enqueueThumbnail(file){var _this9=this;if(this.options.createImageThumbnails&&file.type.match(/image.*/)&&file.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(file),setTimeout((function(){return _this9._processThumbnailQueue()}),0)}},{key:"_processThumbnailQueue",value:function _processThumbnailQueue(){var _this10=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var file=this._thumbnailQueue.shift();return this.createThumbnail(file,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,(function(dataUrl){return _this10.emit("thumbnail",file,dataUrl),_this10._processingThumbnail=!1,_this10._processThumbnailQueue()}))}}},{key:"removeFile",value:function removeFile(file){if(file.status===Dropzone.UPLOADING&&this.cancelUpload(file),this.files=without(this.files,file),this.emit("removedfile",file),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function removeAllFiles(cancelIfNecessary){null==cancelIfNecessary&&(cancelIfNecessary=!1);var _iteratorNormalCompletion17=!0,_didIteratorError17=!1,_iteratorError17=void 0;try{for(var _iterator17=this.files.slice()[Symbol.iterator](),_step17;!(_iteratorNormalCompletion17=(_step17=_iterator17.next()).done);_iteratorNormalCompletion17=!0){var file=_step17.value;(file.status!==Dropzone.UPLOADING||cancelIfNecessary)&&this.removeFile(file)}}catch(err){_didIteratorError17=!0,_iteratorError17=err}finally{try{_iteratorNormalCompletion17||null==_iterator17.return||_iterator17.return()}finally{if(_didIteratorError17)throw _iteratorError17}}return null}},{key:"resizeImage",value:function resizeImage(file,width,height,resizeMethod,callback){var _this11=this;return this.createThumbnail(file,width,height,resizeMethod,!0,(function(dataUrl,canvas){if(null==canvas)return callback(file);var resizeMimeType=_this11.options.resizeMimeType;null==resizeMimeType&&(resizeMimeType=file.type);var resizedDataURL=canvas.toDataURL(resizeMimeType,_this11.options.resizeQuality);return"image/jpeg"!==resizeMimeType&&"image/jpg"!==resizeMimeType||(resizedDataURL=ExifRestore.restore(file.dataURL,resizedDataURL)),callback(Dropzone.dataURItoBlob(resizedDataURL))}))}},{key:"createThumbnail",value:function createThumbnail(file,width,height,resizeMethod,fixOrientation,callback){var _this12=this,fileReader=new FileReader;fileReader.onload=function(){file.dataURL=fileReader.result,"image/svg+xml"!==file.type?_this12.createThumbnailFromUrl(file,width,height,resizeMethod,fixOrientation,callback):null!=callback&&callback(fileReader.result)},fileReader.readAsDataURL(file)}},{key:"displayExistingFile",value:function displayExistingFile(mockFile,imageUrl,callback,crossOrigin){var _this13=this,resizeThumbnail=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this.emit("addedfile",mockFile),this.emit("complete",mockFile),resizeThumbnail){var onDone=function onDone(thumbnail){_this13.emit("thumbnail",mockFile,thumbnail),callback&&callback()};mockFile.dataURL=imageUrl,this.createThumbnailFromUrl(mockFile,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.resizeMethod,this.options.fixOrientation,onDone,crossOrigin)}else this.emit("thumbnail",mockFile,imageUrl),callback&&callback()}},{key:"createThumbnailFromUrl",value:function createThumbnailFromUrl(file,width,height,resizeMethod,fixOrientation,callback,crossOrigin){var _this14=this,img=document.createElement("img");return crossOrigin&&(img.crossOrigin=crossOrigin),img.onload=function(){var loadExif=function loadExif(callback){return callback(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&fixOrientation&&(loadExif=function loadExif(callback){return EXIF.getData(img,(function(){return callback(EXIF.getTag(this,"Orientation"))}))}),loadExif((function(orientation){file.width=img.width,file.height=img.height;var resizeInfo=_this14.options.resize.call(_this14,file,width,height,resizeMethod),canvas=document.createElement("canvas"),ctx=canvas.getContext("2d");switch(canvas.width=resizeInfo.trgWidth,canvas.height=resizeInfo.trgHeight,orientation>4&&(canvas.width=resizeInfo.trgHeight,canvas.height=resizeInfo.trgWidth),orientation){case 2:ctx.translate(canvas.width,0),ctx.scale(-1,1);break;case 3:ctx.translate(canvas.width,canvas.height),ctx.rotate(Math.PI);break;case 4:ctx.translate(0,canvas.height),ctx.scale(1,-1);break;case 5:ctx.rotate(.5*Math.PI),ctx.scale(1,-1);break;case 6:ctx.rotate(.5*Math.PI),ctx.translate(0,-canvas.width);break;case 7:ctx.rotate(.5*Math.PI),ctx.translate(canvas.height,-canvas.width),ctx.scale(-1,1);break;case 8:ctx.rotate(-.5*Math.PI),ctx.translate(-canvas.height,0)}drawImageIOSFix(ctx,img,null!=resizeInfo.srcX?resizeInfo.srcX:0,null!=resizeInfo.srcY?resizeInfo.srcY:0,resizeInfo.srcWidth,resizeInfo.srcHeight,null!=resizeInfo.trgX?resizeInfo.trgX:0,null!=resizeInfo.trgY?resizeInfo.trgY:0,resizeInfo.trgWidth,resizeInfo.trgHeight);var thumbnail=canvas.toDataURL("image/png");if(null!=callback)return callback(thumbnail,canvas)}))},null!=callback&&(img.onerror=callback),img.src=file.dataURL}},{key:"processQueue",value:function processQueue(){var parallelUploads=this.options.parallelUploads,processingLength=this.getUploadingFiles().length,i=processingLength;if(!(processingLength>=parallelUploads)){var queuedFiles=this.getQueuedFiles();if(queuedFiles.length>0){if(this.options.uploadMultiple)return this.processFiles(queuedFiles.slice(0,parallelUploads-processingLength));for(;i1?_len3-1:0),_key3=1;_key3<_len3;_key3++)args[_key3-1]=arguments[_key3];return option.apply(this,args)}return option}},{key:"uploadFile",value:function uploadFile(file){return this.uploadFiles([file])}},{key:"uploadFiles",value:function uploadFiles(files){var _this15=this;this._transformFiles(files,(function(transformedFiles){if(_this15.options.chunking){var transformedFile=transformedFiles[0];files[0].upload.chunked=_this15.options.chunking&&(_this15.options.forceChunking||transformedFile.size>_this15.options.chunkSize),files[0].upload.totalChunkCount=Math.ceil(transformedFile.size/_this15.options.chunkSize)}if(files[0].upload.chunked){var file=files[0],_transformedFile=transformedFiles[0],startedChunkCount=0;file.upload.chunks=[];var handleNextChunk=function handleNextChunk(){for(var chunkIndex=0;void 0!==file.upload.chunks[chunkIndex];)chunkIndex++;if(!(chunkIndex>=file.upload.totalChunkCount)){startedChunkCount++;var start=chunkIndex*_this15.options.chunkSize,end=Math.min(start+_this15.options.chunkSize,file.size),dataBlock={name:_this15._getParamName(0),data:_transformedFile.webkitSlice?_transformedFile.webkitSlice(start,end):_transformedFile.slice(start,end),filename:file.upload.filename,chunkIndex:chunkIndex};file.upload.chunks[chunkIndex]={file:file,index:chunkIndex,dataBlock:dataBlock,status:Dropzone.UPLOADING,progress:0,retries:0},_this15._uploadData(files,[dataBlock])}};if(file.upload.finishedChunkUpload=function(chunk){var allFinished=!0;chunk.status=Dropzone.SUCCESS,chunk.dataBlock=null,chunk.xhr=null;for(var i=0;i=end;asc?i++:i--)ia[i]=byteString.charCodeAt(i);return new Blob([ab],{type:mimeString})};var without=function without(list,rejectedItem){return list.filter((function(item){return item!==rejectedItem})).map((function(item){return item}))},camelize=function camelize(str){return str.replace(/[\-_](\w)/g,(function(match){return match.charAt(1).toUpperCase()}))};Dropzone.createElement=function(string){var div=document.createElement("div");return div.innerHTML=string,div.childNodes[0]},Dropzone.elementInside=function(element,container){if(element===container)return!0;for(;element=element.parentNode;)if(element===container)return!0;return!1},Dropzone.getElement=function(el,name){var element;if("string"==typeof el?element=document.querySelector(el):null!=el.nodeType&&(element=el),null==element)throw new Error("Invalid `".concat(name,"` option provided. Please provide a CSS selector or a plain HTML element."));return element},Dropzone.getElements=function(els,name){var el,elements;if(els instanceof Array){elements=[];try{var _iteratorNormalCompletion34=!0,_didIteratorError34=!1,_iteratorError34=void 0;try{for(var _iterator34=els[Symbol.iterator](),_step34;!(_iteratorNormalCompletion34=(_step34=_iterator34.next()).done);_iteratorNormalCompletion34=!0)el=_step34.value,elements.push(this.getElement(el,name))}catch(err){_didIteratorError34=!0,_iteratorError34=err}finally{try{_iteratorNormalCompletion34||null==_iterator34.return||_iterator34.return()}finally{if(_didIteratorError34)throw _iteratorError34}}}catch(e){elements=null}}else if("string"==typeof els){elements=[];var _iteratorNormalCompletion35=!0,_didIteratorError35=!1,_iteratorError35=void 0;try{for(var _iterator35=document.querySelectorAll(els)[Symbol.iterator](),_step35;!(_iteratorNormalCompletion35=(_step35=_iterator35.next()).done);_iteratorNormalCompletion35=!0)el=_step35.value,elements.push(el)}catch(err){_didIteratorError35=!0,_iteratorError35=err}finally{try{_iteratorNormalCompletion35||null==_iterator35.return||_iterator35.return()}finally{if(_didIteratorError35)throw _iteratorError35}}}else null!=els.nodeType&&(elements=[els]);if(null==elements||!elements.length)throw new Error("Invalid `".concat(name,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return elements},Dropzone.confirm=function(question,accepted,rejected){return window.confirm(question)?accepted():null!=rejected?rejected():void 0},Dropzone.isValidFile=function(file,acceptedFiles){if(!acceptedFiles)return!0;acceptedFiles=acceptedFiles.split(",");var mimeType=file.type,baseMimeType=mimeType.replace(/\/.*$/,""),_iteratorNormalCompletion36=!0,_didIteratorError36=!1,_iteratorError36=void 0;try{for(var _iterator36=acceptedFiles[Symbol.iterator](),_step36;!(_iteratorNormalCompletion36=(_step36=_iterator36.next()).done);_iteratorNormalCompletion36=!0){var validType=_step36.value;if("."===(validType=validType.trim()).charAt(0)){if(-1!==file.name.toLowerCase().indexOf(validType.toLowerCase(),file.name.length-validType.length))return!0}else if(/\/\*$/.test(validType)){if(baseMimeType===validType.replace(/\/.*$/,""))return!0}else if(mimeType===validType)return!0}}catch(err){_didIteratorError36=!0,_iteratorError36=err}finally{try{_iteratorNormalCompletion36||null==_iterator36.return||_iterator36.return()}finally{if(_didIteratorError36)throw _iteratorError36}}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(options){return this.each((function(){return new Dropzone(this,options)}))}),"undefined"!=typeof module&&null!==module?module.exports=Dropzone:window.Dropzone=Dropzone,Dropzone.ADDED="added",Dropzone.QUEUED="queued",Dropzone.ACCEPTED=Dropzone.QUEUED,Dropzone.UPLOADING="uploading",Dropzone.PROCESSING=Dropzone.UPLOADING,Dropzone.CANCELED="canceled",Dropzone.ERROR="error",Dropzone.SUCCESS="success";var detectVerticalSquash=function detectVerticalSquash(img){var iw=img.naturalWidth,ih=img.naturalHeight,canvas=document.createElement("canvas");canvas.width=1,canvas.height=ih;var ctx=canvas.getContext("2d");ctx.drawImage(img,0,0);for(var _ctx$getImageData,data=ctx.getImageData(1,0,1,ih).data,sy=0,ey=ih,py=ih;py>sy;){var alpha;0===data[4*(py-1)+3]?ey=py:sy=py,py=ey+sy>>1}var ratio=py/ih;return 0===ratio?1:ratio},drawImageIOSFix=function drawImageIOSFix(ctx,img,sx,sy,sw,sh,dx,dy,dw,dh){var vertSquashRatio=detectVerticalSquash(img);return ctx.drawImage(img,sx,sy,sw,sh,dx,dy,dw,dh/vertSquashRatio)},ExifRestore=function(){function ExifRestore(){_classCallCheck(this,ExifRestore)}return _createClass(ExifRestore,null,[{key:"initClass",value:function initClass(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function encode64(input){for(var output="",chr1=void 0,chr2=void 0,chr3="",enc1=void 0,enc2=void 0,enc3=void 0,enc4="",i=0;enc1=(chr1=input[i++])>>2,enc2=(3&chr1)<<4|(chr2=input[i++])>>4,enc3=(15&chr2)<<2|(chr3=input[i++])>>6,enc4=63&chr3,isNaN(chr2)?enc3=enc4=64:isNaN(chr3)&&(enc4=64),output=output+this.KEY_STR.charAt(enc1)+this.KEY_STR.charAt(enc2)+this.KEY_STR.charAt(enc3)+this.KEY_STR.charAt(enc4),chr1=chr2=chr3="",enc1=enc2=enc3=enc4="",irawImageArray.length)break}return segments}},{key:"decode64",value:function decode64(input){var output="",chr1=void 0,chr2=void 0,chr3="",enc1=void 0,enc2=void 0,enc3=void 0,enc4="",i=0,buf=[],base64test;for(/[^A-Za-z0-9\+\/\=]/g.exec(input)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");chr1=(enc1=this.KEY_STR.indexOf(input.charAt(i++)))<<2|(enc2=this.KEY_STR.indexOf(input.charAt(i++)))>>4,chr2=(15&enc2)<<4|(enc3=this.KEY_STR.indexOf(input.charAt(i++)))>>2,chr3=(3&enc3)<<6|(enc4=this.KEY_STR.indexOf(input.charAt(i++))),buf.push(chr1),64!==enc3&&buf.push(chr2),64!==enc4&&buf.push(chr3),chr1=chr2=chr3="",enc1=enc2=enc3=enc4="",i1)return Definitions.map((function(d){return register(d)}));var Definition=Definitions[0];if("string"!=typeof Definition.blotName&&"string"!=typeof Definition.attrName)throw new ParchmentError("Invalid definition");if("abstract"===Definition.blotName)throw new ParchmentError("Cannot register abstract class");if(types[Definition.blotName||Definition.attrName]=Definition,"string"==typeof Definition.keyName)attributes[Definition.keyName]=Definition;else if(null!=Definition.className&&(classes[Definition.className]=Definition),null!=Definition.tagName){Array.isArray(Definition.tagName)?Definition.tagName=Definition.tagName.map((function(tagName){return tagName.toUpperCase()})):Definition.tagName=Definition.tagName.toUpperCase();var tagNames=Array.isArray(Definition.tagName)?Definition.tagName:[Definition.tagName];tagNames.forEach((function(tag){null!=tags[tag]&&null!=Definition.className||(tags[tag]=Definition)}))}return Definition}exports.DATA_KEY="__blot",function(Scope){Scope[Scope.TYPE=3]="TYPE",Scope[Scope.LEVEL=12]="LEVEL",Scope[Scope.ATTRIBUTE=13]="ATTRIBUTE",Scope[Scope.BLOT=14]="BLOT",Scope[Scope.INLINE=7]="INLINE",Scope[Scope.BLOCK=11]="BLOCK",Scope[Scope.BLOCK_BLOT=10]="BLOCK_BLOT",Scope[Scope.INLINE_BLOT=6]="INLINE_BLOT",Scope[Scope.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",Scope[Scope.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",Scope[Scope.ANY=15]="ANY"}(Scope=exports.Scope||(exports.Scope={})),exports.create=create,exports.find=find,exports.query=query,exports.register=register},function(module,exports,__webpack_require__){var diff=__webpack_require__(51),equal=__webpack_require__(11),extend=__webpack_require__(3),op=__webpack_require__(20),NULL_CHARACTER=String.fromCharCode(0),Delta=function(ops){Array.isArray(ops)?this.ops=ops:null!=ops&&Array.isArray(ops.ops)?this.ops=ops.ops:this.ops=[]};Delta.prototype.insert=function(text,attributes){var newOp={};return 0===text.length?this:(newOp.insert=text,null!=attributes&&"object"==typeof attributes&&Object.keys(attributes).length>0&&(newOp.attributes=attributes),this.push(newOp))},Delta.prototype.delete=function(length){return length<=0?this:this.push({delete:length})},Delta.prototype.retain=function(length,attributes){if(length<=0)return this;var newOp={retain:length};return null!=attributes&&"object"==typeof attributes&&Object.keys(attributes).length>0&&(newOp.attributes=attributes),this.push(newOp)},Delta.prototype.push=function(newOp){var index=this.ops.length,lastOp=this.ops[index-1];if(newOp=extend(!0,{},newOp),"object"==typeof lastOp){if("number"==typeof newOp.delete&&"number"==typeof lastOp.delete)return this.ops[index-1]={delete:lastOp.delete+newOp.delete},this;if("number"==typeof lastOp.delete&&null!=newOp.insert&&(index-=1,"object"!=typeof(lastOp=this.ops[index-1])))return this.ops.unshift(newOp),this;if(equal(newOp.attributes,lastOp.attributes)){if("string"==typeof newOp.insert&&"string"==typeof lastOp.insert)return this.ops[index-1]={insert:lastOp.insert+newOp.insert},"object"==typeof newOp.attributes&&(this.ops[index-1].attributes=newOp.attributes),this;if("number"==typeof newOp.retain&&"number"==typeof lastOp.retain)return this.ops[index-1]={retain:lastOp.retain+newOp.retain},"object"==typeof newOp.attributes&&(this.ops[index-1].attributes=newOp.attributes),this}}return index===this.ops.length?this.ops.push(newOp):this.ops.splice(index,0,newOp),this},Delta.prototype.chop=function(){var lastOp=this.ops[this.ops.length-1];return lastOp&&lastOp.retain&&!lastOp.attributes&&this.ops.pop(),this},Delta.prototype.filter=function(predicate){return this.ops.filter(predicate)},Delta.prototype.forEach=function(predicate){this.ops.forEach(predicate)},Delta.prototype.map=function(predicate){return this.ops.map(predicate)},Delta.prototype.partition=function(predicate){var passed=[],failed=[];return this.forEach((function(op){var target;(predicate(op)?passed:failed).push(op)})),[passed,failed]},Delta.prototype.reduce=function(predicate,initial){return this.ops.reduce(predicate,initial)},Delta.prototype.changeLength=function(){return this.reduce((function(length,elem){return elem.insert?length+op.length(elem):elem.delete?length-elem.delete:length}),0)},Delta.prototype.length=function(){return this.reduce((function(length,elem){return length+op.length(elem)}),0)},Delta.prototype.slice=function(start,end){start=start||0,"number"!=typeof end&&(end=1/0);for(var ops=[],iter=op.iterator(this.ops),index=0;index0&&otherIter.next(firstOther.retain-firstLeft)}for(var delta=new Delta(ops);thisIter.hasNext()||otherIter.hasNext();)if("insert"===otherIter.peekType())delta.push(otherIter.next());else if("delete"===thisIter.peekType())delta.push(thisIter.next());else{var length=Math.min(thisIter.peekLength(),otherIter.peekLength()),thisOp=thisIter.next(length),otherOp=otherIter.next(length);if("number"==typeof otherOp.retain){var newOp={};"number"==typeof thisOp.retain?newOp.retain=length:newOp.insert=thisOp.insert;var attributes=op.attributes.compose(thisOp.attributes,otherOp.attributes,"number"==typeof thisOp.retain);if(attributes&&(newOp.attributes=attributes),delta.push(newOp),!otherIter.hasNext()&&equal(delta.ops[delta.ops.length-1],newOp)){var rest=new Delta(thisIter.rest());return delta.concat(rest).chop()}}else"number"==typeof otherOp.delete&&"number"==typeof thisOp.retain&&delta.push(otherOp)}return delta.chop()},Delta.prototype.concat=function(other){var delta=new Delta(this.ops.slice());return other.ops.length>0&&(delta.push(other.ops[0]),delta.ops=delta.ops.concat(other.ops.slice(1))),delta},Delta.prototype.diff=function(other,index){if(this.ops===other.ops)return new Delta;var strings=[this,other].map((function(delta){return delta.map((function(op){if(null!=op.insert)return"string"==typeof op.insert?op.insert:NULL_CHARACTER;var prep;throw new Error("diff() called "+(delta===other?"on":"with")+" non-document")})).join("")})),delta=new Delta,diffResult=diff(strings[0],strings[1],index),thisIter=op.iterator(this.ops),otherIter=op.iterator(other.ops);return diffResult.forEach((function(component){for(var length=component[1].length;length>0;){var opLength=0;switch(component[0]){case diff.INSERT:opLength=Math.min(otherIter.peekLength(),length),delta.push(otherIter.next(opLength));break;case diff.DELETE:opLength=Math.min(length,thisIter.peekLength()),thisIter.next(opLength),delta.delete(opLength);break;case diff.EQUAL:opLength=Math.min(thisIter.peekLength(),otherIter.peekLength(),length);var thisOp=thisIter.next(opLength),otherOp=otherIter.next(opLength);equal(thisOp.insert,otherOp.insert)?delta.retain(opLength,op.attributes.diff(thisOp.attributes,otherOp.attributes)):delta.push(otherOp).delete(opLength)}length-=opLength}})),delta.chop()},Delta.prototype.eachLine=function(predicate,newline){newline=newline||"\n";for(var iter=op.iterator(this.ops),line=new Delta,i=0;iter.hasNext();){if("insert"!==iter.peekType())return;var thisOp=iter.peek(),start=op.length(thisOp)-iter.peekLength(),index="string"==typeof thisOp.insert?thisOp.insert.indexOf(newline,start)-start:-1;if(index<0)line.push(iter.next());else if(index>0)line.push(iter.next(index));else{if(!1===predicate(line,iter.next(1).attributes||{},i))return;i+=1,line=new Delta}}line.length()>0&&predicate(line,{},i)},Delta.prototype.transform=function(other,priority){if(priority=!!priority,"number"==typeof other)return this.transformPosition(other,priority);for(var thisIter=op.iterator(this.ops),otherIter=op.iterator(other.ops),delta=new Delta;thisIter.hasNext()||otherIter.hasNext();)if("insert"!==thisIter.peekType()||!priority&&"insert"===otherIter.peekType())if("insert"===otherIter.peekType())delta.push(otherIter.next());else{var length=Math.min(thisIter.peekLength(),otherIter.peekLength()),thisOp=thisIter.next(length),otherOp=otherIter.next(length);if(thisOp.delete)continue;otherOp.delete?delta.push(otherOp):delta.retain(length,op.attributes.transform(thisOp.attributes,otherOp.attributes,priority))}else delta.retain(op.length(thisIter.next()));return delta.chop()},Delta.prototype.transformPosition=function(index,priority){priority=!!priority;for(var thisIter=op.iterator(this.ops),offset=0;thisIter.hasNext()&&offset<=index;){var length=thisIter.peekLength(),nextType=thisIter.peekType();thisIter.next(),"delete"!==nextType?("insert"===nextType&&(offset0&&(index1&&void 0!==arguments[1]&&arguments[1];if(force&&(0===index||index>=this.length()-1)){var clone=this.clone();return 0===index?(this.parent.insertBefore(clone,this),this):(this.parent.insertBefore(clone,this.next),clone)}var next=_get(Block.prototype.__proto__||Object.getPrototypeOf(Block.prototype),"split",this).call(this,index,force);return this.cache={},next}}]),Block}(_parchment2.default.Block);function bubbleFormats(blot){var formats=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==blot?formats:("function"==typeof blot.formats&&(formats=(0,_extend2.default)(formats,blot.formats())),null==blot.parent||"scroll"==blot.parent.blotName||blot.parent.statics.scope!==blot.statics.scope?formats:bubbleFormats(blot.parent,formats))}Block.blotName="block",Block.tagName="P",Block.defaultChild="break",Block.allowedChildren=[_inline2.default,_parchment2.default.Embed,_text2.default],exports.bubbleFormats=bubbleFormats,exports.BlockEmbed=BlockEmbed,exports.default=Block},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.overload=exports.expandConfig=void 0;var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{};if(_classCallCheck(this,Quill),this.options=expandConfig(container,options),this.container=this.options.container,null==this.container)return debug.error("Invalid Quill container",container);this.options.debug&&Quill.debug(this.options.debug);var html=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new _emitter4.default,this.scroll=_parchment2.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new _editor2.default(this.scroll),this.selection=new _selection2.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(_emitter4.default.events.EDITOR_CHANGE,(function(type){type===_emitter4.default.events.TEXT_CHANGE&&_this2.root.classList.toggle("ql-blank",_this2.editor.isBlank())})),this.emitter.on(_emitter4.default.events.SCROLL_UPDATE,(function(source,mutations){var range=_this2.selection.lastRange,index=range&&0===range.length?range.index:void 0;modify.call(_this2,(function(){return _this2.editor.update(null,mutations,index)}),source)}));var contents=this.clipboard.convert("
      "+html+"


      ");this.setContents(contents),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return _createClass(Quill,null,[{key:"debug",value:function debug(limit){!0===limit&&(limit="log"),_logger2.default.level(limit)}},{key:"find",value:function find(node){return node.__quill||_parchment2.default.find(node)}},{key:"import",value:function _import(name){return null==this.imports[name]&&debug.error("Cannot import "+name+". Are you sure it was registered?"),this.imports[name]}},{key:"register",value:function register(path,target){var _this=this,overwrite=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof path){var name=path.attrName||path.blotName;"string"==typeof name?this.register("formats/"+name,path,target):Object.keys(path).forEach((function(key){_this.register(key,path[key],target)}))}else null==this.imports[path]||overwrite||debug.warn("Overwriting "+path+" with",target),this.imports[path]=target,(path.startsWith("blots/")||path.startsWith("formats/"))&&"abstract"!==target.blotName?_parchment2.default.register(target):path.startsWith("modules")&&"function"==typeof target.register&&target.register()}}]),_createClass(Quill,[{key:"addContainer",value:function addContainer(container){var refNode=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof container){var className=container;(container=document.createElement("div")).classList.add(className)}return this.container.insertBefore(container,refNode),container}},{key:"blur",value:function blur(){this.selection.setRange(null)}},{key:"deleteText",value:function deleteText(index,length,source){var _this3=this,_overload=overload(index,length,source),_overload2=_slicedToArray(_overload,4);return index=_overload2[0],length=_overload2[1],source=_overload2[3],modify.call(this,(function(){return _this3.editor.deleteText(index,length)}),source,index,-1*length)}},{key:"disable",value:function disable(){this.enable(!1)}},{key:"enable",value:function enable(){var enabled=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(enabled),this.container.classList.toggle("ql-disabled",!enabled)}},{key:"focus",value:function focus(){var scrollTop=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=scrollTop,this.scrollIntoView()}},{key:"format",value:function format(name,value){var _this4=this,source=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_emitter4.default.sources.API;return modify.call(this,(function(){var range=_this4.getSelection(!0),change=new _quillDelta2.default;if(null==range)return change;if(_parchment2.default.query(name,_parchment2.default.Scope.BLOCK))change=_this4.editor.formatLine(range.index,range.length,_defineProperty({},name,value));else{if(0===range.length)return _this4.selection.format(name,value),change;change=_this4.editor.formatText(range.index,range.length,_defineProperty({},name,value))}return _this4.setSelection(range,_emitter4.default.sources.SILENT),change}),source)}},{key:"formatLine",value:function formatLine(index,length,name,value,source){var _this5=this,formats=void 0,_overload3=overload(index,length,name,value,source),_overload4=_slicedToArray(_overload3,4);return index=_overload4[0],length=_overload4[1],formats=_overload4[2],source=_overload4[3],modify.call(this,(function(){return _this5.editor.formatLine(index,length,formats)}),source,index,0)}},{key:"formatText",value:function formatText(index,length,name,value,source){var _this6=this,formats=void 0,_overload5=overload(index,length,name,value,source),_overload6=_slicedToArray(_overload5,4);return index=_overload6[0],length=_overload6[1],formats=_overload6[2],source=_overload6[3],modify.call(this,(function(){return _this6.editor.formatText(index,length,formats)}),source,index,0)}},{key:"getBounds",value:function getBounds(index){var length=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,bounds=void 0;bounds="number"==typeof index?this.selection.getBounds(index,length):this.selection.getBounds(index.index,index.length);var containerBounds=this.container.getBoundingClientRect();return{bottom:bounds.bottom-containerBounds.top,height:bounds.height,left:bounds.left-containerBounds.left,right:bounds.right-containerBounds.left,top:bounds.top-containerBounds.top,width:bounds.width}}},{key:"getContents",value:function getContents(){var index=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,length=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-index,_overload7=overload(index,length),_overload8=_slicedToArray(_overload7,2);return index=_overload8[0],length=_overload8[1],this.editor.getContents(index,length)}},{key:"getFormat",value:function getFormat(){var index=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),length=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof index?this.editor.getFormat(index,length):this.editor.getFormat(index.index,index.length)}},{key:"getIndex",value:function getIndex(blot){return blot.offset(this.scroll)}},{key:"getLength",value:function getLength(){return this.scroll.length()}},{key:"getLeaf",value:function getLeaf(index){return this.scroll.leaf(index)}},{key:"getLine",value:function getLine(index){return this.scroll.line(index)}},{key:"getLines",value:function getLines(){var index=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,length=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof index?this.scroll.lines(index.index,index.length):this.scroll.lines(index,length)}},{key:"getModule",value:function getModule(name){return this.theme.modules[name]}},{key:"getSelection",value:function getSelection(){var focus=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return focus&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function getText(){var index=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,length=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-index,_overload9=overload(index,length),_overload10=_slicedToArray(_overload9,2);return index=_overload10[0],length=_overload10[1],this.editor.getText(index,length)}},{key:"hasFocus",value:function hasFocus(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function insertEmbed(index,embed,value){var _this7=this,source=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Quill.sources.API;return modify.call(this,(function(){return _this7.editor.insertEmbed(index,embed,value)}),source,index)}},{key:"insertText",value:function insertText(index,text,name,value,source){var _this8=this,formats=void 0,_overload11=overload(index,0,name,value,source),_overload12=_slicedToArray(_overload11,4);return index=_overload12[0],formats=_overload12[2],source=_overload12[3],modify.call(this,(function(){return _this8.editor.insertText(index,text,formats)}),source,index,text.length)}},{key:"isEnabled",value:function isEnabled(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function off(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function on(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function once(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function pasteHTML(index,html,source){this.clipboard.dangerouslyPasteHTML(index,html,source)}},{key:"removeFormat",value:function removeFormat(index,length,source){var _this9=this,_overload13=overload(index,length,source),_overload14=_slicedToArray(_overload13,4);return index=_overload14[0],length=_overload14[1],source=_overload14[3],modify.call(this,(function(){return _this9.editor.removeFormat(index,length)}),source,index)}},{key:"scrollIntoView",value:function scrollIntoView(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function setContents(delta){var _this10=this,source=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_emitter4.default.sources.API;return modify.call(this,(function(){delta=new _quillDelta2.default(delta);var length=_this10.getLength(),deleted=_this10.editor.deleteText(0,length),applied=_this10.editor.applyDelta(delta),lastOp=applied.ops[applied.ops.length-1],ret;return null!=lastOp&&"string"==typeof lastOp.insert&&"\n"===lastOp.insert[lastOp.insert.length-1]&&(_this10.editor.deleteText(_this10.getLength()-1,1),applied.delete(1)),deleted.compose(applied)}),source)}},{key:"setSelection",value:function setSelection(index,length,source){if(null==index)this.selection.setRange(null,length||Quill.sources.API);else{var _overload15=overload(index,length,source),_overload16=_slicedToArray(_overload15,4);index=_overload16[0],length=_overload16[1],source=_overload16[3],this.selection.setRange(new _selection.Range(index,length),source),source!==_emitter4.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function setText(text){var source=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_emitter4.default.sources.API,delta=(new _quillDelta2.default).insert(text);return this.setContents(delta,source)}},{key:"update",value:function update(){var source=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_emitter4.default.sources.USER,change=this.scroll.update(source);return this.selection.update(source),change}},{key:"updateContents",value:function updateContents(delta){var _this11=this,source=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_emitter4.default.sources.API;return modify.call(this,(function(){return delta=new _quillDelta2.default(delta),_this11.editor.applyDelta(delta,source)}),source,!0)}}]),Quill}();function expandConfig(container,userConfig){if((userConfig=(0,_extend2.default)(!0,{container:container,modules:{clipboard:!0,keyboard:!0,history:!0}},userConfig)).theme&&userConfig.theme!==Quill.DEFAULTS.theme){if(userConfig.theme=Quill.import("themes/"+userConfig.theme),null==userConfig.theme)throw new Error("Invalid theme "+userConfig.theme+". Did you register it?")}else userConfig.theme=_theme2.default;var themeConfig=(0,_extend2.default)(!0,{},userConfig.theme.DEFAULTS);[themeConfig,userConfig].forEach((function(config){config.modules=config.modules||{},Object.keys(config.modules).forEach((function(module){!0===config.modules[module]&&(config.modules[module]={})}))}));var moduleNames,moduleConfig=Object.keys(themeConfig.modules).concat(Object.keys(userConfig.modules)).reduce((function(config,name){var moduleClass=Quill.import("modules/"+name);return null==moduleClass?debug.error("Cannot load "+name+" module. Are you sure you registered it?"):config[name]=moduleClass.DEFAULTS||{},config}),{});return null!=userConfig.modules&&userConfig.modules.toolbar&&userConfig.modules.toolbar.constructor!==Object&&(userConfig.modules.toolbar={container:userConfig.modules.toolbar}),userConfig=(0,_extend2.default)(!0,{},Quill.DEFAULTS,{modules:moduleConfig},themeConfig,userConfig),["bounds","container","scrollingContainer"].forEach((function(key){"string"==typeof userConfig[key]&&(userConfig[key]=document.querySelector(userConfig[key]))})),userConfig.modules=Object.keys(userConfig.modules).reduce((function(config,name){return userConfig.modules[name]&&(config[name]=userConfig.modules[name]),config}),{}),userConfig}function modify(modifier,source,index,shift){if(this.options.strict&&!this.isEnabled()&&source===_emitter4.default.sources.USER)return new _quillDelta2.default;var range=null==index?null:this.getSelection(),oldDelta=this.editor.delta,change=modifier();if(null!=range&&(!0===index&&(index=range.index),null==shift?range=shiftRange(range,change,source):0!==shift&&(range=shiftRange(range,index,shift,source)),this.setSelection(range,_emitter4.default.sources.SILENT)),change.length()>0){var _emitter,args=[_emitter4.default.events.TEXT_CHANGE,change,oldDelta,source],_emitter2;if((_emitter=this.emitter).emit.apply(_emitter,[_emitter4.default.events.EDITOR_CHANGE].concat(args)),source!==_emitter4.default.sources.SILENT)(_emitter2=this.emitter).emit.apply(_emitter2,args)}return change}function overload(index,length,name,value,source){var formats={};return"number"==typeof index.index&&"number"==typeof index.length?"number"!=typeof length?(source=value,value=name,name=length,length=index.length,index=index.index):(length=index.length,index=index.index):"number"!=typeof length&&(source=value,value=name,name=length,length=0),"object"===(void 0===name?"undefined":_typeof(name))?(formats=name,source=value):"string"==typeof name&&(null!=value?formats[name]=value:source=name),[index,length,formats,source=source||_emitter4.default.sources.API]}function shiftRange(range,index,length,source){if(null==range)return null;var start=void 0,end=void 0;if(index instanceof _quillDelta2.default){var _map=[range.index,range.index+range.length].map((function(pos){return index.transformPosition(pos,source!==_emitter4.default.sources.USER)})),_map2=_slicedToArray(_map,2);start=_map2[0],end=_map2[1]}else{var _map3=[range.index,range.index+range.length].map((function(pos){return pos=0?pos+length:Math.max(index,pos+length)})),_map4=_slicedToArray(_map3,2);start=_map4[0],end=_map4[1]}return new _selection.Range(start,end-start)}Quill.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},Quill.events=_emitter4.default.events,Quill.sources=_emitter4.default.sources,Quill.version="1.3.7",Quill.imports={delta:_quillDelta2.default,parchment:_parchment2.default,"core/module":_module2.default,"core/theme":_theme2.default},exports.expandConfig=expandConfig,exports.overload=overload,exports.default=Quill},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i0){var parent=this.parent.isolate(this.offset(),this.length());this.moveChildren(parent),parent.wrap(this)}}}],[{key:"compare",value:function compare(self,other){var selfIndex=Inline.order.indexOf(self),otherIndex=Inline.order.indexOf(other);return selfIndex>=0||otherIndex>=0?selfIndex-otherIndex:self===other?0:self1?_len2-1:0),_key2=1;_key2<_len2;_key2++)args[_key2-1]=arguments[_key2];(this.listeners[event.type]||[]).forEach((function(_ref){var node=_ref.node,handler=_ref.handler;(event.target===node||node.contains(event.target))&&handler.apply(void 0,[event].concat(args))}))}},{key:"listenDOM",value:function listenDOM(eventName,node,handler){this.listeners[eventName]||(this.listeners[eventName]=[]),this.listeners[eventName].push({node:node,handler:handler})}}]),Emitter}(_eventemitter2.default);Emitter.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},Emitter.sources={API:"api",SILENT:"silent",USER:"user"},exports.default=Emitter},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var Module=function Module(quill){var options=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,Module),this.quill=quill,this.options=options};Module.DEFAULTS={},exports.default=Module},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var levels=["error","warn","log","info"],level="warn";function debug(method){if(levels.indexOf(method)<=levels.indexOf(level)){for(var _console,_len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];(_console=console)[method].apply(_console,args)}}function namespace(ns){return levels.reduce((function(logger,method){return logger[method]=debug.bind(console,method,ns),logger}),{})}debug.level=namespace.level=function(newLevel){level=newLevel},exports.default=namespace},function(module,exports,__webpack_require__){var pSlice=Array.prototype.slice,objectKeys=__webpack_require__(52),isArguments=__webpack_require__(53),deepEqual=module.exports=function(actual,expected,opts){return opts||(opts={}),actual===expected||(actual instanceof Date&&expected instanceof Date?actual.getTime()===expected.getTime():!actual||!expected||"object"!=typeof actual&&"object"!=typeof expected?opts.strict?actual===expected:actual==expected:objEquiv(actual,expected,opts))};function isUndefinedOrNull(value){return null==value}function isBuffer(x){return!(!x||"object"!=typeof x||"number"!=typeof x.length)&&("function"==typeof x.copy&&"function"==typeof x.slice&&!(x.length>0&&"number"!=typeof x[0]))}function objEquiv(a,b,opts){var i,key;if(isUndefinedOrNull(a)||isUndefinedOrNull(b))return!1;if(a.prototype!==b.prototype)return!1;if(isArguments(a))return!!isArguments(b)&&(a=pSlice.call(a),b=pSlice.call(b),deepEqual(a,b,opts));if(isBuffer(a)){if(!isBuffer(b))return!1;if(a.length!==b.length)return!1;for(i=0;i=0;i--)if(ka[i]!=kb[i])return!1;for(i=ka.length-1;i>=0;i--)if(key=ka[i],!deepEqual(a[key],b[key],opts))return!1;return typeof a==typeof b}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Registry=__webpack_require__(1),Attributor=function(){function Attributor(attrName,keyName,options){void 0===options&&(options={}),this.attrName=attrName,this.keyName=keyName;var attributeBit=Registry.Scope.TYPE&Registry.Scope.ATTRIBUTE;null!=options.scope?this.scope=options.scope&Registry.Scope.LEVEL|attributeBit:this.scope=Registry.Scope.ATTRIBUTE,null!=options.whitelist&&(this.whitelist=options.whitelist)}return Attributor.keys=function(node){return[].map.call(node.attributes,(function(item){return item.name}))},Attributor.prototype.add=function(node,value){return!!this.canAdd(node,value)&&(node.setAttribute(this.keyName,value),!0)},Attributor.prototype.canAdd=function(node,value){var match;return null!=Registry.query(node,Registry.Scope.BLOT&(this.scope|Registry.Scope.TYPE))&&(null==this.whitelist||("string"==typeof value?this.whitelist.indexOf(value.replace(/["']/g,""))>-1:this.whitelist.indexOf(value)>-1))},Attributor.prototype.remove=function(node){node.removeAttribute(this.keyName)},Attributor.prototype.value=function(node){var value=node.getAttribute(this.keyName);return this.canAdd(node,value)&&value?value:""},Attributor}();exports.default=Attributor},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Code=void 0;var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i=index+length)){var prevNewline=this.newlineIndex(index,!0)+1,isolateLength=nextNewline-prevNewline+1,blot=this.isolate(prevNewline,isolateLength),next=blot.next;blot.format(name,value),next instanceof CodeBlock&&next.formatAt(0,index-prevNewline+length-isolateLength,name,value)}}}},{key:"insertAt",value:function insertAt(index,value,def){if(null==def){var _descendant3=this.descendant(_text2.default,index),_descendant4=_slicedToArray(_descendant3,2),text=_descendant4[0],offset=_descendant4[1];text.insertAt(offset,value)}}},{key:"length",value:function length(){var length=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?length:length+1}},{key:"newlineIndex",value:function newlineIndex(searchIndex){var reverse=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(reverse)return this.domNode.textContent.slice(0,searchIndex).lastIndexOf("\n");var offset=this.domNode.textContent.slice(searchIndex).indexOf("\n");return offset>-1?searchIndex+offset:-1}},{key:"optimize",value:function optimize(context){this.domNode.textContent.endsWith("\n")||this.appendChild(_parchment2.default.create("text","\n")),_get(CodeBlock.prototype.__proto__||Object.getPrototypeOf(CodeBlock.prototype),"optimize",this).call(this,context);var next=this.next;null!=next&&next.prev===this&&next.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===next.statics.formats(next.domNode)&&(next.optimize(context),next.moveChildren(this),next.remove())}},{key:"replace",value:function replace(target){_get(CodeBlock.prototype.__proto__||Object.getPrototypeOf(CodeBlock.prototype),"replace",this).call(this,target),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(node){var blot=_parchment2.default.find(node);null==blot?node.parentNode.removeChild(node):blot instanceof _parchment2.default.Embed?blot.remove():blot.unwrap()}))}}],[{key:"create",value:function create(value){var domNode=_get(CodeBlock.__proto__||Object.getPrototypeOf(CodeBlock),"create",this).call(this,value);return domNode.setAttribute("spellcheck",!1),domNode}},{key:"formats",value:function formats(){return!0}}]),CodeBlock}(_block2.default);CodeBlock.blotName="code-block",CodeBlock.tagName="PRE",CodeBlock.TAB=" ",exports.Code=Code,exports.default=CodeBlock},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i=scrollLength&&!text.endsWith("\n")&&(consumeNextNewline=!0),_this.scroll.insertAt(index,text);var _scroll$line=_this.scroll.line(index),_scroll$line2=_slicedToArray(_scroll$line,2),line=_scroll$line2[0],offset=_scroll$line2[1],formats=(0,_extend2.default)({},(0,_block.bubbleFormats)(line));if(line instanceof _block2.default){var _line$descendant=line.descendant(_parchment2.default.Leaf,offset),_line$descendant2,leaf=_slicedToArray(_line$descendant,1)[0];formats=(0,_extend2.default)(formats,(0,_block.bubbleFormats)(leaf))}attributes=_op2.default.attributes.diff(formats,attributes)||{}}else if("object"===_typeof(op.insert)){var key=Object.keys(op.insert)[0];if(null==key)return index;_this.scroll.insertAt(index,key,op.insert[key])}scrollLength+=length}return Object.keys(attributes).forEach((function(name){_this.scroll.formatAt(index,length,name,attributes[name])})),index+length}),0),delta.reduce((function(index,op){return"number"==typeof op.delete?(_this.scroll.deleteAt(index,op.delete),index):index+(op.retain||op.insert.length||1)}),0),this.scroll.batchEnd(),this.update(delta)}},{key:"deleteText",value:function deleteText(index,length){return this.scroll.deleteAt(index,length),this.update((new _quillDelta2.default).retain(index).delete(length))}},{key:"formatLine",value:function formatLine(index,length){var _this2=this,formats=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(formats).forEach((function(format){if(null==_this2.scroll.whitelist||_this2.scroll.whitelist[format]){var lines=_this2.scroll.lines(index,Math.max(length,1)),lengthRemaining=length;lines.forEach((function(line){var lineLength=line.length();if(line instanceof _code2.default){var codeIndex=index-line.offset(_this2.scroll),codeLength=line.newlineIndex(codeIndex+lengthRemaining)-codeIndex+1;line.formatAt(codeIndex,codeLength,format,formats[format])}else line.format(format,formats[format]);lengthRemaining-=lineLength}))}})),this.scroll.optimize(),this.update((new _quillDelta2.default).retain(index).retain(length,(0,_clone2.default)(formats)))}},{key:"formatText",value:function formatText(index,length){var _this3=this,formats=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(formats).forEach((function(format){_this3.scroll.formatAt(index,length,format,formats[format])})),this.update((new _quillDelta2.default).retain(index).retain(length,(0,_clone2.default)(formats)))}},{key:"getContents",value:function getContents(index,length){return this.delta.slice(index,index+length)}},{key:"getDelta",value:function getDelta(){return this.scroll.lines().reduce((function(delta,line){return delta.concat(line.delta())}),new _quillDelta2.default)}},{key:"getFormat",value:function getFormat(index){var length=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,lines=[],leaves=[];0===length?this.scroll.path(index).forEach((function(path){var _path,blot=_slicedToArray(path,1)[0];blot instanceof _block2.default?lines.push(blot):blot instanceof _parchment2.default.Leaf&&leaves.push(blot)})):(lines=this.scroll.lines(index,length),leaves=this.scroll.descendants(_parchment2.default.Leaf,index,length));var formatsArr=[lines,leaves].map((function(blots){if(0===blots.length)return{};for(var formats=(0,_block.bubbleFormats)(blots.shift());Object.keys(formats).length>0;){var blot=blots.shift();if(null==blot)return formats;formats=combineFormats((0,_block.bubbleFormats)(blot),formats)}return formats}));return _extend2.default.apply(_extend2.default,formatsArr)}},{key:"getText",value:function getText(index,length){return this.getContents(index,length).filter((function(op){return"string"==typeof op.insert})).map((function(op){return op.insert})).join("")}},{key:"insertEmbed",value:function insertEmbed(index,embed,value){return this.scroll.insertAt(index,embed,value),this.update((new _quillDelta2.default).retain(index).insert(_defineProperty({},embed,value)))}},{key:"insertText",value:function insertText(index,text){var _this4=this,formats=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return text=text.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(index,text),Object.keys(formats).forEach((function(format){_this4.scroll.formatAt(index,text.length,format,formats[format])})),this.update((new _quillDelta2.default).retain(index).insert(text,(0,_clone2.default)(formats)))}},{key:"isBlank",value:function isBlank(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var block=this.scroll.children.head;return block.statics.blotName===_block2.default.blotName&&(!(block.children.length>1)&&block.children.head instanceof _break2.default)}},{key:"removeFormat",value:function removeFormat(index,length){var text=this.getText(index,length),_scroll$line3=this.scroll.line(index+length),_scroll$line4=_slicedToArray(_scroll$line3,2),line=_scroll$line4[0],offset=_scroll$line4[1],suffixLength=0,suffix=new _quillDelta2.default;null!=line&&(suffixLength=line instanceof _code2.default?line.newlineIndex(offset)-offset+1:line.length()-offset,suffix=line.delta().slice(offset,offset+suffixLength-1).insert("\n"));var contents,diff=this.getContents(index,length+suffixLength).diff((new _quillDelta2.default).insert(text).concat(suffix)),delta=(new _quillDelta2.default).retain(index).concat(diff);return this.applyDelta(delta)}},{key:"update",value:function update(change){var mutations=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],cursorIndex=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,oldDelta=this.delta;if(1===mutations.length&&"characterData"===mutations[0].type&&mutations[0].target.data.match(ASCII)&&_parchment2.default.find(mutations[0].target)){var textBlot=_parchment2.default.find(mutations[0].target),formats=(0,_block.bubbleFormats)(textBlot),index=textBlot.offset(this.scroll),oldValue=mutations[0].oldValue.replace(_cursor2.default.CONTENTS,""),oldText=(new _quillDelta2.default).insert(oldValue),newText=(new _quillDelta2.default).insert(textBlot.value()),diffDelta=(new _quillDelta2.default).retain(index).concat(oldText.diff(newText,cursorIndex));change=diffDelta.reduce((function(delta,op){return op.insert?delta.insert(op.insert,formats):delta.push(op)}),new _quillDelta2.default),this.delta=oldDelta.compose(change)}else this.delta=this.getDelta(),change&&(0,_deepEqual2.default)(oldDelta.compose(change),this.delta)||(change=oldDelta.diff(this.delta,cursorIndex));return change}}]),Editor}();function combineFormats(formats,combined){return Object.keys(combined).reduce((function(merged,name){return null==formats[name]?merged:(combined[name]===formats[name]?merged[name]=combined[name]:Array.isArray(combined[name])?combined[name].indexOf(formats[name])<0&&(merged[name]=combined[name].concat([formats[name]])):merged[name]=[combined[name],formats[name]],merged)}),{})}function normalizeDelta(delta){return delta.reduce((function(delta,op){if(1===op.insert){var attributes=(0,_clone2.default)(op.attributes);return delete attributes.image,delta.insert({image:op.attributes.image},attributes)}if(null==op.attributes||!0!==op.attributes.list&&!0!==op.attributes.bullet||((op=(0,_clone2.default)(op)).attributes.list?op.attributes.list="ordered":(op.attributes.list="bullet",delete op.attributes.bullet)),"string"==typeof op.insert){var text=op.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return delta.insert(text,op.attributes)}return delta.push(op)}),new _quillDelta2.default)}exports.default=Editor},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Range=void 0;var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:0;_classCallCheck(this,Range),this.index=index,this.length=length},Selection=function(){function Selection(scroll,emitter){var _this=this;_classCallCheck(this,Selection),this.emitter=emitter,this.scroll=scroll,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=_parchment2.default.create("cursor",this),this.lastRange=this.savedRange=new Range(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){_this.mouseDown||setTimeout(_this.update.bind(_this,_emitter4.default.sources.USER),1)})),this.emitter.on(_emitter4.default.events.EDITOR_CHANGE,(function(type,delta){type===_emitter4.default.events.TEXT_CHANGE&&delta.length()>0&&_this.update(_emitter4.default.sources.SILENT)})),this.emitter.on(_emitter4.default.events.SCROLL_BEFORE_UPDATE,(function(){if(_this.hasFocus()){var native=_this.getNativeRange();null!=native&&native.start.node!==_this.cursor.textNode&&_this.emitter.once(_emitter4.default.events.SCROLL_UPDATE,(function(){try{_this.setNativeRange(native.start.node,native.start.offset,native.end.node,native.end.offset)}catch(ignored){}}))}})),this.emitter.on(_emitter4.default.events.SCROLL_OPTIMIZE,(function(mutations,context){if(context.range){var _context$range=context.range,startNode=_context$range.startNode,startOffset=_context$range.startOffset,endNode=_context$range.endNode,endOffset=_context$range.endOffset;_this.setNativeRange(startNode,startOffset,endNode,endOffset)}})),this.update(_emitter4.default.sources.SILENT)}return _createClass(Selection,[{key:"handleComposition",value:function handleComposition(){var _this2=this;this.root.addEventListener("compositionstart",(function(){_this2.composing=!0})),this.root.addEventListener("compositionend",(function(){if(_this2.composing=!1,_this2.cursor.parent){var range=_this2.cursor.restore();if(!range)return;setTimeout((function(){_this2.setNativeRange(range.startNode,range.startOffset,range.endNode,range.endOffset)}),1)}}))}},{key:"handleDragging",value:function handleDragging(){var _this3=this;this.emitter.listenDOM("mousedown",document.body,(function(){_this3.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){_this3.mouseDown=!1,_this3.update(_emitter4.default.sources.USER)}))}},{key:"focus",value:function focus(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function format(_format,value){if(null==this.scroll.whitelist||this.scroll.whitelist[_format]){this.scroll.update();var nativeRange=this.getNativeRange();if(null!=nativeRange&&nativeRange.native.collapsed&&!_parchment2.default.query(_format,_parchment2.default.Scope.BLOCK)){if(nativeRange.start.node!==this.cursor.textNode){var blot=_parchment2.default.find(nativeRange.start.node,!1);if(null==blot)return;if(blot instanceof _parchment2.default.Leaf){var after=blot.split(nativeRange.start.offset);blot.parent.insertBefore(this.cursor,after)}else blot.insertBefore(this.cursor,nativeRange.start.node);this.cursor.attach()}this.cursor.format(_format,value),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function getBounds(index){var length=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,scrollLength=this.scroll.length();index=Math.min(index,scrollLength-1),length=Math.min(index+length,scrollLength-1)-index;var node=void 0,_scroll$leaf=this.scroll.leaf(index),_scroll$leaf2=_slicedToArray(_scroll$leaf,2),leaf=_scroll$leaf2[0],offset=_scroll$leaf2[1];if(null==leaf)return null;var _leaf$position=leaf.position(offset,!0),_leaf$position2=_slicedToArray(_leaf$position,2);node=_leaf$position2[0],offset=_leaf$position2[1];var range=document.createRange();if(length>0){range.setStart(node,offset);var _scroll$leaf3=this.scroll.leaf(index+length),_scroll$leaf4=_slicedToArray(_scroll$leaf3,2);if(leaf=_scroll$leaf4[0],offset=_scroll$leaf4[1],null==leaf)return null;var _leaf$position3=leaf.position(offset,!0),_leaf$position4=_slicedToArray(_leaf$position3,2);return node=_leaf$position4[0],offset=_leaf$position4[1],range.setEnd(node,offset),range.getBoundingClientRect()}var side="left",rect=void 0;return node instanceof Text?(offset0&&(side="right")),{bottom:rect.top+rect.height,height:rect.height,left:rect[side],right:rect[side],top:rect.top,width:0}}},{key:"getNativeRange",value:function getNativeRange(){var selection=document.getSelection();if(null==selection||selection.rangeCount<=0)return null;var nativeRange=selection.getRangeAt(0);if(null==nativeRange)return null;var range=this.normalizeNative(nativeRange);return debug.info("getNativeRange",range),range}},{key:"getRange",value:function getRange(){var normalized=this.getNativeRange(),range;return null==normalized?[null,null]:[this.normalizedToRange(normalized),normalized]}},{key:"hasFocus",value:function hasFocus(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function normalizedToRange(range){var _this4=this,positions=[[range.start.node,range.start.offset]];range.native.collapsed||positions.push([range.end.node,range.end.offset]);var indexes=positions.map((function(position){var _position=_slicedToArray(position,2),node=_position[0],offset=_position[1],blot=_parchment2.default.find(node,!0),index=blot.offset(_this4.scroll);return 0===offset?index:blot instanceof _parchment2.default.Container?index+blot.length():index+blot.index(node,offset)})),end=Math.min(Math.max.apply(Math,_toConsumableArray(indexes)),this.scroll.length()-1),start=Math.min.apply(Math,[end].concat(_toConsumableArray(indexes)));return new Range(start,end-start)}},{key:"normalizeNative",value:function normalizeNative(nativeRange){if(!contains(this.root,nativeRange.startContainer)||!nativeRange.collapsed&&!contains(this.root,nativeRange.endContainer))return null;var range={start:{node:nativeRange.startContainer,offset:nativeRange.startOffset},end:{node:nativeRange.endContainer,offset:nativeRange.endOffset},native:nativeRange};return[range.start,range.end].forEach((function(position){for(var node=position.node,offset=position.offset;!(node instanceof Text)&&node.childNodes.length>0;)if(node.childNodes.length>offset)node=node.childNodes[offset],offset=0;else{if(node.childNodes.length!==offset)break;offset=(node=node.lastChild)instanceof Text?node.data.length:node.childNodes.length+1}position.node=node,position.offset=offset})),range}},{key:"rangeToNative",value:function rangeToNative(range){var _this5=this,indexes=range.collapsed?[range.index]:[range.index,range.index+range.length],args=[],scrollLength=this.scroll.length();return indexes.forEach((function(index,i){index=Math.min(scrollLength-1,index);var node=void 0,_scroll$leaf5=_this5.scroll.leaf(index),_scroll$leaf6=_slicedToArray(_scroll$leaf5,2),leaf=_scroll$leaf6[0],offset=_scroll$leaf6[1],_leaf$position5=leaf.position(offset,0!==i),_leaf$position6=_slicedToArray(_leaf$position5,2);node=_leaf$position6[0],offset=_leaf$position6[1],args.push(node,offset)})),args.length<2&&(args=args.concat(args)),args}},{key:"scrollIntoView",value:function scrollIntoView(scrollingContainer){var range=this.lastRange;if(null!=range){var bounds=this.getBounds(range.index,range.length);if(null!=bounds){var limit=this.scroll.length()-1,_scroll$line=this.scroll.line(Math.min(range.index,limit)),_scroll$line2,first=_slicedToArray(_scroll$line,1)[0],last=first;if(range.length>0){var _scroll$line3=this.scroll.line(Math.min(range.index+range.length,limit)),_scroll$line4;last=_slicedToArray(_scroll$line3,1)[0]}if(null!=first&&null!=last){var scrollBounds=scrollingContainer.getBoundingClientRect();bounds.topscrollBounds.bottom&&(scrollingContainer.scrollTop+=bounds.bottom-scrollBounds.bottom)}}}}},{key:"setNativeRange",value:function setNativeRange(startNode,startOffset){var endNode=arguments.length>2&&void 0!==arguments[2]?arguments[2]:startNode,endOffset=arguments.length>3&&void 0!==arguments[3]?arguments[3]:startOffset,force=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(debug.info("setNativeRange",startNode,startOffset,endNode,endOffset),null==startNode||null!=this.root.parentNode&&null!=startNode.parentNode&&null!=endNode.parentNode){var selection=document.getSelection();if(null!=selection)if(null!=startNode){this.hasFocus()||this.root.focus();var native=(this.getNativeRange()||{}).native;if(null==native||force||startNode!==native.startContainer||startOffset!==native.startOffset||endNode!==native.endContainer||endOffset!==native.endOffset){"BR"==startNode.tagName&&(startOffset=[].indexOf.call(startNode.parentNode.childNodes,startNode),startNode=startNode.parentNode),"BR"==endNode.tagName&&(endOffset=[].indexOf.call(endNode.parentNode.childNodes,endNode),endNode=endNode.parentNode);var range=document.createRange();range.setStart(startNode,startOffset),range.setEnd(endNode,endOffset),selection.removeAllRanges(),selection.addRange(range)}}else selection.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function setRange(range){var force=arguments.length>1&&void 0!==arguments[1]&&arguments[1],source=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_emitter4.default.sources.API;if("string"==typeof force&&(source=force,force=!1),debug.info("setRange",range),null!=range){var args=this.rangeToNative(range);this.setNativeRange.apply(this,_toConsumableArray(args).concat([force]))}else this.setNativeRange(null);this.update(source)}},{key:"update",value:function update(){var source=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_emitter4.default.sources.USER,oldRange=this.lastRange,_getRange=this.getRange(),_getRange2=_slicedToArray(_getRange,2),lastRange=_getRange2[0],nativeRange=_getRange2[1];if(this.lastRange=lastRange,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,_deepEqual2.default)(oldRange,this.lastRange)){var _emitter;!this.composing&&null!=nativeRange&&nativeRange.native.collapsed&&nativeRange.start.node!==this.cursor.textNode&&this.cursor.restore();var args=[_emitter4.default.events.SELECTION_CHANGE,(0,_clone2.default)(this.lastRange),(0,_clone2.default)(oldRange),source],_emitter2;if((_emitter=this.emitter).emit.apply(_emitter,[_emitter4.default.events.EDITOR_CHANGE].concat(args)),source!==_emitter4.default.sources.SILENT)(_emitter2=this.emitter).emit.apply(_emitter2,args)}}}]),Selection}();function contains(parent,descendant){try{descendant.parentNode}catch(e){return!1}return descendant instanceof Text&&(descendant=descendant.parentNode),parent.contains(descendant)}exports.Range=Range,exports.default=Selection},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&(offset+=1),[this.parent.domNode,offset]},LeafBlot.prototype.value=function(){var _a;return(_a={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,_a},LeafBlot.scope=Registry.Scope.INLINE_BLOT,LeafBlot}(shadow_1.default);exports.default=LeafBlot},function(module,exports,__webpack_require__){var equal=__webpack_require__(11),extend=__webpack_require__(3),lib={attributes:{compose:function(a,b,keepNull){"object"!=typeof a&&(a={}),"object"!=typeof b&&(b={});var attributes=extend(!0,{},b);for(var key in keepNull||(attributes=Object.keys(attributes).reduce((function(copy,key){return null!=attributes[key]&&(copy[key]=attributes[key]),copy}),{})),a)void 0!==a[key]&&void 0===b[key]&&(attributes[key]=a[key]);return Object.keys(attributes).length>0?attributes:void 0},diff:function(a,b){"object"!=typeof a&&(a={}),"object"!=typeof b&&(b={});var attributes=Object.keys(a).concat(Object.keys(b)).reduce((function(attributes,key){return equal(a[key],b[key])||(attributes[key]=void 0===b[key]?null:b[key]),attributes}),{});return Object.keys(attributes).length>0?attributes:void 0},transform:function(a,b,priority){if("object"!=typeof a)return b;if("object"==typeof b){if(!priority)return b;var attributes=Object.keys(b).reduce((function(attributes,key){return void 0===a[key]&&(attributes[key]=b[key]),attributes}),{});return Object.keys(attributes).length>0?attributes:void 0}}},iterator:function(ops){return new Iterator(ops)},length:function(op){return"number"==typeof op.delete?op.delete:"number"==typeof op.retain?op.retain:"string"==typeof op.insert?op.insert.length:1}};function Iterator(ops){this.ops=ops,this.index=0,this.offset=0}Iterator.prototype.hasNext=function(){return this.peekLength()<1/0},Iterator.prototype.next=function(length){length||(length=1/0);var nextOp=this.ops[this.index];if(nextOp){var offset=this.offset,opLength=lib.length(nextOp);if(length>=opLength-offset?(length=opLength-offset,this.index+=1,this.offset=0):this.offset+=length,"number"==typeof nextOp.delete)return{delete:length};var retOp={};return nextOp.attributes&&(retOp.attributes=nextOp.attributes),"number"==typeof nextOp.retain?retOp.retain=length:"string"==typeof nextOp.insert?retOp.insert=nextOp.insert.substr(offset,length):retOp.insert=nextOp.insert,retOp}return{retain:1/0}},Iterator.prototype.peek=function(){return this.ops[this.index]},Iterator.prototype.peekLength=function(){return this.ops[this.index]?lib.length(this.ops[this.index])-this.offset:1/0},Iterator.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},Iterator.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var offset=this.offset,index=this.index,next=this.next(),rest=this.ops.slice(this.index);return this.offset=offset,this.index=index,[next].concat(rest)}return[]},module.exports=lib},function(module,exports){var clone=function(){"use strict";function _instanceof(obj,type){return null!=type&&obj instanceof type}var nativeMap,nativeSet,nativePromise;try{nativeMap=Map}catch(_){nativeMap=function(){}}try{nativeSet=Set}catch(_){nativeSet=function(){}}try{nativePromise=Promise}catch(_){nativePromise=function(){}}function clone(parent,circular,depth,prototype,includeNonEnumerable){"object"==typeof circular&&(depth=circular.depth,prototype=circular.prototype,includeNonEnumerable=circular.includeNonEnumerable,circular=circular.circular);var allParents=[],allChildren=[],useBuffer="undefined"!=typeof Buffer;function _clone(parent,depth){if(null===parent)return null;if(0===depth)return parent;var child,proto;if("object"!=typeof parent)return parent;if(_instanceof(parent,nativeMap))child=new nativeMap;else if(_instanceof(parent,nativeSet))child=new nativeSet;else if(_instanceof(parent,nativePromise))child=new nativePromise((function(resolve,reject){parent.then((function(value){resolve(_clone(value,depth-1))}),(function(err){reject(_clone(err,depth-1))}))}));else if(clone.__isArray(parent))child=[];else if(clone.__isRegExp(parent))child=new RegExp(parent.source,__getRegExpFlags(parent)),parent.lastIndex&&(child.lastIndex=parent.lastIndex);else if(clone.__isDate(parent))child=new Date(parent.getTime());else{if(useBuffer&&Buffer.isBuffer(parent))return child=Buffer.allocUnsafe?Buffer.allocUnsafe(parent.length):new Buffer(parent.length),parent.copy(child),child;_instanceof(parent,Error)?child=Object.create(parent):void 0===prototype?(proto=Object.getPrototypeOf(parent),child=Object.create(proto)):(child=Object.create(prototype),proto=prototype)}if(circular){var index=allParents.indexOf(parent);if(-1!=index)return allChildren[index];allParents.push(parent),allChildren.push(child)}for(var i in _instanceof(parent,nativeMap)&&parent.forEach((function(value,key){var keyChild=_clone(key,depth-1),valueChild=_clone(value,depth-1);child.set(keyChild,valueChild)})),_instanceof(parent,nativeSet)&&parent.forEach((function(value){var entryChild=_clone(value,depth-1);child.add(entryChild)})),parent){var attrs;proto&&(attrs=Object.getOwnPropertyDescriptor(proto,i)),attrs&&null==attrs.set||(child[i]=_clone(parent[i],depth-1))}if(Object.getOwnPropertySymbols)for(var symbols=Object.getOwnPropertySymbols(parent),i=0;i0){if(first instanceof _block.BlockEmbed||last instanceof _block.BlockEmbed)return void this.optimize();if(first instanceof _code2.default){var newlineIndex=first.newlineIndex(first.length(),!0);if(newlineIndex>-1&&(first=first.split(newlineIndex+1))===last)return void this.optimize()}else if(last instanceof _code2.default){var _newlineIndex=last.newlineIndex(0);_newlineIndex>-1&&last.split(_newlineIndex+1)}var ref=last.children.head instanceof _break2.default?null:last.children.head;first.moveChildren(last,ref),first.remove()}this.optimize()}},{key:"enable",value:function enable(){var enabled=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",enabled)}},{key:"formatAt",value:function formatAt(index,length,format,value){(null==this.whitelist||this.whitelist[format])&&(_get(Scroll.prototype.__proto__||Object.getPrototypeOf(Scroll.prototype),"formatAt",this).call(this,index,length,format,value),this.optimize())}},{key:"insertAt",value:function insertAt(index,value,def){if(null==def||null==this.whitelist||this.whitelist[value]){if(index>=this.length())if(null==def||null==_parchment2.default.query(value,_parchment2.default.Scope.BLOCK)){var blot=_parchment2.default.create(this.statics.defaultChild);this.appendChild(blot),null==def&&value.endsWith("\n")&&(value=value.slice(0,-1)),blot.insertAt(0,value,def)}else{var embed=_parchment2.default.create(value,def);this.appendChild(embed)}else _get(Scroll.prototype.__proto__||Object.getPrototypeOf(Scroll.prototype),"insertAt",this).call(this,index,value,def);this.optimize()}}},{key:"insertBefore",value:function insertBefore(blot,ref){if(blot.statics.scope===_parchment2.default.Scope.INLINE_BLOT){var wrapper=_parchment2.default.create(this.statics.defaultChild);wrapper.appendChild(blot),blot=wrapper}_get(Scroll.prototype.__proto__||Object.getPrototypeOf(Scroll.prototype),"insertBefore",this).call(this,blot,ref)}},{key:"leaf",value:function leaf(index){return this.path(index).pop()||[null,-1]}},{key:"line",value:function line(index){return index===this.length()?this.line(index-1):this.descendant(isLine,index)}},{key:"lines",value:function lines(){var index=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,length=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,getLines=function getLines(blot,index,length){var lines=[],lengthLeft=length;return blot.children.forEachAt(index,length,(function(child,index,length){isLine(child)?lines.push(child):child instanceof _parchment2.default.Container&&(lines=lines.concat(getLines(child,index,lengthLeft))),lengthLeft-=length})),lines};return getLines(this,index,length)}},{key:"optimize",value:function optimize(){var mutations=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],context=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(_get(Scroll.prototype.__proto__||Object.getPrototypeOf(Scroll.prototype),"optimize",this).call(this,mutations,context),mutations.length>0&&this.emitter.emit(_emitter2.default.events.SCROLL_OPTIMIZE,mutations,context))}},{key:"path",value:function path(index){return _get(Scroll.prototype.__proto__||Object.getPrototypeOf(Scroll.prototype),"path",this).call(this,index).slice(1)}},{key:"update",value:function update(mutations){if(!0!==this.batch){var source=_emitter2.default.sources.USER;"string"==typeof mutations&&(source=mutations),Array.isArray(mutations)||(mutations=this.observer.takeRecords()),mutations.length>0&&this.emitter.emit(_emitter2.default.events.SCROLL_BEFORE_UPDATE,source,mutations),_get(Scroll.prototype.__proto__||Object.getPrototypeOf(Scroll.prototype),"update",this).call(this,mutations.concat([])),mutations.length>0&&this.emitter.emit(_emitter2.default.events.SCROLL_UPDATE,source,mutations)}}}]),Scroll}(_parchment2.default.Scroll);Scroll.blotName="scroll",Scroll.className="ql-editor",Scroll.tagName="DIV",Scroll.defaultChild="block",Scroll.allowedChildren=[_block2.default,_block.BlockEmbed,_container2.default],exports.default=Scroll},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SHORTKEY=exports.default=void 0;var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{},handler=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},binding=normalize(key);if(null==binding||null==binding.key)return debug.warn("Attempted to add invalid keyboard binding",binding);"function"==typeof context&&(context={handler:context}),"function"==typeof handler&&(handler={handler:handler}),binding=(0,_extend2.default)(binding,context,handler),this.bindings[binding.key]=this.bindings[binding.key]||[],this.bindings[binding.key].push(binding)}},{key:"listen",value:function listen(){var _this2=this;this.quill.root.addEventListener("keydown",(function(evt){if(!evt.defaultPrevented){var which=evt.which||evt.keyCode,bindings=(_this2.bindings[which]||[]).filter((function(binding){return Keyboard.match(evt,binding)}));if(0!==bindings.length){var range=_this2.quill.getSelection();if(null!=range&&_this2.quill.hasFocus()){var _quill$getLine=_this2.quill.getLine(range.index),_quill$getLine2=_slicedToArray(_quill$getLine,2),line=_quill$getLine2[0],offset=_quill$getLine2[1],_quill$getLeaf=_this2.quill.getLeaf(range.index),_quill$getLeaf2=_slicedToArray(_quill$getLeaf,2),leafStart=_quill$getLeaf2[0],offsetStart=_quill$getLeaf2[1],_ref=0===range.length?[leafStart,offsetStart]:_this2.quill.getLeaf(range.index+range.length),_ref2=_slicedToArray(_ref,2),leafEnd=_ref2[0],offsetEnd=_ref2[1],prefixText=leafStart instanceof _parchment2.default.Text?leafStart.value().slice(0,offsetStart):"",suffixText=leafEnd instanceof _parchment2.default.Text?leafEnd.value().slice(offsetEnd):"",curContext={collapsed:0===range.length,empty:0===range.length&&line.length()<=1,format:_this2.quill.getFormat(range),offset:offset,prefix:prefixText,suffix:suffixText},prevented;bindings.some((function(binding){if(null!=binding.collapsed&&binding.collapsed!==curContext.collapsed)return!1;if(null!=binding.empty&&binding.empty!==curContext.empty)return!1;if(null!=binding.offset&&binding.offset!==curContext.offset)return!1;if(Array.isArray(binding.format)){if(binding.format.every((function(name){return null==curContext.format[name]})))return!1}else if("object"===_typeof(binding.format)&&!Object.keys(binding.format).every((function(name){return!0===binding.format[name]?null!=curContext.format[name]:!1===binding.format[name]?null==curContext.format[name]:(0,_deepEqual2.default)(binding.format[name],curContext.format[name])})))return!1;return!(null!=binding.prefix&&!binding.prefix.test(curContext.prefix))&&(!(null!=binding.suffix&&!binding.suffix.test(curContext.suffix))&&!0!==binding.handler.call(_this2,range,curContext))}))&&evt.preventDefault()}}}}))}}]),Keyboard}(_module2.default);function makeEmbedArrowHandler(key,shiftKey){var _ref3,where=key===Keyboard.keys.LEFT?"prefix":"suffix";return _defineProperty(_ref3={key:key,shiftKey:shiftKey,altKey:null},where,/^$/),_defineProperty(_ref3,"handler",(function handler(range){var index=range.index;key===Keyboard.keys.RIGHT&&(index+=range.length+1);var _quill$getLeaf3=this.quill.getLeaf(index),_quill$getLeaf4,leaf;return!(_slicedToArray(_quill$getLeaf3,1)[0]instanceof _parchment2.default.Embed)||(key===Keyboard.keys.LEFT?shiftKey?this.quill.setSelection(range.index-1,range.length+1,_quill2.default.sources.USER):this.quill.setSelection(range.index-1,_quill2.default.sources.USER):shiftKey?this.quill.setSelection(range.index,range.length+1,_quill2.default.sources.USER):this.quill.setSelection(range.index+range.length+1,_quill2.default.sources.USER),!1)})),_ref3}function handleBackspace(range,context){if(!(0===range.index||this.quill.getLength()<=1)){var _quill$getLine11=this.quill.getLine(range.index),_quill$getLine12,line=_slicedToArray(_quill$getLine11,1)[0],formats={};if(0===context.offset){var _quill$getLine13=this.quill.getLine(range.index-1),_quill$getLine14,prev=_slicedToArray(_quill$getLine13,1)[0];if(null!=prev&&prev.length()>1){var curFormats=line.formats(),prevFormats=this.quill.getFormat(range.index-1,1);formats=_op2.default.attributes.diff(curFormats,prevFormats)||{}}}var length=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(context.prefix)?2:1;this.quill.deleteText(range.index-length,length,_quill2.default.sources.USER),Object.keys(formats).length>0&&this.quill.formatLine(range.index-length,length,formats,_quill2.default.sources.USER),this.quill.focus()}}function handleDelete(range,context){var length=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(context.suffix)?2:1;if(!(range.index>=this.quill.getLength()-length)){var formats={},nextLength=0,_quill$getLine15=this.quill.getLine(range.index),_quill$getLine16,line=_slicedToArray(_quill$getLine15,1)[0];if(context.offset>=line.length()-1){var _quill$getLine17=this.quill.getLine(range.index+1),_quill$getLine18,next=_slicedToArray(_quill$getLine17,1)[0];if(next){var curFormats=line.formats(),nextFormats=this.quill.getFormat(range.index,1);formats=_op2.default.attributes.diff(curFormats,nextFormats)||{},nextLength=next.length()}}this.quill.deleteText(range.index,length,_quill2.default.sources.USER),Object.keys(formats).length>0&&this.quill.formatLine(range.index+nextLength-1,length,formats,_quill2.default.sources.USER)}}function handleDeleteRange(range){var lines=this.quill.getLines(range),formats={};if(lines.length>1){var firstFormats=lines[0].formats(),lastFormats=lines[lines.length-1].formats();formats=_op2.default.attributes.diff(lastFormats,firstFormats)||{}}this.quill.deleteText(range,_quill2.default.sources.USER),Object.keys(formats).length>0&&this.quill.formatLine(range.index,1,formats,_quill2.default.sources.USER),this.quill.setSelection(range.index,_quill2.default.sources.SILENT),this.quill.focus()}function handleEnter(range,context){var _this3=this;range.length>0&&this.quill.scroll.deleteAt(range.index,range.length);var lineFormats=Object.keys(context.format).reduce((function(lineFormats,format){return _parchment2.default.query(format,_parchment2.default.Scope.BLOCK)&&!Array.isArray(context.format[format])&&(lineFormats[format]=context.format[format]),lineFormats}),{});this.quill.insertText(range.index,"\n",lineFormats,_quill2.default.sources.USER),this.quill.setSelection(range.index+1,_quill2.default.sources.SILENT),this.quill.focus(),Object.keys(context.format).forEach((function(name){null==lineFormats[name]&&(Array.isArray(context.format[name])||"link"!==name&&_this3.quill.format(name,context.format[name],_quill2.default.sources.USER))}))}function makeCodeBlockHandler(indent){return{key:Keyboard.keys.TAB,shiftKey:!indent,format:{"code-block":!0},handler:function handler(range){var CodeBlock=_parchment2.default.query("code-block"),index=range.index,length=range.length,_quill$scroll$descend=this.quill.scroll.descendant(CodeBlock,index),_quill$scroll$descend2=_slicedToArray(_quill$scroll$descend,2),block=_quill$scroll$descend2[0],offset=_quill$scroll$descend2[1];if(null!=block){var scrollIndex=this.quill.getIndex(block),start=block.newlineIndex(offset,!0)+1,end=block.newlineIndex(scrollIndex+offset+length),lines=block.domNode.textContent.slice(start,end).split("\n");offset=0,lines.forEach((function(line,i){indent?(block.insertAt(start+offset,CodeBlock.TAB),offset+=CodeBlock.TAB.length,0===i?index+=CodeBlock.TAB.length:length+=CodeBlock.TAB.length):line.startsWith(CodeBlock.TAB)&&(block.deleteAt(start+offset,CodeBlock.TAB.length),offset-=CodeBlock.TAB.length,0===i?index-=CodeBlock.TAB.length:length-=CodeBlock.TAB.length),offset+=line.length+1})),this.quill.update(_quill2.default.sources.USER),this.quill.setSelection(index,length,_quill2.default.sources.SILENT)}}}}function makeFormatHandler(format){return{key:format[0].toUpperCase(),shortKey:!0,handler:function handler(range,context){this.quill.format(format,!context.format[format],_quill2.default.sources.USER)}}}function normalize(binding){if("string"==typeof binding||"number"==typeof binding)return normalize({key:binding});if("object"===(void 0===binding?"undefined":_typeof(binding))&&(binding=(0,_clone2.default)(binding,!1)),"string"==typeof binding.key)if(null!=Keyboard.keys[binding.key.toUpperCase()])binding.key=Keyboard.keys[binding.key.toUpperCase()];else{if(1!==binding.key.length)return null;binding.key=binding.key.toUpperCase().charCodeAt(0)}return binding.shortKey&&(binding[SHORTKEY]=binding.shortKey,delete binding.shortKey),binding}Keyboard.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},Keyboard.DEFAULTS={bindings:{bold:makeFormatHandler("bold"),italic:makeFormatHandler("italic"),underline:makeFormatHandler("underline"),indent:{key:Keyboard.keys.TAB,format:["blockquote","indent","list"],handler:function handler(range,context){if(context.collapsed&&0!==context.offset)return!0;this.quill.format("indent","+1",_quill2.default.sources.USER)}},outdent:{key:Keyboard.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function handler(range,context){if(context.collapsed&&0!==context.offset)return!0;this.quill.format("indent","-1",_quill2.default.sources.USER)}},"outdent backspace":{key:Keyboard.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function handler(range,context){null!=context.format.indent?this.quill.format("indent","-1",_quill2.default.sources.USER):null!=context.format.list&&this.quill.format("list",!1,_quill2.default.sources.USER)}},"indent code-block":makeCodeBlockHandler(!0),"outdent code-block":makeCodeBlockHandler(!1),"remove tab":{key:Keyboard.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function handler(range){this.quill.deleteText(range.index-1,1,_quill2.default.sources.USER)}},tab:{key:Keyboard.keys.TAB,handler:function handler(range){this.quill.history.cutoff();var delta=(new _quillDelta2.default).retain(range.index).delete(range.length).insert("\t");this.quill.updateContents(delta,_quill2.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(range.index+1,_quill2.default.sources.SILENT)}},"list empty enter":{key:Keyboard.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function handler(range,context){this.quill.format("list",!1,_quill2.default.sources.USER),context.format.indent&&this.quill.format("indent",!1,_quill2.default.sources.USER)}},"checklist enter":{key:Keyboard.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function handler(range){var _quill$getLine3=this.quill.getLine(range.index),_quill$getLine4=_slicedToArray(_quill$getLine3,2),line=_quill$getLine4[0],offset=_quill$getLine4[1],formats=(0,_extend2.default)({},line.formats(),{list:"checked"}),delta=(new _quillDelta2.default).retain(range.index).insert("\n",formats).retain(line.length()-offset-1).retain(1,{list:"unchecked"});this.quill.updateContents(delta,_quill2.default.sources.USER),this.quill.setSelection(range.index+1,_quill2.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:Keyboard.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function handler(range,context){var _quill$getLine5=this.quill.getLine(range.index),_quill$getLine6=_slicedToArray(_quill$getLine5,2),line=_quill$getLine6[0],offset=_quill$getLine6[1],delta=(new _quillDelta2.default).retain(range.index).insert("\n",context.format).retain(line.length()-offset-1).retain(1,{header:null});this.quill.updateContents(delta,_quill2.default.sources.USER),this.quill.setSelection(range.index+1,_quill2.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function handler(range,context){var length=context.prefix.length,_quill$getLine7=this.quill.getLine(range.index),_quill$getLine8=_slicedToArray(_quill$getLine7,2),line=_quill$getLine8[0],offset=_quill$getLine8[1];if(offset>length)return!0;var value=void 0;switch(context.prefix.trim()){case"[]":case"[ ]":value="unchecked";break;case"[x]":value="checked";break;case"-":case"*":value="bullet";break;default:value="ordered"}this.quill.insertText(range.index," ",_quill2.default.sources.USER),this.quill.history.cutoff();var delta=(new _quillDelta2.default).retain(range.index-offset).delete(length+1).retain(line.length()-2-offset).retain(1,{list:value});this.quill.updateContents(delta,_quill2.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(range.index-length,_quill2.default.sources.SILENT)}},"code exit":{key:Keyboard.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function handler(range){var _quill$getLine9=this.quill.getLine(range.index),_quill$getLine10=_slicedToArray(_quill$getLine9,2),line=_quill$getLine10[0],offset=_quill$getLine10[1],delta=(new _quillDelta2.default).retain(range.index+line.length()-offset-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(delta,_quill2.default.sources.USER)}},"embed left":makeEmbedArrowHandler(Keyboard.keys.LEFT,!1),"embed left shift":makeEmbedArrowHandler(Keyboard.keys.LEFT,!0),"embed right":makeEmbedArrowHandler(Keyboard.keys.RIGHT,!1),"embed right shift":makeEmbedArrowHandler(Keyboard.keys.RIGHT,!0)}},exports.default=Keyboard,exports.SHORTKEY=SHORTKEY},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_get=function get(object,property,receiver){null===object&&(object=Function.prototype);var desc=Object.getOwnPropertyDescriptor(object,property);if(void 0===desc){var parent=Object.getPrototypeOf(object);return null===parent?void 0:get(parent,property,receiver)}if("value"in desc)return desc.value;var getter=desc.get;return void 0!==getter?getter.call(receiver):void 0},_createClass=function(){function defineProperties(target,props){for(var i=0;i-1}Link.blotName="link",Link.tagName="A",Link.SANITIZED_URL="about:blank",Link.PROTOCOL_WHITELIST=["http","https","mailto","tel"],exports.default=Link,exports.sanitize=_sanitize},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_createClass=function(){function defineProperties(target,props){for(var i=0;i1&&void 0!==arguments[1]&&arguments[1],selected=this.container.querySelector(".ql-selected");if(item!==selected&&(null!=selected&&selected.classList.remove("ql-selected"),null!=item&&(item.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(item.parentNode.children,item),item.hasAttribute("data-value")?this.label.setAttribute("data-value",item.getAttribute("data-value")):this.label.removeAttribute("data-value"),item.hasAttribute("data-label")?this.label.setAttribute("data-label",item.getAttribute("data-label")):this.label.removeAttribute("data-label"),trigger))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":_typeof(Event))){var event=document.createEvent("Event");event.initEvent("change",!0,!0),this.select.dispatchEvent(event)}this.close()}}},{key:"update",value:function update(){var option=void 0;if(this.select.selectedIndex>-1){var item=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];option=this.select.options[this.select.selectedIndex],this.selectItem(item)}else this.selectItem(null);var isActive=null!=option&&option!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",isActive)}}]),Picker}();exports.default=Picker},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _parchment,_parchment2=_interopRequireDefault(__webpack_require__(0)),_quill,_quill2=_interopRequireDefault(__webpack_require__(5)),_block=__webpack_require__(4),_block2=_interopRequireDefault(_block),_break,_break2=_interopRequireDefault(__webpack_require__(16)),_container,_container2=_interopRequireDefault(__webpack_require__(25)),_cursor,_cursor2=_interopRequireDefault(__webpack_require__(24)),_embed,_embed2=_interopRequireDefault(__webpack_require__(35)),_inline,_inline2=_interopRequireDefault(__webpack_require__(6)),_scroll,_scroll2=_interopRequireDefault(__webpack_require__(22)),_text,_text2=_interopRequireDefault(__webpack_require__(7)),_clipboard,_clipboard2=_interopRequireDefault(__webpack_require__(55)),_history,_history2=_interopRequireDefault(__webpack_require__(42)),_keyboard,_keyboard2=_interopRequireDefault(__webpack_require__(23));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}_quill2.default.register({"blots/block":_block2.default,"blots/block/embed":_block.BlockEmbed,"blots/break":_break2.default,"blots/container":_container2.default,"blots/cursor":_cursor2.default,"blots/embed":_embed2.default,"blots/inline":_inline2.default,"blots/scroll":_scroll2.default,"blots/text":_text2.default,"modules/clipboard":_clipboard2.default,"modules/history":_history2.default,"modules/keyboard":_keyboard2.default}),_parchment2.default.register(_block2.default,_break2.default,_cursor2.default,_inline2.default,_scroll2.default,_text2.default),exports.default=_quill2.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Registry=__webpack_require__(1),ShadowBlot=function(){function ShadowBlot(domNode){this.domNode=domNode,this.domNode[Registry.DATA_KEY]={blot:this}}return Object.defineProperty(ShadowBlot.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),ShadowBlot.create=function(value){if(null==this.tagName)throw new Registry.ParchmentError("Blot definition missing tagName");var node;return Array.isArray(this.tagName)?("string"==typeof value&&(value=value.toUpperCase(),parseInt(value).toString()===value&&(value=parseInt(value))),node="number"==typeof value?document.createElement(this.tagName[value-1]):this.tagName.indexOf(value)>-1?document.createElement(value):document.createElement(this.tagName[0])):node=document.createElement(this.tagName),this.className&&node.classList.add(this.className),node},ShadowBlot.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},ShadowBlot.prototype.clone=function(){var domNode=this.domNode.cloneNode(!1);return Registry.create(domNode)},ShadowBlot.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[Registry.DATA_KEY]},ShadowBlot.prototype.deleteAt=function(index,length){var blot;this.isolate(index,length).remove()},ShadowBlot.prototype.formatAt=function(index,length,name,value){var blot=this.isolate(index,length);if(null!=Registry.query(name,Registry.Scope.BLOT)&&value)blot.wrap(name,value);else if(null!=Registry.query(name,Registry.Scope.ATTRIBUTE)){var parent=Registry.create(this.statics.scope);blot.wrap(parent),parent.format(name,value)}},ShadowBlot.prototype.insertAt=function(index,value,def){var blot=null==def?Registry.create("text",value):Registry.create(value,def),ref=this.split(index);this.parent.insertBefore(blot,ref)},ShadowBlot.prototype.insertInto=function(parentBlot,refBlot){void 0===refBlot&&(refBlot=null),null!=this.parent&&this.parent.children.remove(this);var refDomNode=null;parentBlot.children.insertBefore(this,refBlot),null!=refBlot&&(refDomNode=refBlot.domNode),this.domNode.parentNode==parentBlot.domNode&&this.domNode.nextSibling==refDomNode||parentBlot.domNode.insertBefore(this.domNode,refDomNode),this.parent=parentBlot,this.attach()},ShadowBlot.prototype.isolate=function(index,length){var target=this.split(index);return target.split(length),target},ShadowBlot.prototype.length=function(){return 1},ShadowBlot.prototype.offset=function(root){return void 0===root&&(root=this.parent),null==this.parent||this==root?0:this.parent.children.offset(this)+this.parent.offset(root)},ShadowBlot.prototype.optimize=function(context){null!=this.domNode[Registry.DATA_KEY]&&delete this.domNode[Registry.DATA_KEY].mutations},ShadowBlot.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},ShadowBlot.prototype.replace=function(target){null!=target.parent&&(target.parent.insertBefore(this,target.next),target.remove())},ShadowBlot.prototype.replaceWith=function(name,value){var replacement="string"==typeof name?Registry.create(name,value):name;return replacement.replace(this),replacement},ShadowBlot.prototype.split=function(index,force){return 0===index?this:this.next},ShadowBlot.prototype.update=function(mutations,context){},ShadowBlot.prototype.wrap=function(name,value){var wrapper="string"==typeof name?Registry.create(name,value):name;return null!=this.parent&&this.parent.insertBefore(wrapper,this.next),wrapper.appendChild(this),wrapper},ShadowBlot.blotName="abstract",ShadowBlot}();exports.default=ShadowBlot},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var attributor_1=__webpack_require__(12),class_1=__webpack_require__(32),style_1=__webpack_require__(33),Registry=__webpack_require__(1),AttributorStore=function(){function AttributorStore(domNode){this.attributes={},this.domNode=domNode,this.build()}return AttributorStore.prototype.attribute=function(attribute,value){value?attribute.add(this.domNode,value)&&(null!=attribute.value(this.domNode)?this.attributes[attribute.attrName]=attribute:delete this.attributes[attribute.attrName]):(attribute.remove(this.domNode),delete this.attributes[attribute.attrName])},AttributorStore.prototype.build=function(){var _this=this;this.attributes={};var attributes=attributor_1.default.keys(this.domNode),classes=class_1.default.keys(this.domNode),styles=style_1.default.keys(this.domNode);attributes.concat(classes).concat(styles).forEach((function(name){var attr=Registry.query(name,Registry.Scope.ATTRIBUTE);attr instanceof attributor_1.default&&(_this.attributes[attr.attrName]=attr)}))},AttributorStore.prototype.copy=function(target){var _this=this;Object.keys(this.attributes).forEach((function(key){var value=_this.attributes[key].value(_this.domNode);target.format(key,value)}))},AttributorStore.prototype.move=function(target){var _this=this;this.copy(target),Object.keys(this.attributes).forEach((function(key){_this.attributes[key].remove(_this.domNode)})),this.attributes={}},AttributorStore.prototype.values=function(){var _this=this;return Object.keys(this.attributes).reduce((function(attributes,name){return attributes[name]=_this.attributes[name].value(_this.domNode),attributes}),{})},AttributorStore}();exports.default=AttributorStore},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),extendStatics,attributor_1;function match(node,prefix){var className;return(node.getAttribute("class")||"").split(/\s+/).filter((function(name){return 0===name.indexOf(prefix+"-")}))}Object.defineProperty(exports,"__esModule",{value:!0});var ClassAttributor=function(_super){function ClassAttributor(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(ClassAttributor,_super),ClassAttributor.keys=function(node){return(node.getAttribute("class")||"").split(/\s+/).map((function(name){return name.split("-").slice(0,-1).join("-")}))},ClassAttributor.prototype.add=function(node,value){return!!this.canAdd(node,value)&&(this.remove(node),node.classList.add(this.keyName+"-"+value),!0)},ClassAttributor.prototype.remove=function(node){var matches;match(node,this.keyName).forEach((function(name){node.classList.remove(name)})),0===node.classList.length&&node.removeAttribute("class")},ClassAttributor.prototype.value=function(node){var result,value=(match(node,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(node,value)?value:""},ClassAttributor}(__webpack_require__(12).default);exports.default=ClassAttributor},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),extendStatics,attributor_1;function camelize(name){var parts=name.split("-"),rest=parts.slice(1).map((function(part){return part[0].toUpperCase()+part.slice(1)})).join("");return parts[0]+rest}Object.defineProperty(exports,"__esModule",{value:!0});var StyleAttributor=function(_super){function StyleAttributor(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(StyleAttributor,_super),StyleAttributor.keys=function(node){return(node.getAttribute("style")||"").split(";").map((function(value){var arr;return value.split(":")[0].trim()}))},StyleAttributor.prototype.add=function(node,value){return!!this.canAdd(node,value)&&(node.style[camelize(this.keyName)]=value,!0)},StyleAttributor.prototype.remove=function(node){node.style[camelize(this.keyName)]="",node.getAttribute("style")||node.removeAttribute("style")},StyleAttributor.prototype.value=function(node){var value=node.style[camelize(this.keyName)];return this.canAdd(node,value)?value:""},StyleAttributor}(__webpack_require__(12).default);exports.default=StyleAttributor},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;itimestamp&&this.stack.undo.length>0){var delta=this.stack.undo.pop();undoDelta=undoDelta.compose(delta.undo),changeDelta=delta.redo.compose(changeDelta)}else this.lastRecorded=timestamp;this.stack.undo.push({redo:changeDelta,undo:undoDelta}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function redo(){this.change("redo","undo")}},{key:"transform",value:function transform(delta){this.stack.undo.forEach((function(change){change.undo=delta.transform(change.undo,!0),change.redo=delta.transform(change.redo,!0)})),this.stack.redo.forEach((function(change){change.undo=delta.transform(change.undo,!0),change.redo=delta.transform(change.redo,!0)}))}},{key:"undo",value:function undo(){this.change("undo","redo")}}]),History}(_interopRequireDefault(__webpack_require__(9)).default);function endsWithNewlineChange(delta){var lastOp=delta.ops[delta.ops.length-1];return null!=lastOp&&(null!=lastOp.insert?"string"==typeof lastOp.insert&&lastOp.insert.endsWith("\n"):null!=lastOp.attributes&&Object.keys(lastOp.attributes).some((function(attr){return null!=_parchment2.default.query(attr,_parchment2.default.Scope.BLOCK)})))}function getLastChangeIndex(delta){var deleteLength=delta.reduce((function(length,op){return length+=op.delete||0}),0),changeIndex=delta.length()-deleteLength;return endsWithNewlineChange(delta)&&(changeIndex-=1),changeIndex}History.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},exports.default=History,exports.getLastChangeIndex=getLastChangeIndex},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.BaseTooltip=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:"link",preview=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=preview?this.textbox.value=preview:mode!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+mode)||""),this.root.setAttribute("data-mode",mode)}},{key:"restoreFocus",value:function restoreFocus(){var scrollTop=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=scrollTop}},{key:"save",value:function save(){var value=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var scrollTop=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",value,_emitter2.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",value,_emitter2.default.sources.USER)),this.quill.root.scrollTop=scrollTop;break;case"video":value=extractVideoUrl(value);case"formula":if(!value)break;var range=this.quill.getSelection(!0);if(null!=range){var index=range.index+range.length;this.quill.insertEmbed(index,this.root.getAttribute("data-mode"),value,_emitter2.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(index+1," ",_emitter2.default.sources.USER),this.quill.setSelection(index+2,_emitter2.default.sources.USER)}}this.textbox.value="",this.hide()}}]),BaseTooltip}(_tooltip2.default);function extractVideoUrl(url){var match=url.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||url.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return match?(match[1]||"https")+"://www.youtube.com/embed/"+match[2]+"?showinfo=0":(match=url.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(match[1]||"https")+"://player.vimeo.com/video/"+match[2]+"/":url}function fillSelect(select,values){var defaultValue=arguments.length>2&&void 0!==arguments[2]&&arguments[2];values.forEach((function(value){var option=document.createElement("option");value===defaultValue?option.setAttribute("selected","selected"):option.setAttribute("value",value),select.appendChild(option)}))}exports.BaseTooltip=BaseTooltip,exports.default=BaseTheme},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var LinkedList=function(){function LinkedList(){this.head=this.tail=null,this.length=0}return LinkedList.prototype.append=function(){for(var nodes=[],_i=0;_i1&&this.append.apply(this,nodes.slice(1))},LinkedList.prototype.contains=function(node){for(var cur,next=this.iterator();cur=next();)if(cur===node)return!0;return!1},LinkedList.prototype.insertBefore=function(node,refNode){node&&(node.next=refNode,null!=refNode?(node.prev=refNode.prev,null!=refNode.prev&&(refNode.prev.next=node),refNode.prev=node,refNode===this.head&&(this.head=node)):null!=this.tail?(this.tail.next=node,node.prev=this.tail,this.tail=node):(node.prev=null,this.head=this.tail=node),this.length+=1)},LinkedList.prototype.offset=function(target){for(var index=0,cur=this.head;null!=cur;){if(cur===target)return index;index+=cur.length(),cur=cur.next}return-1},LinkedList.prototype.remove=function(node){this.contains(node)&&(null!=node.prev&&(node.prev.next=node.next),null!=node.next&&(node.next.prev=node.prev),node===this.head&&(this.head=node.next),node===this.tail&&(this.tail=node.prev),this.length-=1)},LinkedList.prototype.iterator=function(curNode){return void 0===curNode&&(curNode=this.head),function(){var ret=curNode;return null!=curNode&&(curNode=curNode.next),ret}},LinkedList.prototype.find=function(index,inclusive){void 0===inclusive&&(inclusive=!1);for(var cur,next=this.iterator();cur=next();){var length=cur.length();if(indexcurIndex?callback(cur,index-curIndex,Math.min(length,curIndex+curLength-index)):callback(cur,0,Math.min(curLength,index+length-curIndex)),curIndex+=curLength}},LinkedList.prototype.map=function(callback){return this.reduce((function(memo,cur){return memo.push(callback(cur)),memo}),[])},LinkedList.prototype.reduce=function(callback,memo){for(var cur,next=this.iterator();cur=next();)memo=callback(memo,cur);return memo},LinkedList}();exports.default=LinkedList},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),extendStatics;Object.defineProperty(exports,"__esModule",{value:!0});var container_1=__webpack_require__(17),Registry=__webpack_require__(1),OBSERVER_CONFIG={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},MAX_OPTIMIZE_ITERATIONS=100,ScrollBlot=function(_super){function ScrollBlot(node){var _this=_super.call(this,node)||this;return _this.scroll=_this,_this.observer=new MutationObserver((function(mutations){_this.update(mutations)})),_this.observer.observe(_this.domNode,OBSERVER_CONFIG),_this.attach(),_this}return __extends(ScrollBlot,_super),ScrollBlot.prototype.detach=function(){_super.prototype.detach.call(this),this.observer.disconnect()},ScrollBlot.prototype.deleteAt=function(index,length){this.update(),0===index&&length===this.length()?this.children.forEach((function(child){child.remove()})):_super.prototype.deleteAt.call(this,index,length)},ScrollBlot.prototype.formatAt=function(index,length,name,value){this.update(),_super.prototype.formatAt.call(this,index,length,name,value)},ScrollBlot.prototype.insertAt=function(index,value,def){this.update(),_super.prototype.insertAt.call(this,index,value,def)},ScrollBlot.prototype.optimize=function(mutations,context){var _this=this;void 0===mutations&&(mutations=[]),void 0===context&&(context={}),_super.prototype.optimize.call(this,context);for(var records=[].slice.call(this.observer.takeRecords());records.length>0;)mutations.push(records.pop());for(var mark=function(blot,markParent){void 0===markParent&&(markParent=!0),null!=blot&&blot!==_this&&null!=blot.domNode.parentNode&&(null==blot.domNode[Registry.DATA_KEY].mutations&&(blot.domNode[Registry.DATA_KEY].mutations=[]),markParent&&mark(blot.parent))},optimize=function(blot){null!=blot.domNode[Registry.DATA_KEY]&&null!=blot.domNode[Registry.DATA_KEY].mutations&&(blot instanceof container_1.default&&blot.children.forEach(optimize),blot.optimize(context))},remaining=mutations,i=0;remaining.length>0;i+=1){if(i>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(remaining.forEach((function(mutation){var blot=Registry.find(mutation.target,!0);null!=blot&&(blot.domNode===mutation.target&&("childList"===mutation.type?(mark(Registry.find(mutation.previousSibling,!1)),[].forEach.call(mutation.addedNodes,(function(node){var child=Registry.find(node,!1);mark(child,!1),child instanceof container_1.default&&child.children.forEach((function(grandChild){mark(grandChild,!1)}))}))):"attributes"===mutation.type&&mark(blot.prev)),mark(blot))})),this.children.forEach(optimize),records=(remaining=[].slice.call(this.observer.takeRecords())).slice();records.length>0;)mutations.push(records.pop())}},ScrollBlot.prototype.update=function(mutations,context){var _this=this;void 0===context&&(context={}),(mutations=mutations||this.observer.takeRecords()).map((function(mutation){var blot=Registry.find(mutation.target,!0);return null==blot?null:null==blot.domNode[Registry.DATA_KEY].mutations?(blot.domNode[Registry.DATA_KEY].mutations=[mutation],blot):(blot.domNode[Registry.DATA_KEY].mutations.push(mutation),null)})).forEach((function(blot){null!=blot&&blot!==_this&&null!=blot.domNode[Registry.DATA_KEY]&&blot.update(blot.domNode[Registry.DATA_KEY].mutations||[],context)})),null!=this.domNode[Registry.DATA_KEY].mutations&&_super.prototype.update.call(this,this.domNode[Registry.DATA_KEY].mutations,context),this.optimize(mutations,context)},ScrollBlot.blotName="scroll",ScrollBlot.defaultChild="block",ScrollBlot.scope=Registry.Scope.BLOCK_BLOT,ScrollBlot.tagName="DIV",ScrollBlot}(container_1.default);exports.default=ScrollBlot},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),extendStatics;Object.defineProperty(exports,"__esModule",{value:!0});var format_1=__webpack_require__(18),Registry=__webpack_require__(1);function isEqual(obj1,obj2){if(Object.keys(obj1).length!==Object.keys(obj2).length)return!1;for(var prop in obj1)if(obj1[prop]!==obj2[prop])return!1;return!0}var InlineBlot=function(_super){function InlineBlot(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(InlineBlot,_super),InlineBlot.formats=function(domNode){if(domNode.tagName!==InlineBlot.tagName)return _super.formats.call(this,domNode)},InlineBlot.prototype.format=function(name,value){var _this=this;name!==this.statics.blotName||value?_super.prototype.format.call(this,name,value):(this.children.forEach((function(child){child instanceof format_1.default||(child=child.wrap(InlineBlot.blotName,!0)),_this.attributes.copy(child)})),this.unwrap())},InlineBlot.prototype.formatAt=function(index,length,name,value){var blot;null!=this.formats()[name]||Registry.query(name,Registry.Scope.ATTRIBUTE)?this.isolate(index,length).format(name,value):_super.prototype.formatAt.call(this,index,length,name,value)},InlineBlot.prototype.optimize=function(context){_super.prototype.optimize.call(this,context);var formats=this.formats();if(0===Object.keys(formats).length)return this.unwrap();var next=this.next;next instanceof InlineBlot&&next.prev===this&&isEqual(formats,next.formats())&&(next.moveChildren(this),next.remove())},InlineBlot.blotName="inline",InlineBlot.scope=Registry.Scope.INLINE_BLOT,InlineBlot.tagName="SPAN",InlineBlot}(format_1.default);exports.default=InlineBlot},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),extendStatics;Object.defineProperty(exports,"__esModule",{value:!0});var format_1=__webpack_require__(18),Registry=__webpack_require__(1),BlockBlot=function(_super){function BlockBlot(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(BlockBlot,_super),BlockBlot.formats=function(domNode){var tagName=Registry.query(BlockBlot.blotName).tagName;if(domNode.tagName!==tagName)return _super.formats.call(this,domNode)},BlockBlot.prototype.format=function(name,value){null!=Registry.query(name,Registry.Scope.BLOCK)&&(name!==this.statics.blotName||value?_super.prototype.format.call(this,name,value):this.replaceWith(BlockBlot.blotName))},BlockBlot.prototype.formatAt=function(index,length,name,value){null!=Registry.query(name,Registry.Scope.BLOCK)?this.format(name,value):_super.prototype.formatAt.call(this,index,length,name,value)},BlockBlot.prototype.insertAt=function(index,value,def){if(null==def||null!=Registry.query(value,Registry.Scope.INLINE))_super.prototype.insertAt.call(this,index,value,def);else{var after=this.split(index),blot=Registry.create(value,def);after.parent.insertBefore(blot,after)}},BlockBlot.prototype.update=function(mutations,context){navigator.userAgent.match(/Trident/)?this.build():_super.prototype.update.call(this,mutations,context)},BlockBlot.blotName="block",BlockBlot.scope=Registry.Scope.BLOCK_BLOT,BlockBlot.tagName="P",BlockBlot}(format_1.default);exports.default=BlockBlot},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),extendStatics;Object.defineProperty(exports,"__esModule",{value:!0});var leaf_1,EmbedBlot=function(_super){function EmbedBlot(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(EmbedBlot,_super),EmbedBlot.formats=function(domNode){},EmbedBlot.prototype.format=function(name,value){_super.prototype.formatAt.call(this,0,this.length(),name,value)},EmbedBlot.prototype.formatAt=function(index,length,name,value){0===index&&length===this.length()?this.format(name,value):_super.prototype.formatAt.call(this,index,length,name,value)},EmbedBlot.prototype.formats=function(){return this.statics.formats(this.domNode)},EmbedBlot}(__webpack_require__(19).default);exports.default=EmbedBlot},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),extendStatics;Object.defineProperty(exports,"__esModule",{value:!0});var leaf_1=__webpack_require__(19),Registry=__webpack_require__(1),TextBlot=function(_super){function TextBlot(node){var _this=_super.call(this,node)||this;return _this.text=_this.statics.value(_this.domNode),_this}return __extends(TextBlot,_super),TextBlot.create=function(value){return document.createTextNode(value)},TextBlot.value=function(domNode){var text=domNode.data;return text.normalize&&(text=text.normalize()),text},TextBlot.prototype.deleteAt=function(index,length){this.domNode.data=this.text=this.text.slice(0,index)+this.text.slice(index+length)},TextBlot.prototype.index=function(node,offset){return this.domNode===node?offset:-1},TextBlot.prototype.insertAt=function(index,value,def){null==def?(this.text=this.text.slice(0,index)+value+this.text.slice(index),this.domNode.data=this.text):_super.prototype.insertAt.call(this,index,value,def)},TextBlot.prototype.length=function(){return this.text.length},TextBlot.prototype.optimize=function(context){_super.prototype.optimize.call(this,context),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof TextBlot&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},TextBlot.prototype.position=function(index,inclusive){return void 0===inclusive&&(inclusive=!1),[this.domNode,index]},TextBlot.prototype.split=function(index,force){if(void 0===force&&(force=!1),!force){if(0===index)return this;if(index===this.length())return this.next}var after=Registry.create(this.domNode.splitText(index));return this.parent.insertBefore(after,this.next),this.text=this.statics.value(this.domNode),after},TextBlot.prototype.update=function(mutations,context){var _this=this;mutations.some((function(mutation){return"characterData"===mutation.type&&mutation.target===_this.domNode}))&&(this.text=this.statics.value(this.domNode))},TextBlot.prototype.value=function(){return this.text},TextBlot.blotName="text",TextBlot.scope=Registry.Scope.INLINE_BLOT,TextBlot}(leaf_1.default);exports.default=TextBlot},function(module,exports,__webpack_require__){"use strict";var elem=document.createElement("div");if(elem.classList.toggle("test-class",!1),elem.classList.contains("test-class")){var _toggle=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(token,force){return arguments.length>1&&!this.contains(token)==!force?force:_toggle.call(this,token)}}String.prototype.startsWith||(String.prototype.startsWith=function(searchString,position){return position=position||0,this.substr(position,searchString.length)===searchString}),String.prototype.endsWith||(String.prototype.endsWith=function(searchString,position){var subjectString=this.toString();("number"!=typeof position||!isFinite(position)||Math.floor(position)!==position||position>subjectString.length)&&(position=subjectString.length),position-=searchString.length;var lastIndex=subjectString.indexOf(searchString,position);return-1!==lastIndex&&lastIndex===position}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function value(predicate){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof predicate)throw new TypeError("predicate must be a function");for(var list=Object(this),length=list.length>>>0,thisArg=arguments[1],value,i=0;itext2.length?text1:text2,shorttext=text1.length>text2.length?text2:text1,i=longtext.indexOf(shorttext);if(-1!=i)return diffs=[[1,longtext.substring(0,i)],[0,shorttext],[1,longtext.substring(i+shorttext.length)]],text1.length>text2.length&&(diffs[0][0]=diffs[2][0]=-1),diffs;if(1==shorttext.length)return[[-1,text1],[1,text2]];var hm=diff_halfMatch_(text1,text2);if(hm){var text1_a=hm[0],text1_b=hm[1],text2_a=hm[2],text2_b=hm[3],mid_common=hm[4],diffs_a=diff_main(text1_a,text2_a),diffs_b=diff_main(text1_b,text2_b);return diffs_a.concat([[0,mid_common]],diffs_b)}return diff_bisect_(text1,text2)}function diff_bisect_(text1,text2){for(var text1_length=text1.length,text2_length=text2.length,max_d=Math.ceil((text1_length+text2_length)/2),v_offset=max_d,v_length=2*max_d,v1=new Array(v_length),v2=new Array(v_length),x=0;xtext1_length)k1end+=2;else if(y1>text2_length)k1start+=2;else if(front){var k2_offset,x2;if((k2_offset=v_offset+delta-k1)>=0&&k2_offset=(x2=text1_length-v2[k2_offset]))return diff_bisectSplit_(text1,text2,x1,y1)}}for(var k2=-d+k2start;k2<=d-k2end;k2+=2){for(var k2_offset=v_offset+k2,x2,y2=(x2=k2==-d||k2!=d&&v2[k2_offset-1]text1_length)k2end+=2;else if(y2>text2_length)k2start+=2;else if(!front){var k1_offset;if((k1_offset=v_offset+delta-k2)>=0&&k1_offset=(x2=text1_length-x2))return diff_bisectSplit_(text1,text2,x1,y1)}}}}return[[-1,text1],[1,text2]]}function diff_bisectSplit_(text1,text2,x,y){var text1a=text1.substring(0,x),text2a=text2.substring(0,y),text1b=text1.substring(x),text2b=text2.substring(y),diffs=diff_main(text1a,text2a),diffsb=diff_main(text1b,text2b);return diffs.concat(diffsb)}function diff_commonPrefix(text1,text2){if(!text1||!text2||text1.charAt(0)!=text2.charAt(0))return 0;for(var pointermin=0,pointermax=Math.min(text1.length,text2.length),pointermid=pointermax,pointerstart=0;pointermintext2.length?text1:text2,shorttext=text1.length>text2.length?text2:text1;if(longtext.length<4||2*shorttext.length=longtext.length?[best_longtext_a,best_longtext_b,best_shorttext_a,best_shorttext_b,best_common]:null}var hm1=diff_halfMatchI_(longtext,shorttext,Math.ceil(longtext.length/4)),hm2=diff_halfMatchI_(longtext,shorttext,Math.ceil(longtext.length/2)),hm,text1_a,text1_b,text2_a,text2_b,mid_common;return hm1||hm2?(hm=hm2?hm1&&hm1[4].length>hm2[4].length?hm1:hm2:hm1,text1.length>text2.length?(text1_a=hm[0],text1_b=hm[1],text2_a=hm[2],text2_b=hm[3]):(text2_a=hm[0],text2_b=hm[1],text1_a=hm[2],text1_b=hm[3]),[text1_a,text1_b,text2_a,text2_b,hm[4]]):null}function diff_cleanupMerge(diffs){diffs.push([0,""]);for(var pointer=0,count_delete=0,count_insert=0,text_delete="",text_insert="",commonlength;pointer1?(0!==count_delete&&0!==count_insert&&(0!==(commonlength=diff_commonPrefix(text_insert,text_delete))&&(pointer-count_delete-count_insert>0&&0==diffs[pointer-count_delete-count_insert-1][0]?diffs[pointer-count_delete-count_insert-1][1]+=text_insert.substring(0,commonlength):(diffs.splice(0,0,[0,text_insert.substring(0,commonlength)]),pointer++),text_insert=text_insert.substring(commonlength),text_delete=text_delete.substring(commonlength)),0!==(commonlength=diff_commonSuffix(text_insert,text_delete))&&(diffs[pointer][1]=text_insert.substring(text_insert.length-commonlength)+diffs[pointer][1],text_insert=text_insert.substring(0,text_insert.length-commonlength),text_delete=text_delete.substring(0,text_delete.length-commonlength))),0===count_delete?diffs.splice(pointer-count_insert,count_delete+count_insert,[1,text_insert]):0===count_insert?diffs.splice(pointer-count_delete,count_delete+count_insert,[-1,text_delete]):diffs.splice(pointer-count_delete-count_insert,count_delete+count_insert,[-1,text_delete],[1,text_insert]),pointer=pointer-count_delete-count_insert+(count_delete?1:0)+(count_insert?1:0)+1):0!==pointer&&0==diffs[pointer-1][0]?(diffs[pointer-1][1]+=diffs[pointer][1],diffs.splice(pointer,1)):pointer++,count_insert=0,count_delete=0,text_delete="",text_insert=""}""===diffs[diffs.length-1][1]&&diffs.pop();var changes=!1;for(pointer=1;pointer0&&ndiffs.splice(cursor_pointer+2,0,[d_next[0],suffix]),merge_tuples(ndiffs,cursor_pointer,3)}return diffs}function fix_emoji(diffs){for(var compact=!1,starts_with_pair_end=function(str){return str.charCodeAt(0)>=56320&&str.charCodeAt(0)<=57343},ends_with_pair_start=function(str){return str.charCodeAt(str.length-1)>=55296&&str.charCodeAt(str.length-1)<=56319},i=2;i0&&fixed_diffs.push(diffs[i]);return fixed_diffs}function merge_tuples(diffs,start,length){for(var i=start+length-1;i>=0&&i>=start-1;i--)if(i+1\r?\n +\<"),this.convert();var formats=this.quill.getFormat(this.quill.selection.savedRange.index);if(formats[_code2.default.blotName]){var text=this.container.innerText;return this.container.innerHTML="",(new _quillDelta2.default).insert(text,_defineProperty({},_code2.default.blotName,formats[_code2.default.blotName]))}var _prepareMatching=this.prepareMatching(),_prepareMatching2=_slicedToArray(_prepareMatching,2),elementMatchers=_prepareMatching2[0],textMatchers=_prepareMatching2[1],delta=traverse(this.container,elementMatchers,textMatchers);return deltaEndsWith(delta,"\n")&&null==delta.ops[delta.ops.length-1].attributes&&(delta=delta.compose((new _quillDelta2.default).retain(delta.length()-1).delete(1))),debug.log("convert",this.container.innerHTML,delta),this.container.innerHTML="",delta}},{key:"dangerouslyPasteHTML",value:function dangerouslyPasteHTML(index,html){var source=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_quill2.default.sources.API;if("string"==typeof index)this.quill.setContents(this.convert(index),html),this.quill.setSelection(0,_quill2.default.sources.SILENT);else{var paste=this.convert(html);this.quill.updateContents((new _quillDelta2.default).retain(index).concat(paste),source),this.quill.setSelection(index+paste.length(),_quill2.default.sources.SILENT)}}},{key:"onPaste",value:function onPaste(e){var _this2=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var range=this.quill.getSelection(),delta=(new _quillDelta2.default).retain(range.index),scrollTop=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(_quill2.default.sources.SILENT),setTimeout((function(){delta=delta.concat(_this2.convert()).delete(range.length),_this2.quill.updateContents(delta,_quill2.default.sources.USER),_this2.quill.setSelection(delta.length()-range.length,_quill2.default.sources.SILENT),_this2.quill.scrollingContainer.scrollTop=scrollTop,_this2.quill.focus()}),1)}}},{key:"prepareMatching",value:function prepareMatching(){var _this3=this,elementMatchers=[],textMatchers=[];return this.matchers.forEach((function(pair){var _pair=_slicedToArray(pair,2),selector=_pair[0],matcher=_pair[1];switch(selector){case Node.TEXT_NODE:textMatchers.push(matcher);break;case Node.ELEMENT_NODE:elementMatchers.push(matcher);break;default:[].forEach.call(_this3.container.querySelectorAll(selector),(function(node){node[DOM_KEY]=node[DOM_KEY]||[],node[DOM_KEY].push(matcher)}))}})),[elementMatchers,textMatchers]}}]),Clipboard}(_module2.default);function applyFormat(delta,format,value){return"object"===(void 0===format?"undefined":_typeof(format))?Object.keys(format).reduce((function(delta,key){return applyFormat(delta,key,format[key])}),delta):delta.reduce((function(delta,op){return op.attributes&&op.attributes[format]?delta.push(op):delta.insert(op.insert,(0,_extend3.default)({},_defineProperty({},format,value),op.attributes))}),new _quillDelta2.default)}function computeStyle(node){if(node.nodeType!==Node.ELEMENT_NODE)return{};var DOM_KEY="__ql-computed-style";return node[DOM_KEY]||(node[DOM_KEY]=window.getComputedStyle(node))}function deltaEndsWith(delta,text){for(var endText="",i=delta.ops.length-1;i>=0&&endText.length-1}function traverse(node,elementMatchers,textMatchers){return node.nodeType===node.TEXT_NODE?textMatchers.reduce((function(delta,matcher){return matcher(node,delta)}),new _quillDelta2.default):node.nodeType===node.ELEMENT_NODE?[].reduce.call(node.childNodes||[],(function(delta,childNode){var childrenDelta=traverse(childNode,elementMatchers,textMatchers);return childNode.nodeType===node.ELEMENT_NODE&&(childrenDelta=elementMatchers.reduce((function(childrenDelta,matcher){return matcher(childNode,childrenDelta)}),childrenDelta),childrenDelta=(childNode[DOM_KEY]||[]).reduce((function(childrenDelta,matcher){return matcher(childNode,childrenDelta)}),childrenDelta)),delta.concat(childrenDelta)}),new _quillDelta2.default):new _quillDelta2.default}function matchAlias(format,node,delta){return applyFormat(delta,format,!0)}function matchAttributor(node,delta){var attributes=_parchment2.default.Attributor.Attribute.keys(node),classes=_parchment2.default.Attributor.Class.keys(node),styles=_parchment2.default.Attributor.Style.keys(node),formats={};return attributes.concat(classes).concat(styles).forEach((function(name){var attr=_parchment2.default.query(name,_parchment2.default.Scope.ATTRIBUTE);null!=attr&&(formats[attr.attrName]=attr.value(node),formats[attr.attrName])||(null==(attr=ATTRIBUTE_ATTRIBUTORS[name])||attr.attrName!==name&&attr.keyName!==name||(formats[attr.attrName]=attr.value(node)||void 0),null==(attr=STYLE_ATTRIBUTORS[name])||attr.attrName!==name&&attr.keyName!==name||(attr=STYLE_ATTRIBUTORS[name],formats[attr.attrName]=attr.value(node)||void 0))})),Object.keys(formats).length>0&&(delta=applyFormat(delta,formats)),delta}function matchBlot(node,delta){var match=_parchment2.default.query(node);if(null==match)return delta;if(match.prototype instanceof _parchment2.default.Embed){var embed={},value=match.value(node);null!=value&&(embed[match.blotName]=value,delta=(new _quillDelta2.default).insert(embed,match.formats(node)))}else"function"==typeof match.formats&&(delta=applyFormat(delta,match.blotName,match.formats(node)));return delta}function matchBreak(node,delta){return deltaEndsWith(delta,"\n")||delta.insert("\n"),delta}function matchIgnore(){return new _quillDelta2.default}function matchIndent(node,delta){var match=_parchment2.default.query(node);if(null==match||"list-item"!==match.blotName||!deltaEndsWith(delta,"\n"))return delta;for(var indent=-1,parent=node.parentNode;!parent.classList.contains("ql-clipboard");)"list"===(_parchment2.default.query(parent)||{}).blotName&&(indent+=1),parent=parent.parentNode;return indent<=0?delta:delta.compose((new _quillDelta2.default).retain(delta.length()-1).retain(1,{indent:indent}))}function matchNewline(node,delta){return deltaEndsWith(delta,"\n")||(isLine(node)||delta.length()>0&&node.nextSibling&&isLine(node.nextSibling))&&delta.insert("\n"),delta}function matchSpacing(node,delta){if(isLine(node)&&null!=node.nextElementSibling&&!deltaEndsWith(delta,"\n\n")){var nodeHeight=node.offsetHeight+parseFloat(computeStyle(node).marginTop)+parseFloat(computeStyle(node).marginBottom);node.nextElementSibling.offsetTop>node.offsetTop+1.5*nodeHeight&&delta.insert("\n")}return delta}function matchStyles(node,delta){var formats={},style=node.style||{};return style.fontStyle&&"italic"===computeStyle(node).fontStyle&&(formats.italic=!0),style.fontWeight&&(computeStyle(node).fontWeight.startsWith("bold")||parseInt(computeStyle(node).fontWeight)>=700)&&(formats.bold=!0),Object.keys(formats).length>0&&(delta=applyFormat(delta,formats)),parseFloat(style.textIndent||0)>0&&(delta=(new _quillDelta2.default).insert("\t").concat(delta)),delta}function matchText(node,delta){var text=node.data;if("O:P"===node.parentNode.tagName)return delta.insert(text.trim());if(0===text.trim().length&&node.parentNode.classList.contains("ql-clipboard"))return delta;if(!computeStyle(node.parentNode).whiteSpace.startsWith("pre")){var replacer=function replacer(collapse,match){return(match=match.replace(/[^\u00a0]/g,"")).length<1&&collapse?" ":match};text=(text=text.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,replacer.bind(replacer,!0)),(null==node.previousSibling&&isLine(node.parentNode)||null!=node.previousSibling&&isLine(node.previousSibling))&&(text=text.replace(/^\s+/,replacer.bind(replacer,!1))),(null==node.nextSibling&&isLine(node.parentNode)||null!=node.nextSibling&&isLine(node.nextSibling))&&(text=text.replace(/\s+$/,replacer.bind(replacer,!1)))}return delta.insert(text)}Clipboard.DEFAULTS={matchers:[],matchVisual:!0},exports.default=Clipboard,exports.matchAttributor=matchAttributor,exports.matchBlot=matchBlot,exports.matchNewline=matchNewline,exports.matchSpacing=matchSpacing,exports.matchText=matchText},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i '},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;icontainerBounds.right&&(shift=containerBounds.right-rootBounds.right,this.root.style.left=left+shift+"px"),rootBounds.leftcontainerBounds.bottom){var height=rootBounds.bottom-rootBounds.top,verticalShift=reference.bottom-reference.top+height;this.root.style.top=top-verticalShift+"px",this.root.classList.add("ql-flip")}return shift}},{key:"show",value:function show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),Tooltip}();exports.default=Tooltip},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_get=function get(object,property,receiver){null===object&&(object=Function.prototype);var desc=Object.getOwnPropertyDescriptor(object,property);if(void 0===desc){var parent=Object.getPrototypeOf(object);return null===parent?void 0:get(parent,property,receiver)}if("value"in desc)return desc.value;var getter=desc.get;return void 0!==getter?getter.call(receiver):void 0},_createClass=function(){function defineProperties(target,props){for(var i=0;i','','',''].join(""),exports.default=SnowTheme},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _core,_core2=_interopRequireDefault(__webpack_require__(29)),_align=__webpack_require__(36),_direction=__webpack_require__(38),_indent=__webpack_require__(64),_blockquote,_blockquote2=_interopRequireDefault(__webpack_require__(65)),_header,_header2=_interopRequireDefault(__webpack_require__(66)),_list=__webpack_require__(67),_list2=_interopRequireDefault(_list),_background=__webpack_require__(37),_color=__webpack_require__(26),_font=__webpack_require__(39),_size=__webpack_require__(40),_bold,_bold2=_interopRequireDefault(__webpack_require__(56)),_italic,_italic2=_interopRequireDefault(__webpack_require__(68)),_link,_link2=_interopRequireDefault(__webpack_require__(27)),_script,_script2=_interopRequireDefault(__webpack_require__(69)),_strike,_strike2=_interopRequireDefault(__webpack_require__(70)),_underline,_underline2=_interopRequireDefault(__webpack_require__(71)),_image,_image2=_interopRequireDefault(__webpack_require__(72)),_video,_video2=_interopRequireDefault(__webpack_require__(73)),_code=__webpack_require__(13),_code2=_interopRequireDefault(_code),_formula,_formula2=_interopRequireDefault(__webpack_require__(74)),_syntax,_syntax2=_interopRequireDefault(__webpack_require__(75)),_toolbar,_toolbar2=_interopRequireDefault(__webpack_require__(57)),_icons,_icons2=_interopRequireDefault(__webpack_require__(41)),_picker,_picker2=_interopRequireDefault(__webpack_require__(28)),_colorPicker,_colorPicker2=_interopRequireDefault(__webpack_require__(59)),_iconPicker,_iconPicker2=_interopRequireDefault(__webpack_require__(60)),_tooltip,_tooltip2=_interopRequireDefault(__webpack_require__(61)),_bubble,_bubble2=_interopRequireDefault(__webpack_require__(108)),_snow,_snow2=_interopRequireDefault(__webpack_require__(62));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}_core2.default.register({"attributors/attribute/direction":_direction.DirectionAttribute,"attributors/class/align":_align.AlignClass,"attributors/class/background":_background.BackgroundClass,"attributors/class/color":_color.ColorClass,"attributors/class/direction":_direction.DirectionClass,"attributors/class/font":_font.FontClass,"attributors/class/size":_size.SizeClass,"attributors/style/align":_align.AlignStyle,"attributors/style/background":_background.BackgroundStyle,"attributors/style/color":_color.ColorStyle,"attributors/style/direction":_direction.DirectionStyle,"attributors/style/font":_font.FontStyle,"attributors/style/size":_size.SizeStyle},!0),_core2.default.register({"formats/align":_align.AlignClass,"formats/direction":_direction.DirectionClass,"formats/indent":_indent.IndentClass,"formats/background":_background.BackgroundStyle,"formats/color":_color.ColorStyle,"formats/font":_font.FontClass,"formats/size":_size.SizeClass,"formats/blockquote":_blockquote2.default,"formats/code-block":_code2.default,"formats/header":_header2.default,"formats/list":_list2.default,"formats/bold":_bold2.default,"formats/code":_code.Code,"formats/italic":_italic2.default,"formats/link":_link2.default,"formats/script":_script2.default,"formats/strike":_strike2.default,"formats/underline":_underline2.default,"formats/image":_image2.default,"formats/video":_video2.default,"formats/list/item":_list.ListItem,"modules/formula":_formula2.default,"modules/syntax":_syntax2.default,"modules/toolbar":_toolbar2.default,"themes/bubble":_bubble2.default,"themes/snow":_snow2.default,"ui/icons":_icons2.default,"ui/picker":_picker2.default,"ui/icon-picker":_iconPicker2.default,"ui/color-picker":_colorPicker2.default,"ui/tooltip":_tooltip2.default},!0),exports.default=_core2.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.IndentClass=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&this.children.tail.format(name,value)}},{key:"formats",value:function formats(){return _defineProperty({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function insertBefore(blot,ref){if(blot instanceof ListItem)_get(List.prototype.__proto__||Object.getPrototypeOf(List.prototype),"insertBefore",this).call(this,blot,ref);else{var index=null==ref?this.length():ref.offset(this),after=this.split(index);after.parent.insertBefore(blot,after)}}},{key:"optimize",value:function optimize(context){_get(List.prototype.__proto__||Object.getPrototypeOf(List.prototype),"optimize",this).call(this,context);var next=this.next;null!=next&&next.prev===this&&next.statics.blotName===this.statics.blotName&&next.domNode.tagName===this.domNode.tagName&&next.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(next.moveChildren(this),next.remove())}},{key:"replace",value:function replace(target){if(target.statics.blotName!==this.statics.blotName){var item=_parchment2.default.create(this.statics.defaultChild);target.moveChildren(item),this.appendChild(item)}_get(List.prototype.__proto__||Object.getPrototypeOf(List.prototype),"replace",this).call(this,target)}}]),List}(_container2.default);List.blotName="list",List.scope=_parchment2.default.Scope.BLOCK_BLOT,List.tagName=["OL","UL"],List.defaultChild="list-item",List.allowedChildren=[ListItem],exports.ListItem=ListItem,exports.default=List},function(module,exports,__webpack_require__){"use strict";var _bold,_bold2;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var Italic=function(_Bold){function Italic(){return _classCallCheck(this,Italic),_possibleConstructorReturn(this,(Italic.__proto__||Object.getPrototypeOf(Italic)).apply(this,arguments))}return _inherits(Italic,_Bold),Italic}(_interopRequireDefault(__webpack_require__(56)).default);Italic.blotName="italic",Italic.tagName=["EM","I"],exports.default=Italic},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i-1?value?this.domNode.setAttribute(name,value):this.domNode.removeAttribute(name):_get(Image.prototype.__proto__||Object.getPrototypeOf(Image.prototype),"format",this).call(this,name,value)}}],[{key:"create",value:function create(value){var node=_get(Image.__proto__||Object.getPrototypeOf(Image),"create",this).call(this,value);return"string"==typeof value&&node.setAttribute("src",this.sanitize(value)),node}},{key:"formats",value:function formats(domNode){return ATTRIBUTES.reduce((function(formats,attribute){return domNode.hasAttribute(attribute)&&(formats[attribute]=domNode.getAttribute(attribute)),formats}),{})}},{key:"match",value:function match(url){return/\.(jpe?g|gif|png)$/.test(url)||/^data:image\/.+;base64/.test(url)}},{key:"sanitize",value:function sanitize(url){return(0,_link.sanitize)(url,["http","https","data"])?url:"//:0"}},{key:"value",value:function value(domNode){return domNode.getAttribute("src")}}]),Image}(_parchment2.default.Embed);Image.blotName="image",Image.tagName="IMG",exports.default=Image},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i-1?value?this.domNode.setAttribute(name,value):this.domNode.removeAttribute(name):_get(Video.prototype.__proto__||Object.getPrototypeOf(Video.prototype),"format",this).call(this,name,value)}}],[{key:"create",value:function create(value){var node=_get(Video.__proto__||Object.getPrototypeOf(Video),"create",this).call(this,value);return node.setAttribute("frameborder","0"),node.setAttribute("allowfullscreen",!0),node.setAttribute("src",this.sanitize(value)),node}},{key:"formats",value:function formats(domNode){return ATTRIBUTES.reduce((function(formats,attribute){return domNode.hasAttribute(attribute)&&(formats[attribute]=domNode.getAttribute(attribute)),formats}),{})}},{key:"sanitize",value:function sanitize(url){return _link2.default.sanitize(url)}},{key:"value",value:function value(domNode){return domNode.getAttribute("src")}}]),Video}(_block.BlockEmbed);Video.blotName="video",Video.className="ql-video",Video.tagName="IFRAME",exports.default=Video},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.FormulaBlot=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i0||null==this.cachedText)&&(this.domNode.innerHTML=_highlight(text),this.domNode.normalize(),this.attach()),this.cachedText=text)}}]),SyntaxCodeBlock}(_interopRequireDefault(__webpack_require__(13)).default);SyntaxCodeBlock.className="ql-syntax";var CodeToken=new _parchment2.default.Attributor.Class("token","hljs",{scope:_parchment2.default.Scope.INLINE}),Syntax=function(_Module){function Syntax(quill,options){_classCallCheck(this,Syntax);var _this2=_possibleConstructorReturn(this,(Syntax.__proto__||Object.getPrototypeOf(Syntax)).call(this,quill,options));if("function"!=typeof _this2.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var timer=null;return _this2.quill.on(_quill2.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(timer),timer=setTimeout((function(){_this2.highlight(),timer=null}),_this2.options.interval)})),_this2.highlight(),_this2}return _inherits(Syntax,_Module),_createClass(Syntax,null,[{key:"register",value:function register(){_quill2.default.register(CodeToken,!0),_quill2.default.register(SyntaxCodeBlock,!0)}}]),_createClass(Syntax,[{key:"highlight",value:function highlight(){var _this3=this;if(!this.quill.selection.composing){this.quill.update(_quill2.default.sources.USER);var range=this.quill.getSelection();this.quill.scroll.descendants(SyntaxCodeBlock).forEach((function(code){code.highlight(_this3.options.highlight)})),this.quill.update(_quill2.default.sources.SILENT),null!=range&&this.quill.setSelection(range,_quill2.default.sources.SILENT)}}}]),Syntax}(_module2.default);Syntax.DEFAULTS={highlight:null==window.hljs?null:function(text){var result;return window.hljs.highlightAuto(text).value},interval:1e3},exports.CodeBlock=SyntaxCodeBlock,exports.CodeToken=CodeToken,exports.default=Syntax},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports){module.exports=' '},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.BubbleTooltip=void 0;var _get=function get(object,property,receiver){null===object&&(object=Function.prototype);var desc=Object.getOwnPropertyDescriptor(object,property);if(void 0===desc){var parent=Object.getPrototypeOf(object);return null===parent?void 0:get(parent,property,receiver)}if("value"in desc)return desc.value;var getter=desc.get;return void 0!==getter?getter.call(receiver):void 0},_createClass=function(){function defineProperties(target,props){for(var i=0;i0&&source===_emitter2.default.sources.USER){_this2.show(),_this2.root.style.left="0px",_this2.root.style.width="",_this2.root.style.width=_this2.root.offsetWidth+"px";var lines=_this2.quill.getLines(range.index,range.length);if(1===lines.length)_this2.position(_this2.quill.getBounds(range));else{var lastLine=lines[lines.length-1],index=_this2.quill.getIndex(lastLine),length=Math.min(lastLine.length()-1,range.index+range.length-index),_bounds=_this2.quill.getBounds(new _selection.Range(index,length));_this2.position(_bounds)}}else document.activeElement!==_this2.textbox&&_this2.quill.hasFocus()&&_this2.hide()})),_this2}return _inherits(BubbleTooltip,_BaseTooltip),_createClass(BubbleTooltip,[{key:"listen",value:function listen(){var _this3=this;_get(BubbleTooltip.prototype.__proto__||Object.getPrototypeOf(BubbleTooltip.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){_this3.root.classList.remove("ql-editing")})),this.quill.on(_emitter2.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!_this3.root.classList.contains("ql-hidden")){var range=_this3.quill.getSelection();null!=range&&_this3.position(_this3.quill.getBounds(range))}}),1)}))}},{key:"cancel",value:function cancel(){this.show()}},{key:"position",value:function position(reference){var shift=_get(BubbleTooltip.prototype.__proto__||Object.getPrototypeOf(BubbleTooltip.prototype),"position",this).call(this,reference),arrow=this.root.querySelector(".ql-tooltip-arrow");if(arrow.style.marginLeft="",0===shift)return shift;arrow.style.marginLeft=-1*shift-arrow.offsetWidth/2+"px"}}]),BubbleTooltip}(_base.BaseTooltip);BubbleTooltip.TEMPLATE=['','
      ','','',"
      "].join(""),exports.BubbleTooltip=BubbleTooltip,exports.default=BubbleTheme},function(module,exports,__webpack_require__){module.exports=__webpack_require__(63)}]).default})),function(){"use strict";function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}"".trim||(String.prototype.trim=function(){return this.replace(/^[\s]+|[\s]+$/g,"")}),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;ithis.length)&&-1!==this.indexOf(t,e)}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1;r[\r\n ]+\<").replace(/(<.*?>)|\s+/g,(function(t,e){return e||" "})):""}function o(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/`|'/g,"'")}function c(t,e,i){function s(t,e){for(var i in e)e.hasOwnProperty(i)&&(p(e[i])?p(t[i])?s(t[i],e[i]):t[i]=Object.assign({},e[i]):t[i]=e[i])}return t instanceof Object||(t={}),s(t,e),i&&s(t,i),t}function f(t){return String.prototype.normalize?"string"==typeof t?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:t}function t(t,e){if(!t)return console.warn("Tagify: ","invalid input element ",t),this;this.applySettings(t,e||{}),this.state={editing:!1,actions:{},mixMode:{},dropdown:{},flaggedTags:{}},this.value=[],this.listeners={},this.DOM={},c(this,new this.EventDispatcher(this)),this.build(t),this.getCSSVars(),this.loadOriginalValues(),this.events.customBinding.call(this),this.events.binding.call(this),t.autofocus&&this.DOM.input.focus()}return(t.prototype={isIE:window.document.documentMode,TEXTS:{empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},DEFAULTS:{delimiters:",",pattern:null,maxTags:1/0,callbacks:{},addTagOnBlur:!0,duplicates:!1,whitelist:[],blacklist:[],enforceWhitelist:!1,keepInvalidTags:!1,mixTagsAllowedAfter:/,|\.|\:|\s/,mixTagsInterpolator:["[[","]]"],backspace:!0,skipInvalid:!1,editTags:2,transformTag:function(){},autoComplete:{enabled:!0,rightKey:!1},dropdown:{classname:"",enabled:2,maxItems:10,searchKeys:[],fuzzySearch:!0,accentedSearch:!0,highlightFirst:!1,closeOnSelect:!0,position:"all"},hooks:{beforeRemoveTag:function(){return Promise.resolve()}}},templates:{wrapper:function(t,e){return'\n \n ')},tag:function(t,e){return'\n \n
      \n ").concat(t,"\n
      \n
      ")},dropdown:function(t){var e=t.dropdown,i="".concat("manual"==e.position?"":"tagify__dropdown tagify__dropdown--".concat(e.position)," ").concat(e.classname).trim();return'
      \n
      \n
      ')},dropdownItem:function(t){return"
      ').concat(t.value,"
      ")}},customEventsList:["add","remove","invalid","input","click","keydown","focus","blur","edit:input","edit:updated","edit:start","edit:keydown","dropdown:show","dropdown:hide","dropdown:select"],applySettings:function(i,t){var s=this;if(this.DEFAULTS.templates=this.templates,this.settings=c({},this.DEFAULTS,t),this.settings.readonly=i.hasAttribute("readonly"),this.settings.placeholder=i.getAttribute("placeholder")||this.settings.placeholder||"",this.isIE&&(this.settings.autoComplete=!1),["whitelist","blacklist"].forEach((function(t){var e=i.getAttribute("data-"+t);e&&(e=e.split(s.settings.delimiters))instanceof Array&&(s.settings[t]=e)})),"autoComplete"in t&&!p(t.autoComplete)&&(this.settings.autoComplete=this.DEFAULTS.autoComplete,this.settings.autoComplete.enabled=t.autoComplete),i.pattern)try{this.settings.pattern=new RegExp(i.pattern)}catch(t){}if(this.settings.delimiters)try{this.settings.delimiters=new RegExp(this.settings.delimiters,"g")}catch(t){}"select"==this.settings.mode&&(this.settings.dropdown.enabled=0),"mix"==this.settings.mode&&(this.settings.autoComplete.rightKey=!0)},getAttributes:function(t){if("[object Object]"!=Object.prototype.toString.call(t))return"";var e,i,s=Object.keys(t),n="";for(i=s.length;i--;)"class"!=(e=s[i])&&t.hasOwnProperty(e)&&t[e]&&(n+=" "+e+(t[e]?'="'.concat(t[e],'"'):""));return n},getCaretGlobalPosition:function(){var t=document.getSelection();if(t.rangeCount){var e,i,s=t.getRangeAt(0),n=s.startContainer,a=s.startOffset;return 0=o.length)&&(s.removeTags(i.anchorNode.previousElementSibling),s.fixFirefoxLastTagNoCaret(),2==s.DOM.input.children.length&&"BR"==s.DOM.input.children[1].tagName))return s.DOM.input.innerHTML="",!(s.value.length=0);s.value=[].map.call(r,(function(t,e){var i=t.__tagifyTagData;if(t.parentNode)return i;s.trigger("remove",{tag:t,index:e,data:i})})).filter((function(t){return t}))}),50)}return!0}switch(t.key){case"Backspace":this.state.dropdown.visible||""!=e&&8203!=e.charCodeAt(0)||(!0===this.settings.backspace?this.removeTags():"edit"==this.settings.backspace&&setTimeout(this.editTag.bind(this),0));break;case"Esc":case"Escape":if(this.state.dropdown.visible)return;t.target.blur();break;case"Down":case"ArrowDown":this.state.dropdown.visible||this.dropdown.show.call(this);break;case"ArrowRight":var l=this.state.inputSuggestion||this.state.ddItemData;if(l&&this.settings.autoComplete.rightKey)return void this.addTags([l],!0);break;case"Tab":if(!e||"select"==this.settings.mode)return!0;case"Enter":t.preventDefault(),setTimeout((function(){s.state.actions.selectOption||s.addTags(e,!0)}))}},onInput:function(t){var e=this.input.normalize.call(this),i=e.length>=this.settings.dropdown.enabled,s={value:e,inputElm:this.DOM.input};if("mix"==this.settings.mode)return this.events.callbacks.onMixTagsInput.call(this,t);s.isValid=this.validateTag({value:e}),this.trigger("input",s),e?this.input.value!=e&&(this.input.set.call(this,e,!1),-1!=e.search(this.settings.delimiters)?this.addTags(e)&&this.input.set.call(this):0<=this.settings.dropdown.enabled&&this.dropdown[i?"show":"hide"].call(this,e)):this.input.set.call(this,"")},onMixTagsInput:function(){var t,e,i,s,n,a,o,r,l=this,d=this.settings;if(this.value.length=d.dropdown.enabled;try{r=(r=this.state.flaggedTags[this.state.tag.baseOffset]).prefix==this.state.tag.prefix&&r.value[0]==this.state.tag.value[0],this.state.flaggedTags[this.state.tag.baseOffset]&&!this.state.tag.value&&delete this.state.flaggedTags[this.state.tag.baseOffset]}catch(t){}(r||s=this.settings.dropdown.enabled&&(this.state.editing.value=n,this.dropdown.show.call(this,n)),this.trigger("edit:input",{tag:i,index:s,data:c({},this.value[s],{newValue:n}),originalEvent:this.cloneEvent(e)})},onEditTagFocus:function(t){this.state.editing={scope:t,input:t.querySelector("[contenteditable]")}},onEditTagBlur:function(t){if(this.state.editing=!1,this.state.hasFocus||this.toggleFocusClass(),this.DOM.scope.contains(t)){var e=t.closest(".tagify__tag"),i=this.input.normalize.call(this,t),s=i,n=s!=t.originalValue,a=c({},e.__tagifyTagData,{value:s}),o=this.validateTag(a);if(!i)return this.removeTags(e),void this.onEditTagDone(null,a);n?(this.settings.transformTag.call(this,a),!0===(o=this.validateTag(a))?this.onEditTagDone(e,a):this.trigger("invalid",{data:a,tag:e,message:o})):this.onEditTagDone(e,a)}},onEditTagkeydown:function(t,e){switch(this.trigger("edit:keydown",{originalEvent:this.cloneEvent(t)}),t.key){case"Esc":case"Escape":t.target.textContent=t.target.originalValue,e.__tagifyTagData=e.__tagifyTagData.__originalData;case"Enter":case"Tab":t.preventDefault(),t.target.blur()}},onDoubleClickScope:function(t){var e,i,s=t.target.closest("tag"),n=this.settings;s&&(e=s.classList.contains("tagify__tag--editable"),i=s.hasAttribute("readonly"),"select"==n.mode||n.readonly||e||i||!this.settings.editTags||this.editTag(s),this.toggleFocusClass(!0),this.trigger("dblclick",{tag:s,index:this.getNodeIndex(s),data:this.tagData(s)}))}}},fixFirefoxLastTagNoCaret:function(){var t=this.DOM.input;if(e&&t.childNodes.length&&1==t.lastChild.nodeType)return t.appendChild(document.createTextNode("")),this.setRangeAtStartEnd(!0),!0},editTag:function(e,t){var i=this;t=t||{};var s=(e=e||this.getLastTag()).querySelector(".tagify__tag-text"),n=this.getNodeIndex(e),a=e.__tagifyTagData,o=this.events.callbacks,r=this,l=!0;if(s){if(!(a instanceof Object&&"editable"in a)||a.editable)return e.__tagifyTagData.__originalData=c({},a),e.classList.add("tagify__tag--editable"),s.originalValue=s.textContent,s.setAttribute("contenteditable",!0),s.addEventListener("focus",o.onEditTagFocus.bind(this,e)),s.addEventListener("blur",(function(){setTimeout(o.onEditTagBlur.bind(r),0,s)})),s.addEventListener("input",o.onEditTagInput.bind(this,s)),s.addEventListener("keydown",(function(t){return o.onEditTagkeydown.call(i,t,e)})),s.focus(),this.setRangeAtStartEnd(!1,s),t.skipValidation||(l=this.editTagToggleValidity(e,a.value)),s.originalIsValid=l,this.trigger("edit:start",{tag:e,index:n,data:a,isValid:l}),this}else console.warn("Cannot find element in Tag template: ",".tagify__tag-text")},editTagToggleValidity:function(t){var e,i=t.__tagifyTagData;if(i)return e=!(!i.__isValid||1==i.__isValid),t.classList.toggle("tagify--invalid",e),i.__isValid;console.warn("tag has no data: ",t,i)},onEditTagDone:function(t,e){var i=this;e=e||{};var s={tag:t,index:this.getNodeIndex(t),data:e};this.trigger("edit:beforeUpdate",s),delete e.__originalData,t&&(this.editTagToggleValidity(t),this.replaceTag(t,e)),this.trigger("edit:updated",s),this.dropdown.hide.call(this),!0===e.__isValid&&this.getTagElms("tagify--notAllowed").forEach((function(t){var e=i.validateTag(t.__tagifyTagData);!0===e&&(t.__tagifyTagData.__isValid=e,i.replaceTag(t))}))},replaceTag:function(t,e){e&&e.value||(e=t.__tagifyTagData),e.__isValid&&1!=e.__isValid&&c(e,this.getInvaildTagParams(e,e.__isValid));var i=this.createTagElem(e);t.parentNode.replaceChild(i,t),this.updateValueByDOMTags()},updateValueByDOMTags:function(){var e=this;this.value.length=0,[].forEach.call(this.getTagElms(),(function(t){t.classList.contains("tagify--notAllowed")||e.value.push(t.__tagifyTagData)})),this.update()},setRangeAtStartEnd:function(e,i){i=(i=i||this.DOM.input).lastChild||i;var s=document.getSelection();s.rangeCount&&["Start","End"].forEach((function(t){return s.getRangeAt(0)["set"+t](i,e?0:i.length)}))},input:{value:"",set:function(t,e){var i=0=this.settings.maxTags&&this.TEXTS.exceed},normalizeTags:function(t){function i(t){return(t+"").split(a).filter((function(t){return t})).map((function(t){return{value:t.trim()}}))}var e,s=this.settings,n=s.whitelist,a=s.delimiters,o=s.mode,r=!!n&&n[0]instanceof Object,l=t instanceof Array,d=l&&t[0]instanceof Object&&"value"in t[0],c=[];if(d)return(e=[]).concat.apply(e,u(t.map((function(e){return i(e.value).map((function(t){return g(g({},e),t)}))}))));if("number"==typeof t&&(t=t.toString()),"string"==typeof t){if(!t.trim())return[];t=i(t)}else if(l){var h;t=(h=[]).concat.apply(h,u(t.map((function(t){return i(t)}))))}return r&&(t.forEach((function(e){var t=n.filter((function(t){return t.value.toLowerCase()==e.value.toLowerCase()}));t[0]?c.push(t[0]):"mix"!=o&&c.push(e)})),c.length&&(t=c)),t},parseMixTags:function(t){var o=this,e=this.settings,r=e.mixTagsInterpolator,l=e.duplicates,d=e.transformTag,c=e.enforceWhitelist,h=[];return t=t.split(r[0]).map((function(t,e){var i,s,n=t.split(r[1]),a=n[0];try{i=JSON.parse(a)}catch(t){i=o.normalizeTags(a)[0]}if(!(1=this.settings.maxTags),this.DOM.scope.classList.toggle("tagify--noTags",!this.value.length)},update:function(){this.preUpdate();var t=this.DOM.originalInput,e=t.value,i=function(t,s){return t.map((function(t){var e={};for(var i in t)i!=s&&(e[i]=t[i]);return e}))}(this.value,"__isValid"),s=new CustomEvent("change",{bubbles:!0});t.value="mix"==this.settings.mode?this.getMixedTagsAsString(i):i.length?this.settings.originalInputValueFormat?this.settings.originalInputValueFormat(i):JSON.stringify(i):"",s.simulated=!0,t._valueTracker&&t._valueTracker.setValue(e),t.dispatchEvent(s)},getMixedTagsAsString:function(){var i="",s=this,n=this.settings.mixTagsInterpolator;return function e(t){t.childNodes.forEach((function(t){if(1==t.nodeType){if(t.classList.contains("tagify__tag")&&t.__tagifyTagData)return void(i+=n[0]+JSON.stringify(t.__tagifyTagData)+n[1]);"BR"!=t.tagName||t.parentNode!=s.DOM.input&&1!=t.parentNode.childNodes.length?"DIV"!=t.tagName&&"P"!=t.tagName||(i+="\r\n",e(t)):i+="\r\n"}else i+=t.textContent}))}(this.DOM.input),i},getNodeHeight:function(t){var e,i=t.cloneNode(!0);return i.style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(i),e=i.clientHeight,i.parentNode.removeChild(i),e},dropdown:{init:function(){this.DOM.dropdown=a(this.settings.templates.dropdown(this.settings)),this.DOM.dropdown.content=this.DOM.dropdown.querySelector(".tagify__dropdown__wrapper")},show:function(t){var e,i,s,n,a=this,o=this.settings,r=window.getSelection(),l="mix"==o.mode&&!o.enforceWhitelist,d=!o.whitelist||!o.whitelist.length,c="manual"==o.dropdown.position;if(!(d&&!l||!1===o.dropdown.enable||this.state.isLoading)){if(clearTimeout(this.dropdownHide__bindEventsTimeout),this.suggestedListItems=this.dropdown.filterListItems.call(this,t),this.suggestedListItems.length)t&&l&&!this.state.editing.scope&&!function(t,e){return t.toLowerCase()==e.toLowerCase()}(this.suggestedListItems[0].value,t)&&this.suggestedListItems.unshift({value:t});else{if(!t||!l||this.state.editing.scope)return this.input.autocomplete.suggest.call(this),this.dropdown.hide.call(this),void this.events.binding.call(this);this.suggestedListItems=[{value:t}]}s=p(i=this.suggestedListItems[0])?i.value:i,o.autoComplete&&s&&0==s.indexOf(t)&&this.input.autocomplete.suggest.call(this,i),e=this.dropdown.createListHTML.call(this,this.suggestedListItems),this.DOM.dropdown.content.innerHTML=h(e),(o.enforceWhitelist&&!c||o.dropdown.highlightFirst)&&this.dropdown.highlightOption.call(this,this.DOM.dropdown.content.children[0]),this.DOM.scope.setAttribute("aria-expanded",!0),this.trigger("dropdown:show",this.DOM.dropdown),this.state.dropdown.visible=t||!0,this.state.selection={anchorOffset:r.anchorOffset,anchorNode:r.anchorNode},this.dropdown.position.call(this),document.body.contains(this.DOM.dropdown)||(c||(this.events.binding.call(this,!1),n=this.getNodeHeight(this.DOM.dropdown),this.DOM.dropdown.classList.add("tagify__dropdown--initial"),this.dropdown.position.call(this,n),document.body.appendChild(this.DOM.dropdown),setTimeout((function(){return a.DOM.dropdown.classList.remove("tagify__dropdown--initial")}))),setTimeout(this.dropdown.events.binding.bind(this)))}},hide:function(t){var e=this.DOM,i=e.scope,s=e.dropdown,n="manual"==this.settings.dropdown.position&&!t;s&&document.body.contains(s)&&!n&&(window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),clearTimeout(this.dropdownHide__bindEventsTimeout),this.dropdownHide__bindEventsTimeout=setTimeout(this.events.binding.bind(this),250),i.setAttribute("aria-expanded",!1),s.parentNode.removeChild(s),this.state.dropdown.visible=!1,this.state.ddItemData=this.state.ddItemElm=this.state.selection=null,this.state.tag&&this.state.tag.value.length&&(this.state.flaggedTags[this.state.tag.baseOffset]=this.state.tag),this.trigger("dropdown:hide",s))},refilter:function(){this.suggestedListItems=this.dropdown.filterListItems.call(this,"");var t=this.dropdown.createListHTML.call(this,this.suggestedListItems);this.DOM.dropdown.content.innerHTML=h(t),this.trigger("dropdown:updated",this.DOM.dropdown)},position:function(t){var e,i,s,n,a,o,r=this.DOM.dropdown,l=this.DOM["input"==this.settings.dropdown.position?"input":"scope"];this.state.dropdown.visible&&(o="text"==this.settings.dropdown.position?(n=(i=this.getCaretGlobalPosition()).bottom,s=i.top,a=i.left,"auto"):(s=(i=l.getBoundingClientRect()).top,n=i.bottom-1,a=i.left,i.width+"px"),s=Math.floor(s),n=Math.ceil(n),e=document.documentElement.clientHeight-n<(t||r.clientHeight),r.style.cssText="left:"+(a+window.pageXOffset)+"px; width:"+o+";"+(e?"bottom:"+(document.documentElement.clientHeight-s-window.pageYOffset-2)+"px;":"top: "+(n+window.pageYOffset)+"px"),r.setAttribute("placement",e?"top":"bottom"))},events:{binding:function(t){var e=!(00||navigator.msMaxTouchPoints>0,inputEventName=isMSIE?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input",env={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:isMSIE,isEdge:isEdge,isFF:!isEdge&&/firefox/i.test(userAgent),isPhantom:/PhantomJS/i.test(userAgent),isWebkit:!isEdge&&/webkit/i.test(userAgent),isChrome:!isEdge&&/chrome/i.test(userAgent),isSafari:!isEdge&&/safari/i.test(userAgent)&&!/chrome/i.test(userAgent),browserVersion:browserVersion,jqueryVersion:parseFloat(external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.fn.jquery),isSupportAmd:isSupportAmd,isSupportTouch:isSupportTouch,isFontInstalled:env_isFontInstalled,isW3CRangeSupport:!!document.createRange,inputEventName:inputEventName,genericFontFamilies:genericFontFamilies,validFontName:validFontName};function eq(itemA){return function(itemB){return itemA===itemB}}function eq2(itemA,itemB){return itemA===itemB}function peq2(propName){return function(itemA,itemB){return itemA[propName]===itemB[propName]}}function ok(){return!0}function fail(){return!1}function not(f){return function(){return!f.apply(f,arguments)}}function and(fA,fB){return function(item){return fA(item)&&fB(item)}}function func_self(a){return a}function func_invoke(obj,method){return function(){return obj[method].apply(obj,arguments)}}var idCounter=0;function resetUniqueId(){idCounter=0}function uniqueId(prefix){var id=++idCounter+"";return prefix?prefix+id:id}function rect2bnd(rect){var $document=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(document);return{top:rect.top+$document.scrollTop(),left:rect.left+$document.scrollLeft(),width:rect.right-rect.left,height:rect.bottom-rect.top}}function invertObject(obj){var inverted={};for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(inverted[obj[key]]=key);return inverted}function namespaceToCamel(namespace,prefix){return(prefix=prefix||"")+namespace.split(".").map((function(name){return name.substring(0,1).toUpperCase()+name.substring(1)})).join("")}function debounce(func,wait,immediate){var timeout;return function(){var context=this,args=arguments,later=function later(){timeout=null,immediate||func.apply(context,args)},callNow=immediate&&!timeout;clearTimeout(timeout),timeout=setTimeout(later,wait),callNow&&func.apply(context,args)}}function isValidUrl(url){var expression;return/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi.test(url)}var func={eq:eq,eq2:eq2,peq2:peq2,ok:ok,fail:fail,self:func_self,not:not,and:and,invoke:func_invoke,resetUniqueId:resetUniqueId,uniqueId:uniqueId,rect2bnd:rect2bnd,invertObject:invertObject,namespaceToCamel:namespaceToCamel,debounce:debounce,isValidUrl:isValidUrl};function lists_head(array){return array[0]}function lists_last(array){return array[array.length-1]}function initial(array){return array.slice(0,array.length-1)}function tail(array){return array.slice(1)}function find(array,pred){for(var idx=0,len=array.length;idx";function nodeLength(node){return isText(node)?node.nodeValue.length:node?node.childNodes.length:0}function deepestChildIsEmpty(node){do{if(null===node.firstElementChild||""===node.firstElementChild.innerHTML)break}while(node=node.firstElementChild);return dom_isEmpty(node)}function dom_isEmpty(node){var len=nodeLength(node);return 0===len||(!isText(node)&&1===len&&node.innerHTML===blankHTML||!(!lists.all(node.childNodes,isText)||""!==node.innerHTML))}function paddingBlankHTML(node){isVoid(node)||nodeLength(node)||(node.innerHTML=blankHTML)}function dom_ancestor(node,pred){for(;node;){if(pred(node))return node;if(isEditable(node))break;node=node.parentNode}return null}function singleChildAncestor(node,pred){for(node=node.parentNode;node&&1===nodeLength(node);){if(pred(node))return node;if(isEditable(node))break;node=node.parentNode}return null}function listAncestor(node,pred){pred=pred||func.fail;var ancestors=[];return dom_ancestor(node,(function(el){return isEditable(el)||ancestors.push(el),pred(el)})),ancestors}function lastAncestor(node,pred){var ancestors=listAncestor(node);return lists.last(ancestors.filter(pred))}function dom_commonAncestor(nodeA,nodeB){for(var ancestors=listAncestor(nodeA),n=nodeB;n;n=n.parentNode)if(ancestors.indexOf(n)>-1)return n;return null}function listPrev(node,pred){pred=pred||func.fail;for(var nodes=[];node&&!pred(node);)nodes.push(node),node=node.previousSibling;return nodes}function listNext(node,pred){pred=pred||func.fail;for(var nodes=[];node&&!pred(node);)nodes.push(node),node=node.nextSibling;return nodes}function listDescendant(node,pred){var descendants=[];return pred=pred||func.ok,function fnWalk(current){node!==current&&pred(current)&&descendants.push(current);for(var idx=0,len=current.childNodes.length;idx")[0];return parent.insertBefore(wrapper,node),wrapper.appendChild(node),wrapper}function insertAfter(node,preceding){var next=preceding.nextSibling,parent=preceding.parentNode;return next?parent.insertBefore(node,next):parent.appendChild(node),node}function appendChildNodes(node,aChild){return external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.each(aChild,(function(idx,child){node.appendChild(child)})),node}function isLeftEdgePoint(point){return 0===point.offset}function isRightEdgePoint(point){return point.offset===nodeLength(point.node)}function isEdgePoint(point){return isLeftEdgePoint(point)||isRightEdgePoint(point)}function dom_isLeftEdgeOf(node,ancestor){for(;node&&node!==ancestor;){if(0!==dom_position(node))return!1;node=node.parentNode}return!0}function isRightEdgeOf(node,ancestor){if(!ancestor)return!1;for(;node&&node!==ancestor;){if(dom_position(node)!==nodeLength(node.parentNode)-1)return!1;node=node.parentNode}return!0}function isLeftEdgePointOf(point,ancestor){return isLeftEdgePoint(point)&&dom_isLeftEdgeOf(point.node,ancestor)}function isRightEdgePointOf(point,ancestor){return isRightEdgePoint(point)&&isRightEdgeOf(point.node,ancestor)}function dom_position(node){for(var offset=0;node=node.previousSibling;)offset+=1;return offset}function hasChildren(node){return!!(node&&node.childNodes&&node.childNodes.length)}function dom_prevPoint(point,isSkipInnerOffset){var node,offset;if(0===point.offset){if(isEditable(point.node))return null;node=point.node.parentNode,offset=dom_position(point.node)}else hasChildren(point.node)?offset=nodeLength(node=point.node.childNodes[point.offset-1]):(node=point.node,offset=isSkipInnerOffset?0:point.offset-1);return{node:node,offset:offset}}function dom_nextPoint(point,isSkipInnerOffset){var node,offset;if(nodeLength(point.node)===point.offset){if(isEditable(point.node))return null;var nextTextNode=getNextTextNode(point.node);nextTextNode?(node=nextTextNode,offset=0):(node=point.node.parentNode,offset=dom_position(point.node)+1)}else hasChildren(point.node)?(node=point.node.childNodes[point.offset],offset=0):(node=point.node,offset=isSkipInnerOffset?nodeLength(point.node):point.offset+1);return{node:node,offset:offset}}function nextPointWithEmptyNode(point,isSkipInnerOffset){var node,offset;if(dom_isEmpty(point.node))return{node:node=point.node.nextSibling,offset:offset=0};if(nodeLength(point.node)===point.offset){if(isEditable(point.node))return null;var nextTextNode=getNextTextNode(point.node);nextTextNode?(node=nextTextNode,offset=0):(node=point.node.parentNode,offset=dom_position(point.node)+1),isEditable(node)&&(node=point.node.nextSibling,offset=0)}else if(hasChildren(point.node)){if(offset=0,dom_isEmpty(node=point.node.childNodes[point.offset]))return null}else if(node=point.node,offset=isSkipInnerOffset?nodeLength(point.node):point.offset+1,dom_isEmpty(node))return null;return{node:node,offset:offset}}function getNextTextNode(actual){if(actual.nextSibling&&actual.parent===actual.nextSibling.parent)return isText(actual.nextSibling)?actual.nextSibling:getNextTextNode(actual.nextSibling)}function isSamePoint(pointA,pointB){return pointA.node===pointB.node&&pointA.offset===pointB.offset}function isVisiblePoint(point){if(isText(point.node)||!hasChildren(point.node)||dom_isEmpty(point.node))return!0;var leftNode=point.node.childNodes[point.offset-1],rightNode=point.node.childNodes[point.offset];return!(leftNode&&!isVoid(leftNode)||rightNode&&!isVoid(rightNode))}function prevPointUntil(point,pred){for(;point;){if(pred(point))return point;point=dom_prevPoint(point)}return null}function nextPointUntil(point,pred){for(;point;){if(pred(point))return point;point=dom_nextPoint(point)}return null}function isCharPoint(point){if(!isText(point.node))return!1;var ch=point.node.nodeValue.charAt(point.offset-1);return ch&&" "!==ch&&ch!==NBSP_CHAR}function isSpacePoint(point){if(!isText(point.node))return!1;var ch=point.node.nodeValue.charAt(point.offset-1);return" "===ch||ch===NBSP_CHAR}function walkPoint(startPoint,endPoint,handler,isSkipInnerOffset){for(var point=startPoint;point&&(handler(point),!isSamePoint(point,endPoint));){var isSkipOffset;point=nextPointWithEmptyNode(point,isSkipInnerOffset&&startPoint.node!==point.node&&endPoint.node!==point.node)}}function makeOffsetPath(ancestor,node){var ancestors;return listAncestor(node,func.eq(ancestor)).map(dom_position).reverse()}function fromOffsetPath(ancestor,offsets){for(var current=ancestor,i=0,len=offsets.length;i\s]*)(.*?)(\s*\/?>)/g;markup=(markup=markup.replace(regexTag,(function(match,endSlash,name){name=name.toUpperCase();var isEndOfInlineContainer=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(name)&&!!endSlash,isBlockNode=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(name);return match+(isEndOfInlineContainer||isBlockNode?"\n":"")}))).trim()}return markup}function posFromPlaceholder(placeholder){var $placeholder=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(placeholder),pos=$placeholder.offset(),height=$placeholder.outerHeight(!0);return{left:pos.left,top:pos.top+height}}function attachEvents($node,events){Object.keys(events).forEach((function(key){$node.on(key,events[key])}))}function detachEvents($node,events){Object.keys(events).forEach((function(key){$node.off(key,events[key])}))}function isCustomStyleTag(node){return node&&!isText(node)&&lists.contains(node.classList,"note-styletag")}var dom={NBSP_CHAR:NBSP_CHAR,ZERO_WIDTH_NBSP_CHAR:"\ufeff",blank:blankHTML,emptyPara:"

      ".concat(blankHTML,"

      "),makePredByNodeName:makePredByNodeName,isEditable:isEditable,isControlSizing:isControlSizing,isText:isText,isElement:isElement,isVoid:isVoid,isPara:isPara,isPurePara:isPurePara,isHeading:isHeading,isInline:dom_isInline,isBlock:func.not(dom_isInline),isBodyInline:isBodyInline,isBody:isBody,isParaInline:isParaInline,isPre:isPre,isList:isList,isTable:isTable,isData:isData,isCell:dom_isCell,isBlockquote:isBlockquote,isBodyContainer:isBodyContainer,isAnchor:isAnchor,isDiv:makePredByNodeName("DIV"),isLi:isLi,isBR:makePredByNodeName("BR"),isSpan:makePredByNodeName("SPAN"),isB:makePredByNodeName("B"),isU:makePredByNodeName("U"),isS:makePredByNodeName("S"),isI:makePredByNodeName("I"),isImg:makePredByNodeName("IMG"),isTextarea:isTextarea,deepestChildIsEmpty:deepestChildIsEmpty,isEmpty:dom_isEmpty,isEmptyAnchor:func.and(isAnchor,dom_isEmpty),isClosestSibling:isClosestSibling,withClosestSiblings:withClosestSiblings,nodeLength:nodeLength,isLeftEdgePoint:isLeftEdgePoint,isRightEdgePoint:isRightEdgePoint,isEdgePoint:isEdgePoint,isLeftEdgeOf:dom_isLeftEdgeOf,isRightEdgeOf:isRightEdgeOf,isLeftEdgePointOf:isLeftEdgePointOf,isRightEdgePointOf:isRightEdgePointOf,prevPoint:dom_prevPoint,nextPoint:dom_nextPoint,nextPointWithEmptyNode:nextPointWithEmptyNode,isSamePoint:isSamePoint,isVisiblePoint:isVisiblePoint,prevPointUntil:prevPointUntil,nextPointUntil:nextPointUntil,isCharPoint:isCharPoint,isSpacePoint:isSpacePoint,walkPoint:walkPoint,ancestor:dom_ancestor,singleChildAncestor:singleChildAncestor,listAncestor:listAncestor,lastAncestor:lastAncestor,listNext:listNext,listPrev:listPrev,listDescendant:listDescendant,commonAncestor:dom_commonAncestor,wrap:wrap,insertAfter:insertAfter,appendChildNodes:appendChildNodes,position:dom_position,hasChildren:hasChildren,makeOffsetPath:makeOffsetPath,fromOffsetPath:fromOffsetPath,splitTree:splitTree,splitPoint:splitPoint,create:dom_create,createText:createText,remove:remove,removeWhile:removeWhile,replace:dom_replace,html:dom_html,value:dom_value,posFromPlaceholder:posFromPlaceholder,attachEvents:attachEvents,detachEvents:detachEvents,isCustomStyleTag:isCustomStyleTag};function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i1,moduleName=hasSeparator&&lists.head(splits),methodName=hasSeparator?lists.last(splits):lists.head(splits),module=this.modules[moduleName||"editor"];return!moduleName&&this[methodName]?this[methodName].apply(this,args):module&&module[methodName]&&module.shouldInitialize()?module[methodName].apply(module,args):void 0}}]),Context}();function range_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function range_defineProperties(target,props){for(var i=0;i=0)break;prevContainer=childNodes[offset]}if(0!==offset&&dom.isText(childNodes[offset-1])){var textRangeStart=document.body.createTextRange(),curTextNode=null;textRangeStart.moveToElementText(prevContainer||container),textRangeStart.collapse(!prevContainer),curTextNode=prevContainer?prevContainer.nextSibling:container.firstChild;var pointTester=textRange.duplicate();pointTester.setEndPoint("StartToStart",textRangeStart);for(var textCount=pointTester.text.replace(/[\r\n]/g,"").length;textCount>curTextNode.nodeValue.length&&curTextNode.nextSibling;)textCount-=curTextNode.nodeValue.length,curTextNode=curTextNode.nextSibling;var dummy=curTextNode.nodeValue;isStart&&curTextNode.nextSibling&&dom.isText(curTextNode.nextSibling)&&textCount===curTextNode.nodeValue.length&&(textCount-=curTextNode.nodeValue.length,curTextNode=curTextNode.nextSibling),container=curTextNode,offset=textCount}return{cont:container,offset:offset}}function pointToTextRange(point){var textRangeInfo=function textRangeInfo(container,offset){var node,isCollapseToStart;if(dom.isText(container)){var prevTextNodes=dom.listPrev(container,func.not(dom.isText)),prevContainer=lists.last(prevTextNodes).previousSibling;node=prevContainer||container.parentNode,offset+=lists.sum(lists.tail(prevTextNodes),dom.nodeLength),isCollapseToStart=!prevContainer}else{if(node=container.childNodes[offset]||container,dom.isText(node))return textRangeInfo(node,0);offset=0,isCollapseToStart=!1}return{node:node,collapseToStart:isCollapseToStart,offset:offset}},textRange=document.body.createTextRange(),info=textRangeInfo(point.node,point.offset);return textRange.moveToElementText(info.node),textRange.collapse(info.collapseToStart),textRange.moveStart("character",info.offset),textRange}external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.fn.extend({summernote:function summernote(){var type=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.type(lists.head(arguments)),isExternalAPICalled="string"===type,hasInitOptions="object"===type,options=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.extend({},external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.summernote.options,hasInitOptions?lists.head(arguments):{});options.langInfo=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.extend(!0,{},external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.summernote.lang["en-US"],external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.summernote.lang[options.lang]),options.icons=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.extend(!0,{},external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.summernote.options.icons,options.icons),options.tooltip="auto"===options.tooltip?!env.isSupportTouch:options.tooltip,this.each((function(idx,note){var $note=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(note);if(!$note.data("summernote")){var context=new Context_Context($note,options);$note.data("summernote",context),$note.data("summernote").triggerEvent("init",context.layoutInfo)}}));var $note=this.first();if($note.length){var context=$note.data("summernote");if(isExternalAPICalled)return context.invoke.apply(context,lists.from(arguments));options.focus&&context.invoke("editor.focus")}return this}});var range_WrappedRange=function(){function WrappedRange(sc,so,ec,eo){range_classCallCheck(this,WrappedRange),this.sc=sc,this.so=so,this.ec=ec,this.eo=eo,this.isOnEditable=this.makeIsOn(dom.isEditable),this.isOnList=this.makeIsOn(dom.isList),this.isOnAnchor=this.makeIsOn(dom.isAnchor),this.isOnCell=this.makeIsOn(dom.isCell),this.isOnData=this.makeIsOn(dom.isData)}return range_createClass(WrappedRange,[{key:"nativeRange",value:function nativeRange(){if(env.isW3CRangeSupport){var w3cRange=document.createRange();return w3cRange.setStart(this.sc,this.so),w3cRange.setEnd(this.ec,this.eo),w3cRange}var textRange=pointToTextRange({node:this.sc,offset:this.so});return textRange.setEndPoint("EndToEnd",pointToTextRange({node:this.ec,offset:this.eo})),textRange}},{key:"getPoints",value:function getPoints(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}}},{key:"getStartPoint",value:function getStartPoint(){return{node:this.sc,offset:this.so}}},{key:"getEndPoint",value:function getEndPoint(){return{node:this.ec,offset:this.eo}}},{key:"select",value:function select(){var nativeRng=this.nativeRange();if(env.isW3CRangeSupport){var selection=document.getSelection();selection.rangeCount>0&&selection.removeAllRanges(),selection.addRange(nativeRng)}else nativeRng.select();return this}},{key:"scrollIntoView",value:function scrollIntoView(container){var height=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(container).height();return container.scrollTop+height0?rng.so-1:0];if(topAncestor){var inlineSiblings=dom.listPrev(topAncestor,dom.isParaInline).reverse();if((inlineSiblings=inlineSiblings.concat(dom.listNext(topAncestor.nextSibling,dom.isParaInline))).length){var para=dom.wrap(lists.head(inlineSiblings),"p");dom.appendChildNodes(para,lists.tail(inlineSiblings))}}return this.normalize()}},{key:"insertNode",value:function insertNode(node){var rng=this;(dom.isText(node)||dom.isInline(node))&&(rng=this.wrapBodyInlineWithPara().deleteContents());var info=dom.splitPoint(rng.getStartPoint(),dom.isInline(node));return info.rightNode?(info.rightNode.parentNode.insertBefore(node,info.rightNode),dom.isEmpty(info.rightNode)&&dom.isPara(node)&&info.rightNode.parentNode.removeChild(info.rightNode)):info.container.appendChild(node),node}},{key:"pasteHTML",value:function pasteHTML(markup){markup=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.trim(markup);var contentsContainer=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()("
      ").html(markup)[0],childNodes=lists.from(contentsContainer.childNodes),rng=this,reversed=!1;return rng.so>=0&&(childNodes=childNodes.reverse(),reversed=!0),childNodes=childNodes.map((function(childNode){return rng.insertNode(childNode)})),reversed&&(childNodes=childNodes.reverse()),childNodes}},{key:"toString",value:function toString(){var nativeRng=this.nativeRange();return env.isW3CRangeSupport?nativeRng.toString():nativeRng.text}},{key:"getWordRange",value:function getWordRange(findAfter){var endPoint=this.getEndPoint();if(!dom.isCharPoint(endPoint))return this;var startPoint=dom.prevPointUntil(endPoint,(function(point){return!dom.isCharPoint(point)}));return findAfter&&(endPoint=dom.nextPointUntil(endPoint,(function(point){return!dom.isCharPoint(point)}))),new WrappedRange(startPoint.node,startPoint.offset,endPoint.node,endPoint.offset)}},{key:"getWordsRange",value:function getWordsRange(findAfter){var endPoint=this.getEndPoint(),isNotTextPoint=function isNotTextPoint(point){return!dom.isCharPoint(point)&&!dom.isSpacePoint(point)};if(isNotTextPoint(endPoint))return this;var startPoint=dom.prevPointUntil(endPoint,isNotTextPoint);return findAfter&&(endPoint=dom.nextPointUntil(endPoint,isNotTextPoint)),new WrappedRange(startPoint.node,startPoint.offset,endPoint.node,endPoint.offset)}},{key:"getWordsMatchRange",value:function getWordsMatchRange(regex){var endPoint=this.getEndPoint(),startPoint=dom.prevPointUntil(endPoint,(function(point){if(!dom.isCharPoint(point)&&!dom.isSpacePoint(point))return!0;var rng=new WrappedRange(point.node,point.offset,endPoint.node,endPoint.offset),result=regex.exec(rng.toString());return result&&0===result.index})),rng=new WrappedRange(startPoint.node,startPoint.offset,endPoint.node,endPoint.offset),text=rng.toString(),result=regex.exec(text);return result&&result[0].length===text.length?rng:null}},{key:"bookmark",value:function bookmark(editable){return{s:{path:dom.makeOffsetPath(editable,this.sc),offset:this.so},e:{path:dom.makeOffsetPath(editable,this.ec),offset:this.eo}}}},{key:"paraBookmark",value:function paraBookmark(paras){return{s:{path:lists.tail(dom.makeOffsetPath(lists.head(paras),this.sc)),offset:this.so},e:{path:lists.tail(dom.makeOffsetPath(lists.last(paras),this.ec)),offset:this.eo}}}},{key:"getClientRects",value:function getClientRects(){var nativeRng;return this.nativeRange().getClientRects()}}]),WrappedRange}(),range={create:function create(sc,so,ec,eo){if(4===arguments.length)return new range_WrappedRange(sc,so,ec,eo);if(2===arguments.length)return new range_WrappedRange(sc,so,ec=sc,eo=so);var wrappedRange=this.createFromSelection();if(!wrappedRange&&1===arguments.length){var bodyElement=arguments[0];return dom.isEditable(bodyElement)&&(bodyElement=bodyElement.lastChild),this.createFromBodyElement(bodyElement,dom.emptyPara===arguments[0].innerHTML)}return wrappedRange},createFromBodyElement:function createFromBodyElement(bodyElement){var isCollapseToStart=arguments.length>1&&void 0!==arguments[1]&&arguments[1],wrappedRange=this.createFromNode(bodyElement);return wrappedRange.collapse(isCollapseToStart)},createFromSelection:function createFromSelection(){var sc,so,ec,eo;if(env.isW3CRangeSupport){var selection=document.getSelection();if(!selection||0===selection.rangeCount)return null;if(dom.isBody(selection.anchorNode))return null;var nativeRng=selection.getRangeAt(0);sc=nativeRng.startContainer,so=nativeRng.startOffset,ec=nativeRng.endContainer,eo=nativeRng.endOffset}else{var textRange=document.selection.createRange(),textRangeEnd=textRange.duplicate();textRangeEnd.collapse(!1);var textRangeStart=textRange;textRangeStart.collapse(!0);var startPoint=textRangeToPoint(textRangeStart,!0),endPoint=textRangeToPoint(textRangeEnd,!1);dom.isText(startPoint.node)&&dom.isLeftEdgePoint(startPoint)&&dom.isTextNode(endPoint.node)&&dom.isRightEdgePoint(endPoint)&&endPoint.node.nextSibling===startPoint.node&&(startPoint=endPoint),sc=startPoint.cont,so=startPoint.offset,ec=endPoint.cont,eo=endPoint.offset}return new range_WrappedRange(sc,so,ec,eo)},createFromNode:function createFromNode(node){var sc=node,so=0,ec=node,eo=dom.nodeLength(ec);return dom.isVoid(sc)&&(so=dom.listPrev(sc).length-1,sc=sc.parentNode),dom.isBR(ec)?(eo=dom.listPrev(ec).length-1,ec=ec.parentNode):dom.isVoid(ec)&&(eo=dom.listPrev(ec).length,ec=ec.parentNode),this.create(sc,so,ec,eo)},createFromNodeBefore:function createFromNodeBefore(node){return this.createFromNode(node).collapse(!0)},createFromNodeAfter:function createFromNodeAfter(node){return this.createFromNode(node).collapse()},createFromBookmark:function createFromBookmark(editable,bookmark){var sc=dom.fromOffsetPath(editable,bookmark.s.path),so=bookmark.s.offset,ec=dom.fromOffsetPath(editable,bookmark.e.path),eo=bookmark.e.offset;return new range_WrappedRange(sc,so,ec,eo)},createFromParaBookmark:function createFromParaBookmark(bookmark,paras){var so=bookmark.s.offset,eo=bookmark.e.offset,sc=dom.fromOffsetPath(lists.head(paras),bookmark.s.path),ec=dom.fromOffsetPath(lists.last(paras),bookmark.e.path);return new range_WrappedRange(sc,so,ec,eo)}},KEY_MAP={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,DELETE:46,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUM0:48,NUM1:49,NUM2:50,NUM3:51,NUM4:52,NUM5:53,NUM6:54,NUM7:55,NUM8:56,B:66,E:69,I:73,J:74,K:75,L:76,R:82,S:83,U:85,V:86,Y:89,Z:90,SLASH:191,LEFTBRACKET:219,BACKSLASH:220,RIGHTBRACKET:221,HOME:36,END:35,PAGEUP:33,PAGEDOWN:34},core_key={isEdit:function isEdit(keyCode){return lists.contains([KEY_MAP.BACKSPACE,KEY_MAP.TAB,KEY_MAP.ENTER,KEY_MAP.SPACE,KEY_MAP.DELETE],keyCode)},isMove:function isMove(keyCode){return lists.contains([KEY_MAP.LEFT,KEY_MAP.UP,KEY_MAP.RIGHT,KEY_MAP.DOWN],keyCode)},isNavigation:function isNavigation(keyCode){return lists.contains([KEY_MAP.HOME,KEY_MAP.END,KEY_MAP.PAGEUP,KEY_MAP.PAGEDOWN],keyCode)},nameFromCode:func.invertObject(KEY_MAP),code:KEY_MAP};function readFileAsDataURL(file){return external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.Deferred((function(deferred){external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.extend(new FileReader,{onload:function onload(e){var dataURL=e.target.result;deferred.resolve(dataURL)},onerror:function onerror(err){deferred.reject(err)}}).readAsDataURL(file)})).promise()}function createImage(url){return external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.Deferred((function(deferred){var $img=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()("");$img.one("load",(function(){$img.off("error abort"),deferred.resolve($img)})).one("error abort",(function(){$img.off("load").detach(),deferred.reject($img)})).css({display:"none"}).appendTo(document.body).attr("src",url)})).promise()}function History_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function History_defineProperties(target,props){for(var i=0;i0&&(this.stackOffset--,this.applySnapshot(this.stack[this.stackOffset]))}},{key:"redo",value:function redo(){this.stack.length-1>this.stackOffset&&(this.stackOffset++,this.applySnapshot(this.stack[this.stackOffset]))}},{key:"recordUndo",value:function recordUndo(){this.stackOffset++,this.stack.length>this.stackOffset&&(this.stack=this.stack.slice(0,this.stackOffset)),this.stack.push(this.makeSnapshot()),this.stack.length>this.context.options.historyLimit&&(this.stack.shift(),this.stackOffset-=1)}}]),History}();function Style_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Style_defineProperties(target,props){for(var i=0;i-1;styleInfo["list-style"]=isUnordered?"unordered":"ordered"}else styleInfo["list-style"]="none";var para=dom.ancestor(rng.sc,dom.isPara);if(para&¶.style["line-height"])styleInfo["line-height"]=para.style.lineHeight;else{var lineHeight=parseInt(styleInfo["line-height"],10)/parseInt(styleInfo["font-size"],10);styleInfo["line-height"]=lineHeight.toFixed(1)}return styleInfo.anchor=rng.isOnAnchor()&&dom.ancestor(rng.sc,dom.isAnchor),styleInfo.ancestors=dom.listAncestor(rng.sc,dom.isEditable),styleInfo.range=rng,styleInfo}}]),Style}();function Bullet_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Bullet_defineProperties(target,props){for(var i=0;i25?val-25:""}))}))})),rng.select()}},{key:"toggleList",value:function toggleList(listName,editable){var _this3=this,rng=range.create(editable).wrapBodyInlineWithPara(),paras=rng.nodes(dom.isPara,{includeAncestor:!0}),bookmark=rng.paraBookmark(paras),clustereds=lists.clusterBy(paras,func.peq2("parentNode"));if(lists.find(paras,dom.isPurePara)){var wrappedParas=[];external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.each(clustereds,(function(idx,paras){wrappedParas=wrappedParas.concat(_this3.wrapList(paras,listName))})),paras=wrappedParas}else{var diffLists=rng.nodes(dom.isList,{includeAncestor:!0}).filter((function(listNode){return!external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.nodeName(listNode,listName)}));diffLists.length?external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.each(diffLists,(function(idx,listNode){dom.replace(listNode,listName)})):paras=this.releaseList(clustereds,!0)}range.createFromParaBookmark(bookmark,paras).select()}},{key:"wrapList",value:function wrapList(paras,listName){var head=lists.head(paras),last=lists.last(paras),prevList=dom.isList(head.previousSibling)&&head.previousSibling,nextList=dom.isList(last.nextSibling)&&last.nextSibling,listNode=prevList||dom.insertAfter(dom.create(listName||"UL"),last);return paras=paras.map((function(para){return dom.isPurePara(para)?dom.replace(para,"LI"):para})),dom.appendChildNodes(listNode,paras),nextList&&(dom.appendChildNodes(listNode,lists.from(nextList.childNodes)),dom.remove(nextList)),paras}},{key:"releaseList",value:function releaseList(clustereds,isEscapseToBody){var _this4=this,releasedParas=[];return external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.each(clustereds,(function(idx,paras){var head=lists.head(paras),last=lists.last(paras),headList=isEscapseToBody?dom.lastAncestor(head,dom.isList):head.parentNode,parentItem=headList.parentNode;if("LI"===headList.parentNode.nodeName)paras.map((function(para){var newList=_this4.findNextSiblings(para);parentItem.nextSibling?parentItem.parentNode.insertBefore(para,parentItem.nextSibling):parentItem.parentNode.appendChild(para),newList.length&&(_this4.wrapList(newList,headList.nodeName),para.appendChild(newList[0].parentNode))})),0===headList.children.length&&parentItem.removeChild(headList),0===parentItem.childNodes.length&&parentItem.parentNode.removeChild(parentItem);else{var lastList=headList.childNodes.length>1?dom.splitTree(headList,{node:last.parentNode,offset:dom.position(last)+1},{isSkipPaddingBlankHTML:!0}):null,middleList=dom.splitTree(headList,{node:head.parentNode,offset:dom.position(head)},{isSkipPaddingBlankHTML:!0});paras=isEscapseToBody?dom.listDescendant(middleList,dom.isLi):lists.from(middleList.childNodes).filter(dom.isLi),!isEscapseToBody&&dom.isList(headList.parentNode)||(paras=paras.map((function(para){return dom.replace(para,"P")}))),external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.each(lists.from(paras).reverse(),(function(idx,para){dom.insertAfter(para,headList)}));var rootLists=lists.compact([headList,middleList,lastList]);external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.each(rootLists,(function(idx,rootList){var listNodes=[rootList].concat(dom.listDescendant(rootList,dom.isList));external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.each(listNodes.reverse(),(function(idx,listNode){dom.nodeLength(listNode)||dom.remove(listNode,!0)}))}))}releasedParas=releasedParas.concat(paras)})),releasedParas}},{key:"appendToPrevious",value:function appendToPrevious(node){return node.previousSibling?dom.appendChildNodes(node.previousSibling,[node]):this.wrapList([node],"LI")}},{key:"findList",value:function findList(node){return node?lists.find(node.children,(function(child){return["OL","UL"].indexOf(child.nodeName)>-1})):null}},{key:"findNextSiblings",value:function findNextSiblings(node){for(var siblings=[];node.nextSibling;)siblings.push(node.nextSibling),node=node.nextSibling;return siblings}}]),Bullet}();function Typing_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Typing_defineProperties(target,props){for(var i=0;i1,cellHasRowspan=cell.rowSpan>1,isThisSelectedCell=row.rowIndex===_startPoint.rowPos&&cell.cellIndex===_startPoint.colPos;setVirtualTablePosition(row.rowIndex,cellIndex,row,cell,cellHasRowspan,cellHasColspan,!1);var rowspanNumber=cell.attributes.rowSpan?parseInt(cell.attributes.rowSpan.value,10):0;if(rowspanNumber>1)for(var rp=1;rp1)for(var cp=1;cp=cell.cellIndex&&cell.cellIndex<=cellIndex&&!isSelectedCell&&_startPoint.colPos++}function createVirtualTable(){for(var rows=domTable.rows,rowIndex=0;rowIndex=0?fixedRow:actualPosition,colPosition=fixedCol>=0?fixedCol:actualPosition,row=_virtualTable[rowPosition];if(!row)return canContinue=!1,_actionCellList;var cell=row[colPosition];if(!cell)return canContinue=!1,_actionCellList;var resultAction=TableResultAction.resultAction.Ignore;switch(action){case TableResultAction.requestAction.Add:resultAction=getAddResultActionToCell(cell);break;case TableResultAction.requestAction.Delete:resultAction=getDeleteResultActionToCell(cell)}_actionCellList.push(getActionCell(cell,resultAction,rowPosition,colPosition)),actualPosition++}return _actionCellList},init()};TableResultAction.where={Row:0,Column:1},TableResultAction.requestAction={Add:0,Delete:1},TableResultAction.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var Table_Table=function(){function Table(){Table_classCallCheck(this,Table)}return Table_createClass(Table,[{key:"tab",value:function tab(rng,isShift){var cell=dom.ancestor(rng.commonAncestor(),dom.isCell),table=dom.ancestor(cell,dom.isTable),cells=dom.listDescendant(table,dom.isCell),nextCell=lists[isShift?"prev":"next"](cells,cell);nextCell&&range.create(nextCell,0).select()}},{key:"addRow",value:function addRow(rng,position){for(var cell=dom.ancestor(rng.commonAncestor(),dom.isCell),currentTr=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(cell).closest("tr"),trAttributes=this.recoverAttributes(currentTr),html=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(""),vTable,actions=new TableResultAction(cell,TableResultAction.where.Row,TableResultAction.requestAction.Add,external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(currentTr).closest("table")[0]).getActionList(),idCell=0;idCell"+dom.blank+"");break;case TableResultAction.resultAction.SumSpanCount:var baseCellTr,isTopFromRowSpan;if("top"===position)if((currentCell.baseCell.parent?currentCell.baseCell.closest("tr").rowIndex:0)<=currentTr[0].rowIndex){var newTd=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()("
      ").append(external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(""+dom.blank+"").removeAttr("rowspan")).html();html.append(newTd);break}var rowspanNumber=parseInt(currentCell.baseCell.rowSpan,10);rowspanNumber++,currentCell.baseCell.setAttribute("rowSpan",rowspanNumber)}}if("top"===position)currentTr.before(html);else{var cellHasRowspan;if(cell.rowSpan>1){var lastTrIndex=currentTr[0].rowIndex+(cell.rowSpan-2);return void external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(currentTr).parent().find("tr")[lastTrIndex]).after(external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(html))}currentTr.after(html)}}},{key:"addCol",value:function addCol(rng,position){var cell=dom.ancestor(rng.commonAncestor(),dom.isCell),row=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(cell).closest("tr"),rowsGroup;external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(row).siblings().push(row);for(var vTable,actions=new TableResultAction(cell,TableResultAction.where.Column,TableResultAction.requestAction.Add,external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(row).closest("table")[0]).getActionList(),actionIndex=0;actionIndex"+dom.blank+""):external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(currentCell.baseCell).before(""+dom.blank+"");break;case TableResultAction.resultAction.SumSpanCount:if("right"===position){var colspanNumber=parseInt(currentCell.baseCell.colSpan,10);colspanNumber++,currentCell.baseCell.setAttribute("colSpan",colspanNumber)}else external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(currentCell.baseCell).before(""+dom.blank+"")}}}},{key:"recoverAttributes",value:function recoverAttributes(el){var resultStr="";if(!el)return resultStr;for(var attrList=el.attributes||[],i=0;i1,rowspanNumber=hasRowspan?parseInt(baseCell.rowSpan,10):0;switch(actions[actionIndex].action){case TableResultAction.resultAction.Ignore:continue;case TableResultAction.resultAction.AddCell:var nextRow=row.next("tr")[0];if(!nextRow)continue;var cloneRow=row[0].cells[cellPos];hasRowspan&&(rowspanNumber>2?(rowspanNumber--,nextRow.insertBefore(cloneRow,nextRow.cells[cellPos]),nextRow.cells[cellPos].setAttribute("rowSpan",rowspanNumber),nextRow.cells[cellPos].innerHTML=""):2===rowspanNumber&&(nextRow.insertBefore(cloneRow,nextRow.cells[cellPos]),nextRow.cells[cellPos].removeAttribute("rowSpan"),nextRow.cells[cellPos].innerHTML=""));continue;case TableResultAction.resultAction.SubtractSpanCount:hasRowspan&&(rowspanNumber>2?(rowspanNumber--,baseCell.setAttribute("rowSpan",rowspanNumber),virtualPosition.rowIndex!==rowPos&&baseCell.cellIndex===cellPos&&(baseCell.innerHTML="")):2===rowspanNumber&&(baseCell.removeAttribute("rowSpan"),virtualPosition.rowIndex!==rowPos&&baseCell.cellIndex===cellPos&&(baseCell.innerHTML="")));continue;case TableResultAction.resultAction.RemoveCell:continue}}row.remove()}},{key:"deleteCol",value:function deleteCol(rng){for(var cell=dom.ancestor(rng.commonAncestor(),dom.isCell),row=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(cell).closest("tr"),cellPos=row.children("td, th").index(external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(cell)),vTable,actions=new TableResultAction(cell,TableResultAction.where.Column,TableResultAction.requestAction.Delete,external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(row).closest("table")[0]).getActionList(),actionIndex=0;actionIndex1){var colspanNumber=baseCell.colSpan?parseInt(baseCell.colSpan,10):0;colspanNumber>2?(colspanNumber--,baseCell.setAttribute("colSpan",colspanNumber),baseCell.cellIndex===cellPos&&(baseCell.innerHTML="")):2===colspanNumber&&(baseCell.removeAttribute("colSpan"),baseCell.cellIndex===cellPos&&(baseCell.innerHTML=""))}continue;case TableResultAction.resultAction.RemoveCell:dom.remove(actions[actionIndex].baseCell,!0);continue}}},{key:"createTable",value:function createTable(colCount,rowCount,options){for(var tds=[],tdHTML,idxCol=0;idxCol"+dom.blank+"");tdHTML=tds.join("");for(var trs=[],trHTML,idxRow=0;idxRow"+tdHTML+"");trHTML=trs.join("");var $table=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(""+trHTML+"
      ");return options&&options.tableClassName&&$table.addClass(options.tableClassName),$table[0]}},{key:"deleteTable",value:function deleteTable(rng){var cell=dom.ancestor(rng.commonAncestor(),dom.isCell);external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(cell).closest("table").remove()}}]),Table}();function Editor_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Editor_defineProperties(target,props){for(var i=0;i0&&_this.isLimited(additionalTextLength))){var isTextChanged=rng.toString()!==linkText;"string"==typeof linkUrl&&(linkUrl=linkUrl.trim()),_this.options.onCreateLink?linkUrl=_this.options.onCreateLink(linkUrl):checkProtocol&&(linkUrl=/^([A-Za-z][A-Za-z0-9+-.]*\:|#|\/)/.test(linkUrl)?linkUrl:_this.options.defaultProtocol+linkUrl);var anchors=[];if(isTextChanged){var anchor=(rng=rng.deleteContents()).insertNode(external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(""+linkText+"")[0]);anchors.push(anchor)}else anchors=_this.style.styleNodes(rng,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.each(anchors,(function(idx,anchor){external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(anchor).attr("href",linkUrl),isNewWindow?external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(anchor).attr("target","_blank"):external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(anchor).removeAttr("target")})),_this.setLastRange(_this.createRangeFromList(anchors).select())}})),this.color=this.wrapCommand((function(colorInfo){var foreColor=colorInfo.foreColor,backColor=colorInfo.backColor;foreColor&&document.execCommand("foreColor",!1,foreColor),backColor&&document.execCommand("backColor",!1,backColor)})),this.foreColor=this.wrapCommand((function(colorInfo){document.execCommand("foreColor",!1,colorInfo)})),this.insertTable=this.wrapCommand((function(dim){var dimension=dim.split("x"),rng;_this.getLastRange().deleteContents().insertNode(_this.table.createTable(dimension[0],dimension[1],_this.options))})),this.removeMedia=this.wrapCommand((function(){var $target=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(_this.restoreTarget()).parent();$target.closest("figure").length?$target.closest("figure").remove():$target=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(_this.restoreTarget()).detach(),_this.context.triggerEvent("media.delete",$target,_this.$editable)})),this.floatMe=this.wrapCommand((function(value){var $target=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(_this.restoreTarget());$target.toggleClass("note-float-left","left"===value),$target.toggleClass("note-float-right","right"===value),$target.css("float","none"===value?"":value)})),this.resize=this.wrapCommand((function(value){var $target=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(_this.restoreTarget());0===(value=parseFloat(value))?$target.css("width",""):$target.css({width:100*value+"%",height:""})}))}return Editor_createClass(Editor,[{key:"initialize",value:function initialize(){var _this2=this;this.$editable.on("keydown",(function(event){if(event.keyCode===core_key.code.ENTER&&_this2.context.triggerEvent("enter",event),_this2.context.triggerEvent("keydown",event),_this2.snapshot=_this2.history.makeSnapshot(),_this2.hasKeyShortCut=!1,event.isDefaultPrevented()||(_this2.options.shortcuts?_this2.hasKeyShortCut=_this2.handleKeyMap(event):_this2.preventDefaultEditableShortCuts(event)),_this2.isLimited(1,event)){var lastRange=_this2.getLastRange();if(lastRange.eo-lastRange.so==0)return!1}_this2.setLastRange(),_this2.options.recordEveryKeystroke&&!1===_this2.hasKeyShortCut&&_this2.history.recordUndo()})).on("keyup",(function(event){_this2.setLastRange(),_this2.context.triggerEvent("keyup",event)})).on("focus",(function(event){_this2.setLastRange(),_this2.context.triggerEvent("focus",event)})).on("blur",(function(event){_this2.context.triggerEvent("blur",event)})).on("mousedown",(function(event){_this2.context.triggerEvent("mousedown",event)})).on("mouseup",(function(event){_this2.setLastRange(),_this2.history.recordUndo(),_this2.context.triggerEvent("mouseup",event)})).on("scroll",(function(event){_this2.context.triggerEvent("scroll",event)})).on("paste",(function(event){_this2.setLastRange(),_this2.context.triggerEvent("paste",event)})).on("input",(function(){_this2.isLimited(0)&&_this2.snapshot&&_this2.history.applySnapshot(_this2.snapshot)})),this.$editable.attr("spellcheck",this.options.spellCheck),this.$editable.attr("autocorrect",this.options.spellCheck),this.options.disableGrammar&&this.$editable.attr("data-gramm",!1),this.$editable.html(dom.html(this.$note)||dom.emptyPara),this.$editable.on(env.inputEventName,func.debounce((function(){_this2.context.triggerEvent("change",_this2.$editable.html(),_this2.$editable)}),10)),this.$editable.on("focusin",(function(event){_this2.context.triggerEvent("focusin",event)})).on("focusout",(function(event){_this2.context.triggerEvent("focusout",event)})),this.options.airMode?this.options.overrideContextMenu&&this.$editor.on("contextmenu",(function(event){return _this2.context.triggerEvent("contextmenu",event),!1})):(this.options.width&&this.$editor.outerWidth(this.options.width),this.options.height&&this.$editable.outerHeight(this.options.height),this.options.maxHeight&&this.$editable.css("max-height",this.options.maxHeight),this.options.minHeight&&this.$editable.css("min-height",this.options.minHeight)),this.history.recordUndo(),this.setLastRange()}},{key:"destroy",value:function destroy(){this.$editable.off()}},{key:"handleKeyMap",value:function handleKeyMap(event){var keyMap=this.options.keyMap[env.isMac?"mac":"pc"],keys=[];event.metaKey&&keys.push("CMD"),event.ctrlKey&&!event.altKey&&keys.push("CTRL"),event.shiftKey&&keys.push("SHIFT");var keyName=core_key.nameFromCode[event.keyCode];keyName&&keys.push(keyName);var eventName=keyMap[keys.join("+")];if("TAB"!==keyName||this.options.tabDisable)if(eventName){if(!1!==this.context.invoke(eventName))return event.preventDefault(),!0}else core_key.isEdit(event.keyCode)&&this.afterCommand();else this.afterCommand();return!1}},{key:"preventDefaultEditableShortCuts",value:function preventDefaultEditableShortCuts(event){(event.ctrlKey||event.metaKey)&&lists.contains([66,73,85],event.keyCode)&&event.preventDefault()}},{key:"isLimited",value:function isLimited(pad,event){return pad=pad||0,(void 0===event||!(core_key.isMove(event.keyCode)||core_key.isNavigation(event.keyCode)||event.ctrlKey||event.metaKey||lists.contains([core_key.code.BACKSPACE,core_key.code.DELETE],event.keyCode)))&&(this.options.maxTextLength>0&&this.$editable.text().length+pad>this.options.maxTextLength)}},{key:"createRange",value:function createRange(){return this.focus(),this.setLastRange(),this.getLastRange()}},{key:"createRangeFromList",value:function createRangeFromList(lst){var startRange,startPoint=range.createFromNodeBefore(lists.head(lst)).getStartPoint(),endRange,endPoint=range.createFromNodeAfter(lists.last(lst)).getEndPoint();return range.create(startPoint.node,startPoint.offset,endPoint.node,endPoint.offset)}},{key:"setLastRange",value:function setLastRange(rng){rng?this.lastRange=rng:(this.lastRange=range.create(this.editable),0===external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(this.lastRange.sc).closest(".note-editable").length&&(this.lastRange=range.createFromBodyElement(this.editable)))}},{key:"getLastRange",value:function getLastRange(){return this.lastRange||this.setLastRange(),this.lastRange}},{key:"saveRange",value:function saveRange(thenCollapse){thenCollapse&&this.getLastRange().collapse().select()}},{key:"restoreRange",value:function restoreRange(){this.lastRange&&(this.lastRange.select(),this.focus())}},{key:"saveTarget",value:function saveTarget(node){this.$editable.data("target",node)}},{key:"clearTarget",value:function clearTarget(){this.$editable.removeData("target")}},{key:"restoreTarget",value:function restoreTarget(){return this.$editable.data("target")}},{key:"currentStyle",value:function currentStyle(){var rng=range.create();return rng&&(rng=rng.normalize()),rng?this.style.current(rng):this.style.fromNode(this.$editable)}},{key:"styleFromNode",value:function styleFromNode($node){return this.style.fromNode($node)}},{key:"undo",value:function undo(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.undo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"commit",value:function commit(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.commit(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"redo",value:function redo(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.redo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"beforeCommand",value:function beforeCommand(){this.context.triggerEvent("before.command",this.$editable.html()),document.execCommand("styleWithCSS",!1,this.options.styleWithCSS),this.focus()}},{key:"afterCommand",value:function afterCommand(isPreventTrigger){this.normalizeContent(),this.history.recordUndo(),isPreventTrigger||this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"tab",value:function tab(){var rng=this.getLastRange();if(rng.isCollapsed()&&rng.isOnCell())this.table.tab(rng);else{if(0===this.options.tabSize)return!1;this.isLimited(this.options.tabSize)||(this.beforeCommand(),this.typing.insertTab(rng,this.options.tabSize),this.afterCommand())}}},{key:"untab",value:function untab(){var rng=this.getLastRange();if(rng.isCollapsed()&&rng.isOnCell())this.table.tab(rng,!0);else if(0===this.options.tabSize)return!1}},{key:"wrapCommand",value:function wrapCommand(fn){return function(){this.beforeCommand(),fn.apply(this,arguments),this.afterCommand()}}},{key:"insertImage",value:function insertImage(src,param){var _this3=this;return createImage(src,param).then((function($image){_this3.beforeCommand(),"function"==typeof param?param($image):("string"==typeof param&&$image.attr("data-filename",param),$image.css("width",Math.min(_this3.$editable.width(),$image.width()))),$image.show(),_this3.getLastRange().insertNode($image[0]),_this3.setLastRange(range.createFromNodeAfter($image[0]).select()),_this3.afterCommand()})).fail((function(e){_this3.context.triggerEvent("image.upload.error",e)}))}},{key:"insertImagesAsDataURL",value:function insertImagesAsDataURL(files){var _this4=this;external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.each(files,(function(idx,file){var filename=file.name;_this4.options.maximumImageFileSize&&_this4.options.maximumImageFileSize":tagName),$target&&$target.length&&($target[0].tagName.toUpperCase()!==tagName.toUpperCase()&&($target=$target.find(tagName)),$target&&$target.length)){var className=$target[0].className||"";if(className){var currentRange=this.createRange(),$parent;external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()([currentRange.sc,currentRange.ec]).closest(tagName).addClass(className)}}}},{key:"formatPara",value:function formatPara(){this.formatBlock("P")}},{key:"fontStyling",value:function fontStyling(target,value){var rng=this.getLastRange();if(""!==rng){var spans=this.style.styleNodes(rng);if(this.$editor.find(".note-status-output").html(""),external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(spans).css(target,value),rng.isCollapsed()){var firstSpan=lists.head(spans);firstSpan&&!dom.nodeLength(firstSpan)&&(firstSpan.innerHTML=dom.ZERO_WIDTH_NBSP_CHAR,range.createFromNode(firstSpan.firstChild).select(),this.setLastRange(),this.$editable.data("bogus",firstSpan))}else this.setLastRange(this.createRangeFromList(spans).select())}else{var noteStatusOutput=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.now();this.$editor.find(".note-status-output").html('
      '+this.lang.output.noSelection+"
      "),setTimeout((function(){external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()("#note-status-output-"+noteStatusOutput).remove()}),5e3)}}},{key:"unlink",value:function unlink(){var rng=this.getLastRange();if(rng.isOnAnchor()){var anchor=dom.ancestor(rng.sc,dom.isAnchor);(rng=range.createFromNode(anchor)).select(),this.setLastRange(),this.beforeCommand(),document.execCommand("unlink"),this.afterCommand()}}},{key:"getLinkInfo",value:function getLinkInfo(){var rng=this.getLastRange().expand(dom.isAnchor),$anchor=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(lists.head(rng.nodes(dom.isAnchor))),linkInfo={range:rng,text:rng.toString(),url:$anchor.length?$anchor.attr("href"):""};return $anchor.length&&(linkInfo.isNewWindow="_blank"===$anchor.attr("target")),linkInfo}},{key:"addRow",value:function addRow(position){var rng=this.getLastRange(this.$editable);rng.isCollapsed()&&rng.isOnCell()&&(this.beforeCommand(),this.table.addRow(rng,position),this.afterCommand())}},{key:"addCol",value:function addCol(position){var rng=this.getLastRange(this.$editable);rng.isCollapsed()&&rng.isOnCell()&&(this.beforeCommand(),this.table.addCol(rng,position),this.afterCommand())}},{key:"deleteRow",value:function deleteRow(){var rng=this.getLastRange(this.$editable);rng.isCollapsed()&&rng.isOnCell()&&(this.beforeCommand(),this.table.deleteRow(rng),this.afterCommand())}},{key:"deleteCol",value:function deleteCol(){var rng=this.getLastRange(this.$editable);rng.isCollapsed()&&rng.isOnCell()&&(this.beforeCommand(),this.table.deleteCol(rng),this.afterCommand())}},{key:"deleteTable",value:function deleteTable(){var rng=this.getLastRange(this.$editable);rng.isCollapsed()&&rng.isOnCell()&&(this.beforeCommand(),this.table.deleteTable(rng),this.afterCommand())}},{key:"resizeTo",value:function resizeTo(pos,$target,bKeepRatio){var imageSize;if(bKeepRatio){var newRatio=pos.y/pos.x,ratio=$target.data("ratio");imageSize={width:ratio>newRatio?pos.x:pos.y/ratio,height:ratio>newRatio?pos.x*ratio:pos.y}}else imageSize={width:pos.x,height:pos.y};$target.css(imageSize)}},{key:"hasFocus",value:function hasFocus(){return this.$editable.is(":focus")}},{key:"focus",value:function focus(){this.hasFocus()||this.$editable.focus()}},{key:"isEmpty",value:function isEmpty(){return dom.isEmpty(this.$editable[0])||dom.emptyPara===this.$editable.html()}},{key:"empty",value:function empty(){this.context.invoke("code",dom.emptyPara)}},{key:"normalizeContent",value:function normalizeContent(){this.$editable[0].normalize()}}]),Editor}();function Clipboard_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Clipboard_defineProperties(target,props){for(var i=0;i1?clipboardData.items[1]:lists.head(clipboardData.items);"file"===item.kind&&-1!==item.type.indexOf("image/")?(this.context.invoke("editor.insertImagesOrCallback",[item.getAsFile()]),event.preventDefault()):"string"===item.kind&&this.context.invoke("editor.isLimited",clipboardData.getData("Text").length)&&event.preventDefault()}else if(window.clipboardData){var text=window.clipboardData.getData("text");this.context.invoke("editor.isLimited",text.length)&&event.preventDefault()}setTimeout((function(){_this.context.invoke("editor.afterCommand")}),10)}}]),Clipboard}();function Dropzone_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Dropzone_defineProperties(target,props){for(var i=0;i','
      ',"
      "].join("")).prependTo(this.$editor)}return Dropzone_createClass(Dropzone,[{key:"initialize",value:function initialize(){this.options.disableDragAndDrop?(this.documentEventHandlers.onDrop=function(e){e.preventDefault()},this.$eventListener=this.$dropzone,this.$eventListener.on("drop",this.documentEventHandlers.onDrop)):this.attachDragAndDropEvent()}},{key:"attachDragAndDropEvent",value:function attachDragAndDropEvent(){var _this=this,collection=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(),$dropzoneMessage=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(e){var isCodeview=_this.context.invoke("codeview.isActivated"),hasEditorSize=_this.$editor.width()>0&&_this.$editor.height()>0;isCodeview||collection.length||!hasEditorSize||(_this.$editor.addClass("dragover"),_this.$dropzone.width(_this.$editor.width()),_this.$dropzone.height(_this.$editor.height()),$dropzoneMessage.text(_this.lang.image.dragImageHere)),collection=collection.add(e.target)},this.documentEventHandlers.onDragleave=function(e){(collection=collection.not(e.target)).length&&"BODY"!==e.target.nodeName||(collection=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(),_this.$editor.removeClass("dragover"))},this.documentEventHandlers.onDrop=function(){collection=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(),_this.$editor.removeClass("dragover")},this.$eventListener.on("dragenter",this.documentEventHandlers.onDragenter).on("dragleave",this.documentEventHandlers.onDragleave).on("drop",this.documentEventHandlers.onDrop),this.$dropzone.on("dragenter",(function(){_this.$dropzone.addClass("hover"),$dropzoneMessage.text(_this.lang.image.dropImage)})).on("dragleave",(function(){_this.$dropzone.removeClass("hover"),$dropzoneMessage.text(_this.lang.image.dragImageHere)})),this.$dropzone.on("drop",(function(event){var dataTransfer=event.originalEvent.dataTransfer;event.preventDefault(),dataTransfer&&dataTransfer.files&&dataTransfer.files.length?(_this.$editable.focus(),_this.context.invoke("editor.insertImagesOrCallback",dataTransfer.files)):external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.each(dataTransfer.types,(function(idx,type){if(!(type.toLowerCase().indexOf("_moz_")>-1)){var content=dataTransfer.getData(type);type.toLowerCase().indexOf("text")>-1?_this.context.invoke("editor.pasteHTML",content):external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(content).each((function(idx,item){_this.context.invoke("editor.insertNode",item)}))}}))})).on("dragover",!1)}},{key:"destroy",value:function destroy(){var _this2=this;Object.keys(this.documentEventHandlers).forEach((function(key){_this2.$eventListener.off(key.substr(2).toLowerCase(),_this2.documentEventHandlers[key])})),this.documentEventHandlers={}}}]),Dropzone}();function _createForOfIteratorHelper(o){if("undefined"==typeof Symbol||null==o[Symbol.iterator]){if(Array.isArray(o)||(o=_unsupportedIterableToArray(o))){var i=0,F=function F(){};return{s:F,n:function n(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var it,normalCompletion=!0,didErr=!1,err;return{s:function s(){it=o[Symbol.iterator]()},n:function n(){var step=it.next();return normalCompletion=step.done,step},e:function e(_e2){didErr=!0,err=_e2},f:function f(){try{normalCompletion||null==it.return||it.return()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i.*?(?:<\/iframe>)?)/gi,(function(tag){if(/<.+src(?==?('|"|\s)?)[\s\S]+src(?=('|"|\s)?)[^>]*?>/i.test(tag))return"";var _iterator=_createForOfIteratorHelper(whitelist),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var src=_step.value;if(new RegExp('src="(https?:)?//'+src.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+'/(.+)"').test(tag))return tag}}catch(err){_iterator.e(err)}finally{_iterator.f()}return""}))}return value}},{key:"activate",value:function activate(){var _this2=this,CodeMirror=this.CodeMirrorConstructor;if(this.$codable.val(dom.html(this.$editable,this.options.prettifyHtml)),this.$codable.height(this.$editable.height()),this.context.invoke("toolbar.updateCodeview",!0),this.context.invoke("airPopover.updateCodeview",!0),this.$editor.addClass("codeview"),this.$codable.focus(),CodeMirror){var cmEditor=CodeMirror.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var server=new CodeMirror.TernServer(this.options.codemirror.tern);cmEditor.ternServer=server,cmEditor.on("cursorActivity",(function(cm){server.updateArgHints(cm)}))}cmEditor.on("blur",(function(event){_this2.context.triggerEvent("blur.codeview",cmEditor.getValue(),event)})),cmEditor.on("change",(function(){_this2.context.triggerEvent("change.codeview",cmEditor.getValue(),cmEditor)})),cmEditor.setSize(null,this.$editable.outerHeight()),this.$codable.data("cmEditor",cmEditor)}else this.$codable.on("blur",(function(event){_this2.context.triggerEvent("blur.codeview",_this2.$codable.val(),event)})),this.$codable.on("input",(function(){_this2.context.triggerEvent("change.codeview",_this2.$codable.val(),_this2.$codable)}))}},{key:"deactivate",value:function deactivate(){var CodeMirror;if(this.CodeMirrorConstructor){var cmEditor=this.$codable.data("cmEditor");this.$codable.val(cmEditor.getValue()),cmEditor.toTextArea()}var value=this.purify(dom.value(this.$codable,this.options.prettifyHtml)||dom.emptyPara),isChange=this.$editable.html()!==value;this.$editable.html(value),this.$editable.height(this.options.height?this.$codable.height():"auto"),this.$editor.removeClass("codeview"),isChange&&this.context.triggerEvent("change",this.$editable.html(),this.$editable),this.$editable.focus(),this.context.invoke("toolbar.updateCodeview",!1),this.context.invoke("airPopover.updateCodeview",!1)}},{key:"destroy",value:function destroy(){this.isActivated()&&this.deactivate()}}]),CodeView}();function Statusbar_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Statusbar_defineProperties(target,props){for(var i=0;i0?Math.max(height,_this.options.minheight):height,height=_this.options.maxHeight>0?Math.min(height,_this.options.maxHeight):height,_this.$editable.height(height)};_this.$document.on("mousemove",onMouseMove).one("mouseup",(function(){_this.$document.off("mousemove",onMouseMove)}))}))}},{key:"destroy",value:function destroy(){this.$statusbar.off(),this.$statusbar.addClass("locked")}}]),Statusbar}();function Fullscreen_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Fullscreen_defineProperties(target,props){for(var i=0;i','
      ','
      ','
      ','
      ','
      ','
      ',this.options.disableResizeImage?"":'
      ',"
      ",""].join("")).prependTo(this.$editingArea),this.$handle.on("mousedown",(function(event){if(dom.isControlSizing(event.target)){event.preventDefault(),event.stopPropagation();var $target=_this2.$handle.find(".note-control-selection").data("target"),posStart=$target.offset(),scrollTop=_this2.$document.scrollTop(),onMouseMove=function onMouseMove(event){_this2.context.invoke("editor.resizeTo",{x:event.clientX-posStart.left,y:event.clientY-(posStart.top-scrollTop)},$target,!event.shiftKey),_this2.update($target[0],event)};_this2.$document.on("mousemove",onMouseMove).one("mouseup",(function(e){e.preventDefault(),_this2.$document.off("mousemove",onMouseMove),_this2.context.invoke("editor.afterCommand")})),$target.data("ratio")||$target.data("ratio",$target.height()/$target.width())}})),this.$handle.on("wheel",(function(e){e.preventDefault(),_this2.update()}))}},{key:"destroy",value:function destroy(){this.$handle.remove()}},{key:"update",value:function update(target,event){if(this.context.isDisabled())return!1;var isImage=dom.isImg(target),$selection=this.$handle.find(".note-control-selection");if(this.context.invoke("imagePopover.update",target,event),isImage){var $image=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(target),position=$image.position(),pos={left:position.left+parseInt($image.css("marginLeft"),10),top:position.top+parseInt($image.css("marginTop"),10)},imageSize={w:$image.outerWidth(!1),h:$image.outerHeight(!1)};$selection.css({display:"block",left:pos.left,top:pos.top,width:imageSize.w,height:imageSize.h}).data("target",$image);var origImageObj=new Image;origImageObj.src=$image.attr("src");var sizingText=imageSize.w+"x"+imageSize.h+" ("+this.lang.image.original+": "+origImageObj.width+"x"+origImageObj.height+")";$selection.find(".note-control-selection-info").text(sizingText),this.context.invoke("editor.saveTarget",target)}else this.hide();return isImage}},{key:"hide",value:function hide(){this.context.invoke("editor.clearTarget"),this.$handle.children().hide()}}]),Handle}();function AutoLink_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function AutoLink_defineProperties(target,props){for(var i=0;i").html(urlText).attr("href",link)[0];this.context.options.linkTargetBlank&&external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(node).attr("target","_blank"),this.lastWordRange.insertNode(node),this.lastWordRange=null,this.context.invoke("editor.focus")}}}},{key:"handleKeydown",value:function handleKeydown(e){if(lists.contains([core_key.code.ENTER,core_key.code.SPACE],e.keyCode)){var wordRange=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=wordRange}}},{key:"handleKeyup",value:function handleKeyup(e){lists.contains([core_key.code.ENTER,core_key.code.SPACE],e.keyCode)&&this.replace()}}]),AutoLink}();function AutoSync_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function AutoSync_defineProperties(target,props){for(var i=0;i'),this.$placeholder.on("click",(function(){_this2.context.invoke("focus")})).html(this.options.placeholder).prependTo(this.$editingArea),this.update()}},{key:"destroy",value:function destroy(){this.$placeholder.remove()}},{key:"update",value:function update(){var isShow=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(isShow)}}]),Placeholder}();function Buttons_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Buttons_defineProperties(target,props){for(var i=0;i','
      '+this.lang.color.background+"
      ","
      ",'","
      ",'
      \x3c!-- back colors --\x3e
      ',"
      ",'",'',"
      ",'
      ',""].join(""):"")+(foreColor?['
      ','
      '+this.lang.color.foreground+"
      ","
      ",'","
      ",'
      \x3c!-- fore colors --\x3e
      ',"
      ",'",'',"
      ",'
      ',"
      "].join(""):""),callback:function callback($dropdown){$dropdown.find(".note-holder").each((function(idx,item){var $holder=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(item);$holder.append(_this.ui.palette({colors:_this.options.colors,colorsName:_this.options.colorsName,eventName:$holder.data("event"),container:_this.options.container,tooltip:_this.options.tooltip}).render())}));var customColors=[["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"]];$dropdown.find(".note-holder-custom").each((function(idx,item){var $holder=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(item);$holder.append(_this.ui.palette({colors:customColors,colorsName:customColors,eventName:$holder.data("event"),container:_this.options.container,tooltip:_this.options.tooltip}).render())})),$dropdown.find("input[type=color]").each((function(idx,item){external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(item).change((function(){var $chip=$dropdown.find("#"+external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(this).data("event")).find(".note-color-btn").first(),color=this.value.toUpperCase();$chip.css("background-color",color).attr("aria-label",color).attr("data-value",color).attr("data-original-title",color),$chip.click()}))}))},click:function click(event){event.stopPropagation();var $parent=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()("."+className).find(".note-dropdown-menu"),$button=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(event.target),eventName=$button.data("event"),value=$button.attr("data-value");if("openPalette"===eventName){var $picker=$parent.find("#"+value),$palette=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()($parent.find("#"+$picker.data("event")).find(".note-color-row")[0]),$chip=$palette.find(".note-color-btn").last().detach(),color=$picker.val();$chip.css("background-color",color).attr("aria-label",color).attr("data-value",color).attr("data-original-title",color),$palette.prepend($chip),$picker.click()}else{if(lists.contains(["backColor","foreColor"],eventName)){var key="backColor"===eventName?"background-color":"color",$color=$button.closest(".note-color").find(".note-recent-color"),$currentButton=$button.closest(".note-color").find(".note-current-color-button");$color.css(key,value),$currentButton.attr("data-"+eventName,value)}_this.context.invoke("editor."+eventName,value)}}})]}).render()}},{key:"addToolbarButtons",value:function addToolbarButtons(){var _this2=this;this.context.memo("button.style",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents(_this2.ui.icon(_this2.options.icons.magic),_this2.options),tooltip:_this2.lang.style.style,data:{toggle:"dropdown"}}),_this2.ui.dropdown({className:"dropdown-style",items:_this2.options.styleTags,title:_this2.lang.style.style,template:function template(item){"string"==typeof item&&(item={tag:item,title:Object.prototype.hasOwnProperty.call(_this2.lang.style,item)?_this2.lang.style[item]:item});var tag=item.tag,title=item.title,style,className;return"<"+tag+(item.style?' style="'+item.style+'" ':"")+(item.className?' class="'+item.className+'"':"")+">"+title+""},click:_this2.context.createInvokeHandler("editor.formatBlock")})]).render()}));for(var _loop=function _loop(styleIdx,styleLen){var item=_this2.options.styleTags[styleIdx];_this2.context.memo("button.style."+item,(function(){return _this2.button({className:"note-btn-style-"+item,contents:'
      '+item.toUpperCase()+"
      ",tooltip:_this2.lang.style[item],click:_this2.context.createInvokeHandler("editor.formatBlock")}).render()}))},styleIdx=0,styleLen=this.options.styleTags.length;styleIdx',_this2.options),tooltip:_this2.lang.font.name,data:{toggle:"dropdown"}}),_this2.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:_this2.options.icons.menuCheck,items:_this2.options.fontNames.filter(_this2.isFontInstalled.bind(_this2)),title:_this2.lang.font.name,template:function template(item){return''+item+""},click:_this2.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()})),this.context.memo("button.fontsize",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents('',_this2.options),tooltip:_this2.lang.font.size,data:{toggle:"dropdown"}}),_this2.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:_this2.options.icons.menuCheck,items:_this2.options.fontSizes,title:_this2.lang.font.size,click:_this2.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()})),this.context.memo("button.fontsizeunit",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents('',_this2.options),tooltip:_this2.lang.font.sizeunit,data:{toggle:"dropdown"}}),_this2.ui.dropdownCheck({className:"dropdown-fontsizeunit",checkClassName:_this2.options.icons.menuCheck,items:_this2.options.fontSizeUnits,title:_this2.lang.font.sizeunit,click:_this2.context.createInvokeHandlerAndUpdateState("editor.fontSizeUnit")})]).render()})),this.context.memo("button.color",(function(){return _this2.colorPalette("note-color-all",_this2.lang.color.recent,!0,!0)})),this.context.memo("button.forecolor",(function(){return _this2.colorPalette("note-color-fore",_this2.lang.color.foreground,!1,!0)})),this.context.memo("button.backcolor",(function(){return _this2.colorPalette("note-color-back",_this2.lang.color.background,!0,!1)})),this.context.memo("button.ul",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.unorderedlist),tooltip:_this2.lang.lists.unordered+_this2.representShortcut("insertUnorderedList"),click:_this2.context.createInvokeHandler("editor.insertUnorderedList")}).render()})),this.context.memo("button.ol",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.orderedlist),tooltip:_this2.lang.lists.ordered+_this2.representShortcut("insertOrderedList"),click:_this2.context.createInvokeHandler("editor.insertOrderedList")}).render()}));var justifyLeft=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")}),justifyCenter=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")}),justifyRight=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")}),justifyFull=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")}),outdent=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")}),indent=this.button({contents:this.ui.icon(this.options.icons.indent),tooltip:this.lang.paragraph.indent+this.representShortcut("indent"),click:this.context.createInvokeHandler("editor.indent")});this.context.memo("button.justifyLeft",func.invoke(justifyLeft,"render")),this.context.memo("button.justifyCenter",func.invoke(justifyCenter,"render")),this.context.memo("button.justifyRight",func.invoke(justifyRight,"render")),this.context.memo("button.justifyFull",func.invoke(justifyFull,"render")),this.context.memo("button.outdent",func.invoke(outdent,"render")),this.context.memo("button.indent",func.invoke(indent,"render")),this.context.memo("button.paragraph",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents(_this2.ui.icon(_this2.options.icons.alignLeft),_this2.options),tooltip:_this2.lang.paragraph.paragraph,data:{toggle:"dropdown"}}),_this2.ui.dropdown([_this2.ui.buttonGroup({className:"note-align",children:[justifyLeft,justifyCenter,justifyRight,justifyFull]}),_this2.ui.buttonGroup({className:"note-list",children:[outdent,indent]})])]).render()})),this.context.memo("button.height",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents(_this2.ui.icon(_this2.options.icons.textHeight),_this2.options),tooltip:_this2.lang.font.height,data:{toggle:"dropdown"}}),_this2.ui.dropdownCheck({items:_this2.options.lineHeights,checkClassName:_this2.options.icons.menuCheck,className:"dropdown-line-height",title:_this2.lang.font.height,click:_this2.context.createInvokeHandler("editor.lineHeight")})]).render()})),this.context.memo("button.table",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents(_this2.ui.icon(_this2.options.icons.table),_this2.options),tooltip:_this2.lang.table.table,data:{toggle:"dropdown"}}),_this2.ui.dropdown({title:_this2.lang.table.table,className:"note-table",items:['
      ','
      ','
      ','
      ',"
      ",'
      1 x 1
      '].join("")})],{callback:function callback($node){var $catcher;$node.find(".note-dimension-picker-mousecatcher").css({width:_this2.options.insertTableMaxSize.col+"em",height:_this2.options.insertTableMaxSize.row+"em"}).mousedown(_this2.context.createInvokeHandler("editor.insertTable")).on("mousemove",_this2.tableMoveHandler.bind(_this2))}}).render()})),this.context.memo("button.link",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.link),tooltip:_this2.lang.link.link+_this2.representShortcut("linkDialog.show"),click:_this2.context.createInvokeHandler("linkDialog.show")}).render()})),this.context.memo("button.picture",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.picture),tooltip:_this2.lang.image.image,click:_this2.context.createInvokeHandler("imageDialog.show")}).render()})),this.context.memo("button.video",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.video),tooltip:_this2.lang.video.video,click:_this2.context.createInvokeHandler("videoDialog.show")}).render()})),this.context.memo("button.hr",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.minus),tooltip:_this2.lang.hr.insert+_this2.representShortcut("insertHorizontalRule"),click:_this2.context.createInvokeHandler("editor.insertHorizontalRule")}).render()})),this.context.memo("button.fullscreen",(function(){return _this2.button({className:"btn-fullscreen note-codeview-keep",contents:_this2.ui.icon(_this2.options.icons.arrowsAlt),tooltip:_this2.lang.options.fullscreen,click:_this2.context.createInvokeHandler("fullscreen.toggle")}).render()})),this.context.memo("button.codeview",(function(){return _this2.button({className:"btn-codeview note-codeview-keep",contents:_this2.ui.icon(_this2.options.icons.code),tooltip:_this2.lang.options.codeview,click:_this2.context.createInvokeHandler("codeview.toggle")}).render()})),this.context.memo("button.redo",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.redo),tooltip:_this2.lang.history.redo+_this2.representShortcut("redo"),click:_this2.context.createInvokeHandler("editor.redo")}).render()})),this.context.memo("button.undo",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.undo),tooltip:_this2.lang.history.undo+_this2.representShortcut("undo"),click:_this2.context.createInvokeHandler("editor.undo")}).render()})),this.context.memo("button.help",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.question),tooltip:_this2.lang.options.help,click:_this2.context.createInvokeHandler("helpDialog.show")}).render()}))}},{key:"addImagePopoverButtons",value:function addImagePopoverButtons(){var _this3=this;this.context.memo("button.resizeFull",(function(){return _this3.button({contents:'100%',tooltip:_this3.lang.image.resizeFull,click:_this3.context.createInvokeHandler("editor.resize","1")}).render()})),this.context.memo("button.resizeHalf",(function(){return _this3.button({contents:'50%',tooltip:_this3.lang.image.resizeHalf,click:_this3.context.createInvokeHandler("editor.resize","0.5")}).render()})),this.context.memo("button.resizeQuarter",(function(){return _this3.button({contents:'25%',tooltip:_this3.lang.image.resizeQuarter,click:_this3.context.createInvokeHandler("editor.resize","0.25")}).render()})),this.context.memo("button.resizeNone",(function(){return _this3.button({contents:_this3.ui.icon(_this3.options.icons.rollback),tooltip:_this3.lang.image.resizeNone,click:_this3.context.createInvokeHandler("editor.resize","0")}).render()})),this.context.memo("button.floatLeft",(function(){return _this3.button({contents:_this3.ui.icon(_this3.options.icons.floatLeft),tooltip:_this3.lang.image.floatLeft,click:_this3.context.createInvokeHandler("editor.floatMe","left")}).render()})),this.context.memo("button.floatRight",(function(){return _this3.button({contents:_this3.ui.icon(_this3.options.icons.floatRight),tooltip:_this3.lang.image.floatRight,click:_this3.context.createInvokeHandler("editor.floatMe","right")}).render()})),this.context.memo("button.floatNone",(function(){return _this3.button({contents:_this3.ui.icon(_this3.options.icons.rollback),tooltip:_this3.lang.image.floatNone,click:_this3.context.createInvokeHandler("editor.floatMe","none")}).render()})),this.context.memo("button.removeMedia",(function(){return _this3.button({contents:_this3.ui.icon(_this3.options.icons.trash),tooltip:_this3.lang.image.remove,click:_this3.context.createInvokeHandler("editor.removeMedia")}).render()}))}},{key:"addLinkPopoverButtons",value:function addLinkPopoverButtons(){var _this4=this;this.context.memo("button.linkDialogShow",(function(){return _this4.button({contents:_this4.ui.icon(_this4.options.icons.link),tooltip:_this4.lang.link.edit,click:_this4.context.createInvokeHandler("linkDialog.show")}).render()})),this.context.memo("button.unlink",(function(){return _this4.button({contents:_this4.ui.icon(_this4.options.icons.unlink),tooltip:_this4.lang.link.unlink,click:_this4.context.createInvokeHandler("editor.unlink")}).render()}))}},{key:"addTablePopoverButtons",value:function addTablePopoverButtons(){var _this5=this;this.context.memo("button.addRowUp",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.rowAbove),tooltip:_this5.lang.table.addRowAbove,click:_this5.context.createInvokeHandler("editor.addRow","top")}).render()})),this.context.memo("button.addRowDown",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.rowBelow),tooltip:_this5.lang.table.addRowBelow,click:_this5.context.createInvokeHandler("editor.addRow","bottom")}).render()})),this.context.memo("button.addColLeft",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.colBefore),tooltip:_this5.lang.table.addColLeft,click:_this5.context.createInvokeHandler("editor.addCol","left")}).render()})),this.context.memo("button.addColRight",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.colAfter),tooltip:_this5.lang.table.addColRight,click:_this5.context.createInvokeHandler("editor.addCol","right")}).render()})),this.context.memo("button.deleteRow",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.rowRemove),tooltip:_this5.lang.table.delRow,click:_this5.context.createInvokeHandler("editor.deleteRow")}).render()})),this.context.memo("button.deleteCol",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.colRemove),tooltip:_this5.lang.table.delCol,click:_this5.context.createInvokeHandler("editor.deleteCol")}).render()})),this.context.memo("button.deleteTable",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.trash),tooltip:_this5.lang.table.delTable,click:_this5.context.createInvokeHandler("editor.deleteTable")}).render()}))}},{key:"build",value:function build($container,groups){for(var groupIdx=0,groupLen=groups.length;groupIdx3&&dim_c3&&dim_ractivateOffset&¤tOffsetdeactivateOffsetBottom)&&(this.isFollowing=!1,this.$toolbar.css({position:"relative",top:0,width:"100%",zIndex:"auto"}),this.$editable.css({marginTop:""}))}},{key:"changeContainer",value:function changeContainer(isFullscreen){isFullscreen?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.options.followingToolbar&&this.followScroll()}},{key:"updateFullscreen",value:function updateFullscreen(isFullscreen){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),isFullscreen),this.changeContainer(isFullscreen)}},{key:"updateCodeview",value:function updateCodeview(isCodeview){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),isCodeview),isCodeview?this.deactivate():this.activate()}},{key:"activate",value:function activate(isIncludeCodeview){var $btn=this.$toolbar.find("button");isIncludeCodeview||($btn=$btn.not(".note-codeview-keep")),this.ui.toggleBtn($btn,!0)}},{key:"deactivate",value:function deactivate(isIncludeCodeview){var $btn=this.$toolbar.find("button");isIncludeCodeview||($btn=$btn.not(".note-codeview-keep")),this.ui.toggleBtn($btn,!1)}}]),Toolbar}();function LinkDialog_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function LinkDialog_defineProperties(target,props){for(var i=0;i','"),''),"",'
      ','"),''),"
      ",this.options.disableLinkTarget?"":external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()("
      ").append(this.ui.checkbox({className:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:!0}).render()).html(),external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()("
      ").append(this.ui.checkbox({className:"sn-checkbox-use-protocol",text:this.lang.link.useProtocol,checked:!0}).render()).html()].join(""),buttonClass,footer='');this.$dialog=this.ui.dialog({className:"link-dialog",title:this.lang.link.insert,fade:this.options.dialogsFade,body:body,footer:footer}).render().appendTo($container)}},{key:"destroy",value:function destroy(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function bindEnterKey($input,$btn){$input.on("keypress",(function(event){event.keyCode===core_key.code.ENTER&&(event.preventDefault(),$btn.trigger("click"))}))}},{key:"toggleLinkBtn",value:function toggleLinkBtn($linkBtn,$linkText,$linkUrl){this.ui.toggleBtn($linkBtn,$linkText.val()&&$linkUrl.val())}},{key:"showLinkDialog",value:function showLinkDialog(linkInfo){var _this=this;return external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.Deferred((function(deferred){var $linkText=_this.$dialog.find(".note-link-text"),$linkUrl=_this.$dialog.find(".note-link-url"),$linkBtn=_this.$dialog.find(".note-link-btn"),$openInNewWindow=_this.$dialog.find(".sn-checkbox-open-in-new-window input[type=checkbox]"),$useProtocol=_this.$dialog.find(".sn-checkbox-use-protocol input[type=checkbox]");_this.ui.onDialogShown(_this.$dialog,(function(){_this.context.triggerEvent("dialog.shown"),!linkInfo.url&&func.isValidUrl(linkInfo.text)&&(linkInfo.url=linkInfo.text),$linkText.on("input paste propertychange",(function(){linkInfo.text=$linkText.val(),_this.toggleLinkBtn($linkBtn,$linkText,$linkUrl)})).val(linkInfo.text),$linkUrl.on("input paste propertychange",(function(){linkInfo.text||$linkText.val($linkUrl.val()),_this.toggleLinkBtn($linkBtn,$linkText,$linkUrl)})).val(linkInfo.url),env.isSupportTouch||$linkUrl.trigger("focus"),_this.toggleLinkBtn($linkBtn,$linkText,$linkUrl),_this.bindEnterKey($linkUrl,$linkBtn),_this.bindEnterKey($linkText,$linkBtn);var isNewWindowChecked=void 0!==linkInfo.isNewWindow?linkInfo.isNewWindow:_this.context.options.linkTargetBlank;$openInNewWindow.prop("checked",isNewWindowChecked);var useProtocolChecked=!linkInfo.url&&_this.context.options.useProtocol;$useProtocol.prop("checked",useProtocolChecked),$linkBtn.one("click",(function(event){event.preventDefault(),deferred.resolve({range:linkInfo.range,url:$linkUrl.val(),text:$linkText.val(),isNewWindow:$openInNewWindow.is(":checked"),checkProtocol:$useProtocol.is(":checked")}),_this.ui.hideDialog(_this.$dialog)}))})),_this.ui.onDialogHidden(_this.$dialog,(function(){$linkText.off(),$linkUrl.off(),$linkBtn.off(),"pending"===deferred.state()&&deferred.reject()})),_this.ui.showDialog(_this.$dialog)})).promise()}},{key:"show",value:function show(){var _this2=this,linkInfo=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange"),this.showLinkDialog(linkInfo).then((function(linkInfo){_this2.context.invoke("editor.restoreRange"),_this2.context.invoke("editor.createLink",linkInfo)})).fail((function(){_this2.context.invoke("editor.restoreRange")}))}}]),LinkDialog}();function LinkPopover_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function LinkPopover_defineProperties(target,props){for(var i=0;i ')}}).render().appendTo(this.options.container);var $content=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",$content,this.options.popover.link),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function destroy(){this.$popover.remove()}},{key:"update",value:function update(){if(this.context.invoke("editor.hasFocus")){var rng=this.context.invoke("editor.getLastRange");if(rng.isCollapsed()&&rng.isOnAnchor()){var anchor=dom.ancestor(rng.sc,dom.isAnchor),href=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(anchor).attr("href");this.$popover.find("a").attr("href",href).text(href);var pos=dom.posFromPlaceholder(anchor),containerOffset=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(this.options.container).offset();pos.top-=containerOffset.top,pos.left-=containerOffset.left,this.$popover.css({display:"block",left:pos.left,top:pos.top})}else this.hide()}else this.hide()}},{key:"hide",value:function hide(){this.$popover.hide()}}]),LinkPopover}();function ImageDialog_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function ImageDialog_defineProperties(target,props){for(var i=0;i")}var $container=this.options.dialogsInBody?this.$body:this.options.container,body=['
      ','",'',imageLimitation,"
      ",'
      ','",'',"
      "].join(""),buttonClass,footer='');this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:body,footer:footer}).render().appendTo($container)}},{key:"destroy",value:function destroy(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function bindEnterKey($input,$btn){$input.on("keypress",(function(event){event.keyCode===core_key.code.ENTER&&(event.preventDefault(),$btn.trigger("click"))}))}},{key:"show",value:function show(){var _this=this;this.context.invoke("editor.saveRange"),this.showImageDialog().then((function(data){_this.ui.hideDialog(_this.$dialog),_this.context.invoke("editor.restoreRange"),"string"==typeof data?_this.options.callbacks.onImageLinkInsert?_this.context.triggerEvent("image.link.insert",data):_this.context.invoke("editor.insertImage",data):_this.context.invoke("editor.insertImagesOrCallback",data)})).fail((function(){_this.context.invoke("editor.restoreRange")}))}},{key:"showImageDialog",value:function showImageDialog(){var _this2=this;return external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default.a.Deferred((function(deferred){var $imageInput=_this2.$dialog.find(".note-image-input"),$imageUrl=_this2.$dialog.find(".note-image-url"),$imageBtn=_this2.$dialog.find(".note-image-btn");_this2.ui.onDialogShown(_this2.$dialog,(function(){_this2.context.triggerEvent("dialog.shown"),$imageInput.replaceWith($imageInput.clone().on("change",(function(event){deferred.resolve(event.target.files||event.target.value)})).val("")),$imageUrl.on("input paste propertychange",(function(){_this2.ui.toggleBtn($imageBtn,$imageUrl.val())})).val(""),env.isSupportTouch||$imageUrl.trigger("focus"),$imageBtn.click((function(event){event.preventDefault(),deferred.resolve($imageUrl.val())})),_this2.bindEnterKey($imageUrl,$imageBtn)})),_this2.ui.onDialogHidden(_this2.$dialog,(function(){$imageInput.off(),$imageUrl.off(),$imageBtn.off(),"pending"===deferred.state()&&deferred.reject()})),_this2.ui.showDialog(_this2.$dialog)}))}}]),ImageDialog}();function ImagePopover_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function ImagePopover_defineProperties(target,props){for(var i=0;i','"),''),"
      "].join(""),buttonClass,footer='');this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:body,footer:footer}).render().appendTo($container)}},{key:"destroy",value:function destroy(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function bindEnterKey($input,$btn){$input.on("keypress",(function(event){event.keyCode===core_key.code.ENTER&&(event.preventDefault(),$btn.trigger("click"))}))}},{key:"createVideoNode",value:function createVideoNode(url){var ytRegExp=/\/\/(?:(?:www|m)\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?$/,ytRegExpForStart=/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/,ytMatch=url.match(ytRegExp),igRegExp=/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/,igMatch=url.match(igRegExp),vRegExp=/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/,vMatch=url.match(vRegExp),vimRegExp=/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/,vimMatch=url.match(vimRegExp),dmRegExp=/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/,dmMatch=url.match(dmRegExp),youkuRegExp=/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/,youkuMatch=url.match(youkuRegExp),qqRegExp=/\/\/v\.qq\.com.*?vid=(.+)/,qqMatch=url.match(qqRegExp),qqRegExp2=/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/,qqMatch2=url.match(qqRegExp2),mp4RegExp=/^.+.(mp4|m4v)$/,mp4Match=url.match(mp4RegExp),oggRegExp=/^.+.(ogg|ogv)$/,oggMatch=url.match(oggRegExp),webmRegExp=/^.+.(webm)$/,webmMatch=url.match(webmRegExp),fbRegExp=/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/,fbMatch=url.match(fbRegExp),$video;if(ytMatch&&11===ytMatch[1].length){var youtubeId=ytMatch[1],start=0;if(void 0!==ytMatch[2]){var ytMatchForStart=ytMatch[2].match(ytRegExpForStart);if(ytMatchForStart)for(var n=[3600,60,1],i=0,r=n.length;i").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+youtubeId+(start>0?"?start="+start:"")).attr("width","640").attr("height","360")}else if(igMatch&&igMatch[0].length)$video=external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()("