@standardnotes/rich-text 1.9.1 → 1.9.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/dist/vendor.js +1 -1
- package/package.json +8 -4
package/dist/vendor.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see vendor.js.LICENSE.txt */
|
|
2
|
-
if(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(e,t){"use strict";var n=[],o=Object.getPrototypeOf,i=n.slice,r=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},a=n.push,s=n.indexOf,l={},c=l.toString,u=l.hasOwnProperty,d=u.toString,h=d.call(Object),f={},p=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},m=function(e){return null!=e&&e===e.window},g=e.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,n){var o,i,r=(n=n||g).createElement("script");if(r.text=e,t)for(o in v)(i=t[o]||t.getAttribute&&t.getAttribute(o))&&r.setAttribute(o,i);n.head.appendChild(r).parentNode.removeChild(r)}function b(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var k="3.6.1",w=function(e,t){return new w.fn.init(e,t)};function x(e){var t=!!e&&"length"in e&&e.length,n=b(e);return!p(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}w.fn=w.prototype={jquery:k,constructor:w,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(w.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(w.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,o,i,r,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||p(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)o=e[t],"__proto__"!==t&&a!==o&&(c&&o&&(w.isPlainObject(o)||(i=Array.isArray(o)))?(n=a[t],r=i&&!Array.isArray(n)?[]:i||w.isPlainObject(n)?n:{},i=!1,a[t]=w.extend(c,r,o)):void 0!==o&&(a[t]=o));return a},w.extend({expando:"jQuery"+(k+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e)||(t=o(e))&&("function"!=typeof(n=u.call(t,"constructor")&&t.constructor)||d.call(n)!==h))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){y(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,o=0;if(x(e))for(n=e.length;o<n&&!1!==t.call(e[o],o,e[o]);o++);else for(o in e)if(!1===t.call(e[o],o,e[o]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(x(Object(e))?w.merge(n,"string"==typeof e?[e]:e):a.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:s.call(t,e,n)},merge:function(e,t){for(var n=+t.length,o=0,i=e.length;o<n;o++)e[i++]=t[o];return e.length=i,e},grep:function(e,t,n){for(var o=[],i=0,r=e.length,a=!n;i<r;i++)!t(e[i],i)!==a&&o.push(e[i]);return o},map:function(e,t,n){var o,i,a=0,s=[];if(x(e))for(o=e.length;a<o;a++)null!=(i=t(e[a],a,n))&&s.push(i);else for(a in e)null!=(i=t(e[a],a,n))&&s.push(i);return r(s)},guid:1,support:f}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){l["[object "+t+"]"]=t.toLowerCase()}));var C=function(e){var t,n,o,i,r,a,s,l,c,u,d,h,f,p,m,g,v,y,b,k="sizzle"+1*new Date,w=e.document,x=0,C=0,T=le(),S=le(),E=le(),N=le(),A=function(e,t){return e===t&&(d=!0),0},I={}.hasOwnProperty,$=[],D=$.pop,L=$.push,R=$.push,P=$.slice,O=function(e,t){for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},F="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",M="(?:\\\\[\\da-fA-F]{1,6}"+H+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",j="\\["+H+"*("+M+")(?:"+H+"*([*^$|!~]?=)"+H+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+H+"*\\]",B=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+j+")*)|.*)\\)|)",z=new RegExp(H+"+","g"),U=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),W=new RegExp("^"+H+"*,"+H+"*"),_=new RegExp("^"+H+"*([>+~]|"+H+")"+H+"*"),q=new RegExp(H+"|>"),K=new RegExp(B),V=new RegExp("^"+M+"$"),G={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),bool:new RegExp("^(?:"+F+")$","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},Q=/HTML$/i,Y=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+H+"?|\\\\([^\\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))},oe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){h()},ae=ke((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{R.apply($=P.call(w.childNodes),w.childNodes),$[w.childNodes.length].nodeType}catch(t){R={apply:$.length?function(e,t){L.apply(e,P.call(t))}:function(e,t){for(var n=e.length,o=0;e[n++]=t[o++];);e.length=n-1}}}function se(e,t,o,i){var r,s,c,u,d,p,v,y=t&&t.ownerDocument,w=t?t.nodeType:9;if(o=o||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return o;if(!i&&(h(t),t=t||f,m)){if(11!==w&&(d=J.exec(e)))if(r=d[1]){if(9===w){if(!(c=t.getElementById(r)))return o;if(c.id===r)return o.push(c),o}else if(y&&(c=y.getElementById(r))&&b(t,c)&&c.id===r)return o.push(c),o}else{if(d[2])return R.apply(o,t.getElementsByTagName(e)),o;if((r=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return R.apply(o,t.getElementsByClassName(r)),o}if(n.qsa&&!N[e+" "]&&(!g||!g.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===w&&(q.test(e)||_.test(e))){for((y=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((u=t.getAttribute("id"))?u=u.replace(oe,ie):t.setAttribute("id",u=k)),s=(p=a(e)).length;s--;)p[s]=(u?"#"+u:":scope")+" "+be(p[s]);v=p.join(",")}try{return R.apply(o,y.querySelectorAll(v)),o}catch(t){N(e,!0)}finally{u===k&&t.removeAttribute("id")}}}return l(e.replace(U,"$1"),t,o,i)}function le(){var e=[];return function t(n,i){return e.push(n+" ")>o.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ce(e){return e[k]=!0,e}function ue(e){var t=f.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),i=n.length;i--;)o.attrHandle[n[i]]=t}function he(e,t){var n=t&&e,o=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(o)return o;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return ce((function(t){return t=+t,ce((function(n,o){for(var i,r=e([],n.length,t),a=r.length;a--;)n[i=r[a]]&&(n[i]=!(o[i]=n[i]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},r=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Q.test(t||n&&n.nodeName||"HTML")},h=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!=f&&9===a.nodeType&&a.documentElement&&(p=(f=a).documentElement,m=!r(f),w!=f&&(i=f.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.scope=ue((function(e){return p.appendChild(e).appendChild(f.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ue((function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Z.test(f.getElementsByClassName),n.getById=ue((function(e){return p.appendChild(e).id=k,!f.getElementsByName||!f.getElementsByName(k).length})),n.getById?(o.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},o.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(o.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},o.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,o,i,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(i=t.getElementsByName(e),o=0;r=i[o++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),o.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,o=[],i=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[i++];)1===n.nodeType&&o.push(n);return o}return r},o.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},v=[],g=[],(n.qsa=Z.test(f.querySelectorAll))&&(ue((function(e){var t;p.appendChild(e).innerHTML="<a id='"+k+"'></a><select id='"+k+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+H+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+H+"*(?:value|"+F+")"),e.querySelectorAll("[id~="+k+"-]").length||g.push("~="),(t=f.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\["+H+"*name"+H+"*="+H+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+H+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=Z.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ue((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",B)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=Z.test(p.compareDocumentPosition),b=t||Z.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,o=t&&t.parentNode;return e===o||!(!o||1!==o.nodeType||!(n.contains?n.contains(o):e.compareDocumentPosition&&16&e.compareDocumentPosition(o)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return d=!0,0;var o=!e.compareDocumentPosition-!t.compareDocumentPosition;return o||(1&(o=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===o?e==f||e.ownerDocument==w&&b(w,e)?-1:t==f||t.ownerDocument==w&&b(w,t)?1:u?O(u,e)-O(u,t):0:4&o?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,o=0,i=e.parentNode,r=t.parentNode,a=[e],s=[t];if(!i||!r)return e==f?-1:t==f?1:i?-1:r?1:u?O(u,e)-O(u,t):0;if(i===r)return he(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[o]===s[o];)o++;return o?he(a[o],s[o]):a[o]==w?-1:s[o]==w?1:0}),f},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&m&&!N[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var o=y.call(e,t);if(o||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return o}catch(e){N(t,!0)}return 0<se(t,f,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=f&&h(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=f&&h(e);var i=o.attrHandle[t.toLowerCase()],r=i&&I.call(o.attrHandle,t.toLowerCase())?i(e,t,!m):void 0;return void 0!==r?r:n.attributes||!m?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(oe,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,o=[],i=0,r=0;if(d=!n.detectDuplicates,u=!n.sortStable&&e.slice(0),e.sort(A),d){for(;t=e[r++];)t===e[r]&&(i=o.push(r));for(;i--;)e.splice(o[i],1)}return u=null,e},i=se.getText=function(e){var t,n="",o=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[o++];)n+=i(t);return n},(o=se.selectors={cacheLength:50,createPseudo:ce,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(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&&K.test(n)&&(t=a(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=T[e+" "];return t||(t=new RegExp("(^|"+H+")"+e+"("+H+"|$)"))&&T(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(o){var i=se.attr(o,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&-1<i.indexOf(n):"$="===t?n&&i.slice(-n.length)===n:"~="===t?-1<(" "+i.replace(z," ")+" ").indexOf(n):"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,o,i){var r="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===o&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,f,p,m=r!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(g){if(r){for(;m;){for(h=t;h=h[m];)if(s?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(b=(f=(c=(u=(d=(h=g)[k]||(h[k]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===x&&c[1])&&c[2],h=f&&g.childNodes[f];h=++f&&h&&h[m]||(b=f=0)||p.pop();)if(1===h.nodeType&&++b&&h===t){u[e]=[x,f,b];break}}else if(y&&(b=f=(c=(u=(d=(h=t)[k]||(h[k]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===x&&c[1]),!1===b)for(;(h=++f&&h&&h[m]||(b=f=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(y&&((u=(d=h[k]||(h[k]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[x,b]),h!==t)););return(b-=i)===o||b%o==0&&0<=b/o}}},PSEUDO:function(e,t){var n,i=o.pseudos[e]||o.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[k]?i(t):1<i.length?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?ce((function(e,n){for(var o,r=i(e,t),a=r.length;a--;)e[o=O(e,r[a])]=!(n[o]=r[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:ce((function(e){var t=[],n=[],o=s(e.replace(U,"$1"));return o[k]?ce((function(e,t,n,i){for(var r,a=o(e,null,i,[]),s=e.length;s--;)(r=a[s])&&(e[s]=!(t[s]=r))})):function(e,i,r){return t[0]=e,o(t,null,r,n),t[0]=null,!n.pop()}})),has:ce((function(e){return function(t){return 0<se(e,t).length}})),contains:ce((function(e){return e=e.replace(te,ne),function(t){return-1<(t.textContent||i(t)).indexOf(e)}})),lang:ce((function(e){return V.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,n){return[n<0?n+t:n]})),even:ge((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ge((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ge((function(e,t,n){for(var o=n<0?n+t:t<n?t:n;0<=--o;)e.push(o);return e})),gt:ge((function(e,t,n){for(var o=n<0?n+t:n;++o<t;)e.push(o);return e}))}}).pseudos.nth=o.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})o.pseudos[t]=pe(t);function ye(){}function be(e){for(var t=0,n=e.length,o="";t<n;t++)o+=e[t].value;return o}function ke(e,t,n){var o=t.dir,i=t.next,r=i||o,a=n&&"parentNode"===r,s=C++;return t.first?function(t,n,i){for(;t=t[o];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,l){var c,u,d,h=[x,s];if(l){for(;t=t[o];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[o];)if(1===t.nodeType||a)if(u=(d=t[k]||(t[k]={}))[t.uniqueID]||(d[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[o]||t;else{if((c=u[r])&&c[0]===x&&c[1]===s)return h[2]=c[2];if((u[r]=h)[2]=e(t,n,l))return!0}return!1}}function we(e){return 1<e.length?function(t,n,o){for(var i=e.length;i--;)if(!e[i](t,n,o))return!1;return!0}:e[0]}function xe(e,t,n,o,i){for(var r,a=[],s=0,l=e.length,c=null!=t;s<l;s++)(r=e[s])&&(n&&!n(r,o,i)||(a.push(r),c&&t.push(s)));return a}function Ce(e,t,n,o,i,r){return o&&!o[k]&&(o=Ce(o)),i&&!i[k]&&(i=Ce(i,r)),ce((function(r,a,s,l){var c,u,d,h=[],f=[],p=a.length,m=r||function(e,t,n){for(var o=0,i=t.length;o<i;o++)se(e,t[o],n);return n}(t||"*",s.nodeType?[s]:s,[]),g=!e||!r&&t?m:xe(m,h,e,s,l),v=n?i||(r?e:p||o)?[]:a:g;if(n&&n(g,v,s,l),o)for(c=xe(v,f),o(c,[],s,l),u=c.length;u--;)(d=c[u])&&(v[f[u]]=!(g[f[u]]=d));if(r){if(i||e){if(i){for(c=[],u=v.length;u--;)(d=v[u])&&c.push(g[u]=d);i(null,v=[],c,l)}for(u=v.length;u--;)(d=v[u])&&-1<(c=i?O(r,d):h[u])&&(r[c]=!(a[c]=d))}}else v=xe(v===a?v.splice(p,v.length):v),i?i(null,a,v,l):R.apply(a,v)}))}function Te(e){for(var t,n,i,r=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,u=ke((function(e){return e===t}),s,!0),d=ke((function(e){return-1<O(t,e)}),s,!0),h=[function(e,n,o){var i=!a&&(o||n!==c)||((t=n).nodeType?u(e,n,o):d(e,n,o));return t=null,i}];l<r;l++)if(n=o.relative[e[l].type])h=[ke(we(h),n)];else{if((n=o.filter[e[l].type].apply(null,e[l].matches))[k]){for(i=++l;i<r&&!o.relative[e[i].type];i++);return Ce(1<l&&we(h),1<l&&be(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(U,"$1"),n,l<i&&Te(e.slice(l,i)),i<r&&Te(e=e.slice(i)),i<r&&be(e))}h.push(n)}return we(h)}return ye.prototype=o.filters=o.pseudos,o.setFilters=new ye,a=se.tokenize=function(e,t){var n,i,r,a,s,l,c,u=S[e+" "];if(u)return t?0:u.slice(0);for(s=e,l=[],c=o.preFilter;s;){for(a in n&&!(i=W.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(r=[])),n=!1,(i=_.exec(s))&&(n=i.shift(),r.push({value:n,type:i[0].replace(U," ")}),s=s.slice(n.length)),o.filter)!(i=G[a].exec(s))||c[a]&&!(i=c[a](i))||(n=i.shift(),r.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):S(e,l).slice(0)},s=se.compile=function(e,t){var n,i,r,s,l,u,d=[],p=[],g=E[e+" "];if(!g){for(t||(t=a(e)),n=t.length;n--;)(g=Te(t[n]))[k]?d.push(g):p.push(g);(g=E(e,(i=p,s=0<(r=d).length,l=0<i.length,u=function(e,t,n,a,u){var d,p,g,v=0,y="0",b=e&&[],k=[],w=c,C=e||l&&o.find.TAG("*",u),T=x+=null==w?1:Math.random()||.1,S=C.length;for(u&&(c=t==f||t||u);y!==S&&null!=(d=C[y]);y++){if(l&&d){for(p=0,t||d.ownerDocument==f||(h(d),n=!m);g=i[p++];)if(g(d,t||f,n)){a.push(d);break}u&&(x=T)}s&&((d=!g&&d)&&v--,e&&b.push(d))}if(v+=y,s&&y!==v){for(p=0;g=r[p++];)g(b,k,t,n);if(e){if(0<v)for(;y--;)b[y]||k[y]||(k[y]=D.call(a));k=xe(k)}R.apply(a,k),u&&!e&&0<k.length&&1<v+r.length&&se.uniqueSort(a)}return u&&(x=T,c=w),b},s?ce(u):u))).selector=e}return g},l=se.select=function(e,t,n,i){var r,l,c,u,d,h="function"==typeof e&&e,f=!i&&a(e=h.selector||e);if(n=n||[],1===f.length){if(2<(l=f[0]=f[0].slice(0)).length&&"ID"===(c=l[0]).type&&9===t.nodeType&&m&&o.relative[l[1].type]){if(!(t=(o.find.ID(c.matches[0].replace(te,ne),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(r=G.needsContext.test(e)?0:l.length;r--&&(c=l[r],!o.relative[u=c.type]);)if((d=o.find[u])&&(i=d(c.matches[0].replace(te,ne),ee.test(l[0].type)&&ve(t.parentNode)||t))){if(l.splice(r,1),!(e=i.length&&be(l)))return R.apply(n,i),n;break}}return(h||s(e,f))(i,t,!m,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=k.split("").sort(A).join("")===k,n.detectDuplicates=!!d,h(),n.sortDetached=ue((function(e){return 1&e.compareDocumentPosition(f.createElement("fieldset"))})),ue((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ue((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ue((function(e){return null==e.getAttribute("disabled")}))||de(F,(function(e,t,n){var o;if(!n)return!0===e[t]?t.toLowerCase():(o=e.getAttributeNode(t))&&o.specified?o.value:null})),se}(e);w.find=C,w.expr=C.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=C.uniqueSort,w.text=C.getText,w.isXMLDoc=C.isXML,w.contains=C.contains,w.escapeSelector=C.escape;var T=function(e,t,n){for(var o=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&w(e).is(n))break;o.push(e)}return o},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},E=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function I(e,t,n){return p(t)?w.grep(e,(function(e,o){return!!t.call(e,o,e)!==n})):t.nodeType?w.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?w.grep(e,(function(e){return-1<s.call(t,e)!==n})):w.filter(t,e,n)}w.filter=function(e,t,n){var o=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===o.nodeType?w.find.matchesSelector(o,e)?[o]:[]:w.find.matches(e,w.grep(t,(function(e){return 1===e.nodeType})))},w.fn.extend({find:function(e){var t,n,o=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter((function(){for(t=0;t<o;t++)if(w.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<o;t++)w.find(e,i[t],n);return 1<o?w.uniqueSort(n):n},filter:function(e){return this.pushStack(I(this,e||[],!1))},not:function(e){return this.pushStack(I(this,e||[],!0))},is:function(e){return!!I(this,"string"==typeof e&&E.test(e)?w(e):e||[],!1).length}});var $,D=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var o,i;if(!e)return this;if(n=n||$,"string"==typeof e){if(!(o="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:D.exec(e))||!o[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(o[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(o[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),A.test(o[1])&&w.isPlainObject(t))for(o in t)p(this[o])?this[o](t[o]):this.attr(o,t[o]);return this}return(i=g.getElementById(o[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):p(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,$=w(g);var L=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0}))},closest:function(e,t){var n,o=0,i=this.length,r=[],a="string"!=typeof e&&w(e);if(!E.test(e))for(;o<i;o++)for(n=this[o];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&w.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(1<r.length?w.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?s.call(w(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,n){return T(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,n){return T(e,"nextSibling",n)},prevUntil:function(e,t,n){return T(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return null!=e.contentDocument&&o(e.contentDocument)?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},(function(e,t){w.fn[e]=function(n,o){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(o=n),o&&"string"==typeof o&&(i=w.filter(o,i)),1<this.length&&(R[e]||w.uniqueSort(i),L.test(e)&&i.reverse()),this.pushStack(i)}}));var O=/[^\x20\t\r\n\f]+/g;function F(e){return e}function H(e){throw e}function M(e,t,n,o){var i;try{e&&p(i=e.promise)?i.call(e).done(t).fail(n):e&&p(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(o))}catch(e){n.apply(void 0,[e])}}w.Callbacks=function(e){var t,n;e="string"==typeof e?(t=e,n={},w.each(t.match(O)||[],(function(e,t){n[t]=!0})),n):w.extend({},e);var o,i,r,a,s=[],l=[],c=-1,u=function(){for(a=a||e.once,r=o=!0;l.length;c=-1)for(i=l.shift();++c<s.length;)!1===s[c].apply(i[0],i[1])&&e.stopOnFalse&&(c=s.length,i=!1);e.memory||(i=!1),o=!1,a&&(s=i?[]:"")},d={add:function(){return s&&(i&&!o&&(c=s.length-1,l.push(i)),function t(n){w.each(n,(function(n,o){p(o)?e.unique&&d.has(o)||s.push(o):o&&o.length&&"string"!==b(o)&&t(o)}))}(arguments),i&&!o&&u()),this},remove:function(){return w.each(arguments,(function(e,t){for(var n;-1<(n=w.inArray(t,s,n));)s.splice(n,1),n<=c&&c--})),this},has:function(e){return e?-1<w.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=l=[],s=i="",this},disabled:function(){return!s},lock:function(){return a=l=[],i||o||(s=i=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],l.push(t),o||u()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!r}};return d},w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],o="pending",i={state:function(){return o},always:function(){return r.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred((function(t){w.each(n,(function(n,o){var i=p(e[o[4]])&&e[o[4]];r[o[1]]((function(){var e=i&&i.apply(this,arguments);e&&p(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[o[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(t,o,i){var r=0;function a(t,n,o,i){return function(){var s=this,l=arguments,c=function(){var e,c;if(!(t<r)){if((e=o.apply(s,l))===n.promise())throw new TypeError("Thenable self-resolution");c=e&&("object"==typeof e||"function"==typeof e)&&e.then,p(c)?i?c.call(e,a(r,n,F,i),a(r,n,H,i)):(r++,c.call(e,a(r,n,F,i),a(r,n,H,i),a(r,n,F,n.notifyWith))):(o!==F&&(s=void 0,l=[e]),(i||n.resolveWith)(s,l))}},u=i?c:function(){try{c()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,u.stackTrace),r<=t+1&&(o!==H&&(s=void 0,l=[e]),n.rejectWith(s,l))}};t?u():(w.Deferred.getStackHook&&(u.stackTrace=w.Deferred.getStackHook()),e.setTimeout(u))}}return w.Deferred((function(e){n[0][3].add(a(0,e,p(i)?i:F,e.notifyWith)),n[1][3].add(a(0,e,p(t)?t:F)),n[2][3].add(a(0,e,p(o)?o:H))})).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},r={};return w.each(n,(function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add((function(){o=s}),n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),r[t[0]]=function(){return r[t[0]+"With"](this===r?void 0:this,arguments),this},r[t[0]+"With"]=a.fireWith})),i.promise(r),t&&t.call(r,r),r},when:function(e){var t=arguments.length,n=t,o=Array(n),r=i.call(arguments),a=w.Deferred(),s=function(e){return function(n){o[e]=this,r[e]=1<arguments.length?i.call(arguments):n,--t||a.resolveWith(o,r)}};if(t<=1&&(M(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||p(r[n]&&r[n].then)))return a.then();for(;n--;)M(r[n],s(n),a.reject);return a.promise()}});var j=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&j.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout((function(){throw t}))};var B=w.Deferred();function z(){g.removeEventListener("DOMContentLoaded",z),e.removeEventListener("load",z),w.ready()}w.fn.ready=function(e){return B.then(e).catch((function(e){w.readyException(e)})),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0)!==e&&0<--w.readyWait||B.resolveWith(g,[w])}}),w.ready.then=B.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?e.setTimeout(w.ready):(g.addEventListener("DOMContentLoaded",z),e.addEventListener("load",z));var U=function(e,t,n,o,i,r,a){var s=0,l=e.length,c=null==n;if("object"===b(n))for(s in i=!0,n)U(e,t,s,n[s],!0,r,a);else if(void 0!==o&&(i=!0,p(o)||(a=!0),c&&(a?(t.call(e,o),t=null):(c=t,t=function(e,t,n){return c.call(w(e),n)})),t))for(;s<l;s++)t(e[s],n,a?o:o.call(e[s],s,t(e[s],n)));return i?e:c?t.call(e):l?t(e[0],n):r},W=/^-ms-/,_=/-([a-z])/g;function q(e,t){return t.toUpperCase()}function K(e){return e.replace(W,"ms-").replace(_,q)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=w.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var o,i=this.cache(e);if("string"==typeof t)i[K(t)]=n;else for(o in t)i[K(o)]=t[o];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][K(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,o=e[this.expando];if(void 0!==o){if(void 0!==t){n=(t=Array.isArray(t)?t.map(K):(t=K(t))in o?[t]:t.match(O)||[]).length;for(;n--;)delete o[t[n]]}(void 0===t||w.isEmptyObject(o))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var Q=new G,Y=new G,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function J(e,t,n){var o,i;if(void 0===n&&1===e.nodeType)if(o="data-"+t.replace(Z,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(o))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:X.test(i)?JSON.parse(i):i)}catch(e){}Y.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return Y.hasData(e)||Q.hasData(e)},data:function(e,t,n){return Y.access(e,t,n)},removeData:function(e,t){Y.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,o,i,r=this[0],a=r&&r.attributes;if(void 0===e){if(this.length&&(i=Y.get(r),1===r.nodeType&&!Q.get(r,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(o=a[n].name).indexOf("data-")&&(o=K(o.slice(5)),J(r,o,i[o]));Q.set(r,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){Y.set(this,e)})):U(this,(function(t){var n;if(r&&void 0===t)return void 0!==(n=Y.get(r,e))||void 0!==(n=J(r,e))?n:void 0;this.each((function(){Y.set(this,e,t)}))}),null,t,1<arguments.length,null,!0)},removeData:function(e){return this.each((function(){Y.remove(this,e)}))}}),w.extend({queue:function(e,t,n){var o;if(e)return t=(t||"fx")+"queue",o=Q.get(e,t),n&&(!o||Array.isArray(n)?o=Q.access(e,t,w.makeArray(n)):o.push(n)),o||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),o=n.length,i=n.shift(),r=w._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),o--),i&&("fx"===t&&n.unshift("inprogress"),delete r.stop,i.call(e,(function(){w.dequeue(e,t)}),r)),!o&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:w.Callbacks("once memory").add((function(){Q.remove(e,[t+"queue",n])}))})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each((function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){w.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,o=1,i=w.Deferred(),r=this,a=this.length,s=function(){--o||i.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Q.get(r[a],e+"queueHooks"))&&n.empty&&(o++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],oe=g.documentElement,ie=function(e){return w.contains(e.ownerDocument,e)},re={composed:!0};oe.getRootNode&&(ie=function(e){return w.contains(e.ownerDocument,e)||e.getRootNode(re)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===w.css(e,"display")};function se(e,t,n,o){var i,r,a=20,s=o?function(){return o.cur()}:function(){return w.css(e,t,"")},l=s(),c=n&&n[3]||(w.cssNumber[t]?"":"px"),u=e.nodeType&&(w.cssNumber[t]||"px"!==c&&+l)&&te.exec(w.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;a--;)w.style(e,t,u+c),(1-r)*(1-(r=s()/l||.5))<=0&&(a=0),u/=r;u*=2,w.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],o&&(o.unit=c,o.start=u,o.end=i)),i}var le={};function ce(e,t){for(var n,o,i,r,a,s,l,c=[],u=0,d=e.length;u<d;u++)(o=e[u]).style&&(n=o.style.display,t?("none"===n&&(c[u]=Q.get(o,"display")||null,c[u]||(o.style.display="")),""===o.style.display&&ae(o)&&(c[u]=(l=a=r=void 0,a=(i=o).ownerDocument,s=i.nodeName,(l=le[s])||(r=a.body.appendChild(a.createElement(s)),l=w.css(r,"display"),r.parentNode.removeChild(r),"none"===l&&(l="block"),le[s]=l)))):"none"!==n&&(c[u]="none",Q.set(o,"display",n)));for(u=0;u<d;u++)null!=c[u]&&(e[u].style.display=c[u]);return e}w.fn.extend({show:function(){return ce(this,!0)},hide:function(){return ce(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){ae(this)?w(this).show():w(this).hide()}))}});var ue,de,he=/^(?:checkbox|radio)$/i,fe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,pe=/^$|^module$|\/(?:java|ecma)script/i;ue=g.createDocumentFragment().appendChild(g.createElement("div")),(de=g.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),ue.appendChild(de),f.checkClone=ue.cloneNode(!0).cloneNode(!0).lastChild.checked,ue.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!ue.cloneNode(!0).lastChild.defaultValue,ue.innerHTML="<option></option>",f.option=!!ue.lastChild;var me={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ge(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,o=e.length;n<o;n++)Q.set(e[n],"globalEval",!t||Q.get(t[n],"globalEval"))}me.tbody=me.tfoot=me.colgroup=me.caption=me.thead,me.th=me.td,f.option||(me.optgroup=me.option=[1,"<select multiple='multiple'>","</select>"]);var ye=/<|&#?\w+;/;function be(e,t,n,o,i){for(var r,a,s,l,c,u,d=t.createDocumentFragment(),h=[],f=0,p=e.length;f<p;f++)if((r=e[f])||0===r)if("object"===b(r))w.merge(h,r.nodeType?[r]:r);else if(ye.test(r)){for(a=a||d.appendChild(t.createElement("div")),s=(fe.exec(r)||["",""])[1].toLowerCase(),l=me[s]||me._default,a.innerHTML=l[1]+w.htmlPrefilter(r)+l[2],u=l[0];u--;)a=a.lastChild;w.merge(h,a.childNodes),(a=d.firstChild).textContent=""}else h.push(t.createTextNode(r));for(d.textContent="",f=0;r=h[f++];)if(o&&-1<w.inArray(r,o))i&&i.push(r);else if(c=ie(r),a=ge(d.appendChild(r),"script"),c&&ve(a),n)for(u=0;r=a[u++];)pe.test(r.type||"")&&n.push(r);return d}var ke=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function xe(){return!1}function Ce(e,t){return e===function(){try{return g.activeElement}catch(e){}}()==("focus"===t)}function Te(e,t,n,o,i,r){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(o=o||n,n=void 0),t)Te(e,s,n,o,t[s],r);return e}if(null==o&&null==i?(i=n,o=n=void 0):null==i&&("string"==typeof n?(i=o,o=void 0):(i=o,o=n,n=void 0)),!1===i)i=xe;else if(!i)return e;return 1===r&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each((function(){w.event.add(this,t,i,o,n)}))}function Se(e,t,n){n?(Q.set(e,t,!1),w.event.add(e,t,{namespace:!1,handler:function(e){var o,r,a=Q.get(this,t);if(1&e.isTrigger&&this[t]){if(a.length)(w.event.special[t]||{}).delegateType&&e.stopPropagation();else if(a=i.call(arguments),Q.set(this,t,a),o=n(this,t),this[t](),a!==(r=Q.get(this,t))||o?Q.set(this,t,!1):r={},a!==r)return e.stopImmediatePropagation(),e.preventDefault(),r&&r.value}else a.length&&(Q.set(this,t,{value:w.event.trigger(w.extend(a[0],w.Event.prototype),a.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,t)&&w.event.add(e,t,we)}w.event={global:{},add:function(e,t,n,o,i){var r,a,s,l,c,u,d,h,f,p,m,g=Q.get(e);if(V(e))for(n.handler&&(n=(r=n).handler,i=r.selector),i&&w.find.matchesSelector(oe,i),n.guid||(n.guid=w.guid++),(l=g.events)||(l=g.events=Object.create(null)),(a=g.handle)||(a=g.handle=function(t){return void 0!==w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(O)||[""]).length;c--;)f=m=(s=ke.exec(t[c])||[])[1],p=(s[2]||"").split(".").sort(),f&&(d=w.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=w.event.special[f]||{},u=w.extend({type:f,origType:m,data:o,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:p.join(".")},r),(h=l[f])||((h=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,o,p,a)||e.addEventListener&&e.addEventListener(f,a)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,u):h.push(u),w.event.global[f]=!0)},remove:function(e,t,n,o,i){var r,a,s,l,c,u,d,h,f,p,m,g=Q.hasData(e)&&Q.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(O)||[""]).length;c--;)if(f=m=(s=ke.exec(t[c])||[])[1],p=(s[2]||"").split(".").sort(),f){for(d=w.event.special[f]||{},h=l[f=(o?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=r=h.length;r--;)u=h[r],!i&&m!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||o&&o!==u.selector&&("**"!==o||!u.selector)||(h.splice(r,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));a&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,g.handle)||w.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)w.event.remove(e,f+t[c],n,o,!0);w.isEmptyObject(l)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,o,i,r,a,s=new Array(arguments.length),l=w.event.fix(e),c=(Q.get(this,"events")||Object.create(null))[l.type]||[],u=w.event.special[l.type]||{};for(s[0]=l,t=1;t<arguments.length;t++)s[t]=arguments[t];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){for(a=w.event.handlers.call(this,l,c),t=0;(i=a[t++])&&!l.isPropagationStopped();)for(l.currentTarget=i.elem,n=0;(r=i.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==r.namespace&&!l.rnamespace.test(r.namespace)||(l.handleObj=r,l.data=r.data,void 0!==(o=((w.event.special[r.origType]||{}).handle||r.handler).apply(i.elem,s))&&!1===(l.result=o)&&(l.preventDefault(),l.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,o,i,r,a,s=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&1<=e.button))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(r=[],a={},n=0;n<l;n++)void 0===a[i=(o=t[n]).selector+" "]&&(a[i]=o.needsContext?-1<w(i,this).index(c):w.find(i,this,null,[c]).length),a[i]&&r.push(o);r.length&&s.push({elem:c,handlers:r})}return c=this,l<t.length&&s.push({elem:c,handlers:t.slice(l)}),s},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:p(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return he.test(t.type)&&t.click&&N(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return he.test(t.type)&&t.click&&N(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return he.test(t.type)&&t.click&&N(t,"input")&&Q.get(t,"click")||N(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:xe,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:xe,isPropagationStopped:xe,isImmediatePropagationStopped:xe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},w.event.addProp),w.each({focus:"focusin",blur:"focusout"},(function(e,t){w.event.special[e]={setup:function(){return Se(this,e,Ce),!1},trigger:function(){return Se(this,e),!0},_default:function(t){return Q.get(t.target,e)},delegateType:t}})),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,o=e.relatedTarget,i=e.handleObj;return o&&(o===this||w.contains(this,o))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}})),w.fn.extend({on:function(e,t,n,o){return Te(this,e,t,n,o)},one:function(e,t,n,o){return Te(this,e,t,n,o,1)},off:function(e,t,n){var o,i;if(e&&e.preventDefault&&e.handleObj)return o=e.handleObj,w(e.delegateTarget).off(o.namespace?o.origType+"."+o.namespace:o.origType,o.selector,o.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=xe),this.each((function(){w.event.remove(this,e,n,t)}))}});var Ee=/<script|<style|<link/i,Ne=/checked\s*(?:[^=]|=\s*.checked.)/i,Ae=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ie(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")&&w(e).children("tbody")[0]||e}function $e(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function De(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,o,i,r,a,s;if(1===t.nodeType){if(Q.hasData(e)&&(s=Q.get(e).events))for(i in Q.remove(t,"handle events"),s)for(n=0,o=s[i].length;n<o;n++)w.event.add(t,i,s[i][n]);Y.hasData(e)&&(r=Y.access(e),a=w.extend({},r),Y.set(t,a))}}function Re(e,t,n,o){t=r(t);var i,a,s,l,c,u,d=0,h=e.length,m=h-1,g=t[0],v=p(g);if(v||1<h&&"string"==typeof g&&!f.checkClone&&Ne.test(g))return e.each((function(i){var r=e.eq(i);v&&(t[0]=g.call(this,i,r.html())),Re(r,t,n,o)}));if(h&&(a=(i=be(t,e[0].ownerDocument,!1,e,o)).firstChild,1===i.childNodes.length&&(i=a),a||o)){for(l=(s=w.map(ge(i,"script"),$e)).length;d<h;d++)c=i,d!==m&&(c=w.clone(c,!0,!0),l&&w.merge(s,ge(c,"script"))),n.call(e[d],c,d);if(l)for(u=s[s.length-1].ownerDocument,w.map(s,De),d=0;d<l;d++)c=s[d],pe.test(c.type||"")&&!Q.access(c,"globalEval")&&w.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?w._evalUrl&&!c.noModule&&w._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):y(c.textContent.replace(Ae,""),c,u))}return e}function Pe(e,t,n){for(var o,i=t?w.filter(t,e):e,r=0;null!=(o=i[r]);r++)n||1!==o.nodeType||w.cleanData(ge(o)),o.parentNode&&(n&&ie(o)&&ve(ge(o,"script")),o.parentNode.removeChild(o));return e}w.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var o,i,r,a,s,l,c,u=e.cloneNode(!0),d=ie(e);if(!(f.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ge(u),o=0,i=(r=ge(e)).length;o<i;o++)s=r[o],"input"===(c=(l=a[o]).nodeName.toLowerCase())&&he.test(s.type)?l.checked=s.checked:"input"!==c&&"textarea"!==c||(l.defaultValue=s.defaultValue);if(t)if(n)for(r=r||ge(e),a=a||ge(u),o=0,i=r.length;o<i;o++)Le(r[o],a[o]);else Le(e,u);return 0<(a=ge(u,"script")).length&&ve(a,!d&&ge(e,"script")),u},cleanData:function(e){for(var t,n,o,i=w.event.special,r=0;void 0!==(n=e[r]);r++)if(V(n)){if(t=n[Q.expando]){if(t.events)for(o in t.events)i[o]?w.event.remove(n,o):w.removeEvent(n,o,t.handle);n[Q.expando]=void 0}n[Y.expando]&&(n[Y.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Pe(this,e,!0)},remove:function(e){return Pe(this,e)},text:function(e){return U(this,(function(e){return void 0===e?w.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Re(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ie(this,e).appendChild(e)}))},prepend:function(){return Re(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ie(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Re(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Re(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ge(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return w.clone(this,e,t)}))},html:function(e){return U(this,(function(e){var t=this[0]||{},n=0,o=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ee.test(e)&&!me[(fe.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<o;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(ge(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Re(this,arguments,(function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(ge(this)),n&&n.replaceChild(t,this))}),e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){w.fn[e]=function(e){for(var n,o=[],i=w(e),r=i.length-1,s=0;s<=r;s++)n=s===r?this:this.clone(!0),w(i[s])[t](n),a.apply(o,n.get());return this.pushStack(o)}}));var Oe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Fe=/^--/,He=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Me=function(e,t,n){var o,i,r={};for(i in t)r[i]=e.style[i],e.style[i]=t[i];for(i in o=n.call(e),t)e.style[i]=r[i];return o},je=new RegExp(ne.join("|"),"i"),Be="[\\x20\\t\\r\\n\\f]",ze=new RegExp("^"+Be+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Be+"+$","g");function Ue(e,t,n){var o,i,r,a,s=Fe.test(t),l=e.style;return(n=n||He(e))&&(a=n.getPropertyValue(t)||n[t],s&&(a=a.replace(ze,"$1")),""!==a||ie(e)||(a=w.style(e,t)),!f.pixelBoxStyles()&&Oe.test(a)&&je.test(t)&&(o=l.width,i=l.minWidth,r=l.maxWidth,l.minWidth=l.maxWidth=l.width=a,a=n.width,l.width=o,l.minWidth=i,l.maxWidth=r)),void 0!==a?a+"":a}function We(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",oe.appendChild(c).appendChild(u);var t=e.getComputedStyle(u);o="1%"!==t.top,l=12===n(t.marginLeft),u.style.right="60%",a=36===n(t.right),i=36===n(t.width),u.style.position="absolute",r=12===n(u.offsetWidth/3),oe.removeChild(c),u=null}}function n(e){return Math.round(parseFloat(e))}var o,i,r,a,s,l,c=g.createElement("div"),u=g.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===u.style.backgroundClip,w.extend(f,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),o},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),r},reliableTrDimensions:function(){var t,n,o,i;return null==s&&(t=g.createElement("table"),n=g.createElement("tr"),o=g.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="border:1px solid",n.style.height="1px",o.style.height="9px",o.style.display="block",oe.appendChild(t).appendChild(n).appendChild(o),i=e.getComputedStyle(n),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===n.offsetHeight,oe.removeChild(t)),s}}))}();var _e=["Webkit","Moz","ms"],qe=g.createElement("div").style,Ke={};function Ve(e){return w.cssProps[e]||Ke[e]||(e in qe?e:Ke[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=_e.length;n--;)if((e=_e[n]+t)in qe)return e}(e)||e)}var Ge=/^(none|table(?!-c[ea]).+)/,Qe={position:"absolute",visibility:"hidden",display:"block"},Ye={letterSpacing:"0",fontWeight:"400"};function Xe(e,t,n){var o=te.exec(t);return o?Math.max(0,o[2]-(n||0))+(o[3]||"px"):t}function Ze(e,t,n,o,i,r){var a="width"===t?1:0,s=0,l=0;if(n===(o?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=w.css(e,n+ne[a],!0,i)),o?("content"===n&&(l-=w.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(l-=w.css(e,"border"+ne[a]+"Width",!0,i))):(l+=w.css(e,"padding"+ne[a],!0,i),"padding"!==n?l+=w.css(e,"border"+ne[a]+"Width",!0,i):s+=w.css(e,"border"+ne[a]+"Width",!0,i));return!o&&0<=r&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-r-l-s-.5))||0),l}function Je(e,t,n){var o=He(e),i=(!f.boxSizingReliable()||n)&&"border-box"===w.css(e,"boxSizing",!1,o),r=i,a=Ue(e,t,o),s="offset"+t[0].toUpperCase()+t.slice(1);if(Oe.test(a)){if(!n)return a;a="auto"}return(!f.boxSizingReliable()&&i||!f.reliableTrDimensions()&&N(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===w.css(e,"display",!1,o))&&e.getClientRects().length&&(i="border-box"===w.css(e,"boxSizing",!1,o),(r=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ze(e,t,n||(i?"border":"content"),r,o,a)+"px"}function et(e,t,n,o,i){return new et.prototype.init(e,t,n,o,i)}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ue(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,o){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,r,a,s=K(t),l=Fe.test(t),c=e.style;if(l||(t=Ve(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,o))?i:c[t];"string"==(r=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),r="number"),null!=n&&n==n&&("number"!==r||l||(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),f.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,o))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,o){var i,r,a,s=K(t);return Fe.test(t)||(t=Ve(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ue(e,t,o)),"normal"===i&&t in Ye&&(i=Ye[t]),""===n||n?(r=parseFloat(i),!0===n||isFinite(r)?r||0:i):i}}),w.each(["height","width"],(function(e,t){w.cssHooks[t]={get:function(e,n,o){if(n)return!Ge.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,t,o):Me(e,Qe,(function(){return Je(e,t,o)}))},set:function(e,n,o){var i,r=He(e),a=!f.scrollboxSize()&&"absolute"===r.position,s=(a||o)&&"border-box"===w.css(e,"boxSizing",!1,r),l=o?Ze(e,t,o,s,r):0;return s&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(r[t])-Ze(e,t,"border",!1,r)-.5)),l&&(i=te.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Xe(0,n,l)}}})),w.cssHooks.marginLeft=We(f.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ue(e,"marginLeft"))||e.getBoundingClientRect().left-Me(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),w.each({margin:"",padding:"",border:"Width"},(function(e,t){w.cssHooks[e+t]={expand:function(n){for(var o=0,i={},r="string"==typeof n?n.split(" "):[n];o<4;o++)i[e+ne[o]+t]=r[o]||r[o-2]||r[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Xe)})),w.fn.extend({css:function(e,t){return U(this,(function(e,t,n){var o,i,r={},a=0;if(Array.isArray(t)){for(o=He(e),i=t.length;a<i;a++)r[t[a]]=w.css(e,t[a],!1,o);return r}return void 0!==n?w.style(e,t,n):w.css(e,t)}),e,t,1<arguments.length)}}),((w.Tween=et).prototype={constructor:et,init:function(e,t,n,o,i,r){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=o,this.unit=r||(w.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||!w.cssHooks[e.prop]&&null==e.elem.style[Ve(e.prop)]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=et.prototype.init,w.fx.step={};var tt,nt,ot,it,rt=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===g.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(st):e.setTimeout(st,w.fx.interval),w.fx.tick())}function lt(){return e.setTimeout((function(){tt=void 0})),tt=Date.now()}function ct(e,t){var n,o=0,i={height:e};for(t=t?1:0;o<4;o+=2-t)i["margin"+(n=ne[o])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var o,i=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),r=0,a=i.length;r<a;r++)if(o=i[r].call(n,t,e))return o}function dt(e,t,n){var o,i,r=0,a=dt.prefilters.length,s=w.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var t=tt||lt(),n=Math.max(0,c.startTime+c.duration-t),o=1-(n/c.duration||0),r=0,a=c.tweens.length;r<a;r++)c.tweens[r].run(o);return s.notifyWith(e,[c,o,n]),o<1&&a?n:(a||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:tt||lt(),duration:n.duration,tweens:[],createTween:function(t,n){var o=w.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(o),o},stop:function(t){var n=0,o=t?c.tweens.length:0;if(i)return this;for(i=!0;n<o;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),u=c.props;for(function(e,t){var n,o,i,r,a;for(n in e)if(i=t[o=K(n)],r=e[n],Array.isArray(r)&&(i=r[1],r=e[n]=r[0]),n!==o&&(e[o]=r,delete e[n]),(a=w.cssHooks[o])&&"expand"in a)for(n in r=a.expand(r),delete e[o],r)n in e||(e[n]=r[n],t[n]=i);else t[o]=i}(u,c.opts.specialEasing);r<a;r++)if(o=dt.prefilters[r].call(c,e,u,c.opts))return p(o.stop)&&(w._queueHooks(c.elem,c.opts.queue).stop=o.stop.bind(o)),o;return w.map(u,ut,c),p(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),w.fx.timer(w.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}w.Animation=w.extend(dt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){p(e)?(t=e,e=["*"]):e=e.match(O);for(var n,o=0,i=e.length;o<i;o++)n=e[o],dt.tweeners[n]=dt.tweeners[n]||[],dt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var o,i,r,a,s,l,c,u,d="width"in t||"height"in t,h=this,f={},p=e.style,m=e.nodeType&&ae(e),g=Q.get(e,"fxshow");for(o in n.queue||(null==(a=w._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,w.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[o],rt.test(i)){if(delete t[o],r=r||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[o])continue;m=!0}f[o]=g&&g[o]||w.style(e,o)}if((l=!w.isEmptyObject(t))||!w.isEmptyObject(f))for(o in d&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(c=g&&g.display)&&(c=Q.get(e,"display")),"none"===(u=w.css(e,"display"))&&(c?u=c:(ce([e],!0),c=e.style.display||c,u=w.css(e,"display"),ce([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===w.css(e,"float")&&(l||(h.done((function(){p.display=c})),null==c&&(u=p.display,c="none"===u?"":u)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),l=!1,f)l||(g?"hidden"in g&&(m=g.hidden):g=Q.access(e,"fxshow",{display:c}),r&&(g.hidden=!m),m&&ce([e],!0),h.done((function(){for(o in m||ce([e]),Q.remove(e,"fxshow"),f)w.style(e,o,f[o])}))),l=ut(m?g[o]:0,o,h),o in g||(g[o]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?dt.prefilters.unshift(e):dt.prefilters.push(e)}}),w.speed=function(e,t,n){var o=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||p(e)&&e,duration:e,easing:n&&t||t&&!p(t)&&t};return w.fx.off?o.duration=0:"number"!=typeof o.duration&&(o.duration in w.fx.speeds?o.duration=w.fx.speeds[o.duration]:o.duration=w.fx.speeds._default),null!=o.queue&&!0!==o.queue||(o.queue="fx"),o.old=o.complete,o.complete=function(){p(o.old)&&o.old.call(this),o.queue&&w.dequeue(this,o.queue)},o},w.fn.extend({fadeTo:function(e,t,n,o){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,o)},animate:function(e,t,n,o){var i=w.isEmptyObject(e),r=w.speed(t,n,o),a=function(){var t=dt(this,w.extend({},e),r);(i||Q.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===r.queue?this.each(a):this.queue(r.queue,a)},stop:function(e,t,n){var o=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",r=w.timers,a=Q.get(this);if(i)a[i]&&a[i].stop&&o(a[i]);else for(i in a)a[i]&&a[i].stop&&at.test(i)&&o(a[i]);for(i=r.length;i--;)r[i].elem!==this||null!=e&&r[i].queue!==e||(r[i].anim.stop(n),t=!1,r.splice(i,1));!t&&n||w.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=Q.get(this),o=n[e+"queue"],i=n[e+"queueHooks"],r=w.timers,a=o?o.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<a;t++)o[t]&&o[t].finish&&o[t].finish.call(this);delete n.finish}))}}),w.each(["toggle","show","hide"],(function(e,t){var n=w.fn[t];w.fn[t]=function(e,o,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ct(t,!0),e,o,i)}})),w.each({slideDown:ct("show"),slideUp:ct("hide"),slideToggle:ct("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){w.fn[e]=function(e,n,o){return this.animate(t,e,n,o)}})),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),tt=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){nt||(nt=!0,st())},w.fx.stop=function(){nt=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(t,n){return t=w.fx&&w.fx.speeds[t]||t,n=n||"fx",this.queue(n,(function(n,o){var i=e.setTimeout(n,t);o.stop=function(){e.clearTimeout(i)}}))},ot=g.createElement("input"),it=g.createElement("select").appendChild(g.createElement("option")),ot.type="checkbox",f.checkOn=""!==ot.value,f.optSelected=it.selected,(ot=g.createElement("input")).value="t",ot.type="radio",f.radioValue="t"===ot.value;var ht,ft=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return U(this,w.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each((function(){w.removeAttr(this,e)}))}}),w.extend({attr:function(e,t,n){var o,i,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?w.prop(e,t,n):(1===r&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?ht:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(o=i.set(e,n,t))?o:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(o=i.get(e,t))?o:null==(o=w.find.attr(e,t))?void 0:o)},attrHooks:{type:{set:function(e,t){if(!f.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,o=0,i=t&&t.match(O);if(i&&1===e.nodeType)for(;n=i[o++];)e.removeAttribute(n)}}),ht={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=ft[t]||w.find.attr;ft[t]=function(e,t,o){var i,r,a=t.toLowerCase();return o||(r=ft[a],ft[a]=i,i=null!=n(e,t,o)?a:null,ft[a]=r),i}}));var pt=/^(?:input|select|textarea|button)$/i,mt=/^(?:a|area)$/i;function gt(e){return(e.match(O)||[]).join(" ")}function vt(e){return e.getAttribute&&e.getAttribute("class")||""}function yt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(O)||[]}w.fn.extend({prop:function(e,t){return U(this,w.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each((function(){delete this[w.propFix[e]||e]}))}}),w.extend({prop:function(e,t,n){var o,i,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(o=i.set(e,n,t))?o:e[t]=n:i&&"get"in i&&null!==(o=i.get(e,t))?o:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||mt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){w.propFix[this.toLowerCase()]=this})),w.fn.extend({addClass:function(e){var t,n,o,i,r,a;return p(e)?this.each((function(t){w(this).addClass(e.call(this,t,vt(this)))})):(t=yt(e)).length?this.each((function(){if(o=vt(this),n=1===this.nodeType&&" "+gt(o)+" "){for(r=0;r<t.length;r++)i=t[r],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=gt(n),o!==a&&this.setAttribute("class",a)}})):this},removeClass:function(e){var t,n,o,i,r,a;return p(e)?this.each((function(t){w(this).removeClass(e.call(this,t,vt(this)))})):arguments.length?(t=yt(e)).length?this.each((function(){if(o=vt(this),n=1===this.nodeType&&" "+gt(o)+" "){for(r=0;r<t.length;r++)for(i=t[r];-1<n.indexOf(" "+i+" ");)n=n.replace(" "+i+" "," ");a=gt(n),o!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,o,i,r,a=typeof e,s="string"===a||Array.isArray(e);return p(e)?this.each((function(n){w(this).toggleClass(e.call(this,n,vt(this),t),t)})):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=yt(e),this.each((function(){if(s)for(r=w(this),i=0;i<n.length;i++)o=n[i],r.hasClass(o)?r.removeClass(o):r.addClass(o);else void 0!==e&&"boolean"!==a||((o=vt(this))&&Q.set(this,"__className__",o),this.setAttribute&&this.setAttribute("class",o||!1===e?"":Q.get(this,"__className__")||""))})))},hasClass:function(e){var t,n,o=0;for(t=" "+e+" ";n=this[o++];)if(1===n.nodeType&&-1<(" "+gt(vt(n))+" ").indexOf(t))return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,o,i=this[0];return arguments.length?(o=p(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=o?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,(function(e){return null==e?"":e+""}))),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n:void 0}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:gt(w.text(e))}},select:{get:function(e){var t,n,o,i=e.options,r=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?r+1:i.length;for(o=r<0?l:a?r:0;o<l;o++)if(((n=i[o]).selected||o===r)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=w(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,o,i=e.options,r=w.makeArray(t),a=i.length;a--;)((o=i[a]).selected=-1<w.inArray(w.valHooks.option.get(o),r))&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),w.each(["radio","checkbox"],(function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<w.inArray(w(e).val(),t)}},f.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),f.focusin="onfocusin"in e;var kt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,o,i){var r,a,s,l,c,d,h,f,v=[o||g],y=u.call(t,"type")?t.type:t,b=u.call(t,"namespace")?t.namespace.split("."):[];if(a=f=s=o=o||g,3!==o.nodeType&&8!==o.nodeType&&!kt.test(y+w.event.triggered)&&(-1<y.indexOf(".")&&(y=(b=y.split(".")).shift(),b.sort()),c=y.indexOf(":")<0&&"on"+y,(t=t[w.expando]?t:new w.Event(y,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=b.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=o),n=null==n?[t]:w.makeArray(n,[t]),h=w.event.special[y]||{},i||!h.trigger||!1!==h.trigger.apply(o,n))){if(!i&&!h.noBubble&&!m(o)){for(l=h.delegateType||y,kt.test(l+y)||(a=a.parentNode);a;a=a.parentNode)v.push(a),s=a;s===(o.ownerDocument||g)&&v.push(s.defaultView||s.parentWindow||e)}for(r=0;(a=v[r++])&&!t.isPropagationStopped();)f=a,t.type=1<r?l:h.bindType||y,(d=(Q.get(a,"events")||Object.create(null))[t.type]&&Q.get(a,"handle"))&&d.apply(a,n),(d=c&&a[c])&&d.apply&&V(a)&&(t.result=d.apply(a,n),!1===t.result&&t.preventDefault());return t.type=y,i||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(v.pop(),n)||!V(o)||c&&p(o[y])&&!m(o)&&((s=o[c])&&(o[c]=null),w.event.triggered=y,t.isPropagationStopped()&&f.addEventListener(y,wt),o[y](),t.isPropagationStopped()&&f.removeEventListener(y,wt),w.event.triggered=void 0,s&&(o[c]=s)),t.result}},simulate:function(e,t,n){var o=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(o,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each((function(){w.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),f.focusin||w.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var o=this.ownerDocument||this.document||this,i=Q.access(o,t);i||o.addEventListener(e,n,!0),Q.access(o,t,(i||0)+1)},teardown:function(){var o=this.ownerDocument||this.document||this,i=Q.access(o,t)-1;i?Q.access(o,t,i):(o.removeEventListener(e,n,!0),Q.remove(o,t))}}}));var xt=e.location,Ct={guid:Date.now()},Tt=/\?/;w.parseXML=function(t){var n,o;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(t){}return o=n&&n.getElementsByTagName("parsererror")[0],n&&!o||w.error("Invalid XML: "+(o?w.map(o.childNodes,(function(e){return e.textContent})).join("\n"):t)),n};var St=/\[\]$/,Et=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function It(e,t,n,o){var i;if(Array.isArray(t))w.each(t,(function(t,i){n||St.test(e)?o(e,i):It(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,o)}));else if(n||"object"!==b(t))o(e,t);else for(i in t)It(e+"["+i+"]",t[i],n,o)}w.param=function(e,t){var n,o=[],i=function(e,t){var n=p(t)?t():t;o[o.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,(function(){i(this.name,this.value)}));else for(n in e)It(n,e[n],t,i);return o.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!he.test(e))})).map((function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,(function(e){return{name:t.name,value:e.replace(Et,"\r\n")}})):{name:t.name,value:n.replace(Et,"\r\n")}})).get()}});var $t=/%20/g,Dt=/#.*$/,Lt=/([?&])_=[^&]*/,Rt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:GET|HEAD)$/,Ot=/^\/\//,Ft={},Ht={},Mt="*/".concat("*"),jt=g.createElement("a");function Bt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var o,i=0,r=t.toLowerCase().match(O)||[];if(p(n))for(;o=r[i++];)"+"===o[0]?(o=o.slice(1)||"*",(e[o]=e[o]||[]).unshift(n)):(e[o]=e[o]||[]).push(n)}}function zt(e,t,n,o){var i={},r=e===Ht;function a(s){var l;return i[s]=!0,w.each(e[s]||[],(function(e,s){var c=s(t,n,o);return"string"!=typeof c||r||i[c]?r?!(l=c):void 0:(t.dataTypes.unshift(c),a(c),!1)})),l}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Ut(e,t){var n,o,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:o||(o={}))[n]=t[n]);return o&&w.extend(!0,e,o),e}jt.href=xt.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Mt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ut(Ut(e,w.ajaxSettings),t):Ut(w.ajaxSettings,e)},ajaxPrefilter:Bt(Ft),ajaxTransport:Bt(Ht),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var o,i,r,a,s,l,c,u,d,h,f=w.ajaxSetup({},n),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?w(p):w.event,v=w.Deferred(),y=w.Callbacks("once memory"),b=f.statusCode||{},k={},x={},C="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a)for(a={};t=Rt.exec(r);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?r:null},setRequestHeader:function(e,t){return null==c&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,k[e]=t),this},overrideMimeType:function(e){return null==c&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)T.always(e[T.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||C;return o&&o.abort(t),S(0,t),this}};if(v.promise(T),f.url=((t||f.url||xt.href)+"").replace(Ot,xt.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(O)||[""],null==f.crossDomain){l=g.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=jt.protocol+"//"+jt.host!=l.protocol+"//"+l.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=w.param(f.data,f.traditional)),zt(Ft,f,n,T),c)return T;for(d in(u=w.event&&f.global)&&0==w.active++&&w.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Pt.test(f.type),i=f.url.replace(Dt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace($t,"+")):(h=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Tt.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Lt,"$1"),h=(Tt.test(i)?"&":"?")+"_="+Ct.guid+++h),f.url=i+h),f.ifModified&&(w.lastModified[i]&&T.setRequestHeader("If-Modified-Since",w.lastModified[i]),w.etag[i]&&T.setRequestHeader("If-None-Match",w.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Mt+"; q=0.01":""):f.accepts["*"]),f.headers)T.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,T,f)||c))return T.abort();if(C="abort",y.add(f.complete),T.done(f.success),T.fail(f.error),o=zt(Ht,f,n,T)){if(T.readyState=1,u&&m.trigger("ajaxSend",[T,f]),c)return T;f.async&&0<f.timeout&&(s=e.setTimeout((function(){T.abort("timeout")}),f.timeout));try{c=!1,o.send(k,S)}catch(t){if(c)throw t;S(-1,t)}}else S(-1,"No Transport");function S(t,n,a,l){var d,h,g,k,x,C=n;c||(c=!0,s&&e.clearTimeout(s),o=void 0,r=l||"",T.readyState=0<t?4:0,d=200<=t&&t<300||304===t,a&&(k=function(e,t,n){for(var o,i,r,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===o&&(o=e.mimeType||t.getResponseHeader("Content-Type"));if(o)for(i in s)if(s[i]&&s[i].test(o)){l.unshift(i);break}if(l[0]in n)r=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){r=i;break}a||(a=i)}r=r||a}if(r)return r!==l[0]&&l.unshift(r),n[r]}(f,T,a)),!d&&-1<w.inArray("script",f.dataTypes)&&w.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),k=function(e,t,n,o){var i,r,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(r=u.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!l&&o&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(a=c[l+" "+r]||c["* "+r]))for(i in c)if((s=i.split(" "))[1]===r&&(a=c[l+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(r=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}(f,k,T,d),d?(f.ifModified&&((x=T.getResponseHeader("Last-Modified"))&&(w.lastModified[i]=x),(x=T.getResponseHeader("etag"))&&(w.etag[i]=x)),204===t||"HEAD"===f.type?C="nocontent":304===t?C="notmodified":(C=k.state,h=k.data,d=!(g=k.error))):(g=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",d?v.resolveWith(p,[h,C,T]):v.rejectWith(p,[T,C,g]),T.statusCode(b),b=void 0,u&&m.trigger(d?"ajaxSuccess":"ajaxError",[T,f,d?h:g]),y.fireWith(p,[T,C]),u&&(m.trigger("ajaxComplete",[T,f]),--w.active||w.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],(function(e,t){w[t]=function(e,n,o,i){return p(n)&&(i=i||o,o=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:o},w.isPlainObject(e)&&e))}})),w.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),w._evalUrl=function(e,t,n){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){w.globalEval(e,t,n)}})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(p(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return p(e)?this.each((function(t){w(this).wrapInner(e.call(this,t))})):this.each((function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=p(e);return this.each((function(n){w(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){w(this).replaceWith(this.childNodes)})),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Wt={0:200,1223:204},_t=w.ajaxSettings.xhr();f.cors=!!_t&&"withCredentials"in _t,f.ajax=_t=!!_t,w.ajaxTransport((function(t){var n,o;if(f.cors||_t&&!t.crossDomain)return{send:function(i,r){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=o=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?r(0,"error"):r(s.status,s.statusText):r(Wt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),o=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=o:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout((function(){n&&o()}))},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(i){if(n)throw i}},abort:function(){n&&n()}}})),w.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),w.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(o,i){t=w("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),g.head.appendChild(t[0])},abort:function(){n&&n()}}}));var qt,Kt=[],Vt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||w.expando+"_"+Ct.guid++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",(function(t,n,o){var i,r,a,s=!1!==t.jsonp&&(Vt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=p(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Vt,"$1"+i):!1!==t.jsonp&&(t.url+=(Tt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||w.error(i+" was not called"),a[0]},t.dataTypes[0]="json",r=e[i],e[i]=function(){a=arguments},o.always((function(){void 0===r?w(e).removeProp(i):e[i]=r,t[i]&&(t.jsonpCallback=n.jsonpCallback,Kt.push(i)),a&&p(r)&&r(a[0]),a=r=void 0})),"script"})),f.createHTMLDocument=((qt=g.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===qt.childNodes.length),w.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(f.createHTMLDocument?((o=(t=g.implementation.createHTMLDocument("")).createElement("base")).href=g.location.href,t.head.appendChild(o)):t=g),r=!n&&[],(i=A.exec(e))?[t.createElement(i[1])]:(i=be([e],t,r),r&&r.length&&w(r).remove(),w.merge([],i.childNodes)));var o,i,r},w.fn.load=function(e,t,n){var o,i,r,a=this,s=e.indexOf(" ");return-1<s&&(o=gt(e.slice(s)),e=e.slice(0,s)),p(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&w.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){r=arguments,a.html(o?w("<div>").append(w.parseHTML(e)).find(o):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,r||[e.responseText,t,e])}))}),this},w.expr.pseudos.animated=function(e){return w.grep(w.timers,(function(t){return e===t.elem})).length},w.offset={setOffset:function(e,t,n){var o,i,r,a,s,l,c=w.css(e,"position"),u=w(e),d={};"static"===c&&(e.style.position="relative"),s=u.offset(),r=w.css(e,"top"),l=w.css(e,"left"),("absolute"===c||"fixed"===c)&&-1<(r+l).indexOf("auto")?(a=(o=u.position()).top,i=o.left):(a=parseFloat(r)||0,i=parseFloat(l)||0),p(t)&&(t=t.call(e,n,w.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):u.css(d)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){w.offset.setOffset(this,e,t)}));var t,n,o=this[0];return o?o.getClientRects().length?(t=o.getBoundingClientRect(),n=o.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,o=this[0],i={top:0,left:0};if("fixed"===w.css(o,"position"))t=o.getBoundingClientRect();else{for(t=this.offset(),n=o.ownerDocument,e=o.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position");)e=e.parentNode;e&&e!==o&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(o,"marginTop",!0),left:t.left-i.left-w.css(o,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===w.css(e,"position");)e=e.offsetParent;return e||oe}))}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;w.fn[e]=function(o){return U(this,(function(e,o,i){var r;if(m(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===i)return r?r[t]:e[o];r?r.scrollTo(n?r.pageXOffset:i,n?i:r.pageYOffset):e[o]=i}),e,o,arguments.length)}})),w.each(["top","left"],(function(e,t){w.cssHooks[t]=We(f.pixelPosition,(function(e,n){if(n)return n=Ue(e,t),Oe.test(n)?w(e).position()[t]+"px":n}))})),w.each({Height:"height",Width:"width"},(function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,o){w.fn[o]=function(i,r){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===r?"margin":"border");return U(this,(function(t,n,i){var r;return m(t)?0===o.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===i?w.css(t,n,s):w.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){w.fn[t]=function(e){return this.on(t,e)}})),w.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,o){return this.on(t,e,n,o)},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)}}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){w.fn[t]=function(e,n){return 0<arguments.length?this.on(t,null,e,n):this.trigger(t)}}));var Gt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;w.proxy=function(e,t){var n,o,r;if("string"==typeof t&&(n=e[t],t=e,e=n),p(e))return o=i.call(arguments,2),(r=function(){return e.apply(t||this,o.concat(i.call(arguments)))}).guid=e.guid=e.guid||w.guid++,r},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=N,w.isFunction=p,w.isWindow=m,w.camelCase=K,w.type=b,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},w.trim=function(e){return null==e?"":(e+"").replace(Gt,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return w}));var Qt=e.jQuery,Yt=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=Yt),t&&e.jQuery===w&&(e.jQuery=Qt),w},void 0===t&&(e.jQuery=e.$=w),w})),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=jQuery.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||3<t[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(),function(e){"use strict";e.fn.emulateTransitionEnd=function(t){var n=!1,o=this;return e(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||e(o).trigger(e.support.transition.end)}),t),this},e((function(){e.support.transition=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})}))}(jQuery),function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(t){var o=e(this),i=o.attr("data-target");i||(i=(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var r=e(document).find(i);function a(){r.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),r.length||(r=o.closest(".alert")),r.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(r.removeClass("in"),e.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",a).emulateTransitionEnd(n.TRANSITION_DURATION):a())};var o=e.fn.alert;e.fn.alert=function(t){return this.each((function(){var o=e(this),i=o.data("bs.alert");i||o.data("bs.alert",i=new n(this)),"string"==typeof t&&i[t].call(o)}))},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=o,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),function(e){"use strict";var t=function(n,o){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,o),this.isLoading=!1};function n(n){return this.each((function(){var o=e(this),i=o.data("bs.button"),r="object"==typeof n&&n;i||o.data("bs.button",i=new t(this,r)),"toggle"==n?i.toggle():n&&i.setState(n)}))}t.VERSION="3.4.1",t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(t){var n="disabled",o=this.$element,i=o.is("input")?"val":"html",r=o.data();t+="Text",null==r.resetText&&o.data("resetText",o[i]()),setTimeout(e.proxy((function(){o[i](null==r[t]?this.options[t]:r[t]),"loadingText"==t?(this.isLoading=!0,o.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,o.removeClass(n).removeAttr(n).prop(n,!1))}),this),0)},t.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var o=e.fn.button;e.fn.button=n,e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=o,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var o=e(t.target).closest(".btn");n.call(o,"toggle"),e(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),o.is("input,button")?o.trigger("focus"):o.find("input:visible,button:visible").first().trigger("focus"))})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))}))}(jQuery),function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};function n(n){return this.each((function(){var o=e(this),i=o.data("bs.carousel"),r=e.extend({},t.DEFAULTS,o.data(),"object"==typeof n&&n),a="string"==typeof n?n:r.slide;i||o.data("bs.carousel",i=new t(this,r)),"number"==typeof n?i.to(n):a?i[a]():r.interval&&i.pause().cycle()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=600,t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},t.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},t.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t);if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var o=(n+("prev"==e?-1:1))%this.$items.length;return this.$items.eq(o)},t.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){t.to(e)})):n==e?this.pause().cycle():this.slide(n<e?"next":"prev",this.$items.eq(e))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(!this.sliding)return this.slide("next")},t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},t.prototype.slide=function(n,o){var i=this.$element.find(".item.active"),r=o||this.getItemForDirection(n,i),a=this.interval,s="next"==n?"left":"right",l=this;if(r.hasClass("active"))return this.sliding=!1;var c=r[0],u=e.Event("slide.bs.carousel",{relatedTarget:c,direction:s});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=e(this.$indicators.children()[this.getItemIndex(r)]);d&&d.addClass("active")}var h=e.Event("slid.bs.carousel",{relatedTarget:c,direction:s});return e.support.transition&&this.$element.hasClass("slide")?(r.addClass(n),"object"==typeof r&&r.length&&r[0].offsetWidth,i.addClass(s),r.addClass(s),i.one("bsTransitionEnd",(function(){r.removeClass([n,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),l.sliding=!1,setTimeout((function(){l.$element.trigger(h)}),0)})).emulateTransitionEnd(t.TRANSITION_DURATION)):(i.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(h)),a&&this.cycle(),this}};var o=e.fn.carousel;e.fn.carousel=n,e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=o,this};var i=function(t){var o=e(this),i=o.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var r=o.attr("data-target")||i,a=e(document).find(r);if(a.hasClass("carousel")){var s=e.extend({},a.data(),o.data()),l=o.attr("data-slide-to");l&&(s.interval=!1),n.call(a,s),l&&a.data("bs.carousel").to(l),t.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),e(window).on("load",(function(){e('[data-ride="carousel"]').each((function(){var t=e(this);n.call(t,t.data())}))}))}(jQuery),function(e){"use strict";var t=function(n,o){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,o),this.$trigger=e('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var n,o=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(document).find(o)}function o(n){return this.each((function(){var o=e(this),i=o.data("bs.collapse"),r=e.extend({},t.DEFAULTS,o.data(),"object"==typeof n&&n);!i&&r.toggle&&/show|hide/.test(n)&&(r.toggle=!1),i||o.data("bs.collapse",i=new t(this,r)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=350,t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var n,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(n=i.data("bs.collapse"))&&n.transitioning)){var r=e.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){i&&i.length&&(o.call(i,"hide"),n||i.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var l=e.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",e.proxy(s,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[a](this.$element[0][l])}}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var n=e.Event("hide.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){var o=this.dimension();this.$element[o](this.$element[o]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return i.call(this);this.$element[o](0).one("bsTransitionEnd",e.proxy(i,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},t.prototype.getParent=function(){return e(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy((function(t,o){var i=e(o);this.addAriaAndCollapsedClass(n(i),i)}),this)).end()},t.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var i=e.fn.collapse;e.fn.collapse=o,e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=i,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){var i=e(this);i.attr("data-target")||t.preventDefault();var r=n(i),a=r.data("bs.collapse")?"toggle":i.data();o.call(r,a)}))}(jQuery),function(e){"use strict";var t='[data-toggle="dropdown"]',n=function(t){e(t).on("click.bs.dropdown",this.toggle)};function o(t){var n=t.attr("data-target");n||(n=(n=t.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var o="#"!==n?e(document).find(n):null;return o&&o.length?o:t.parent()}function i(n){n&&3===n.which||(e(".dropdown-backdrop").remove(),e(t).each((function(){var t=e(this),i=o(t),r={relatedTarget:this};i.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&e.contains(i[0],n.target)||(i.trigger(n=e.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(t.attr("aria-expanded","false"),i.removeClass("open").trigger(e.Event("hidden.bs.dropdown",r)))))})))}n.VERSION="3.4.1",n.prototype.toggle=function(t){var n=e(this);if(!n.is(".disabled, :disabled")){var r=o(n),a=r.hasClass("open");if(i(),!a){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",i);var s={relatedTarget:this};if(r.trigger(t=e.Event("show.bs.dropdown",s)),t.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(e.Event("shown.bs.dropdown",s))}return!1}},n.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=e(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var r=o(i),a=r.hasClass("open");if(!a&&27!=n.which||a&&27==n.which)return 27==n.which&&r.find(t).trigger("focus"),i.trigger("click");var s=r.find(".dropdown-menu li:not(.disabled):visible a");if(s.length){var l=s.index(n.target);38==n.which&&0<l&&l--,40==n.which&&l<s.length-1&&l++,~l||(l=0),s.eq(l).trigger("focus")}}}};var r=e.fn.dropdown;e.fn.dropdown=function(t){return this.each((function(){var o=e(this),i=o.data("bs.dropdown");i||o.data("bs.dropdown",i=new n(this)),"string"==typeof t&&i[t].call(o)}))},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=r,this},e(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",(function(e){e.stopPropagation()})).on("click.bs.dropdown.data-api",t,n.prototype.toggle).on("keydown.bs.dropdown.data-api",t,n.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",n.prototype.keydown)}(jQuery),function(e){"use strict";var t=function(t,n){this.options=n,this.$body=e(document.body),this.$element=e(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,e.proxy((function(){this.$element.trigger("loaded.bs.modal")}),this))};function n(n,o){return this.each((function(){var i=e(this),r=i.data("bs.modal"),a=e.extend({},t.DEFAULTS,i.data(),"object"==typeof n&&n);r||i.data("bs.modal",r=new t(this,a)),"string"==typeof n?r[n](o):a.show&&r.show(o)}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=300,t.BACKDROP_TRANSITION_DURATION=150,t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},t.prototype.show=function(n){var o=this,i=e.Event("show.bs.modal",{relatedTarget:n});this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",(function(){o.$element.one("mouseup.dismiss.bs.modal",(function(t){e(t.target).is(o.$element)&&(o.ignoreBackdropClick=!0)}))})),this.backdrop((function(){var i=e.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),i&&o.$element[0].offsetWidth,o.$element.addClass("in"),o.enforceFocus();var r=e.Event("shown.bs.modal",{relatedTarget:n});i?o.$dialog.one("bsTransitionEnd",(function(){o.$element.trigger("focus").trigger(r)})).emulateTransitionEnd(t.TRANSITION_DURATION):o.$element.trigger("focus").trigger(r)})))},t.prototype.hide=function(n){n&&n.preventDefault(),n=e.Event("hide.bs.modal"),this.$element.trigger(n),this.isShown&&!n.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",e.proxy(this.hideModal,this)).emulateTransitionEnd(t.TRANSITION_DURATION):this.hideModal())},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy((function(e){document===e.target||this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")}),this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",e.proxy((function(e){27==e.which&&this.hide()}),this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},t.prototype.resize=function(){this.isShown?e(window).on("resize.bs.modal",e.proxy(this.handleUpdate,this)):e(window).off("resize.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop((function(){e.$body.removeClass("modal-open"),e.resetAdjustments(),e.resetScrollbar(),e.$element.trigger("hidden.bs.modal")}))},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(n){var o=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=e.support.transition&&i;if(this.$backdrop=e(document.createElement("div")).addClass("modal-backdrop "+i).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",e.proxy((function(e){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())}),this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!n)return;r?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):n()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var a=function(){o.removeBackdrop(),n&&n()};e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",a).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):a()}else n&&n()},t.prototype.handleUpdate=function(){this.adjustDialog()},t.prototype.adjustDialog=function(){var e=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},t.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth<e,this.scrollbarWidth=this.measureScrollbar()},t.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",t+n),e(this.fixedContent).each((function(t,o){var i=o.style.paddingRight,r=e(o).css("padding-right");e(o).data("padding-right",i).css("padding-right",parseFloat(r)+n+"px")})))},t.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),e(this.fixedContent).each((function(t,n){var o=e(n).data("padding-right");e(n).removeData("padding-right"),n.style.paddingRight=o||""}))},t.prototype.measureScrollbar=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",this.$body.append(e);var t=e.offsetWidth-e.clientWidth;return this.$body[0].removeChild(e),t};var o=e.fn.modal;e.fn.modal=n,e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=o,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(t){var o=e(this),i=o.attr("href"),r=o.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,""),a=e(document).find(r),s=a.data("bs.modal")?"toggle":e.extend({remote:!/#/.test(i)&&i},a.data(),o.data());o.is("a")&&t.preventDefault(),a.one("show.bs.modal",(function(e){e.isDefaultPrevented()||a.one("hidden.bs.modal",(function(){o.is(":visible")&&o.trigger("focus")}))})),n.call(a,s,this)}))}(jQuery),function(e){"use strict";var t=["sanitize","whiteList","sanitizeFn"],n=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],o=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,i=/^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 r(t,r){var a=t.nodeName.toLowerCase();if(-1!==e.inArray(a,r))return-1===e.inArray(a,n)||Boolean(t.nodeValue.match(o)||t.nodeValue.match(i));for(var s=e(r).filter((function(e,t){return t instanceof RegExp})),l=0,c=s.length;l<c;l++)if(a.match(s[l]))return!0;return!1}function a(t,n,o){if(0===t.length)return t;if(o&&"function"==typeof o)return o(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;var i=document.implementation.createHTMLDocument("sanitization");i.body.innerHTML=t;for(var a=e.map(n,(function(e,t){return t})),s=e(i.body).find("*"),l=0,c=s.length;l<c;l++){var u=s[l],d=u.nodeName.toLowerCase();if(-1!==e.inArray(d,a))for(var h=e.map(u.attributes,(function(e){return e})),f=[].concat(n["*"]||[],n[d]||[]),p=0,m=h.length;p<m;p++)r(h[p],f)||u.removeAttribute(h[p].nodeName);else u.parentNode.removeChild(u)}return i.body.innerHTML}var s=function(e,t){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",e,t)};s.VERSION="3.4.1",s.TRANSITION_DURATION=150,s.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}},s.prototype.init=function(t,n,o){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&e(document).find(e.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),r=i.length;r--;){var a=i[r];if("click"==a)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},s.prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.getOptions=function(n){var o=this.$element.data();for(var i in o)o.hasOwnProperty(i)&&-1!==e.inArray(i,t)&&delete o[i];return(n=e.extend({},this.getDefaults(),o,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=a(n.template,n.whiteList,n.sanitizeFn)),n},s.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,(function(e,o){n[e]!=o&&(t[e]=o)})),t},s.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},s.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},s.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},s.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var n=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!n)return;var o=this,i=this.tip(),r=this.getUID(this.type);this.setContent(),i.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&i.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(a);c&&(a=a.replace(l,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?i.appendTo(e(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var u=this.getPosition(),d=i[0].offsetWidth,h=i[0].offsetHeight;if(c){var f=a,p=this.getPosition(this.$viewport);a="bottom"==a&&u.bottom+h>p.bottom?"top":"top"==a&&u.top-h<p.top?"bottom":"right"==a&&u.right+d>p.width?"left":"left"==a&&u.left-d<p.left?"right":a,i.removeClass(f).addClass(a)}var m=this.getCalculatedOffset(a,u,d,h);this.applyPlacement(m,a);var g=function(){var e=o.hoverState;o.$element.trigger("shown.bs."+o.type),o.hoverState=null,"out"==e&&o.leave(o)};e.support.transition&&this.$tip.hasClass("fade")?i.one("bsTransitionEnd",g).emulateTransitionEnd(s.TRANSITION_DURATION):g()}},s.prototype.applyPlacement=function(t,n){var o=this.tip(),i=o[0].offsetWidth,r=o[0].offsetHeight,a=parseInt(o.css("margin-top"),10),s=parseInt(o.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(s)&&(s=0),t.top+=a,t.left+=s,e.offset.setOffset(o[0],e.extend({using:function(e){o.css({top:Math.round(e.top),left:Math.round(e.left)})}},t),0),o.addClass("in");var l=o[0].offsetWidth,c=o[0].offsetHeight;"top"==n&&c!=r&&(t.top=t.top+r-c);var u=this.getViewportAdjustedDelta(n,t,l,c);u.left?t.left+=u.left:t.top+=u.top;var d=/top|bottom/.test(n),h=d?2*u.left-i+l:2*u.top-r+c,f=d?"offsetWidth":"offsetHeight";o.offset(t),this.replaceArrow(h,o[0][f],d)},s.prototype.replaceArrow=function(e,t,n){this.arrow().css(n?"left":"top",50*(1-e/t)+"%").css(n?"top":"left","")},s.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();this.options.html?(this.options.sanitize&&(t=a(t,this.options.whiteList,this.options.sanitizeFn)),e.find(".tooltip-inner").html(t)):e.find(".tooltip-inner").text(t),e.removeClass("fade in top bottom left right")},s.prototype.hide=function(t){var n=this,o=e(this.$tip),i=e.Event("hide.bs."+this.type);function r(){"in"!=n.hoverState&&o.detach(),n.$element&&n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),t&&t()}if(this.$element.trigger(i),!i.isDefaultPrevented())return o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",r).emulateTransitionEnd(s.TRANSITION_DURATION):r(),this.hoverState=null,this},s.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},s.prototype.hasContent=function(){return this.getTitle()},s.prototype.getPosition=function(t){var n=(t=t||this.$element)[0],o="BODY"==n.tagName,i=n.getBoundingClientRect();null==i.width&&(i=e.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var r=window.SVGElement&&n instanceof window.SVGElement,a=o?{top:0,left:0}:r?null:t.offset(),s={scroll:o?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},l=o?{width:e(window).width(),height:e(window).height()}:null;return e.extend({},i,s,l,a)},s.prototype.getCalculatedOffset=function(e,t,n,o){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-o,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-o/2,left:t.left-n}:{top:t.top+t.height/2-o/2,left:t.left+t.width}},s.prototype.getViewportAdjustedDelta=function(e,t,n,o){var i={top:0,left:0};if(!this.$viewport)return i;var r=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(e)){var s=t.top-r-a.scroll,l=t.top+r-a.scroll+o;s<a.top?i.top=a.top-s:l>a.top+a.height&&(i.top=a.top+a.height-l)}else{var c=t.left-r,u=t.left+r+n;c<a.left?i.left=a.left-c:u>a.right&&(i.left=a.left+a.width-u)}return i},s.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},s.prototype.getUID=function(e){for(;e+=~~(1e6*Math.random()),document.getElementById(e););return e},s.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},s.prototype.enable=function(){this.enabled=!0},s.prototype.disable=function(){this.enabled=!1},s.prototype.toggleEnabled=function(){this.enabled=!this.enabled},s.prototype.toggle=function(t){var n=this;t&&((n=e(t.currentTarget).data("bs."+this.type))||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},s.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide((function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null}))},s.prototype.sanitizeHtml=function(e){return a(e,this.options.whiteList,this.options.sanitizeFn)};var l=e.fn.tooltip;e.fn.tooltip=function(t){return this.each((function(){var n=e(this),o=n.data("bs.tooltip"),i="object"==typeof t&&t;!o&&/destroy|hide/.test(t)||(o||n.data("bs.tooltip",o=new s(this,i)),"string"==typeof t&&o[t]())}))},e.fn.tooltip.Constructor=s,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=l,this}}(jQuery),function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.4.1",t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype)).constructor=t).prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();if(this.options.html){var o=typeof n;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===o&&(n=this.sanitizeHtml(n))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===o?"html":"append"](n)}else e.find(".popover-title").text(t),e.find(".popover-content").children().detach().end().text(n);e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=e.fn.popover;e.fn.popover=function(n){return this.each((function(){var o=e(this),i=o.data("bs.popover"),r="object"==typeof n&&n;!i&&/destroy|hide/.test(n)||(i||o.data("bs.popover",i=new t(this,r)),"string"==typeof n&&i[n]())}))},e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(jQuery),function(e){"use strict";function t(n,o){this.$body=e(document.body),this.$scrollElement=e(n).is(document.body)?e(window):e(n),this.options=e.extend({},t.DEFAULTS,o),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each((function(){var o=e(this),i=o.data("bs.scrollspy"),r="object"==typeof n&&n;i||o.data("bs.scrollspy",i=new t(this,r)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",o=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",o=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var t=e(this),i=t.data("target")||t.attr("href"),r=/^#./.test(i)&&e(i);return r&&r.length&&r.is(":visible")&&[[r[n]().top+o,i]]||null})).sort((function(e,t){return e[0]-t[0]})).each((function(){t.offsets.push(this[0]),t.targets.push(this[1])}))},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),o=this.options.offset+n-this.$scrollElement.height(),i=this.offsets,r=this.targets,a=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),o<=t)return a!=(e=r[r.length-1])&&this.activate(e);if(a&&t<i[0])return this.activeTarget=null,this.clear();for(e=i.length;e--;)a!=r[e]&&t>=i[e]&&(void 0===i[e+1]||t<i[e+1])&&this.activate(r[e])},t.prototype.activate=function(t){this.activeTarget=t,this.clear();var n=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',o=e(n).parents("li").addClass("active");o.parent(".dropdown-menu").length&&(o=o.closest("li.dropdown").addClass("active")),o.trigger("activate.bs.scrollspy")},t.prototype.clear=function(){e(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var o=e.fn.scrollspy;e.fn.scrollspy=n,e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=o,this},e(window).on("load.bs.scrollspy.data-api",(function(){e('[data-spy="scroll"]').each((function(){var t=e(this);n.call(t,t.data())}))}))}(jQuery),function(e){"use strict";var t=function(t){this.element=e(t)};function n(n){return this.each((function(){var o=e(this),i=o.data("bs.tab");i||o.data("bs.tab",i=new t(this)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=150,t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),o=t.data("target");if(o||(o=(o=t.attr("href"))&&o.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var i=n.find(".active:last a"),r=e.Event("hide.bs.tab",{relatedTarget:t[0]}),a=e.Event("show.bs.tab",{relatedTarget:i[0]});if(i.trigger(r),t.trigger(a),!a.isDefaultPrevented()&&!r.isDefaultPrevented()){var s=e(document).find(o);this.activate(t.closest("li"),n),this.activate(s,s.parent(),(function(){i.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:i[0]})}))}}},t.prototype.activate=function(n,o,i){var r=o.find("> .active"),a=i&&e.support.transition&&(r.length&&r.hasClass("fade")||!!o.find("> .fade").length);function s(){r.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),n.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(n[0].offsetWidth,n.addClass("in")):n.removeClass("fade"),n.parent(".dropdown-menu").length&&n.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}r.length&&a?r.one("bsTransitionEnd",s).emulateTransitionEnd(t.TRANSITION_DURATION):s(),r.removeClass("in")};var o=e.fn.tab;e.fn.tab=n,e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=o,this};var i=function(t){t.preventDefault(),n.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(e){"use strict";var t=function(n,o){this.options=e.extend({},t.DEFAULTS,o);var i=this.options.target===t.DEFAULTS.target?e(this.options.target):e(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var o=e(this),i=o.data("bs.affix"),r="object"==typeof n&&n;i||o.data("bs.affix",i=new t(this,r)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0,target:window},t.prototype.getState=function(e,t,n,o){var i=this.$target.scrollTop(),r=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return i<n&&"top";if("bottom"==this.affixed)return null!=n?!(i+this.unpin<=r.top)&&"bottom":!(i+a<=e-o)&&"bottom";var s=null==this.affixed,l=s?i:r.top;return null!=n&&i<=n?"top":null!=o&&e-o<=l+(s?a:t)&&"bottom"},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var e=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),o=this.options.offset,i=o.top,r=o.bottom,a=Math.max(e(document).height(),e(document.body).height());"object"!=typeof o&&(r=i=o),"function"==typeof i&&(i=o.top(this.$element)),"function"==typeof r&&(r=o.bottom(this.$element));var s=this.getState(a,n,i,r);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var l="affix"+(s?"-"+s:""),c=e.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:a-n-r})}};var o=e.fn.affix;e.fn.affix=n,e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=o,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var t=e(this),o=t.data();o.offset=o.offset||{},null!=o.offsetBottom&&(o.offset.bottom=o.offsetBottom),null!=o.offsetTop&&(o.offset.top=o.offsetTop),n.call(t,o)}))}))}(jQuery),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("jQuery"));else if("function"==typeof define&&define.amd)define(["jQuery"],t);else{var n="object"==typeof exports?t(require("jQuery")):t(e.jQuery);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,(function(e){return(()=>{"use strict";var t={9770:(e,t,n)=>{var o=n(1145),i=n.n(o);i().summernote=i().summernote||{lang:{}},i().extend(i().summernote.lang,{"en-US":{font:{bold:"Bold",italic:"Italic",underline:"Underline",clear:"Remove Font Style",height:"Line Height",name:"Font Family",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript",size:"Font Size",sizeunit:"Font Size Unit"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize full",resizeHalf:"Resize half",resizeQuarter:"Resize quarter",resizeNone:"Original size",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Remove float",shapeRounded:"Shape: Rounded",shapeCircle:"Shape: Circle",shapeThumbnail:"Shape: Thumbnail",shapeNone:"Shape: None",dragImageHere:"Drag image or text here",dropImage:"Drop image or Text",selectFromFiles:"Select from files",maximumFileSize:"Maximum file size",maximumFileSizeError:"Maximum file size exceeded.",url:"Image URL",remove:"Remove Image",original:"Original"},video:{video:"Video",videoLink:"Video Link",insert:"Insert Video",url:"Video URL",providers:"(YouTube, Google Drive, Vimeo, Vine, Instagram, DailyMotion, Youku, Peertube)"},link:{link:"Link",insert:"Insert Link",unlink:"Unlink",edit:"Edit",textToDisplay:"Text to display",url:"To what URL should this link go?",openInNewWindow:"Open in new window",useProtocol:"Use default protocol"},table:{table:"Table",addRowAbove:"Add row above",addRowBelow:"Add row below",addColLeft:"Add column left",addColRight:"Add column right",delRow:"Delete row",delCol:"Delete column",delTable:"Delete table"},hr:{insert:"Insert Horizontal Rule"},style:{style:"Style",p:"Normal",blockquote:"Quote",pre:"Code",h1:"Header 1",h2:"Header 2",h3:"Header 3",h4:"Header 4",h5:"Header 5",h6:"Header 6"},lists:{unordered:"Unordered list",ordered:"Ordered list"},options:{help:"Help",fullscreen:"Full Screen",codeview:"Code View"},paragraph:{paragraph:"Paragraph",outdent:"Outdent",indent:"Indent",left:"Align left",center:"Align center",right:"Align right",justify:"Justify full"},color:{recent:"Recent Color",more:"More Color",background:"Background Color",foreground:"Text Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default",cpSelect:"Select"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style",extraKeys:"Extra keys"},help:{escape:"Escape",insertParagraph:"Insert Paragraph",undo:"Undo the last command",redo:"Redo the last command",tab:"Tab",untab:"Untab",bold:"Set a bold style",italic:"Set a italic style",underline:"Set a underline style",strikethrough:"Set a strikethrough style",removeFormat:"Clean a style",justifyLeft:"Set left align",justifyCenter:"Set center align",justifyRight:"Set right align",justifyFull:"Set full align",insertUnorderedList:"Toggle unordered list",insertOrderedList:"Toggle ordered list",outdent:"Outdent on current paragraph",indent:"Indent on current paragraph",formatPara:"Change current block's format as a paragraph(P tag)",formatH1:"Change current block's format as H1",formatH2:"Change current block's format as H2",formatH3:"Change current block's format as H3",formatH4:"Change current block's format as H4",formatH5:"Change current block's format as H5",formatH6:"Change current block's format as H6",insertHorizontalRule:"Insert horizontal rule","linkDialog.show":"Show Link Dialog"},history:{undo:"Undo",redo:"Redo"},specialChar:{specialChar:"SPECIAL CHARACTERS",select:"Select Special characters"},output:{noSelection:"No Selection Made!"}}})},1145:t=>{t.exports=e}},n={};function o(e){var i=n[e];if(void 0!==i)return i.exports;var r=n[e]={exports:{}};return t[e](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{o.r(i);var e=o(1145),t=o.n(e),n=(o(9770),["sans-serif","serif","monospace","cursive","fantasy"]);function r(e){return-1===t().inArray(e.toLowerCase(),n)?"'".concat(e,"'"):e}var a,s=navigator.userAgent,l=/MSIE|Trident/i.test(s);if(l){var c=/MSIE (\d+[.]\d+)/.exec(s);c&&(a=parseFloat(c[1])),(c=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(s))&&(a=parseFloat(c[1]))}var u=/Edge\/\d+/.test(s),d="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,h=l?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input";const f={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:l,isEdge:u,isFF:!u&&/firefox/i.test(s),isPhantom:/PhantomJS/i.test(s),isWebkit:!u&&/webkit/i.test(s),isChrome:!u&&/chrome/i.test(s),isSafari:!u&&/safari/i.test(s)&&!/chrome/i.test(s),browserVersion:a,isSupportTouch:d,isFontInstalled:function(e){var t="Comic Sans MS"===e?"Courier New":"Comic Sans MS",n="mmmmmmmmmmwwwww",o=document.createElement("canvas").getContext("2d");o.font="200px '"+t+"'";var i=o.measureText(n).width;return o.font="200px "+r(e)+', "'+t+'"',i!==o.measureText(n).width},isW3CRangeSupport:!!document.createRange,inputEventName:h,genericFontFamilies:n,validFontName:r};var p=0;const m={eq:function(e){return function(t){return e===t}},eq2:function(e,t){return e===t},peq2:function(e){return function(t,n){return t[e]===n[e]}},ok:function(){return!0},fail:function(){return!1},self:function(e){return e},not:function(e){return function(){return!e.apply(e,arguments)}},and:function(e,t){return function(n){return e(n)&&t(n)}},invoke:function(e,t){return function(){return e[t].apply(e,arguments)}},resetUniqueId:function(){p=0},uniqueId:function(e){var t=++p+"";return e?e+t:t},rect2bnd:function(e){var n=t()(document);return{top:e.top+n.scrollTop(),left:e.left+n.scrollLeft(),width:e.right-e.left,height:e.bottom-e.top}},invertObject:function(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[e[n]]=n);return t},namespaceToCamel:function(e,t){return(t=t||"")+e.split(".").map((function(e){return e.substring(0,1).toUpperCase()+e.substring(1)})).join("")},debounce:function(e,t,n){var o;return function(){var i=this,r=arguments,a=function(){o=null,n||e.apply(i,r)},s=n&&!o;clearTimeout(o),o=setTimeout(a,t),s&&e.apply(i,r)}},isValidUrl:function(e){return/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi.test(e)}};function g(e){return e[0]}function v(e){return e[e.length-1]}function y(e){return e.slice(1)}function b(e,t){if(e&&e.length&&t){if(e.indexOf)return-1!==e.indexOf(t);if(e.contains)return e.contains(t)}return!1}const k={head:g,last:v,initial:function(e){return e.slice(0,e.length-1)},tail:y,prev:function(e,t){if(e&&e.length&&t){var n=e.indexOf(t);return-1===n?null:e[n-1]}return null},next:function(e,t){if(e&&e.length&&t){var n=e.indexOf(t);return-1===n?null:e[n+1]}return null},find:function(e,t){for(var n=0,o=e.length;n<o;n++){var i=e[n];if(t(i))return i}},contains:b,all:function(e,t){for(var n=0,o=e.length;n<o;n++)if(!t(e[n]))return!1;return!0},sum:function(e,t){return t=t||m.self,e.reduce((function(e,n){return e+t(n)}),0)},from:function(e){for(var t=[],n=e.length,o=-1;++o<n;)t[o]=e[o];return t},isEmpty:function(e){return!e||!e.length},clusterBy:function(e,t){return e.length?y(e).reduce((function(e,n){var o=v(e);return t(v(o),n)?o[o.length]=n:e[e.length]=[n],e}),[[g(e)]]):[]},compact:function(e){for(var t=[],n=0,o=e.length;n<o;n++)e[n]&&t.push(e[n]);return t},unique:function(e){for(var t=[],n=0,o=e.length;n<o;n++)b(t,e[n])||t.push(e[n]);return t}};var w=String.fromCharCode(160);function x(e){return e&&t()(e).hasClass("note-editable")}function C(e){return e=e.toUpperCase(),function(t){return t&&t.nodeName.toUpperCase()===e}}function T(e){return e&&3===e.nodeType}function S(e){return e&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT|^AUDIO|^VIDEO|^EMBED/.test(e.nodeName.toUpperCase())}function E(e){return!x(e)&&e&&/^DIV|^P|^LI|^H[1-7]/.test(e.nodeName.toUpperCase())}var N=C("PRE"),A=C("LI"),I=C("TABLE"),$=C("DATA");function D(e){return!(F(e)||L(e)||R(e)||E(e)||I(e)||O(e)||$(e))}function L(e){return e&&/^UL|^OL/.test(e.nodeName.toUpperCase())}var R=C("HR");function P(e){return e&&/^TD|^TH/.test(e.nodeName.toUpperCase())}var O=C("BLOCKQUOTE");function F(e){return P(e)||O(e)||x(e)}var H=C("A"),M=C("BODY"),j=f.isMSIE&&f.browserVersion<11?" ":"<br>";function B(e){return T(e)?e.nodeValue.length:e?e.childNodes.length:0}function z(e){var t=B(e);return 0===t||!T(e)&&1===t&&e.innerHTML===j||!(!k.all(e.childNodes,T)||""!==e.innerHTML)}function U(e){S(e)||B(e)||(e.innerHTML=j)}function W(e,t){for(;e;){if(t(e))return e;if(x(e))break;e=e.parentNode}return null}function _(e,t){t=t||m.fail;var n=[];return W(e,(function(e){return x(e)||n.push(e),t(e)})),n}function q(e,t){t=t||m.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.nextSibling;return n}function K(e,t){var n=t.nextSibling,o=t.parentNode;return n?o.insertBefore(e,n):o.appendChild(e),e}function V(e,n){return t().each(n,(function(t,n){e.appendChild(n)})),e}function G(e){return 0===e.offset}function Q(e){return e.offset===B(e.node)}function Y(e){return G(e)||Q(e)}function X(e,t){for(;e&&e!==t;){if(0!==J(e))return!1;e=e.parentNode}return!0}function Z(e,t){if(!t)return!1;for(;e&&e!==t;){if(J(e)!==B(e.parentNode)-1)return!1;e=e.parentNode}return!0}function J(e){for(var t=0;e=e.previousSibling;)t+=1;return t}function ee(e){return!!(e&&e.childNodes&&e.childNodes.length)}function te(e,t){var n,o;if(0===e.offset){if(x(e.node))return null;n=e.node.parentNode,o=J(e.node)}else ee(e.node)?o=B(n=e.node.childNodes[e.offset-1]):(n=e.node,o=t?0:e.offset-1);return{node:n,offset:o}}function ne(e,t){var n,o;if(B(e.node)===e.offset){if(x(e.node))return null;var i=ie(e.node);i?(n=i,o=0):(n=e.node.parentNode,o=J(e.node)+1)}else ee(e.node)?(n=e.node.childNodes[e.offset],o=0):(n=e.node,o=t?B(e.node):e.offset+1);return{node:n,offset:o}}function oe(e,t){var n,o=0;if(z(e.node))return null===e.node?null:{node:n=e.node.nextSibling,offset:o=0};if(B(e.node)===e.offset){if(x(e.node))return null;n=e.node.parentNode,o=J(e.node)+1,x(n)&&(n=e.node.nextSibling,o=0)}else if(ee(e.node)){if(o=0,z(n=e.node.childNodes[e.offset]))return z(e.node.nextSibling)?null:{node:e.node.nextSibling,offset:o}}else if(n=e.node,o=t?B(e.node):e.offset+1,z(n))return null;return{node:n,offset:o}}function ie(e){if(e.nextSibling&&e.parent===e.nextSibling.parent)return T(e.nextSibling)?e.nextSibling:ie(e.nextSibling)}function re(e,t){return e.node===t.node&&e.offset===t.offset}function ae(e,t){var n=t&&t.isSkipPaddingBlankHTML,o=t&&t.isNotSplitEdgePoint,i=t&&t.isDiscardEmptySplits;if(i&&(n=!0),Y(e)&&(T(e.node)||o)){if(G(e))return e.node;if(Q(e))return e.node.nextSibling}if(T(e.node))return e.node.splitText(e.offset);var r=e.node.childNodes[e.offset],a=K(e.node.cloneNode(!1),e.node);return V(a,q(r)),n||(U(e.node),U(a)),i&&(z(e.node)&&ce(e.node),z(a))?(ce(a),e.node.nextSibling):a}function se(e,t,n){var o=_(t.node,m.eq(e));return o.length?1===o.length?ae(t,n):o.reduce((function(e,o){return e===t.node&&(e=ae(t,n)),ae({node:o,offset:e?J(e):B(o)},n)})):null}function le(e){return document.createElement(e)}function ce(e,t){if(e&&e.parentNode){if(e.removeNode)return e.removeNode(t);var n=e.parentNode;if(!t){for(var o=[],i=0,r=e.childNodes.length;i<r;i++)o.push(e.childNodes[i]);for(var a=0,s=o.length;a<s;a++)n.insertBefore(o[a],e)}n.removeChild(e)}}var ue=C("TEXTAREA");function de(e,t){var n=ue(e[0])?e.val():e.html();return t?n.replace(/[\n\r]/g,""):n}const he={NBSP_CHAR:w,ZERO_WIDTH_NBSP_CHAR:"\ufeff",blank:j,emptyPara:"<p>".concat(j,"</p>"),makePredByNodeName:C,isEditable:x,isControlSizing:function(e){return e&&t()(e).hasClass("note-control-sizing")},isText:T,isElement:function(e){return e&&1===e.nodeType},isVoid:S,isPara:E,isPurePara:function(e){return E(e)&&!A(e)},isHeading:function(e){return e&&/^H[1-7]/.test(e.nodeName.toUpperCase())},isInline:D,isBlock:m.not(D),isBodyInline:function(e){return D(e)&&!W(e,E)},isBody:M,isParaInline:function(e){return D(e)&&!!W(e,E)},isPre:N,isList:L,isTable:I,isData:$,isCell:P,isBlockquote:O,isBodyContainer:F,isAnchor:H,isDiv:C("DIV"),isLi:A,isBR:C("BR"),isSpan:C("SPAN"),isB:C("B"),isU:C("U"),isS:C("S"),isI:C("I"),isImg:C("IMG"),isTextarea:ue,deepestChildIsEmpty:function(e){do{if(null===e.firstElementChild||""===e.firstElementChild.innerHTML)break}while(e=e.firstElementChild);return z(e)},isEmpty:z,isEmptyAnchor:m.and(H,z),isClosestSibling:function(e,t){return e.nextSibling===t||e.previousSibling===t},withClosestSiblings:function(e,t){t=t||m.ok;var n=[];return e.previousSibling&&t(e.previousSibling)&&n.push(e.previousSibling),n.push(e),e.nextSibling&&t(e.nextSibling)&&n.push(e.nextSibling),n},nodeLength:B,isLeftEdgePoint:G,isRightEdgePoint:Q,isEdgePoint:Y,isLeftEdgeOf:X,isRightEdgeOf:Z,isLeftEdgePointOf:function(e,t){return G(e)&&X(e.node,t)},isRightEdgePointOf:function(e,t){return Q(e)&&Z(e.node,t)},prevPoint:te,nextPoint:ne,nextPointWithEmptyNode:oe,isSamePoint:re,isVisiblePoint:function(e){if(T(e.node)||!ee(e.node)||z(e.node))return!0;var t=e.node.childNodes[e.offset-1],n=e.node.childNodes[e.offset];return!((t&&!S(t)||n&&!S(n))&&!I(n))},prevPointUntil:function(e,t){for(;e;){if(t(e))return e;e=te(e)}return null},nextPointUntil:function(e,t){for(;e;){if(t(e))return e;e=ne(e)}return null},isCharPoint:function(e){if(!T(e.node))return!1;var t=e.node.nodeValue.charAt(e.offset-1);return t&&" "!==t&&t!==w},isSpacePoint:function(e){if(!T(e.node))return!1;var t=e.node.nodeValue.charAt(e.offset-1);return" "===t||t===w},walkPoint:function(e,t,n,o){for(var i=e;i&&(n(i),!re(i,t));)i=oe(i,o&&e.node!==i.node&&t.node!==i.node)},ancestor:W,singleChildAncestor:function(e,t){for(e=e.parentNode;e&&1===B(e);){if(t(e))return e;if(x(e))break;e=e.parentNode}return null},listAncestor:_,lastAncestor:function(e,t){var n=_(e);return k.last(n.filter(t))},listNext:q,listPrev:function(e,t){t=t||m.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.previousSibling;return n},listDescendant:function(e,t){var n=[];return t=t||m.ok,function o(i){e!==i&&t(i)&&n.push(i);for(var r=0,a=i.childNodes.length;r<a;r++)o(i.childNodes[r])}(e),n},commonAncestor:function(e,t){for(var n=_(e),o=t;o;o=o.parentNode)if(n.indexOf(o)>-1)return o;return null},wrap:function(e,n){var o=e.parentNode,i=t()("<"+n+">")[0];return o.insertBefore(i,e),i.appendChild(e),i},insertAfter:K,appendChildNodes:V,position:J,hasChildren:ee,makeOffsetPath:function(e,t){return _(t,m.eq(e)).map(J).reverse()},fromOffsetPath:function(e,t){for(var n=e,o=0,i=t.length;o<i;o++)n=n.childNodes.length<=t[o]?n.childNodes[n.childNodes.length-1]:n.childNodes[t[o]];return n},splitTree:se,splitPoint:function(e,t){var n,o,i=t?E:F,r=_(e.node,i),a=k.last(r)||e.node;i(a)?(n=r[r.length-2],o=a):o=(n=a).parentNode;var s=n&&se(n,e,{isSkipPaddingBlankHTML:t,isNotSplitEdgePoint:t});return s||o!==e.node||(s=e.node.childNodes[e.offset]),{rightNode:s,container:o}},create:le,createText:function(e){return document.createTextNode(e)},remove:ce,removeWhile:function(e,t){for(;e&&!x(e)&&t(e);){var n=e.parentNode;ce(e),e=n}},replace:function(e,t){if(e.nodeName.toUpperCase()===t.toUpperCase())return e;var n=le(t);return e.style.cssText&&(n.style.cssText=e.style.cssText),V(n,k.from(e.childNodes)),K(n,e),ce(e),n},html:function(e,t){var n=de(e);return t&&(n=(n=n.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g,(function(e,t,n){n=n.toUpperCase();var o=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(n)&&!!t,i=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(n);return e+(o||i?"\n":"")}))).trim()),n},value:de,posFromPlaceholder:function(e){var n=t()(e),o=n.offset(),i=n.outerHeight(!0);return{left:o.left,top:o.top+i}},attachEvents:function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},detachEvents:function(e,t){Object.keys(t).forEach((function(n){e.off(n,t[n])}))},isCustomStyleTag:function(e){return e&&!T(e)&&k.contains(e.classList,"note-styletag")}};var fe=function(){function e(n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$note=n,this.memos={},this.modules={},this.layoutInfo={},this.options=t().extend(!0,{},o),t().summernote.ui=t().summernote.ui_template(this.options),this.ui=t().summernote.ui,this.initialize()}var n;return n=[{key:"initialize",value:function(){return this.layoutInfo=this.ui.createLayout(this.$note),this._initialize(),this.$note.hide(),this}},{key:"destroy",value:function(){this._destroy(),this.$note.removeData("summernote"),this.ui.removeLayout(this.$note,this.layoutInfo)}},{key:"reset",value:function(){var e=this.isDisabled();this.code(he.emptyPara),this._destroy(),this._initialize(),e&&this.disable()}},{key:"_initialize",value:function(){var e=this;this.options.id=m.uniqueId(t().now()),this.options.container=this.options.container||this.layoutInfo.editor;var n=t().extend({},this.options.buttons);Object.keys(n).forEach((function(t){e.memo("button."+t,n[t])}));var o=t().extend({},this.options.modules,t().summernote.plugins||{});Object.keys(o).forEach((function(t){e.module(t,o[t],!0)})),Object.keys(this.modules).forEach((function(t){e.initializeModule(t)}))}},{key:"_destroy",value:function(){var e=this;Object.keys(this.modules).reverse().forEach((function(t){e.removeModule(t)})),Object.keys(this.memos).forEach((function(t){e.removeMemo(t)})),this.triggerEvent("destroy",this)}},{key:"code",value:function(e){var t=this.invoke("codeview.isActivated");if(void 0===e)return this.invoke("codeview.sync"),t?this.layoutInfo.codable.val():this.layoutInfo.editable.html();t?this.invoke("codeview.sync",e):this.layoutInfo.editable.html(e),this.$note.val(e),this.triggerEvent("change",e,this.layoutInfo.editable)}},{key:"isDisabled",value:function(){return"false"===this.layoutInfo.editable.attr("contenteditable")}},{key:"enable",value:function(){this.layoutInfo.editable.attr("contenteditable",!0),this.invoke("toolbar.activate",!0),this.triggerEvent("disable",!1),this.options.editing=!0}},{key:"disable",value:function(){this.invoke("codeview.isActivated")&&this.invoke("codeview.deactivate"),this.layoutInfo.editable.attr("contenteditable",!1),this.options.editing=!1,this.invoke("toolbar.deactivate",!0),this.triggerEvent("disable",!0)}},{key:"triggerEvent",value:function(){var e=k.head(arguments),t=k.tail(k.from(arguments)),n=this.options.callbacks[m.namespaceToCamel(e,"on")];n&&n.apply(this.$note[0],t),this.$note.trigger("summernote."+e,t)}},{key:"initializeModule",value:function(e){var t=this.modules[e];t.shouldInitialize=t.shouldInitialize||m.ok,t.shouldInitialize()&&(t.initialize&&t.initialize(),t.events&&he.attachEvents(this.$note,t.events))}},{key:"module",value:function(e,t,n){if(1===arguments.length)return this.modules[e];this.modules[e]=new t(this),n||this.initializeModule(e)}},{key:"removeModule",value:function(e){var t=this.modules[e];t.shouldInitialize()&&(t.events&&he.detachEvents(this.$note,t.events),t.destroy&&t.destroy()),delete this.modules[e]}},{key:"memo",value:function(e,t){if(1===arguments.length)return this.memos[e];this.memos[e]=t}},{key:"removeMemo",value:function(e){this.memos[e]&&this.memos[e].destroy&&this.memos[e].destroy(),delete this.memos[e]}},{key:"createInvokeHandlerAndUpdateState",value:function(e,t){var n=this;return function(o){n.createInvokeHandler(e,t)(o),n.invoke("buttons.updateCurrentStyle")}}},{key:"createInvokeHandler",value:function(e,n){var o=this;return function(i){i.preventDefault();var r=t()(i.target);o.invoke(e,n||r.closest("[data-value]").data("value"),r)}}},{key:"invoke",value:function(){var e=k.head(arguments),t=k.tail(k.from(arguments)),n=e.split("."),o=n.length>1,i=o&&k.head(n),r=o?k.last(n):k.head(n),a=this.modules[i||"editor"];return!i&&this[r]?this[r].apply(this,t):a&&a[r]&&a.shouldInitialize()?a[r].apply(a,t):void 0}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();function pe(e,t){var n,o,i=e.parentElement(),r=document.body.createTextRange(),a=k.from(i.childNodes);for(n=0;n<a.length;n++)if(!he.isText(a[n])){if(r.moveToElementText(a[n]),r.compareEndPoints("StartToStart",e)>=0)break;o=a[n]}if(0!==n&&he.isText(a[n-1])){var s=document.body.createTextRange(),l=null;s.moveToElementText(o||i),s.collapse(!o),l=o?o.nextSibling:i.firstChild;var c=e.duplicate();c.setEndPoint("StartToStart",s);for(var u=c.text.replace(/[\r\n]/g,"").length;u>l.nodeValue.length&&l.nextSibling;)u-=l.nodeValue.length,l=l.nextSibling;l.nodeValue,t&&l.nextSibling&&he.isText(l.nextSibling)&&u===l.nodeValue.length&&(u-=l.nodeValue.length,l=l.nextSibling),i=l,n=u}return{cont:i,offset:n}}function me(e){var t=document.body.createTextRange(),n=function e(t,n){var o,i;if(he.isText(t)){var r=he.listPrev(t,m.not(he.isText)),a=k.last(r).previousSibling;o=a||t.parentNode,n+=k.sum(k.tail(r),he.nodeLength),i=!a}else{if(o=t.childNodes[n]||t,he.isText(o))return e(o,0);n=0,i=!1}return{node:o,collapseToStart:i,offset:n}}(e.node,e.offset);return t.moveToElementText(n.node),t.collapse(n.collapseToStart),t.moveStart("character",n.offset),t}t().fn.extend({summernote:function(){var e=t().type(k.head(arguments)),n="string"===e,o="object"===e,i=t().extend({},t().summernote.options,o?k.head(arguments):{});i.langInfo=t().extend(!0,{},t().summernote.lang["en-US"],t().summernote.lang[i.lang]),i.icons=t().extend(!0,{},t().summernote.options.icons,i.icons),i.tooltip="auto"===i.tooltip?!f.isSupportTouch:i.tooltip,this.each((function(e,n){var o=t()(n);if(!o.data("summernote")){var r=new fe(o,i);o.data("summernote",r),o.data("summernote").triggerEvent("init",r.layoutInfo)}}));var r=this.first();if(r.length){var a=r.data("summernote");if(n)return a.invoke.apply(a,k.from(arguments));i.focus&&a.invoke("editor.focus")}return this}});var ge=function(){function e(t,n,o,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sc=t,this.so=n,this.ec=o,this.eo=i,this.isOnEditable=this.makeIsOn(he.isEditable),this.isOnList=this.makeIsOn(he.isList),this.isOnAnchor=this.makeIsOn(he.isAnchor),this.isOnCell=this.makeIsOn(he.isCell),this.isOnData=this.makeIsOn(he.isData)}var n;return n=[{key:"nativeRange",value:function(){if(f.isW3CRangeSupport){var e=document.createRange();return e.setStart(this.sc,this.so),e.setEnd(this.ec,this.eo),e}var t=me({node:this.sc,offset:this.so});return t.setEndPoint("EndToEnd",me({node:this.ec,offset:this.eo})),t}},{key:"getPoints",value:function(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}}},{key:"getStartPoint",value:function(){return{node:this.sc,offset:this.so}}},{key:"getEndPoint",value:function(){return{node:this.ec,offset:this.eo}}},{key:"select",value:function(){var e=this.nativeRange();if(f.isW3CRangeSupport){var t=document.getSelection();t.rangeCount>0&&t.removeAllRanges(),t.addRange(e)}else e.select();return this}},{key:"scrollIntoView",value:function(e){var n=t()(e).height();return e.scrollTop+n<this.sc.offsetTop&&(e.scrollTop+=Math.abs(e.scrollTop+n-this.sc.offsetTop)),this}},{key:"normalize",value:function(){var t=function(e,t){if(!e)return e;if(he.isVisiblePoint(e)&&(!he.isEdgePoint(e)||he.isRightEdgePoint(e)&&!t||he.isLeftEdgePoint(e)&&t||he.isRightEdgePoint(e)&&t&&he.isVoid(e.node.nextSibling)||he.isLeftEdgePoint(e)&&!t&&he.isVoid(e.node.previousSibling)||he.isBlock(e.node)&&he.isEmpty(e.node)))return e;var n=he.ancestor(e.node,he.isBlock),o=!1;if(!o){var i=he.prevPoint(e)||{node:null};o=(he.isLeftEdgePointOf(e,n)||he.isVoid(i.node))&&!t}var r=!1;if(!r){var a=he.nextPoint(e)||{node:null};r=(he.isRightEdgePointOf(e,n)||he.isVoid(a.node))&&t}if(o||r){if(he.isVisiblePoint(e))return e;t=!t}return(t?he.nextPointUntil(he.nextPoint(e),he.isVisiblePoint):he.prevPointUntil(he.prevPoint(e),he.isVisiblePoint))||e},n=t(this.getEndPoint(),!1),o=this.isCollapsed()?n:t(this.getStartPoint(),!0);return new e(o.node,o.offset,n.node,n.offset)}},{key:"nodes",value:function(e,t){e=e||m.ok;var n=t&&t.includeAncestor,o=t&&t.fullyContains,i=this.getStartPoint(),r=this.getEndPoint(),a=[],s=[];return he.walkPoint(i,r,(function(t){var i;he.isEditable(t.node)||(o?(he.isLeftEdgePoint(t)&&s.push(t.node),he.isRightEdgePoint(t)&&k.contains(s,t.node)&&(i=t.node)):i=n?he.ancestor(t.node,e):t.node,i&&e(i)&&a.push(i))}),!0),k.unique(a)}},{key:"commonAncestor",value:function(){return he.commonAncestor(this.sc,this.ec)}},{key:"expand",value:function(t){var n=he.ancestor(this.sc,t),o=he.ancestor(this.ec,t);if(!n&&!o)return new e(this.sc,this.so,this.ec,this.eo);var i=this.getPoints();return n&&(i.sc=n,i.so=0),o&&(i.ec=o,i.eo=he.nodeLength(o)),new e(i.sc,i.so,i.ec,i.eo)}},{key:"collapse",value:function(t){return t?new e(this.sc,this.so,this.sc,this.so):new e(this.ec,this.eo,this.ec,this.eo)}},{key:"splitText",value:function(){var t=this.sc===this.ec,n=this.getPoints();return he.isText(this.ec)&&!he.isEdgePoint(this.getEndPoint())&&this.ec.splitText(this.eo),he.isText(this.sc)&&!he.isEdgePoint(this.getStartPoint())&&(n.sc=this.sc.splitText(this.so),n.so=0,t&&(n.ec=n.sc,n.eo=this.eo-this.so)),new e(n.sc,n.so,n.ec,n.eo)}},{key:"deleteContents",value:function(){if(this.isCollapsed())return this;var n=this.splitText(),o=n.nodes(null,{fullyContains:!0}),i=he.prevPointUntil(n.getStartPoint(),(function(e){return!k.contains(o,e.node)})),r=[];return t().each(o,(function(e,t){var n=t.parentNode;i.node!==n&&1===he.nodeLength(n)&&r.push(n),he.remove(t,!1)})),t().each(r,(function(e,t){he.remove(t,!1)})),new e(i.node,i.offset,i.node,i.offset).normalize()}},{key:"makeIsOn",value:function(e){return function(){var t=he.ancestor(this.sc,e);return!!t&&t===he.ancestor(this.ec,e)}}},{key:"isLeftEdgeOf",value:function(e){if(!he.isLeftEdgePoint(this.getStartPoint()))return!1;var t=he.ancestor(this.sc,e);return t&&he.isLeftEdgeOf(this.sc,t)}},{key:"isCollapsed",value:function(){return this.sc===this.ec&&this.so===this.eo}},{key:"wrapBodyInlineWithPara",value:function(){if(he.isBodyContainer(this.sc)&&he.isEmpty(this.sc))return this.sc.innerHTML=he.emptyPara,new e(this.sc.firstChild,0,this.sc.firstChild,0);var t,n=this.normalize();if(he.isParaInline(this.sc)||he.isPara(this.sc))return n;if(he.isInline(n.sc)){var o=he.listAncestor(n.sc,m.not(he.isInline));t=k.last(o),he.isInline(t)||(t=o[o.length-2]||n.sc.childNodes[n.so])}else t=n.sc.childNodes[n.so>0?n.so-1:0];if(t){var i=he.listPrev(t,he.isParaInline).reverse();if((i=i.concat(he.listNext(t.nextSibling,he.isParaInline))).length){var r=he.wrap(k.head(i),"p");he.appendChildNodes(r,k.tail(i))}}return this.normalize()}},{key:"insertNode",value:function(e){var t=this;(he.isText(e)||he.isInline(e))&&(t=this.wrapBodyInlineWithPara().deleteContents());var n=he.splitPoint(t.getStartPoint(),he.isInline(e));return n.rightNode?(n.rightNode.parentNode.insertBefore(e,n.rightNode),he.isEmpty(n.rightNode)&&he.isPara(e)&&n.rightNode.parentNode.removeChild(n.rightNode)):n.container.appendChild(e),e}},{key:"pasteHTML",value:function(e){e=t().trim(e);var n=t()("<div></div>").html(e)[0],o=k.from(n.childNodes),i=this,r=!1;return i.so>=0&&(o=o.reverse(),r=!0),o=o.map((function(e){return i.insertNode(e)})),r&&(o=o.reverse()),o}},{key:"toString",value:function(){var e=this.nativeRange();return f.isW3CRangeSupport?e.toString():e.text}},{key:"getWordRange",value:function(t){var n=this.getEndPoint();if(!he.isCharPoint(n))return this;var o=he.prevPointUntil(n,(function(e){return!he.isCharPoint(e)}));return t&&(n=he.nextPointUntil(n,(function(e){return!he.isCharPoint(e)}))),new e(o.node,o.offset,n.node,n.offset)}},{key:"getWordsRange",value:function(t){var n=this.getEndPoint(),o=function(e){return!he.isCharPoint(e)&&!he.isSpacePoint(e)};if(o(n))return this;var i=he.prevPointUntil(n,o);return t&&(n=he.nextPointUntil(n,o)),new e(i.node,i.offset,n.node,n.offset)}},{key:"getWordsMatchRange",value:function(t){var n=this.getEndPoint(),o=he.prevPointUntil(n,(function(o){if(!he.isCharPoint(o)&&!he.isSpacePoint(o))return!0;var i=new e(o.node,o.offset,n.node,n.offset),r=t.exec(i.toString());return r&&0===r.index})),i=new e(o.node,o.offset,n.node,n.offset),r=i.toString(),a=t.exec(r);return a&&a[0].length===r.length?i:null}},{key:"bookmark",value:function(e){return{s:{path:he.makeOffsetPath(e,this.sc),offset:this.so},e:{path:he.makeOffsetPath(e,this.ec),offset:this.eo}}}},{key:"paraBookmark",value:function(e){return{s:{path:k.tail(he.makeOffsetPath(k.head(e),this.sc)),offset:this.so},e:{path:k.tail(he.makeOffsetPath(k.last(e),this.ec)),offset:this.eo}}}},{key:"getClientRects",value:function(){return this.nativeRange().getClientRects()}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();const ve={create:function(e,t,n,o){if(4===arguments.length)return new ge(e,t,n,o);if(2===arguments.length)return new ge(e,t,n=e,o=t);var i=this.createFromSelection();if(!i&&1===arguments.length){var r=arguments[0];return he.isEditable(r)&&(r=r.lastChild),this.createFromBodyElement(r,he.emptyPara===arguments[0].innerHTML)}return i},createFromBodyElement:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.createFromNode(e);return n.collapse(t)},createFromSelection:function(){var e,t,n,o;if(f.isW3CRangeSupport){var i=document.getSelection();if(!i||0===i.rangeCount)return null;if(he.isBody(i.anchorNode))return null;var r=i.getRangeAt(0);e=r.startContainer,t=r.startOffset,n=r.endContainer,o=r.endOffset}else{var a=document.selection.createRange(),s=a.duplicate();s.collapse(!1);var l=a;l.collapse(!0);var c=pe(l,!0),u=pe(s,!1);he.isText(c.node)&&he.isLeftEdgePoint(c)&&he.isTextNode(u.node)&&he.isRightEdgePoint(u)&&u.node.nextSibling===c.node&&(c=u),e=c.cont,t=c.offset,n=u.cont,o=u.offset}return new ge(e,t,n,o)},createFromNode:function(e){var t=e,n=0,o=e,i=he.nodeLength(o);return he.isVoid(t)&&(n=he.listPrev(t).length-1,t=t.parentNode),he.isBR(o)?(i=he.listPrev(o).length-1,o=o.parentNode):he.isVoid(o)&&(i=he.listPrev(o).length,o=o.parentNode),this.create(t,n,o,i)},createFromNodeBefore:function(e){return this.createFromNode(e).collapse(!0)},createFromNodeAfter:function(e){return this.createFromNode(e).collapse()},createFromBookmark:function(e,t){var n=he.fromOffsetPath(e,t.s.path),o=t.s.offset,i=he.fromOffsetPath(e,t.e.path),r=t.e.offset;return new ge(n,o,i,r)},createFromParaBookmark:function(e,t){var n=e.s.offset,o=e.e.offset,i=he.fromOffsetPath(k.head(t),e.s.path),r=he.fromOffsetPath(k.last(t),e.e.path);return new ge(i,n,r,o)}};var ye={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};const be={isEdit:function(e){return k.contains([ye.BACKSPACE,ye.TAB,ye.ENTER,ye.SPACE,ye.DELETE],e)},isMove:function(e){return k.contains([ye.LEFT,ye.UP,ye.RIGHT,ye.DOWN],e)},isNavigation:function(e){return k.contains([ye.HOME,ye.END,ye.PAGEUP,ye.PAGEDOWN],e)},nameFromCode:m.invertObject(ye),code:ye};var ke=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.stack=[],this.stackOffset=-1,this.context=t,this.$editable=t.layoutInfo.editable,this.editable=this.$editable[0]}var t;return(t=[{key:"makeSnapshot",value:function(){var e=ve.create(this.editable);return{contents:this.$editable.html(),bookmark:e&&e.isOnEditable()?e.bookmark(this.editable):{s:{path:[],offset:0},e:{path:[],offset:0}}}}},{key:"applySnapshot",value:function(e){null!==e.contents&&this.$editable.html(e.contents),null!==e.bookmark&&ve.createFromBookmark(this.editable,e.bookmark).select()}},{key:"rewind",value:function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset=0,this.applySnapshot(this.stack[this.stackOffset])}},{key:"commit",value:function(){this.stack=[],this.stackOffset=-1,this.recordUndo()}},{key:"reset",value:function(){this.stack=[],this.stackOffset=-1,this.$editable.html(""),this.recordUndo()}},{key:"undo",value:function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset>0&&(this.stackOffset--,this.applySnapshot(this.stack[this.stackOffset]))}},{key:"redo",value:function(){this.stack.length-1>this.stackOffset&&(this.stackOffset++,this.applySnapshot(this.stack[this.stackOffset]))}},{key:"recordUndo",value:function(){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)}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,t),e}();var we=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var n;return n=[{key:"jQueryCSS",value:function(e,n){var o={};return t().each(n,(function(t,n){o[n]=e.css(n)})),o}},{key:"fromNode",value:function(e){var t=this.jQueryCSS(e,["font-family","font-size","text-align","list-style-type","line-height"])||{},n=e[0].style.fontSize||t["font-size"];return t["font-size"]=parseInt(n,10),t["font-size-unit"]=n.match(/[a-z%]+$/),t}},{key:"stylePara",value:function(e,n){t().each(e.nodes(he.isPara,{includeAncestor:!0}),(function(e,o){t()(o).css(n)}))}},{key:"styleNodes",value:function(e,n){e=e.splitText();var o=n&&n.nodeName||"SPAN",i=!(!n||!n.expandClosestSibling),r=!(!n||!n.onlyPartialContains);if(e.isCollapsed())return[e.insertNode(he.create(o))];var a=he.makePredByNodeName(o),s=e.nodes(he.isText,{fullyContains:!0}).map((function(e){return he.singleChildAncestor(e,a)||he.wrap(e,o)}));if(i){if(r){var l=e.nodes();a=m.and(a,(function(e){return k.contains(l,e)}))}return s.map((function(e){var n=he.withClosestSiblings(e,a),o=k.head(n),i=k.tail(n);return t().each(i,(function(e,t){he.appendChildNodes(o,t.childNodes),he.remove(t)})),k.head(n)}))}return s}},{key:"current",value:function(e){var n=t()(he.isElement(e.sc)?e.sc:e.sc.parentNode),o=this.fromNode(n);try{o=t().extend(o,{"font-bold":document.queryCommandState("bold")?"bold":"normal","font-italic":document.queryCommandState("italic")?"italic":"normal","font-underline":document.queryCommandState("underline")?"underline":"normal","font-subscript":document.queryCommandState("subscript")?"subscript":"normal","font-superscript":document.queryCommandState("superscript")?"superscript":"normal","font-strikethrough":document.queryCommandState("strikethrough")?"strikethrough":"normal","font-family":document.queryCommandValue("fontname")||o["font-family"]})}catch(e){}if(e.isOnList()){var i=["circle","disc","disc-leading-zero","square"].indexOf(o["list-style-type"])>-1;o["list-style"]=i?"unordered":"ordered"}else o["list-style"]="none";var r=he.ancestor(e.sc,he.isPara);if(r&&r.style["line-height"])o["line-height"]=r.style.lineHeight;else{var a=parseInt(o["line-height"],10)/parseInt(o["font-size"],10);o["line-height"]=a.toFixed(1)}return o.anchor=e.isOnAnchor()&&he.ancestor(e.sc,he.isAnchor),o.ancestors=he.listAncestor(e.sc,he.isEditable),o.range=e,o}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var xe=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var n;return n=[{key:"insertOrderedList",value:function(e){this.toggleList("OL",e)}},{key:"insertUnorderedList",value:function(e){this.toggleList("UL",e)}},{key:"indent",value:function(e){var n=this,o=ve.create(e).wrapBodyInlineWithPara(),i=o.nodes(he.isPara,{includeAncestor:!0}),r=k.clusterBy(i,m.peq2("parentNode"));t().each(r,(function(e,o){var i=k.head(o);if(he.isLi(i)){var r=n.findList(i.previousSibling);r?o.map((function(e){return r.appendChild(e)})):(n.wrapList(o,i.parentNode.nodeName),o.map((function(e){return e.parentNode})).map((function(e){return n.appendToPrevious(e)})))}else t().each(o,(function(e,n){t()(n).css("marginLeft",(function(e,t){return(parseInt(t,10)||0)+25}))}))})),o.select()}},{key:"outdent",value:function(e){var n=this,o=ve.create(e).wrapBodyInlineWithPara(),i=o.nodes(he.isPara,{includeAncestor:!0}),r=k.clusterBy(i,m.peq2("parentNode"));t().each(r,(function(e,o){var i=k.head(o);he.isLi(i)?n.releaseList([o]):t().each(o,(function(e,n){t()(n).css("marginLeft",(function(e,t){return(t=parseInt(t,10)||0)>25?t-25:""}))}))})),o.select()}},{key:"toggleList",value:function(e,n){var o=this,i=ve.create(n).wrapBodyInlineWithPara(),r=i.nodes(he.isPara,{includeAncestor:!0}),a=i.paraBookmark(r),s=k.clusterBy(r,m.peq2("parentNode"));if(k.find(r,he.isPurePara)){var l=[];t().each(s,(function(t,n){l=l.concat(o.wrapList(n,e))})),r=l}else{var c=i.nodes(he.isList,{includeAncestor:!0}).filter((function(n){return!t().nodeName(n,e)}));c.length?t().each(c,(function(t,n){he.replace(n,e)})):r=this.releaseList(s,!0)}ve.createFromParaBookmark(a,r).select()}},{key:"wrapList",value:function(e,t){var n=k.head(e),o=k.last(e),i=he.isList(n.previousSibling)&&n.previousSibling,r=he.isList(o.nextSibling)&&o.nextSibling,a=i||he.insertAfter(he.create(t||"UL"),o);return e=e.map((function(e){return he.isPurePara(e)?he.replace(e,"LI"):e})),he.appendChildNodes(a,e),r&&(he.appendChildNodes(a,k.from(r.childNodes)),he.remove(r)),e}},{key:"releaseList",value:function(e,n){var o=this,i=[];return t().each(e,(function(e,r){var a=k.head(r),s=k.last(r),l=n?he.lastAncestor(a,he.isList):a.parentNode,c=l.parentNode;if("LI"===l.parentNode.nodeName)r.map((function(e){var t=o.findNextSiblings(e);c.nextSibling?c.parentNode.insertBefore(e,c.nextSibling):c.parentNode.appendChild(e),t.length&&(o.wrapList(t,l.nodeName),e.appendChild(t[0].parentNode))})),0===l.children.length&&c.removeChild(l),0===c.childNodes.length&&c.parentNode.removeChild(c);else{var u=l.childNodes.length>1?he.splitTree(l,{node:s.parentNode,offset:he.position(s)+1},{isSkipPaddingBlankHTML:!0}):null,d=he.splitTree(l,{node:a.parentNode,offset:he.position(a)},{isSkipPaddingBlankHTML:!0});r=n?he.listDescendant(d,he.isLi):k.from(d.childNodes).filter(he.isLi),!n&&he.isList(l.parentNode)||(r=r.map((function(e){return he.replace(e,"P")}))),t().each(k.from(r).reverse(),(function(e,t){he.insertAfter(t,l)}));var h=k.compact([l,d,u]);t().each(h,(function(e,n){var o=[n].concat(he.listDescendant(n,he.isList));t().each(o.reverse(),(function(e,t){he.nodeLength(t)||he.remove(t,!0)}))}))}i=i.concat(r)})),i}},{key:"appendToPrevious",value:function(e){return e.previousSibling?he.appendChildNodes(e.previousSibling,[e]):this.wrapList([e],"LI")}},{key:"findList",value:function(e){return e?k.find(e.children,(function(e){return["OL","UL"].indexOf(e.nodeName)>-1})):null}},{key:"findNextSiblings",value:function(e){for(var t=[];e.nextSibling;)t.push(e.nextSibling),e=e.nextSibling;return t}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Ce=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bullet=new xe,this.options=t.options}var n;return n=[{key:"insertTab",value:function(e,t){var n=he.createText(new Array(t+1).join(he.NBSP_CHAR));(e=e.deleteContents()).insertNode(n,!0),(e=ve.create(n,t)).select()}},{key:"insertParagraph",value:function(e,n){n=(n=(n=n||ve.create(e)).deleteContents()).wrapBodyInlineWithPara();var o,i=he.ancestor(n.sc,he.isPara);if(i){if(he.isLi(i)&&(he.isEmpty(i)||he.deepestChildIsEmpty(i)))return void this.bullet.toggleList(i.parentNode.nodeName);var r=null;if(1===this.options.blockquoteBreakingLevel?r=he.ancestor(i,he.isBlockquote):2===this.options.blockquoteBreakingLevel&&(r=he.lastAncestor(i,he.isBlockquote)),r){o=t()(he.emptyPara)[0],he.isRightEdgePoint(n.getStartPoint())&&he.isBR(n.sc.nextSibling)&&t()(n.sc.nextSibling).remove();var a=he.splitTree(r,n.getStartPoint(),{isDiscardEmptySplits:!0});a?a.parentNode.insertBefore(o,a):he.insertAfter(o,r)}else{o=he.splitTree(i,n.getStartPoint());var s=he.listDescendant(i,he.isEmptyAnchor);s=s.concat(he.listDescendant(o,he.isEmptyAnchor)),t().each(s,(function(e,t){he.remove(t)})),(he.isHeading(o)||he.isPre(o)||he.isCustomStyleTag(o))&&he.isEmpty(o)&&(o=he.replace(o,"p"))}}else{var l=n.sc.childNodes[n.so];o=t()(he.emptyPara)[0],l?n.sc.insertBefore(o,l):n.sc.appendChild(o)}ve.create(o,0).normalize().select().scrollIntoView(e)}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Te=function e(t,n,o,i){var r={colPos:0,rowPos:0},a=[],s=[];function l(e,t,n,o,i,r,s){var l={baseRow:n,baseCell:o,isRowSpan:i,isColSpan:r,isVirtual:s};a[e]||(a[e]=[]),a[e][t]=l}function c(e,t,n,o){return{baseCell:e.baseCell,action:t,virtualTable:{rowIndex:n,cellIndex:o}}}function u(e,t){if(!a[e])return t;if(!a[e][t])return t;for(var n=t;a[e][n];)if(n++,!a[e][n])return n}function d(e,t){var n=u(e.rowIndex,t.cellIndex),o=t.colSpan>1,i=t.rowSpan>1,a=e.rowIndex===r.rowPos&&t.cellIndex===r.colPos;l(e.rowIndex,n,e,t,i,o,!1);var s=t.attributes.rowSpan?parseInt(t.attributes.rowSpan.value,10):0;if(s>1)for(var c=1;c<s;c++){var d=e.rowIndex+c;h(d,n,t,a),l(d,n,e,t,!0,o,!0)}var f=t.attributes.colSpan?parseInt(t.attributes.colSpan.value,10):0;if(f>1)for(var p=1;p<f;p++){var m=u(e.rowIndex,n+p);h(e.rowIndex,m,t,a),l(e.rowIndex,m,e,t,i,!0,!0)}}function h(e,t,n,o){e===r.rowPos&&r.colPos>=n.cellIndex&&n.cellIndex<=t&&!o&&r.colPos++}function f(t){switch(n){case e.where.Column:if(t.isColSpan)return e.resultAction.SubtractSpanCount;break;case e.where.Row:if(!t.isVirtual&&t.isRowSpan)return e.resultAction.AddCell;if(t.isRowSpan)return e.resultAction.SubtractSpanCount}return e.resultAction.RemoveCell}function p(t){switch(n){case e.where.Column:if(t.isColSpan)return e.resultAction.SumSpanCount;if(t.isRowSpan&&t.isVirtual)return e.resultAction.Ignore;break;case e.where.Row:if(t.isRowSpan)return e.resultAction.SumSpanCount;if(t.isColSpan&&t.isVirtual)return e.resultAction.Ignore}return e.resultAction.AddCell}this.getActionList=function(){for(var t=n===e.where.Row?r.rowPos:-1,i=n===e.where.Column?r.colPos:-1,l=0,u=!0;u;){var d=t>=0?t:l,h=i>=0?i:l,m=a[d];if(!m)return u=!1,s;var g=m[h];if(!g)return u=!1,s;var v=e.resultAction.Ignore;switch(o){case e.requestAction.Add:v=p(g);break;case e.requestAction.Delete:v=f(g)}s.push(c(g,v,d,h)),l++}return s},t&&t.tagName&&("td"===t.tagName.toLowerCase()||"th"===t.tagName.toLowerCase())&&(r.colPos=t.cellIndex,t.parentElement&&t.parentElement.tagName&&"tr"===t.parentElement.tagName.toLowerCase()&&(r.rowPos=t.parentElement.rowIndex)),function(){for(var e=i.rows,t=0;t<e.length;t++)for(var n=e[t].cells,o=0;o<n.length;o++)d(e[t],n[o])}()};Te.where={Row:0,Column:1},Te.requestAction={Add:0,Delete:1},Te.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var Se=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var n;return n=[{key:"tab",value:function(e,t){var n=he.ancestor(e.commonAncestor(),he.isCell),o=he.ancestor(n,he.isTable),i=he.listDescendant(o,he.isCell),r=k[t?"prev":"next"](i,n);r&&ve.create(r,0).select()}},{key:"addRow",value:function(e,n){for(var o=he.ancestor(e.commonAncestor(),he.isCell),i=t()(o).closest("tr"),r=this.recoverAttributes(i),a=t()("<tr"+r+"></tr>"),s=new Te(o,Te.where.Row,Te.requestAction.Add,t()(i).closest("table")[0]).getActionList(),l=0;l<s.length;l++){var c=s[l],u=this.recoverAttributes(c.baseCell);switch(c.action){case Te.resultAction.AddCell:a.append("<td"+u+">"+he.blank+"</td>");break;case Te.resultAction.SumSpanCount:if("top"===n&&(c.baseCell.parent?c.baseCell.closest("tr").rowIndex:0)<=i[0].rowIndex){var d=t()("<div></div>").append(t()("<td"+u+">"+he.blank+"</td>").removeAttr("rowspan")).html();a.append(d);break}var h=parseInt(c.baseCell.rowSpan,10);h++,c.baseCell.setAttribute("rowSpan",h)}}if("top"===n)i.before(a);else{if(o.rowSpan>1){var f=i[0].rowIndex+(o.rowSpan-2);return void t()(t()(i).parent().find("tr")[f]).after(t()(a))}i.after(a)}}},{key:"addCol",value:function(e,n){var o=he.ancestor(e.commonAncestor(),he.isCell),i=t()(o).closest("tr");t()(i).siblings().push(i);for(var r=new Te(o,Te.where.Column,Te.requestAction.Add,t()(i).closest("table")[0]).getActionList(),a=0;a<r.length;a++){var s=r[a],l=this.recoverAttributes(s.baseCell);switch(s.action){case Te.resultAction.AddCell:"right"===n?t()(s.baseCell).after("<td"+l+">"+he.blank+"</td>"):t()(s.baseCell).before("<td"+l+">"+he.blank+"</td>");break;case Te.resultAction.SumSpanCount:if("right"===n){var c=parseInt(s.baseCell.colSpan,10);c++,s.baseCell.setAttribute("colSpan",c)}else t()(s.baseCell).before("<td"+l+">"+he.blank+"</td>")}}}},{key:"recoverAttributes",value:function(e){var t="";if(!e)return t;for(var n=e.attributes||[],o=0;o<n.length;o++)"id"!==n[o].name.toLowerCase()&&n[o].specified&&(t+=" "+n[o].name+"='"+n[o].value+"'");return t}},{key:"deleteRow",value:function(e){for(var n=he.ancestor(e.commonAncestor(),he.isCell),o=t()(n).closest("tr"),i=o.children("td, th").index(t()(n)),r=o[0].rowIndex,a=new Te(n,Te.where.Row,Te.requestAction.Delete,t()(o).closest("table")[0]).getActionList(),s=0;s<a.length;s++)if(a[s]){var l=a[s].baseCell,c=a[s].virtualTable,u=l.rowSpan&&l.rowSpan>1,d=u?parseInt(l.rowSpan,10):0;switch(a[s].action){case Te.resultAction.Ignore:continue;case Te.resultAction.AddCell:var h=o.next("tr")[0];if(!h)continue;var f=o[0].cells[i];u&&(d>2?(d--,h.insertBefore(f,h.cells[i]),h.cells[i].setAttribute("rowSpan",d),h.cells[i].innerHTML=""):2===d&&(h.insertBefore(f,h.cells[i]),h.cells[i].removeAttribute("rowSpan"),h.cells[i].innerHTML=""));continue;case Te.resultAction.SubtractSpanCount:u&&(d>2?(d--,l.setAttribute("rowSpan",d),c.rowIndex!==r&&l.cellIndex===i&&(l.innerHTML="")):2===d&&(l.removeAttribute("rowSpan"),c.rowIndex!==r&&l.cellIndex===i&&(l.innerHTML="")));continue;case Te.resultAction.RemoveCell:continue}}o.remove()}},{key:"deleteCol",value:function(e){for(var n=he.ancestor(e.commonAncestor(),he.isCell),o=t()(n).closest("tr"),i=o.children("td, th").index(t()(n)),r=new Te(n,Te.where.Column,Te.requestAction.Delete,t()(o).closest("table")[0]).getActionList(),a=0;a<r.length;a++)if(r[a])switch(r[a].action){case Te.resultAction.Ignore:continue;case Te.resultAction.SubtractSpanCount:var s=r[a].baseCell;if(s.colSpan&&s.colSpan>1){var l=s.colSpan?parseInt(s.colSpan,10):0;l>2?(l--,s.setAttribute("colSpan",l),s.cellIndex===i&&(s.innerHTML="")):2===l&&(s.removeAttribute("colSpan"),s.cellIndex===i&&(s.innerHTML=""))}continue;case Te.resultAction.RemoveCell:he.remove(r[a].baseCell,!0);continue}}},{key:"createTable",value:function(e,n,o){for(var i,r=[],a=0;a<e;a++)r.push("<td>"+he.blank+"</td>");i=r.join("");for(var s,l=[],c=0;c<n;c++)l.push("<tr>"+i+"</tr>");s=l.join("");var u=t()("<table>"+s+"</table>");return o&&o.tableClassName&&u.addClass(o.tableClassName),u[0]}},{key:"deleteTable",value:function(e){var n=he.ancestor(e.commonAncestor(),he.isCell);t()(n).closest("table").remove()}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Ee=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.$note=n.layoutInfo.note,this.$editor=n.layoutInfo.editor,this.$editable=n.layoutInfo.editable,this.options=n.options,this.lang=this.options.langInfo,this.editable=this.$editable[0],this.lastRange=null,this.snapshot=null,this.style=new we,this.table=new Se,this.typing=new Ce(n),this.bullet=new xe,this.history=new ke(n),this.context.memo("help.escape",this.lang.help.escape),this.context.memo("help.undo",this.lang.help.undo),this.context.memo("help.redo",this.lang.help.redo),this.context.memo("help.tab",this.lang.help.tab),this.context.memo("help.untab",this.lang.help.untab),this.context.memo("help.insertParagraph",this.lang.help.insertParagraph),this.context.memo("help.insertOrderedList",this.lang.help.insertOrderedList),this.context.memo("help.insertUnorderedList",this.lang.help.insertUnorderedList),this.context.memo("help.indent",this.lang.help.indent),this.context.memo("help.outdent",this.lang.help.outdent),this.context.memo("help.formatPara",this.lang.help.formatPara),this.context.memo("help.insertHorizontalRule",this.lang.help.insertHorizontalRule),this.context.memo("help.fontName",this.lang.help.fontName);for(var i=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor"],r=0,a=i.length;r<a;r++)this[i[r]]=function(e){return function(t){o.beforeCommand(),document.execCommand(e,!1,t),o.afterCommand(!0)}}(i[r]),this.context.memo("help."+i[r],this.lang.help[i[r]]);this.fontName=this.wrapCommand((function(e){return o.fontStyling("font-family",f.validFontName(e))})),this.fontSize=this.wrapCommand((function(e){var t=o.currentStyle()["font-size-unit"];return o.fontStyling("font-size",e+t)})),this.fontSizeUnit=this.wrapCommand((function(e){var t=o.currentStyle()["font-size"];return o.fontStyling("font-size",t+e)}));for(var s=1;s<=6;s++)this["formatH"+s]=function(e){return function(){o.formatBlock("H"+e)}}(s),this.context.memo("help.formatH"+s,this.lang.help["formatH"+s]);this.insertParagraph=this.wrapCommand((function(){o.typing.insertParagraph(o.editable)})),this.insertOrderedList=this.wrapCommand((function(){o.bullet.insertOrderedList(o.editable)})),this.insertUnorderedList=this.wrapCommand((function(){o.bullet.insertUnorderedList(o.editable)})),this.indent=this.wrapCommand((function(){o.bullet.indent(o.editable)})),this.outdent=this.wrapCommand((function(){o.bullet.outdent(o.editable)})),this.insertNode=this.wrapCommand((function(e){o.isLimited(t()(e).text().length)||(o.getLastRange().insertNode(e),o.setLastRange(ve.createFromNodeAfter(e).select()))})),this.insertText=this.wrapCommand((function(e){if(!o.isLimited(e.length)){var t=o.getLastRange().insertNode(he.createText(e));o.setLastRange(ve.create(t,he.nodeLength(t)).select())}})),this.pasteHTML=this.wrapCommand((function(e){if(!o.isLimited(e.length)){e=o.context.invoke("codeview.purify",e);var t=o.getLastRange().pasteHTML(e);o.setLastRange(ve.createFromNodeAfter(k.last(t)).select())}})),this.formatBlock=this.wrapCommand((function(e,t){var n=o.options.callbacks.onApplyCustomStyle;n?n.call(o,t,o.context,o.onFormatBlock):o.onFormatBlock(e,t)})),this.insertHorizontalRule=this.wrapCommand((function(){var e=o.getLastRange().insertNode(he.create("HR"));e.nextSibling&&o.setLastRange(ve.create(e.nextSibling,0).normalize().select())})),this.lineHeight=this.wrapCommand((function(e){o.style.stylePara(o.getLastRange(),{lineHeight:e})})),this.createLink=this.wrapCommand((function(e){var n=e.url,i=e.text,r=e.isNewWindow,a=e.checkProtocol,s=e.range||o.getLastRange(),l=i.length-s.toString().length;if(!(l>0&&o.isLimited(l))){var c=s.toString()!==i;"string"==typeof n&&(n=n.trim()),o.options.onCreateLink?n=o.options.onCreateLink(n):a&&(n=/^([A-Za-z][A-Za-z0-9+-.]*\:|#|\/)/.test(n)?n:o.options.defaultProtocol+n);var u=[];if(c){var d=(s=s.deleteContents()).insertNode(t()("<A>"+i+"</A>")[0]);u.push(d)}else u=o.style.styleNodes(s,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});t().each(u,(function(e,o){t()(o).attr("href",n),r?t()(o).attr("target","_blank"):t()(o).removeAttr("target")})),o.setLastRange(o.createRangeFromList(u).select())}})),this.color=this.wrapCommand((function(e){var t=e.foreColor,n=e.backColor;t&&document.execCommand("foreColor",!1,t),n&&document.execCommand("backColor",!1,n)})),this.foreColor=this.wrapCommand((function(e){document.execCommand("foreColor",!1,e)})),this.insertTable=this.wrapCommand((function(e){var t=e.split("x");o.getLastRange().deleteContents().insertNode(o.table.createTable(t[0],t[1],o.options))})),this.removeMedia=this.wrapCommand((function(){var e=t()(o.restoreTarget()).parent();e.closest("figure").length?e.closest("figure").remove():e=t()(o.restoreTarget()).detach(),o.context.triggerEvent("media.delete",e,o.$editable)})),this.floatMe=this.wrapCommand((function(e){var n=t()(o.restoreTarget());n.toggleClass("note-float-left","left"===e),n.toggleClass("note-float-right","right"===e),n.css("float","none"===e?"":e)})),this.resize=this.wrapCommand((function(e){var n=t()(o.restoreTarget());0===(e=parseFloat(e))?n.css("width",""):n.css({width:100*e+"%",height:""})}))}var n;return n=[{key:"initialize",value:function(){var e=this;this.$editable.on("keydown",(function(t){if(t.keyCode===be.code.ENTER&&e.context.triggerEvent("enter",t),e.context.triggerEvent("keydown",t),e.snapshot=e.history.makeSnapshot(),e.hasKeyShortCut=!1,t.isDefaultPrevented()||(e.options.shortcuts?e.hasKeyShortCut=e.handleKeyMap(t):e.preventDefaultEditableShortCuts(t)),e.isLimited(1,t)){var n=e.getLastRange();if(n.eo-n.so==0)return!1}e.setLastRange(),e.options.recordEveryKeystroke&&!1===e.hasKeyShortCut&&e.history.recordUndo()})).on("keyup",(function(t){e.setLastRange(),e.context.triggerEvent("keyup",t)})).on("focus",(function(t){e.setLastRange(),e.context.triggerEvent("focus",t)})).on("blur",(function(t){e.context.triggerEvent("blur",t)})).on("mousedown",(function(t){e.context.triggerEvent("mousedown",t)})).on("mouseup",(function(t){e.setLastRange(),e.history.recordUndo(),e.context.triggerEvent("mouseup",t)})).on("scroll",(function(t){e.context.triggerEvent("scroll",t)})).on("paste",(function(t){e.setLastRange(),e.context.triggerEvent("paste",t)})).on("input",(function(){e.isLimited(0)&&e.snapshot&&e.history.applySnapshot(e.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(he.html(this.$note)||he.emptyPara),this.$editable.on(f.inputEventName,m.debounce((function(){e.context.triggerEvent("change",e.$editable.html(),e.$editable)}),10)),this.$editable.on("focusin",(function(t){e.context.triggerEvent("focusin",t)})).on("focusout",(function(t){e.context.triggerEvent("focusout",t)})),this.options.airMode?this.options.overrideContextMenu&&this.$editor.on("contextmenu",(function(t){return e.context.triggerEvent("contextmenu",t),!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(){this.$editable.off()}},{key:"handleKeyMap",value:function(e){var t=this.options.keyMap[f.isMac?"mac":"pc"],n=[];e.metaKey&&n.push("CMD"),e.ctrlKey&&!e.altKey&&n.push("CTRL"),e.shiftKey&&n.push("SHIFT");var o=be.nameFromCode[e.keyCode];o&&n.push(o);var i=t[n.join("+")];if("TAB"!==o||this.options.tabDisable)if(i){if(!1!==this.context.invoke(i))return e.preventDefault(),!0}else be.isEdit(e.keyCode)&&this.afterCommand();else this.afterCommand();return!1}},{key:"preventDefaultEditableShortCuts",value:function(e){(e.ctrlKey||e.metaKey)&&k.contains([66,73,85],e.keyCode)&&e.preventDefault()}},{key:"isLimited",value:function(e,t){return e=e||0,(void 0===t||!(be.isMove(t.keyCode)||be.isNavigation(t.keyCode)||t.ctrlKey||t.metaKey||k.contains([be.code.BACKSPACE,be.code.DELETE],t.keyCode)))&&this.options.maxTextLength>0&&this.$editable.text().length+e>this.options.maxTextLength}},{key:"createRange",value:function(){return this.focus(),this.setLastRange(),this.getLastRange()}},{key:"createRangeFromList",value:function(e){var t=ve.createFromNodeBefore(k.head(e)).getStartPoint(),n=ve.createFromNodeAfter(k.last(e)).getEndPoint();return ve.create(t.node,t.offset,n.node,n.offset)}},{key:"setLastRange",value:function(e){e?this.lastRange=e:(this.lastRange=ve.create(this.editable),0===t()(this.lastRange.sc).closest(".note-editable").length&&(this.lastRange=ve.createFromBodyElement(this.editable)))}},{key:"getLastRange",value:function(){return this.lastRange||this.setLastRange(),this.lastRange}},{key:"saveRange",value:function(e){e&&this.getLastRange().collapse().select()}},{key:"restoreRange",value:function(){this.lastRange&&(this.lastRange.select(),this.focus())}},{key:"saveTarget",value:function(e){this.$editable.data("target",e)}},{key:"clearTarget",value:function(){this.$editable.removeData("target")}},{key:"restoreTarget",value:function(){return this.$editable.data("target")}},{key:"currentStyle",value:function(){var e=ve.create();return e&&(e=e.normalize()),e?this.style.current(e):this.style.fromNode(this.$editable)}},{key:"styleFromNode",value:function(e){return this.style.fromNode(e)}},{key:"undo",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.undo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"commit",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.commit(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"redo",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.redo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"beforeCommand",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),document.execCommand("styleWithCSS",!1,this.options.styleWithCSS),this.focus()}},{key:"afterCommand",value:function(e){this.normalizeContent(),this.history.recordUndo(),e||this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"tab",value:function(){var e=this.getLastRange();if(e.isCollapsed()&&e.isOnCell())this.table.tab(e);else{if(0===this.options.tabSize)return!1;this.isLimited(this.options.tabSize)||(this.beforeCommand(),this.typing.insertTab(e,this.options.tabSize),this.afterCommand())}}},{key:"untab",value:function(){var e=this.getLastRange();if(e.isCollapsed()&&e.isOnCell())this.table.tab(e,!0);else if(0===this.options.tabSize)return!1}},{key:"wrapCommand",value:function(e){return function(){this.beforeCommand(),e.apply(this,arguments),this.afterCommand()}}},{key:"insertImage",value:function(e,n){var o,i=this;return(o=e,t().Deferred((function(e){var n=t()("<img>");n.one("load",(function(){n.off("error abort"),e.resolve(n)})).one("error abort",(function(){n.off("load").detach(),e.reject(n)})).css({display:"none"}).appendTo(document.body).attr("src",o)})).promise()).then((function(e){i.beforeCommand(),"function"==typeof n?n(e):("string"==typeof n&&e.attr("data-filename",n),e.css("width",Math.min(i.$editable.width(),e.width()))),e.show(),i.getLastRange().insertNode(e[0]),i.setLastRange(ve.createFromNodeAfter(e[0]).select()),i.afterCommand()})).fail((function(e){i.context.triggerEvent("image.upload.error",e)}))}},{key:"insertImagesAsDataURL",value:function(e){var n=this;t().each(e,(function(e,o){var i=o.name;n.options.maximumImageFileSize&&n.options.maximumImageFileSize<o.size?n.context.triggerEvent("image.upload.error",n.lang.image.maximumFileSizeError):function(e){return t().Deferred((function(n){t().extend(new FileReader,{onload:function(e){var t=e.target.result;n.resolve(t)},onerror:function(e){n.reject(e)}}).readAsDataURL(e)})).promise()}(o).then((function(e){return n.insertImage(e,i)})).fail((function(){n.context.triggerEvent("image.upload.error")}))}))}},{key:"insertImagesOrCallback",value:function(e){this.options.callbacks.onImageUpload?this.context.triggerEvent("image.upload",e):this.insertImagesAsDataURL(e)}},{key:"getSelectedText",value:function(){var e=this.getLastRange();return e.isOnAnchor()&&(e=ve.createFromNode(he.ancestor(e.sc,he.isAnchor))),e.toString()}},{key:"onFormatBlock",value:function(e,n){if(document.execCommand("FormatBlock",!1,f.isMSIE?"<"+e+">":e),n&&n.length&&(n[0].tagName.toUpperCase()!==e.toUpperCase()&&(n=n.find(e)),n&&n.length)){var o=this.createRange(),i=t()([o.sc,o.ec]).closest(e);i.removeClass();var r=n[0].className||"";r&&i.addClass(r)}}},{key:"formatPara",value:function(){this.formatBlock("P")}},{key:"fontStyling",value:function(e,n){var o=this.getLastRange();if(""!==o){var i=this.style.styleNodes(o);if(this.$editor.find(".note-status-output").html(""),t()(i).css(e,n),o.isCollapsed()){var r=k.head(i);r&&!he.nodeLength(r)&&(r.innerHTML=he.ZERO_WIDTH_NBSP_CHAR,ve.createFromNode(r.firstChild).select(),this.setLastRange(),this.$editable.data("bogus",r))}else this.setLastRange(this.createRangeFromList(i).select())}else{var a=t().now();this.$editor.find(".note-status-output").html('<div id="note-status-output-'+a+'" class="alert alert-info">'+this.lang.output.noSelection+"</div>"),setTimeout((function(){t()("#note-status-output-"+a).remove()}),5e3)}}},{key:"unlink",value:function(){var e=this.getLastRange();if(e.isOnAnchor()){var t=he.ancestor(e.sc,he.isAnchor);(e=ve.createFromNode(t)).select(),this.setLastRange(),this.beforeCommand(),document.execCommand("unlink"),this.afterCommand()}}},{key:"getLinkInfo",value:function(){var e=this.getLastRange().expand(he.isAnchor),n=t()(k.head(e.nodes(he.isAnchor))),o={range:e,text:e.toString(),url:n.length?n.attr("href"):""};return n.length&&(o.isNewWindow="_blank"===n.attr("target")),o}},{key:"addRow",value:function(e){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addRow(t,e),this.afterCommand())}},{key:"addCol",value:function(e){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addCol(t,e),this.afterCommand())}},{key:"deleteRow",value:function(){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteRow(e),this.afterCommand())}},{key:"deleteCol",value:function(){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteCol(e),this.afterCommand())}},{key:"deleteTable",value:function(){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteTable(e),this.afterCommand())}},{key:"resizeTo",value:function(e,t,n){var o;if(n){var i=e.y/e.x,r=t.data("ratio");o={width:r>i?e.x:e.y/r,height:r>i?e.x*r:e.y}}else o={width:e.x,height:e.y};t.css(o)}},{key:"hasFocus",value:function(){return this.$editable.is(":focus")}},{key:"focus",value:function(){this.hasFocus()||this.$editable.focus()}},{key:"isEmpty",value:function(){return he.isEmpty(this.$editable[0])||he.emptyPara===this.$editable.html()}},{key:"empty",value:function(){this.context.invoke("code",he.emptyPara)}},{key:"normalizeContent",value:function(){this.$editable[0].normalize()}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Ne=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editable=t.layoutInfo.editable}var t;return(t=[{key:"initialize",value:function(){this.$editable.on("paste",this.pasteByEvent.bind(this))}},{key:"pasteByEvent",value:function(e){var t=this,n=e.originalEvent.clipboardData;if(n&&n.items&&n.items.length){var o=n.items.length>1?n.items[1]:k.head(n.items);"file"===o.kind&&-1!==o.type.indexOf("image/")?(this.context.invoke("editor.insertImagesOrCallback",[o.getAsFile()]),e.preventDefault()):"string"===o.kind&&this.context.invoke("editor.isLimited",n.getData("Text").length)&&e.preventDefault()}else if(window.clipboardData){var i=window.clipboardData.getData("text");this.context.invoke("editor.isLimited",i.length)&&e.preventDefault()}setTimeout((function(){t.context.invoke("editor.afterCommand")}),10)}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,t),e}();var Ae=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.$eventListener=t()(document),this.$editor=n.layoutInfo.editor,this.$editable=n.layoutInfo.editable,this.options=n.options,this.lang=this.options.langInfo,this.documentEventHandlers={},this.$dropzone=t()(['<div class="note-dropzone">','<div class="note-dropzone-message"></div>',"</div>"].join("")).prependTo(this.$editor)}var n;return n=[{key:"initialize",value:function(){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(){var e=this,n=t()(),o=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(t){var i=e.context.invoke("codeview.isActivated"),r=e.$editor.width()>0&&e.$editor.height()>0;i||n.length||!r||(e.$editor.addClass("dragover"),e.$dropzone.width(e.$editor.width()),e.$dropzone.height(e.$editor.height()),o.text(e.lang.image.dragImageHere)),n=n.add(t.target)},this.documentEventHandlers.onDragleave=function(o){(n=n.not(o.target)).length&&"BODY"!==o.target.nodeName||(n=t()(),e.$editor.removeClass("dragover"))},this.documentEventHandlers.onDrop=function(){n=t()(),e.$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(){e.$dropzone.addClass("hover"),o.text(e.lang.image.dropImage)})).on("dragleave",(function(){e.$dropzone.removeClass("hover"),o.text(e.lang.image.dragImageHere)})),this.$dropzone.on("drop",(function(n){var o=n.originalEvent.dataTransfer;n.preventDefault(),o&&o.files&&o.files.length?(e.$editable.focus(),e.context.invoke("editor.insertImagesOrCallback",o.files)):t().each(o.types,(function(n,i){if(!(i.toLowerCase().indexOf("_moz_")>-1)){var r=o.getData(i);i.toLowerCase().indexOf("text")>-1?e.context.invoke("editor.pasteHTML",r):t()(r).each((function(t,n){e.context.invoke("editor.insertNode",n)}))}}))})).on("dragover",!1)}},{key:"destroy",value:function(){var e=this;Object.keys(this.documentEventHandlers).forEach((function(t){e.$eventListener.off(t.substr(2).toLowerCase(),e.documentEventHandlers[t])})),this.documentEventHandlers={}}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();function Ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var $e=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.$codable=t.layoutInfo.codable,this.options=t.options,this.CodeMirrorConstructor=window.CodeMirror,this.options.codemirror.CodeMirrorConstructor&&(this.CodeMirrorConstructor=this.options.codemirror.CodeMirrorConstructor)}var t;return t=[{key:"sync",value:function(e){var t=this.isActivated(),n=this.CodeMirrorConstructor;t&&(e?n?this.$codable.data("cmEditor").getDoc().setValue(e):this.$codable.val(e):n&&this.$codable.data("cmEditor").save())}},{key:"initialize",value:function(){var e=this;this.$codable.on("keyup",(function(t){t.keyCode===be.code.ESCAPE&&e.deactivate()}))}},{key:"isActivated",value:function(){return this.$editor.hasClass("codeview")}},{key:"toggle",value:function(){this.isActivated()?this.deactivate():this.activate(),this.context.triggerEvent("codeview.toggled")}},{key:"purify",value:function(e){if(this.options.codeviewFilter&&(e=e.replace(this.options.codeviewFilterRegex,""),this.options.codeviewIframeFilter)){var t=this.options.codeviewIframeWhitelistSrc.concat(this.options.codeviewIframeWhitelistSrcBase);e=e.replace(/(<iframe.*?>.*?(?:<\/iframe>)?)/gi,(function(e){if(/<.+src(?==?('|"|\s)?)[\s\S]+src(?=('|"|\s)?)[^>]*?>/i.test(e))return"";var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ie(e,t):void 0}}(e))){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(new RegExp('src="(https?:)?//'+i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+'/(.+)"').test(e))return e}}catch(e){o.e(e)}finally{o.f()}return""}))}return e}},{key:"activate",value:function(){var e=this,t=this.CodeMirrorConstructor;if(this.$codable.val(he.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(),t){var n=t.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var o=new t.TernServer(this.options.codemirror.tern);n.ternServer=o,n.on("cursorActivity",(function(e){o.updateArgHints(e)}))}n.on("blur",(function(t){e.context.triggerEvent("blur.codeview",n.getValue(),t)})),n.on("change",(function(){e.context.triggerEvent("change.codeview",n.getValue(),n)})),n.setSize(null,this.$editable.outerHeight()),this.$codable.data("cmEditor",n)}else this.$codable.on("blur",(function(t){e.context.triggerEvent("blur.codeview",e.$codable.val(),t)})),this.$codable.on("input",(function(){e.context.triggerEvent("change.codeview",e.$codable.val(),e.$codable)}))}},{key:"deactivate",value:function(){if(this.CodeMirrorConstructor){var e=this.$codable.data("cmEditor");this.$codable.val(e.getValue()),e.toTextArea()}var t=this.purify(he.value(this.$codable,this.options.prettifyHtml)||he.emptyPara),n=this.$editable.html()!==t;this.$editable.html(t),this.$editable.height(this.options.height?this.$codable.height():"auto"),this.$editor.removeClass("codeview"),n&&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(){this.isActivated()&&this.deactivate()}}],t&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,t),e}();var De=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$document=t()(document),this.$statusbar=n.layoutInfo.statusbar,this.$editable=n.layoutInfo.editable,this.$codable=n.layoutInfo.codable,this.options=n.options}var n;return(n=[{key:"initialize",value:function(){var e=this;this.options.airMode||this.options.disableResizeEditor?this.destroy():this.$statusbar.on("mousedown",(function(t){t.preventDefault(),t.stopPropagation();var n=e.$editable.offset().top-e.$document.scrollTop(),o=e.$codable.offset().top-e.$document.scrollTop(),i=function(t){var i=t.clientY-(n+24),r=t.clientY-(o+24);i=e.options.minheight>0?Math.max(i,e.options.minheight):i,i=e.options.maxHeight>0?Math.min(i,e.options.maxHeight):i,r=e.options.minheight>0?Math.max(r,e.options.minheight):r,r=e.options.maxHeight>0?Math.min(r,e.options.maxHeight):r,e.$editable.height(i),e.$codable.height(r)};e.$document.on("mousemove",i).one("mouseup",(function(){e.$document.off("mousemove",i)}))}))}},{key:"destroy",value:function(){this.$statusbar.off(),this.$statusbar.addClass("locked")}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Le=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.$editor=n.layoutInfo.editor,this.$toolbar=n.layoutInfo.toolbar,this.$editable=n.layoutInfo.editable,this.$codable=n.layoutInfo.codable,this.$window=t()(window),this.$scrollbar=t()("html, body"),this.scrollbarClassName="note-fullscreen-body",this.onResize=function(){o.resizeTo({h:o.$window.height()-o.$toolbar.outerHeight()})}}var n;return(n=[{key:"resizeTo",value:function(e){this.$editable.css("height",e.h),this.$codable.css("height",e.h),this.$codable.data("cmeditor")&&this.$codable.data("cmeditor").setsize(null,e.h)}},{key:"toggle",value:function(){this.$editor.toggleClass("fullscreen");var e=this.isFullscreen();this.$scrollbar.toggleClass(this.scrollbarClassName,e),e?(this.$editable.data("orgHeight",this.$editable.css("height")),this.$editable.data("orgMaxHeight",this.$editable.css("maxHeight")),this.$editable.css("maxHeight",""),this.$window.on("resize",this.onResize).trigger("resize")):(this.$window.off("resize",this.onResize),this.resizeTo({h:this.$editable.data("orgHeight")}),this.$editable.css("maxHeight",this.$editable.css("orgMaxHeight"))),this.context.invoke("toolbar.updateFullscreen",e)}},{key:"isFullscreen",value:function(){return this.$editor.hasClass("fullscreen")}},{key:"destroy",value:function(){this.$scrollbar.removeClass(this.scrollbarClassName)}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Re=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.$document=t()(document),this.$editingArea=n.layoutInfo.editingArea,this.options=n.options,this.lang=this.options.langInfo,this.events={"summernote.mousedown":function(e,t){o.update(t.target,t)&&t.preventDefault()},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function(){o.update()},"summernote.disable summernote.blur":function(){o.hide()},"summernote.codeview.toggled":function(){o.update()}}}var n;return n=[{key:"initialize",value:function(){var e=this;this.$handle=t()(['<div class="note-handle">','<div class="note-control-selection">','<div class="note-control-selection-bg"></div>','<div class="note-control-holder note-control-nw"></div>','<div class="note-control-holder note-control-ne"></div>','<div class="note-control-holder note-control-sw"></div>','<div class="',this.options.disableResizeImage?"note-control-holder":"note-control-sizing",' note-control-se"></div>',this.options.disableResizeImage?"":'<div class="note-control-selection-info"></div>',"</div>","</div>"].join("")).prependTo(this.$editingArea),this.$handle.on("mousedown",(function(t){if(he.isControlSizing(t.target)){t.preventDefault(),t.stopPropagation();var n=e.$handle.find(".note-control-selection").data("target"),o=n.offset(),i=e.$document.scrollTop(),r=function(t){e.context.invoke("editor.resizeTo",{x:t.clientX-o.left,y:t.clientY-(o.top-i)},n,!t.shiftKey),e.update(n[0],t)};e.$document.on("mousemove",r).one("mouseup",(function(t){t.preventDefault(),e.$document.off("mousemove",r),e.context.invoke("editor.afterCommand")})),n.data("ratio")||n.data("ratio",n.height()/n.width())}})),this.$handle.on("wheel",(function(t){t.preventDefault(),e.update()}))}},{key:"destroy",value:function(){this.$handle.remove()}},{key:"update",value:function(e,n){if(this.context.isDisabled())return!1;var o=he.isImg(e),i=this.$handle.find(".note-control-selection");if(this.context.invoke("imagePopover.update",e,n),o){var r=t()(e),a=r.position(),s={left:a.left+parseInt(r.css("marginLeft"),10),top:a.top+parseInt(r.css("marginTop"),10)},l={w:r.outerWidth(!1),h:r.outerHeight(!1)};i.css({display:"block",left:s.left,top:s.top,width:l.w,height:l.h}).data("target",r);var c=new Image;c.src=r.attr("src");var u=l.w+"x"+l.h+" ("+this.lang.image.original+": "+c.width+"x"+c.height+")";i.find(".note-control-selection-info").text(u),this.context.invoke("editor.saveTarget",e)}else this.hide();return o}},{key:"hide",value:function(){this.context.invoke("editor.clearTarget"),this.$handle.children().hide()}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Pe=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/]{2}|tel:|mailto:[A-Z0-9._%+-]+@|xmpp:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i,Oe=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.options=t.options,this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||n.handleKeyup(t)},"summernote.keydown":function(e,t){n.handleKeydown(t)}}}var n;return(n=[{key:"initialize",value:function(){this.lastWordRange=null}},{key:"destroy",value:function(){this.lastWordRange=null}},{key:"replace",value:function(){if(this.lastWordRange){var e=this.lastWordRange.toString(),n=e.match(Pe);if(n&&(n[1]||n[2])){var o=n[1]?e:"http://"+e,i=this.options.showDomainOnlyForAutolink?e.replace(/^(?:https?:\/\/)?(?:tel?:?)?(?:mailto?:?)?(?:xmpp?:?)?(?:www\.)?/i,"").split("/")[0]:e,r=t()("<a></a>").html(i).attr("href",o)[0];this.context.options.linkTargetBlank&&t()(r).attr("target","_blank"),this.lastWordRange.insertNode(r),this.lastWordRange=null,this.context.invoke("editor.focus")}}}},{key:"handleKeydown",value:function(e){if(k.contains([be.code.ENTER,be.code.SPACE],e.keyCode)){var t=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=t}}},{key:"handleKeyup",value:function(e){k.contains([be.code.ENTER,be.code.SPACE],e.keyCode)&&this.replace()}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Fe=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$note=t.layoutInfo.note,this.events={"summernote.change":function(){n.$note.val(t.invoke("code"))}}}var t;return(t=[{key:"shouldInitialize",value:function(){return he.isTextarea(this.$note[0])}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,t),e}();var He=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.options=t.options.replace||{},this.keys=[be.code.ENTER,be.code.SPACE,be.code.PERIOD,be.code.COMMA,be.code.SEMICOLON,be.code.SLASH],this.previousKeydownCode=null,this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||n.handleKeyup(t)},"summernote.keydown":function(e,t){n.handleKeydown(t)}}}var t;return(t=[{key:"shouldInitialize",value:function(){return!!this.options.match}},{key:"initialize",value:function(){this.lastWord=null}},{key:"destroy",value:function(){this.lastWord=null}},{key:"replace",value:function(){if(this.lastWord){var e=this,t=this.lastWord.toString();this.options.match(t,(function(t){if(t){var n="";if("string"==typeof t?n=he.createText(t):t instanceof jQuery?n=t[0]:t instanceof Node&&(n=t),!n)return;e.lastWord.insertNode(n),e.lastWord=null,e.context.invoke("editor.focus")}}))}}},{key:"handleKeydown",value:function(e){if(this.previousKeydownCode&&k.contains(this.keys,this.previousKeydownCode))this.previousKeydownCode=e.keyCode;else{if(k.contains(this.keys,e.keyCode)){var t=this.context.invoke("editor.createRange").getWordRange();this.lastWord=t}this.previousKeydownCode=e.keyCode}}},{key:"handleKeyup",value:function(e){k.contains(this.keys,e.keyCode)&&this.replace()}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,t),e}();var Me=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editingArea=t.layoutInfo.editingArea,this.options=t.options,!0===this.options.inheritPlaceholder&&(this.options.placeholder=this.context.$note.attr("placeholder")||this.options.placeholder),this.events={"summernote.init summernote.change":function(){n.update()},"summernote.codeview.toggled":function(){n.update()}}}var n;return(n=[{key:"shouldInitialize",value:function(){return!!this.options.placeholder}},{key:"initialize",value:function(){var e=this;this.$placeholder=t()('<div class="note-placeholder"></div>'),this.$placeholder.on("click",(function(){e.context.invoke("focus")})).html(this.options.placeholder).prependTo(this.$editingArea),this.update()}},{key:"destroy",value:function(){this.$placeholder.remove()}},{key:"update",value:function(){var e=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(e)}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var je=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.ui=t().summernote.ui,this.context=n,this.$toolbar=n.layoutInfo.toolbar,this.options=n.options,this.lang=this.options.langInfo,this.invertedKeyMap=m.invertObject(this.options.keyMap[f.isMac?"mac":"pc"])}var n;return n=[{key:"representShortcut",value:function(e){var t=this.invertedKeyMap[e];return this.options.shortcuts&&t?(f.isMac&&(t=t.replace("CMD","⌘").replace("SHIFT","⇧"))," ("+(t=t.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]"))+")"):""}},{key:"button",value:function(e){return!this.options.tooltip&&e.tooltip&&delete e.tooltip,e.container=this.options.container,this.ui.button(e)}},{key:"initialize",value:function(){this.addToolbarButtons(),this.addImagePopoverButtons(),this.addLinkPopoverButtons(),this.addTablePopoverButtons(),this.fontInstalledMap={}}},{key:"destroy",value:function(){delete this.fontInstalledMap}},{key:"isFontInstalled",value:function(e){return Object.prototype.hasOwnProperty.call(this.fontInstalledMap,e)||(this.fontInstalledMap[e]=f.isFontInstalled(e)||k.contains(this.options.fontNamesIgnoreCheck,e)),this.fontInstalledMap[e]}},{key:"isFontDeservedToAdd",value:function(e){return""!==(e=e.toLowerCase())&&this.isFontInstalled(e)&&-1===f.genericFontFamilies.indexOf(e)}},{key:"colorPalette",value:function(e,n,o,i){var r=this;return this.ui.buttonGroup({className:"note-color "+e,children:[this.button({className:"note-current-color-button",contents:this.ui.icon(this.options.icons.font+" note-recent-color"),tooltip:n,click:function(e){var n=t()(e.currentTarget);o&&i?r.context.invoke("editor.color",{backColor:n.attr("data-backColor"),foreColor:n.attr("data-foreColor")}):o?r.context.invoke("editor.color",{backColor:n.attr("data-backColor")}):i&&r.context.invoke("editor.color",{foreColor:n.attr("data-foreColor")})},callback:function(e){var t=e.find(".note-recent-color");o&&(t.css("background-color",r.options.colorButton.backColor),e.attr("data-backColor",r.options.colorButton.backColor)),i?(t.css("color",r.options.colorButton.foreColor),e.attr("data-foreColor",r.options.colorButton.foreColor)):t.css("color","transparent")}}),this.button({className:"dropdown-toggle",contents:this.ui.dropdownButtonContents("",this.options),tooltip:this.lang.color.more,data:{toggle:"dropdown"}}),this.ui.dropdown({items:(o?['<div class="note-palette">','<div class="note-palette-title">'+this.lang.color.background+"</div>","<div>",'<button type="button" class="note-color-reset btn btn-light btn-default" data-event="backColor" data-value="transparent">',this.lang.color.transparent,"</button>","</div>",'<div class="note-holder" data-event="backColor">\x3c!-- back colors --\x3e</div>',"<div>",'<button type="button" class="note-color-select btn btn-light btn-default" data-event="openPalette" data-value="backColorPicker-'+this.options.id+'">',this.lang.color.cpSelect,"</button>",'<input type="color" id="backColorPicker-'+this.options.id+'" class="note-btn note-color-select-btn" value="'+this.options.colorButton.backColor+'" data-event="backColorPalette-'+this.options.id+'">',"</div>",'<div class="note-holder-custom" id="backColorPalette-'+this.options.id+'" data-event="backColor"></div>',"</div>"].join(""):"")+(i?['<div class="note-palette">','<div class="note-palette-title">'+this.lang.color.foreground+"</div>","<div>",'<button type="button" class="note-color-reset btn btn-light btn-default" data-event="removeFormat" data-value="foreColor">',this.lang.color.resetToDefault,"</button>","</div>",'<div class="note-holder" data-event="foreColor">\x3c!-- fore colors --\x3e</div>',"<div>",'<button type="button" class="note-color-select btn btn-light btn-default" data-event="openPalette" data-value="foreColorPicker-'+this.options.id+'">',this.lang.color.cpSelect,"</button>",'<input type="color" id="foreColorPicker-'+this.options.id+'" class="note-btn note-color-select-btn" value="'+this.options.colorButton.foreColor+'" data-event="foreColorPalette-'+this.options.id+'">',"</div>",'<div class="note-holder-custom" id="foreColorPalette-'+this.options.id+'" data-event="foreColor"></div>',"</div>"].join(""):""),callback:function(e){e.find(".note-holder").each((function(e,n){var o=t()(n);o.append(r.ui.palette({colors:r.options.colors,colorsName:r.options.colorsName,eventName:o.data("event"),container:r.options.container,tooltip:r.options.tooltip}).render())}));var n=[["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"]];e.find(".note-holder-custom").each((function(e,o){var i=t()(o);i.append(r.ui.palette({colors:n,colorsName:n,eventName:i.data("event"),container:r.options.container,tooltip:r.options.tooltip}).render())})),e.find("input[type=color]").each((function(n,o){t()(o).change((function(){var n=e.find("#"+t()(this).data("event")).find(".note-color-btn").first(),o=this.value.toUpperCase();n.css("background-color",o).attr("aria-label",o).attr("data-value",o).attr("data-original-title",o),n.click()}))}))},click:function(n){n.stopPropagation();var o=t()("."+e).find(".note-dropdown-menu"),i=t()(n.target),a=i.data("event"),s=i.attr("data-value");if("openPalette"===a){var l=o.find("#"+s),c=t()(o.find("#"+l.data("event")).find(".note-color-row")[0]),u=c.find(".note-color-btn").last().detach(),d=l.val();u.css("background-color",d).attr("aria-label",d).attr("data-value",d).attr("data-original-title",d),c.prepend(u),l.click()}else{if(k.contains(["backColor","foreColor"],a)){var h="backColor"===a?"background-color":"color",f=i.closest(".note-color").find(".note-recent-color"),p=i.closest(".note-color").find(".note-current-color-button");f.css(h,s),p.attr("data-"+a,s)}r.context.invoke("editor."+a,s)}}})]}).render()}},{key:"addToolbarButtons",value:function(){var e=this;this.context.memo("button.style",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.magic),e.options),tooltip:e.lang.style.style,data:{toggle:"dropdown"}}),e.ui.dropdown({className:"dropdown-style",items:e.options.styleTags,title:e.lang.style.style,template:function(t){"string"==typeof t&&(t={tag:t,title:Object.prototype.hasOwnProperty.call(e.lang.style,t)?e.lang.style[t]:t});var n=t.tag,o=t.title;return"<"+n+(t.style?' style="'+t.style+'" ':"")+(t.className?' class="'+t.className+'"':"")+">"+o+"</"+n+">"},click:e.context.createInvokeHandler("editor.formatBlock")})]).render()}));for(var n=function(t,n){var o=e.options.styleTags[t];e.context.memo("button.style."+o,(function(){return e.button({className:"note-btn-style-"+o,contents:'<div data-value="'+o+'">'+o.toUpperCase()+"</div>",tooltip:e.lang.style[o],click:e.context.createInvokeHandler("editor.formatBlock")}).render()}))},o=0,i=this.options.styleTags.length;o<i;o++)n(o);this.context.memo("button.bold",(function(){return e.button({className:"note-btn-bold",contents:e.ui.icon(e.options.icons.bold),tooltip:e.lang.font.bold+e.representShortcut("bold"),click:e.context.createInvokeHandlerAndUpdateState("editor.bold")}).render()})),this.context.memo("button.italic",(function(){return e.button({className:"note-btn-italic",contents:e.ui.icon(e.options.icons.italic),tooltip:e.lang.font.italic+e.representShortcut("italic"),click:e.context.createInvokeHandlerAndUpdateState("editor.italic")}).render()})),this.context.memo("button.underline",(function(){return e.button({className:"note-btn-underline",contents:e.ui.icon(e.options.icons.underline),tooltip:e.lang.font.underline+e.representShortcut("underline"),click:e.context.createInvokeHandlerAndUpdateState("editor.underline")}).render()})),this.context.memo("button.clear",(function(){return e.button({contents:e.ui.icon(e.options.icons.eraser),tooltip:e.lang.font.clear+e.representShortcut("removeFormat"),click:e.context.createInvokeHandler("editor.removeFormat")}).render()})),this.context.memo("button.strikethrough",(function(){return e.button({className:"note-btn-strikethrough",contents:e.ui.icon(e.options.icons.strikethrough),tooltip:e.lang.font.strikethrough+e.representShortcut("strikethrough"),click:e.context.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()})),this.context.memo("button.superscript",(function(){return e.button({className:"note-btn-superscript",contents:e.ui.icon(e.options.icons.superscript),tooltip:e.lang.font.superscript,click:e.context.createInvokeHandlerAndUpdateState("editor.superscript")}).render()})),this.context.memo("button.subscript",(function(){return e.button({className:"note-btn-subscript",contents:e.ui.icon(e.options.icons.subscript),tooltip:e.lang.font.subscript,click:e.context.createInvokeHandlerAndUpdateState("editor.subscript")}).render()})),this.context.memo("button.fontname",(function(){var n=e.context.invoke("editor.currentStyle");return e.options.addDefaultFonts&&t().each(n["font-family"].split(","),(function(t,n){n=n.trim().replace(/['"]+/g,""),e.isFontDeservedToAdd(n)&&-1===e.options.fontNames.indexOf(n)&&e.options.fontNames.push(n)})),e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontname"></span>',e.options),tooltip:e.lang.font.name,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:e.options.icons.menuCheck,items:e.options.fontNames.filter(e.isFontInstalled.bind(e)),title:e.lang.font.name,template:function(e){return'<span style="font-family: '+f.validFontName(e)+'">'+e+"</span>"},click:e.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()})),this.context.memo("button.fontsize",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontsize"></span>',e.options),tooltip:e.lang.font.size,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:e.options.icons.menuCheck,items:e.options.fontSizes,title:e.lang.font.size,click:e.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()})),this.context.memo("button.fontsizeunit",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontsizeunit"></span>',e.options),tooltip:e.lang.font.sizeunit,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontsizeunit",checkClassName:e.options.icons.menuCheck,items:e.options.fontSizeUnits,title:e.lang.font.sizeunit,click:e.context.createInvokeHandlerAndUpdateState("editor.fontSizeUnit")})]).render()})),this.context.memo("button.color",(function(){return e.colorPalette("note-color-all",e.lang.color.recent,!0,!0)})),this.context.memo("button.forecolor",(function(){return e.colorPalette("note-color-fore",e.lang.color.foreground,!1,!0)})),this.context.memo("button.backcolor",(function(){return e.colorPalette("note-color-back",e.lang.color.background,!0,!1)})),this.context.memo("button.ul",(function(){return e.button({contents:e.ui.icon(e.options.icons.unorderedlist),tooltip:e.lang.lists.unordered+e.representShortcut("insertUnorderedList"),click:e.context.createInvokeHandler("editor.insertUnorderedList")}).render()})),this.context.memo("button.ol",(function(){return e.button({contents:e.ui.icon(e.options.icons.orderedlist),tooltip:e.lang.lists.ordered+e.representShortcut("insertOrderedList"),click:e.context.createInvokeHandler("editor.insertOrderedList")}).render()}));var r=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")}),a=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")}),s=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")}),l=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")}),c=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")}),u=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",m.invoke(r,"render")),this.context.memo("button.justifyCenter",m.invoke(a,"render")),this.context.memo("button.justifyRight",m.invoke(s,"render")),this.context.memo("button.justifyFull",m.invoke(l,"render")),this.context.memo("button.outdent",m.invoke(c,"render")),this.context.memo("button.indent",m.invoke(u,"render")),this.context.memo("button.paragraph",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.alignLeft),e.options),tooltip:e.lang.paragraph.paragraph,data:{toggle:"dropdown"}}),e.ui.dropdown([e.ui.buttonGroup({className:"note-align",children:[r,a,s,l]}),e.ui.buttonGroup({className:"note-list",children:[c,u]})])]).render()})),this.context.memo("button.height",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.textHeight),e.options),tooltip:e.lang.font.height,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({items:e.options.lineHeights,checkClassName:e.options.icons.menuCheck,className:"dropdown-line-height",title:e.lang.font.height,click:e.context.createInvokeHandler("editor.lineHeight")})]).render()})),this.context.memo("button.table",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.table),e.options),tooltip:e.lang.table.table,data:{toggle:"dropdown"}}),e.ui.dropdown({title:e.lang.table.table,className:"note-table",items:['<div class="note-dimension-picker">','<div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"></div>','<div class="note-dimension-picker-highlighted"></div>','<div class="note-dimension-picker-unhighlighted"></div>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function(t){t.find(".note-dimension-picker-mousecatcher").css({width:e.options.insertTableMaxSize.col+"em",height:e.options.insertTableMaxSize.row+"em"}).mouseup(e.context.createInvokeHandler("editor.insertTable")).on("mousemove",e.tableMoveHandler.bind(e))}}).render()})),this.context.memo("button.link",(function(){return e.button({contents:e.ui.icon(e.options.icons.link),tooltip:e.lang.link.link+e.representShortcut("linkDialog.show"),click:e.context.createInvokeHandler("linkDialog.show")}).render()})),this.context.memo("button.picture",(function(){return e.button({contents:e.ui.icon(e.options.icons.picture),tooltip:e.lang.image.image,click:e.context.createInvokeHandler("imageDialog.show")}).render()})),this.context.memo("button.video",(function(){return e.button({contents:e.ui.icon(e.options.icons.video),tooltip:e.lang.video.video,click:e.context.createInvokeHandler("videoDialog.show")}).render()})),this.context.memo("button.hr",(function(){return e.button({contents:e.ui.icon(e.options.icons.minus),tooltip:e.lang.hr.insert+e.representShortcut("insertHorizontalRule"),click:e.context.createInvokeHandler("editor.insertHorizontalRule")}).render()})),this.context.memo("button.fullscreen",(function(){return e.button({className:"btn-fullscreen note-codeview-keep",contents:e.ui.icon(e.options.icons.arrowsAlt),tooltip:e.lang.options.fullscreen,click:e.context.createInvokeHandler("fullscreen.toggle")}).render()})),this.context.memo("button.codeview",(function(){return e.button({className:"btn-codeview note-codeview-keep",contents:e.ui.icon(e.options.icons.code),tooltip:e.lang.options.codeview,click:e.context.createInvokeHandler("codeview.toggle")}).render()})),this.context.memo("button.redo",(function(){return e.button({contents:e.ui.icon(e.options.icons.redo),tooltip:e.lang.history.redo+e.representShortcut("redo"),click:e.context.createInvokeHandler("editor.redo")}).render()})),this.context.memo("button.undo",(function(){return e.button({contents:e.ui.icon(e.options.icons.undo),tooltip:e.lang.history.undo+e.representShortcut("undo"),click:e.context.createInvokeHandler("editor.undo")}).render()})),this.context.memo("button.help",(function(){return e.button({contents:e.ui.icon(e.options.icons.question),tooltip:e.lang.options.help,click:e.context.createInvokeHandler("helpDialog.show")}).render()}))}},{key:"addImagePopoverButtons",value:function(){var e=this;this.context.memo("button.resizeFull",(function(){return e.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:e.lang.image.resizeFull,click:e.context.createInvokeHandler("editor.resize","1")}).render()})),this.context.memo("button.resizeHalf",(function(){return e.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:e.lang.image.resizeHalf,click:e.context.createInvokeHandler("editor.resize","0.5")}).render()})),this.context.memo("button.resizeQuarter",(function(){return e.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:e.lang.image.resizeQuarter,click:e.context.createInvokeHandler("editor.resize","0.25")}).render()})),this.context.memo("button.resizeNone",(function(){return e.button({contents:e.ui.icon(e.options.icons.rollback),tooltip:e.lang.image.resizeNone,click:e.context.createInvokeHandler("editor.resize","0")}).render()})),this.context.memo("button.floatLeft",(function(){return e.button({contents:e.ui.icon(e.options.icons.floatLeft),tooltip:e.lang.image.floatLeft,click:e.context.createInvokeHandler("editor.floatMe","left")}).render()})),this.context.memo("button.floatRight",(function(){return e.button({contents:e.ui.icon(e.options.icons.floatRight),tooltip:e.lang.image.floatRight,click:e.context.createInvokeHandler("editor.floatMe","right")}).render()})),this.context.memo("button.floatNone",(function(){return e.button({contents:e.ui.icon(e.options.icons.rollback),tooltip:e.lang.image.floatNone,click:e.context.createInvokeHandler("editor.floatMe","none")}).render()})),this.context.memo("button.removeMedia",(function(){return e.button({contents:e.ui.icon(e.options.icons.trash),tooltip:e.lang.image.remove,click:e.context.createInvokeHandler("editor.removeMedia")}).render()}))}},{key:"addLinkPopoverButtons",value:function(){var e=this;this.context.memo("button.linkDialogShow",(function(){return e.button({contents:e.ui.icon(e.options.icons.link),tooltip:e.lang.link.edit,click:e.context.createInvokeHandler("linkDialog.show")}).render()})),this.context.memo("button.unlink",(function(){return e.button({contents:e.ui.icon(e.options.icons.unlink),tooltip:e.lang.link.unlink,click:e.context.createInvokeHandler("editor.unlink")}).render()}))}},{key:"addTablePopoverButtons",value:function(){var e=this;this.context.memo("button.addRowUp",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowAbove),tooltip:e.lang.table.addRowAbove,click:e.context.createInvokeHandler("editor.addRow","top")}).render()})),this.context.memo("button.addRowDown",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowBelow),tooltip:e.lang.table.addRowBelow,click:e.context.createInvokeHandler("editor.addRow","bottom")}).render()})),this.context.memo("button.addColLeft",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colBefore),tooltip:e.lang.table.addColLeft,click:e.context.createInvokeHandler("editor.addCol","left")}).render()})),this.context.memo("button.addColRight",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colAfter),tooltip:e.lang.table.addColRight,click:e.context.createInvokeHandler("editor.addCol","right")}).render()})),this.context.memo("button.deleteRow",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowRemove),tooltip:e.lang.table.delRow,click:e.context.createInvokeHandler("editor.deleteRow")}).render()})),this.context.memo("button.deleteCol",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colRemove),tooltip:e.lang.table.delCol,click:e.context.createInvokeHandler("editor.deleteCol")}).render()})),this.context.memo("button.deleteTable",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.trash),tooltip:e.lang.table.delTable,click:e.context.createInvokeHandler("editor.deleteTable")}).render()}))}},{key:"build",value:function(e,t){for(var n=0,o=t.length;n<o;n++){for(var i=t[n],r=Array.isArray(i)?i[0]:i,a=Array.isArray(i)?1===i.length?[i[0]]:i[1]:[i],s=this.ui.buttonGroup({className:"note-"+r}).render(),l=0,c=a.length;l<c;l++){var u=this.context.memo("button."+a[l]);u&&s.append("function"==typeof u?u(this.context):u)}s.appendTo(e)}}},{key:"updateCurrentStyle",value:function(e){var n=e||this.$toolbar,o=this.context.invoke("editor.currentStyle");if(this.updateBtnStates(n,{".note-btn-bold":function(){return"bold"===o["font-bold"]},".note-btn-italic":function(){return"italic"===o["font-italic"]},".note-btn-underline":function(){return"underline"===o["font-underline"]},".note-btn-subscript":function(){return"subscript"===o["font-subscript"]},".note-btn-superscript":function(){return"superscript"===o["font-superscript"]},".note-btn-strikethrough":function(){return"strikethrough"===o["font-strikethrough"]}}),o["font-family"]){var i=o["font-family"].split(",").map((function(e){return e.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")})),r=k.find(i,this.isFontInstalled.bind(this));n.find(".dropdown-fontname a").each((function(e,n){var o=t()(n),i=o.data("value")+""==r+"";o.toggleClass("checked",i)})),n.find(".note-current-fontname").text(r).css("font-family",r)}if(o["font-size"]){var a=o["font-size"];n.find(".dropdown-fontsize a").each((function(e,n){var o=t()(n),i=o.data("value")+""==a+"";o.toggleClass("checked",i)})),n.find(".note-current-fontsize").text(a);var s=o["font-size-unit"];n.find(".dropdown-fontsizeunit a").each((function(e,n){var o=t()(n),i=o.data("value")+""==s+"";o.toggleClass("checked",i)})),n.find(".note-current-fontsizeunit").text(s)}if(o["line-height"]){var l=o["line-height"];n.find(".dropdown-line-height a").each((function(e,n){var o=t()(n),i=t()(n).data("value")+""==l+"";o.toggleClass("checked",i)})),n.find(".note-current-line-height").text(l)}}},{key:"updateBtnStates",value:function(e,n){var o=this;t().each(n,(function(t,n){o.ui.toggleBtnActive(e.find(t),n())}))}},{key:"tableMoveHandler",value:function(e){var n,o=t()(e.target.parentNode),i=o.next(),r=o.find(".note-dimension-picker-mousecatcher"),a=o.find(".note-dimension-picker-highlighted"),s=o.find(".note-dimension-picker-unhighlighted");if(void 0===e.offsetX){var l=t()(e.target).offset();n={x:e.pageX-l.left,y:e.pageY-l.top}}else n={x:e.offsetX,y:e.offsetY};var c=Math.ceil(n.x/18)||1,u=Math.ceil(n.y/18)||1;a.css({width:c+"em",height:u+"em"}),r.data("value",c+"x"+u),c>3&&c<this.options.insertTableMaxSize.col&&s.css({width:c+1+"em"}),u>3&&u<this.options.insertTableMaxSize.row&&s.css({height:u+1+"em"}),i.html(c+" x "+u)}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Be=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.$window=t()(window),this.$document=t()(document),this.ui=t().summernote.ui,this.$note=n.layoutInfo.note,this.$editor=n.layoutInfo.editor,this.$toolbar=n.layoutInfo.toolbar,this.$editable=n.layoutInfo.editable,this.$statusbar=n.layoutInfo.statusbar,this.options=n.options,this.isFollowing=!1,this.followScroll=this.followScroll.bind(this)}var n;return(n=[{key:"shouldInitialize",value:function(){return!this.options.airMode}},{key:"initialize",value:function(){var e=this;this.options.toolbar=this.options.toolbar||[],this.options.toolbar.length?this.context.invoke("buttons.build",this.$toolbar,this.options.toolbar):this.$toolbar.hide(),this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.changeContainer(!1),this.$note.on("summernote.keyup summernote.mouseup summernote.change",(function(){e.context.invoke("buttons.updateCurrentStyle")})),this.context.invoke("buttons.updateCurrentStyle"),this.options.followingToolbar&&this.$window.on("scroll resize",this.followScroll)}},{key:"destroy",value:function(){this.$toolbar.children().remove(),this.options.followingToolbar&&this.$window.off("scroll resize",this.followScroll)}},{key:"followScroll",value:function(){if(this.$editor.hasClass("fullscreen"))return!1;var e=this.$editor.outerHeight(),n=this.$editor.width(),o=this.$toolbar.height(),i=this.$statusbar.height(),r=0;this.options.otherStaticBar&&(r=t()(this.options.otherStaticBar).outerHeight());var a=this.$document.scrollTop(),s=this.$editor.offset().top,l=s-r,c=s+e-r-o-i;!this.isFollowing&&a>l&&a<c-o?(this.isFollowing=!0,this.$editable.css({marginTop:this.$toolbar.outerHeight()}),this.$toolbar.css({position:"fixed",top:r,width:n,zIndex:1e3})):this.isFollowing&&(a<l||a>c)&&(this.isFollowing=!1,this.$toolbar.css({position:"relative",top:0,width:"100%",zIndex:"auto"}),this.$editable.css({marginTop:""}))}},{key:"changeContainer",value:function(e){e?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.options.followingToolbar&&this.followScroll()}},{key:"updateFullscreen",value:function(e){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),e),this.changeContainer(e)}},{key:"updateCodeview",value:function(e){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),e),e?this.deactivate():this.activate()}},{key:"activate",value:function(e){var t=this.$toolbar.find("button");e||(t=t.not(".note-codeview-keep")),this.ui.toggleBtn(t,!0)}},{key:"deactivate",value:function(e){var t=this.$toolbar.find("button");e||(t=t.not(".note-codeview-keep")),this.ui.toggleBtn(t,!1)}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var ze=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.$body=t()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo,n.memo("help.linkDialog.show",this.options.langInfo.help["linkDialog.show"])}var n;return(n=[{key:"initialize",value:function(){var e=this.options.dialogsInBody?this.$body:this.options.container,n=['<div class="form-group note-form-group">','<label for="note-dialog-link-txt-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.link.textToDisplay,"</label>"),'<input id="note-dialog-link-txt-'.concat(this.options.id,'" class="note-link-text form-control note-form-control note-input" type="text"/>'),"</div>",'<div class="form-group note-form-group">','<label for="note-dialog-link-url-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.link.url,"</label>"),'<input id="note-dialog-link-url-'.concat(this.options.id,'" class="note-link-url form-control note-form-control note-input" type="text" value="http://"/>'),"</div>",this.options.disableLinkTarget?"":t()("<div></div>").append(this.ui.checkbox({className:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:!0}).render()).html(),t()("<div></div>").append(this.ui.checkbox({className:"sn-checkbox-use-protocol",text:this.lang.link.useProtocol,checked:!0}).render()).html()].join(""),o='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-link-btn",'" value="').concat(this.lang.link.insert,'" disabled>');this.$dialog=this.ui.dialog({className:"link-dialog",title:this.lang.link.insert,fade:this.options.dialogsFade,body:n,footer:o}).render().appendTo(e)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(e,t){e.on("keypress",(function(e){e.keyCode===be.code.ENTER&&(e.preventDefault(),t.trigger("click"))}))}},{key:"toggleLinkBtn",value:function(e,t,n){this.ui.toggleBtn(e,t.val()&&n.val())}},{key:"showLinkDialog",value:function(e){var n=this;return t().Deferred((function(t){var o=n.$dialog.find(".note-link-text"),i=n.$dialog.find(".note-link-url"),r=n.$dialog.find(".note-link-btn"),a=n.$dialog.find(".sn-checkbox-open-in-new-window input[type=checkbox]"),s=n.$dialog.find(".sn-checkbox-use-protocol input[type=checkbox]");n.ui.onDialogShown(n.$dialog,(function(){n.context.triggerEvent("dialog.shown"),!e.url&&m.isValidUrl(e.text)&&(e.url=e.text),o.on("input paste propertychange",(function(){e.text=o.val(),n.toggleLinkBtn(r,o,i)})).val(e.text),i.on("input paste propertychange",(function(){e.text||o.val(i.val()),n.toggleLinkBtn(r,o,i)})).val(e.url),f.isSupportTouch||i.trigger("focus"),n.toggleLinkBtn(r,o,i),n.bindEnterKey(i,r),n.bindEnterKey(o,r);var l=void 0!==e.isNewWindow?e.isNewWindow:n.context.options.linkTargetBlank;a.prop("checked",l);var c=!e.url&&n.context.options.useProtocol;s.prop("checked",c),r.one("click",(function(r){r.preventDefault(),t.resolve({range:e.range,url:i.val(),text:o.val(),isNewWindow:a.is(":checked"),checkProtocol:s.is(":checked")}),n.ui.hideDialog(n.$dialog)}))})),n.ui.onDialogHidden(n.$dialog,(function(){o.off(),i.off(),r.off(),"pending"===t.state()&&t.reject()})),n.ui.showDialog(n.$dialog)})).promise()}},{key:"show",value:function(){var e=this,t=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange"),this.showLinkDialog(t).then((function(t){e.context.invoke("editor.restoreRange"),e.context.invoke("editor.createLink",t)})).fail((function(){e.context.invoke("editor.restoreRange")}))}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Ue=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.options=n.options,this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function(){o.update()},"summernote.disable summernote.dialog.shown":function(){o.hide()},"summernote.blur":function(e,t){t.originalEvent&&t.originalEvent.relatedTarget&&o.$popover[0].contains(t.originalEvent.relatedTarget)||o.hide()}}}var n;return(n=[{key:"shouldInitialize",value:function(){return!k.isEmpty(this.options.popover.link)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-link-popover",callback:function(e){e.find(".popover-content,.note-popover-content").prepend('<span><a target="_blank"></a> </span>')}}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.link),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(){if(this.context.invoke("editor.hasFocus")){var e=this.context.invoke("editor.getLastRange");if(e.isCollapsed()&&e.isOnAnchor()){var n=he.ancestor(e.sc,he.isAnchor),o=t()(n).attr("href");this.$popover.find("a").attr("href",o).text(o);var i=he.posFromPlaceholder(n),r=t()(this.options.container).offset();i.top-=r.top,i.left-=r.left,this.$popover.css({display:"block",left:i.left,top:i.top})}else this.hide()}else this.hide()}},{key:"hide",value:function(){this.$popover.hide()}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var We=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.$body=t()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo}var n;return(n=[{key:"initialize",value:function(){var e="";if(this.options.maximumImageFileSize){var t=Math.floor(Math.log(this.options.maximumImageFileSize)/Math.log(1024)),n=1*(this.options.maximumImageFileSize/Math.pow(1024,t)).toFixed(2)+" "+" KMGTP"[t]+"B";e="<small>".concat(this.lang.image.maximumFileSize+" : "+n,"</small>")}var o=this.options.dialogsInBody?this.$body:this.options.container,i=['<div class="form-group note-form-group note-group-select-from-files">','<label for="note-dialog-image-file-'+this.options.id+'" class="note-form-label">'+this.lang.image.selectFromFiles+"</label>",'<input id="note-dialog-image-file-'+this.options.id+'" class="note-image-input form-control-file note-form-control note-input" ',' type="file" name="files" accept="'+this.options.acceptImageFileTypes+'" multiple="multiple"/>',e,"</div>",'<div class="form-group note-group-image-url">','<label for="note-dialog-image-url-'+this.options.id+'" class="note-form-label">'+this.lang.image.url+"</label>",'<input id="note-dialog-image-url-'+this.options.id+'" class="note-image-url form-control note-form-control note-input" type="text"/>',"</div>"].join(""),r='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-image-btn",'" value="').concat(this.lang.image.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:i,footer:r}).render().appendTo(o)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(e,t){e.on("keypress",(function(e){e.keyCode===be.code.ENTER&&(e.preventDefault(),t.trigger("click"))}))}},{key:"show",value:function(){var e=this;this.context.invoke("editor.saveRange"),this.showImageDialog().then((function(t){e.ui.hideDialog(e.$dialog),e.context.invoke("editor.restoreRange"),"string"==typeof t?e.options.callbacks.onImageLinkInsert?e.context.triggerEvent("image.link.insert",t):e.context.invoke("editor.insertImage",t):e.context.invoke("editor.insertImagesOrCallback",t)})).fail((function(){e.context.invoke("editor.restoreRange")}))}},{key:"showImageDialog",value:function(){var e=this;return t().Deferred((function(t){var n=e.$dialog.find(".note-image-input"),o=e.$dialog.find(".note-image-url"),i=e.$dialog.find(".note-image-btn");e.ui.onDialogShown(e.$dialog,(function(){e.context.triggerEvent("dialog.shown"),n.replaceWith(n.clone().on("change",(function(e){t.resolve(e.target.files||e.target.value)})).val("")),o.on("input paste propertychange",(function(){e.ui.toggleBtn(i,o.val())})).val(""),f.isSupportTouch||o.trigger("focus"),i.click((function(e){e.preventDefault(),t.resolve(o.val())})),e.bindEnterKey(o,i)})),e.ui.onDialogHidden(e.$dialog,(function(){n.off(),o.off(),i.off(),"pending"===t.state()&&t.reject()})),e.ui.showDialog(e.$dialog)}))}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var _e=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.editable=n.layoutInfo.editable[0],this.options=n.options,this.events={"summernote.disable summernote.dialog.shown":function(){o.hide()},"summernote.blur":function(e,t){t.originalEvent&&t.originalEvent.relatedTarget&&o.$popover[0].contains(t.originalEvent.relatedTarget)||o.hide()}}}var n;return n=[{key:"shouldInitialize",value:function(){return!k.isEmpty(this.options.popover.image)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-image-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.image),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(e,n){if(he.isImg(e)){var o=t()(e).offset(),i=t()(this.options.container).offset(),r={};this.options.popatmouse?(r.left=n.pageX-20,r.top=n.pageY):r=o,r.top-=i.top,r.left-=i.left,this.$popover.css({display:"block",left:r.left,top:r.top})}else this.hide()}},{key:"hide",value:function(){this.$popover.hide()}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var qe=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.options=n.options,this.events={"summernote.mousedown":function(e,t){o.update(t.target)},"summernote.keyup summernote.scroll summernote.change":function(){o.update()},"summernote.disable summernote.dialog.shown":function(){o.hide()},"summernote.blur":function(e,t){t.originalEvent&&t.originalEvent.relatedTarget&&o.$popover[0].contains(t.originalEvent.relatedTarget)||o.hide()}}}var n;return n=[{key:"shouldInitialize",value:function(){return!k.isEmpty(this.options.popover.table)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-table-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.table),f.isFF&&document.execCommand("enableInlineTableEditing",!1,!1),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(e){if(this.context.isDisabled())return!1;var n=he.isCell(e)||he.isCell(null==e?void 0:e.parentElement);if(n){var o=he.posFromPlaceholder(e),i=t()(this.options.container).offset();o.top-=i.top,o.left-=i.left,this.$popover.css({display:"block",left:o.left,top:o.top})}else this.hide();return n}},{key:"hide",value:function(){this.$popover.hide()}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Ke=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.$body=t()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo}var n;return(n=[{key:"initialize",value:function(){var e=this.options.dialogsInBody?this.$body:this.options.container,t=['<div class="form-group note-form-group row-fluid">','<label for="note-dialog-video-url-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.video.url,' <small class="text-muted">').concat(this.lang.video.providers,"</small></label>"),'<input id="note-dialog-video-url-'.concat(this.options.id,'" class="note-video-url form-control note-form-control note-input" type="text"/>'),"</div>"].join(""),n='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-video-btn",'" value="').concat(this.lang.video.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:t,footer:n}).render().appendTo(e)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(e,t){e.on("keypress",(function(e){e.keyCode===be.code.ENTER&&(e.preventDefault(),t.trigger("click"))}))}},{key:"createVideoNode",value:function(e){var n,o=e.match(/\/\/(?:(?:www|m)\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?$/),i=e.match(/(?:\.|\/\/)drive\.google\.com\/file\/d\/(.[a-zA-Z0-9_-]*)\/view/),r=e.match(/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/),a=e.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/),s=e.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/),l=e.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/),c=e.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),u=e.match(/\/\/(.*)\/videos\/watch\/([^?]*)(?:\?(?:start=(\w*))?(?:&stop=(\w*))?(?:&loop=([10]))?(?:&autoplay=([10]))?(?:&muted=([10]))?)?/),d=e.match(/\/\/v\.qq\.com.*?vid=(.+)/),h=e.match(/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/),f=e.match(/^.+.(mp4|m4v)$/),p=e.match(/^.+.(ogg|ogv)$/),m=e.match(/^.+.(webm)$/),g=e.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/);if(o&&11===o[1].length){var v=o[1],y=0;if(void 0!==o[2]){var b=o[2].match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/);if(b)for(var k=[3600,60,1],w=0,x=k.length;w<x;w++)y+=void 0!==b[w+1]?k[w]*parseInt(b[w+1],10):0}n=t()("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+v+(y>0?"?start="+y:"")).attr("width","640").attr("height","360")}else if(i&&i[0].length)n=t()("<iframe>").attr("frameborder",0).attr("src","https://drive.google.com/file/d/"+i[1]+"/preview").attr("width","640").attr("height","480");else if(r&&r[0].length)n=t()("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+r[1]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true");else if(a&&a[0].length)n=t()("<iframe>").attr("frameborder",0).attr("src",a[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(s&&s[3].length)n=t()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+s[3]).attr("width","640").attr("height","360");else if(l&&l[2].length)n=t()("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+l[2]).attr("width","640").attr("height","360");else if(c&&c[1].length)n=t()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+c[1]);else if(u&&u[0].length){var C=0;"undefined"!==u[2]&&(C=u[2]);var T=0;"undefined"!==u[3]&&(T=u[3]);var S=0;"undefined"!==u[4]&&(S=u[4]);var E=0;"undefined"!==u[5]&&(E=u[5]);var N=0;"undefined"!==u[6]&&(N=u[6]),n=t()('<iframe allowfullscreen sandbox="allow-same-origin allow-scripts allow-popups">').attr("frameborder",0).attr("src","//"+u[1]+"/videos/embed/"+u[2]+"?loop="+S+"&autoplay="+E+"&muted="+N+(C>0?"&start="+C:"")+(T>0?"&end="+y:"")).attr("width","560").attr("height","315")}else if(d&&d[1].length||h&&h[2].length){var A=d&&d[1].length?d[1]:h[2];n=t()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","https://v.qq.com/txp/iframe/player.html?vid="+A+"&auto=0")}else if(f||p||m)n=t()("<video controls>").attr("src",e).attr("width","640").attr("height","360");else{if(!g||!g[0].length)return!1;n=t()("<iframe>").attr("frameborder",0).attr("src","https://www.facebook.com/plugins/video.php?href="+encodeURIComponent(g[0])+"&show_text=0&width=560").attr("width","560").attr("height","301").attr("scrolling","no").attr("allowtransparency","true")}return n.addClass("note-video-clip"),n[0]}},{key:"show",value:function(){var e=this,t=this.context.invoke("editor.getSelectedText");this.context.invoke("editor.saveRange"),this.showVideoDialog(t).then((function(t){e.ui.hideDialog(e.$dialog),e.context.invoke("editor.restoreRange");var n=e.createVideoNode(t);n&&e.context.invoke("editor.insertNode",n)})).fail((function(){e.context.invoke("editor.restoreRange")}))}},{key:"showVideoDialog",value:function(){var e=this;return t().Deferred((function(t){var n=e.$dialog.find(".note-video-url"),o=e.$dialog.find(".note-video-btn");e.ui.onDialogShown(e.$dialog,(function(){e.context.triggerEvent("dialog.shown"),n.on("input paste propertychange",(function(){e.ui.toggleBtn(o,n.val())})),f.isSupportTouch||n.trigger("focus"),o.click((function(e){e.preventDefault(),t.resolve(n.val())})),e.bindEnterKey(n,o)})),e.ui.onDialogHidden(e.$dialog,(function(){n.off(),o.off(),"pending"===t.state()&&t.reject()})),e.ui.showDialog(e.$dialog)}))}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Ve=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.$body=t()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo}var n;return n=[{key:"initialize",value:function(){var e=this.options.dialogsInBody?this.$body:this.options.container,t=['<p class="text-center">','<a href="http://summernote.org/" target="_blank" rel="noopener noreferrer">Summernote 0.8.20</a> · ','<a href="https://github.com/summernote/summernote" target="_blank" rel="noopener noreferrer">Project</a> · ','<a href="https://github.com/summernote/summernote/issues" target="_blank" rel="noopener noreferrer">Issues</a>',"</p>"].join("");this.$dialog=this.ui.dialog({title:this.lang.options.help,fade:this.options.dialogsFade,body:this.createShortcutList(),footer:t,callback:function(e){e.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(e)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"createShortcutList",value:function(){var e=this,n=this.options.keyMap[f.isMac?"mac":"pc"];return Object.keys(n).map((function(o){var i=n[o],r=t()('<div><div class="help-list-item"></div></div>');return r.append(t()("<label><kbd>"+o+"</kdb></label>").css({width:180,"margin-right":10})).append(t()("<span></span>").html(e.context.memo("help."+i)||i)),r.html()})).join("")}},{key:"showHelpDialog",value:function(){var e=this;return t().Deferred((function(t){e.ui.onDialogShown(e.$dialog,(function(){e.context.triggerEvent("dialog.shown"),t.resolve()})),e.ui.showDialog(e.$dialog)})).promise()}},{key:"show",value:function(){var e=this;this.context.invoke("editor.saveRange"),this.showHelpDialog().then((function(){e.context.invoke("editor.restoreRange")}))}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Ge=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.options=n.options,this.hidable=!0,this.onContextmenu=!1,this.pageX=null,this.pageY=null,this.events={"summernote.contextmenu":function(e){o.options.editing&&(e.preventDefault(),e.stopPropagation(),o.onContextmenu=!0,o.update(!0))},"summernote.mousedown":function(e,t){o.pageX=t.pageX,o.pageY=t.pageY},"summernote.keyup summernote.mouseup summernote.scroll":function(e,t){o.options.editing&&!o.onContextmenu&&(o.pageX=t.pageX,o.pageY=t.pageY,o.update()),o.onContextmenu=!1},"summernote.disable summernote.change summernote.dialog.shown summernote.blur":function(){o.hide()},"summernote.focusout":function(){o.$popover.is(":active,:focus")||o.hide()}}}var n;return(n=[{key:"shouldInitialize",value:function(){return this.options.airMode&&!k.isEmpty(this.options.popover.air)}},{key:"initialize",value:function(){var e=this;this.$popover=this.ui.popover({className:"note-air-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content");this.context.invoke("buttons.build",t,this.options.popover.air),this.$popover.on("mousedown",(function(){e.hidable=!1})),this.$popover.on("mouseup",(function(){e.hidable=!0}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(e){var n=this.context.invoke("editor.currentStyle");if(!n.range||n.range.isCollapsed()&&!e)this.hide();else{var o={left:this.pageX,top:this.pageY},i=t()(this.options.container).offset();o.top-=i.top,o.left-=i.left,this.$popover.css({display:"block",left:Math.max(o.left,0)+-5,top:o.top+5}),this.context.invoke("buttons.updateCurrentStyle",this.$popover)}}},{key:"updateCodeview",value:function(e){this.ui.toggleBtnActive(this.$popover.find(".btn-codeview"),e),e&&this.hide()}},{key:"hide",value:function(){this.hidable&&this.$popover.hide()}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Qe=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.$editable=n.layoutInfo.editable,this.options=n.options,this.hint=this.options.hint||[],this.direction=this.options.hintDirection||"bottom",this.hints=Array.isArray(this.hint)?this.hint:[this.hint],this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||o.handleKeyup(t)},"summernote.keydown":function(e,t){o.handleKeydown(t)},"summernote.disable summernote.dialog.shown summernote.blur":function(){o.hide()}}}var n;return n=[{key:"shouldInitialize",value:function(){return this.hints.length>0}},{key:"initialize",value:function(){var e=this;this.lastWordRange=null,this.matchingWord=null,this.$popover=this.ui.popover({className:"note-hint-popover",hideArrow:!0,direction:""}).render().appendTo(this.options.container),this.$popover.hide(),this.$content=this.$popover.find(".popover-content,.note-popover-content"),this.$content.on("click",".note-hint-item",(function(n){e.$content.find(".active").removeClass("active"),t()(n.currentTarget).addClass("active"),e.replace()})),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"selectItem",value:function(e){this.$content.find(".active").removeClass("active"),e.addClass("active"),this.$content[0].scrollTop=e[0].offsetTop-this.$content.innerHeight()/2}},{key:"moveDown",value:function(){var e=this.$content.find(".note-hint-item.active"),t=e.next();if(t.length)this.selectItem(t);else{var n=e.parent().next();n.length||(n=this.$content.find(".note-hint-group").first()),this.selectItem(n.find(".note-hint-item").first())}}},{key:"moveUp",value:function(){var e=this.$content.find(".note-hint-item.active"),t=e.prev();if(t.length)this.selectItem(t);else{var n=e.parent().prev();n.length||(n=this.$content.find(".note-hint-group").last()),this.selectItem(n.find(".note-hint-item").last())}}},{key:"replace",value:function(){var e=this.$content.find(".note-hint-item.active");if(e.length){var n=this.nodeFromItem(e);if(null!==this.matchingWord&&0===this.matchingWord.length)this.lastWordRange.so=this.lastWordRange.eo;else if(null!==this.matchingWord&&this.matchingWord.length>0&&!this.lastWordRange.isCollapsed()){var o=this.lastWordRange.eo-this.lastWordRange.so-this.matchingWord.length;o>0&&(this.lastWordRange.so+=o)}if(this.lastWordRange.insertNode(n),"next"===this.options.hintSelect){var i=document.createTextNode("");t()(n).after(i),ve.createFromNodeBefore(i).select()}else ve.createFromNodeAfter(n).select();this.lastWordRange=null,this.hide(),this.context.invoke("editor.focus"),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}}},{key:"nodeFromItem",value:function(e){var t=this.hints[e.data("index")],n=e.data("item"),o=t.content?t.content(n):n;return"string"==typeof o&&(o=he.createText(o)),o}},{key:"createItemTemplates",value:function(e,n){var o=this.hints[e];return n.map((function(n){var i=t()('<div class="note-hint-item"></div>');return i.append(o.template?o.template(n):n+""),i.data({index:e,item:n}),i}))}},{key:"handleKeydown",value:function(e){this.$popover.is(":visible")&&(e.keyCode===be.code.ENTER?(e.preventDefault(),this.replace()):e.keyCode===be.code.UP?(e.preventDefault(),this.moveUp()):e.keyCode===be.code.DOWN&&(e.preventDefault(),this.moveDown()))}},{key:"searchKeyword",value:function(e,t,n){var o=this.hints[e];if(o&&o.match.test(t)&&o.search){var i=o.match.exec(t);this.matchingWord=i[0],o.search(i[1],n)}else n()}},{key:"createGroup",value:function(e,n){var o=this,i=t()('<div class="note-hint-group note-hint-group-'+e+'"></div>');return this.searchKeyword(e,n,(function(t){(t=t||[]).length&&(i.html(o.createItemTemplates(e,t)),o.show())})),i}},{key:"handleKeyup",value:function(e){var n=this;if(!k.contains([be.code.ENTER,be.code.UP,be.code.DOWN],e.keyCode)){var o,i,r=this.context.invoke("editor.getLastRange");if("words"===this.options.hintMode){if(o=r.getWordsRange(r),i=o.toString(),this.hints.forEach((function(e){if(e.match.test(i))return o=r.getWordsMatchRange(e.match),!1})),!o)return void this.hide();i=o.toString()}else o=r.getWordRange(),i=o.toString();if(this.hints.length&&i){this.$content.empty();var a=m.rect2bnd(k.last(o.getClientRects())),s=t()(this.options.container).offset();a&&(a.top-=s.top,a.left-=s.left,this.$popover.hide(),this.lastWordRange=o,this.hints.forEach((function(e,t){e.match.test(i)&&n.createGroup(t,i).appendTo(n.$content)})),this.$content.find(".note-hint-item:first").addClass("active"),"top"===this.direction?this.$popover.css({left:a.left,top:a.top-this.$popover.outerHeight()-5}):this.$popover.css({left:a.left,top:a.top+a.height+5}))}else this.hide()}}},{key:"show",value:function(){this.$popover.show()}},{key:"hide",value:function(){this.$popover.hide()}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();function Ye(e){return Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(e)}t().summernote=t().extend(t().summernote,{version:"0.8.20",plugins:{},dom:he,range:ve,lists:k,options:{langInfo:t().summernote.lang["en-US"],editing:!0,modules:{editor:Ee,clipboard:Ne,dropzone:Ae,codeview:$e,statusbar:De,fullscreen:Le,handle:Re,hintPopover:Qe,autoLink:Oe,autoSync:Fe,autoReplace:He,placeholder:Me,buttons:je,toolbar:Be,linkDialog:ze,linkPopover:Ue,imageDialog:We,imagePopover:_e,tablePopover:qe,videoDialog:Ke,helpDialog:Ve,airPopover:Ge},buttons:{},lang:"en-US",followingToolbar:!1,toolbarPosition:"top",otherStaticBar:"",codeviewKeepButton:!1,toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popatmouse:!0,popover:{image:[["resize",["resizeFull","resizeHalf","resizeQuarter","resizeNone"]],["float",["floatLeft","floatRight","floatNone"]],["remove",["removeMedia"]]],link:[["link",["linkDialogShow","unlink"]]],table:[["add",["addRowDown","addRowUp","addColLeft","addColRight"]],["delete",["deleteRow","deleteCol","deleteTable"]]],air:[["color",["color"]],["font",["bold","underline","clear"]],["para",["ul","paragraph"]],["table",["table"]],["insert",["link","picture"]],["view",["fullscreen","codeview"]]]},airMode:!1,overrideContextMenu:!1,width:null,height:null,linkTargetBlank:!0,useProtocol:!0,defaultProtocol:"http://",focus:!1,tabDisabled:!1,tabSize:4,styleWithCSS:!1,shortcuts:!0,textareaAutoSync:!0,tooltip:"auto",container:null,maxTextLength:0,blockquoteBreakingLevel:2,spellCheck:!0,disableGrammar:!1,placeholder:null,inheritPlaceholder:!1,recordEveryKeystroke:!1,historyLimit:200,showDomainOnlyForAutolink:!1,hintMode:"word",hintSelect:"after",hintDirection:"bottom",styleTags:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Tahoma","Times New Roman","Verdana"],fontNamesIgnoreCheck:[],addDefaultFonts:!0,fontSizes:["8","9","10","11","12","14","18","24","36"],fontSizeUnits:["px","pt"],colors:[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],colorsName:[["Black","Tundora","Dove Gray","Star Dust","Pale Slate","Gallery","Alabaster","White"],["Red","Orange Peel","Yellow","Green","Cyan","Blue","Electric Violet","Magenta"],["Azalea","Karry","Egg White","Zanah","Botticelli","Tropical Blue","Mischka","Twilight"],["Tonys Pink","Peach Orange","Cream Brulee","Sprout","Casper","Perano","Cold Purple","Careys Pink"],["Mandy","Rajah","Dandelion","Olivine","Gulf Stream","Viking","Blue Marguerite","Puce"],["Guardsman Red","Fire Bush","Golden Dream","Chelsea Cucumber","Smalt Blue","Boston Blue","Butterfly Bush","Cadillac"],["Sangria","Mai Tai","Buddha Gold","Forest Green","Eden","Venice Blue","Meteorite","Claret"],["Rosewood","Cinnamon","Olive","Parsley","Tiber","Midnight Blue","Valentino","Loulou"]],colorButton:{foreColor:"#000000",backColor:"#FFFF00"},lineHeights:["1.0","1.2","1.4","1.5","1.6","1.8","2.0","3.0"],tableClassName:"table table-bordered",insertTableMaxSize:{col:10,row:10},dialogsInBody:!1,dialogsFade:!1,maximumImageFileSize:null,acceptImageFileTypes:"image/*",callbacks:{onBeforeCommand:null,onBlur:null,onBlurCodeview:null,onChange:null,onChangeCodeview:null,onDialogShown:null,onEnter:null,onFocus:null,onImageLinkInsert:null,onImageUpload:null,onImageUploadError:null,onInit:null,onKeydown:null,onKeyup:null,onMousedown:null,onMouseup:null,onPaste:null,onScroll:null},codemirror:{mode:"text/html",htmlMode:!0,lineNumbers:!0},codeviewFilter:!0,codeviewFilterRegex:/<\/*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|ilayer|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|t(?:itle|extarea)|xml)[^>]*?>/gi,codeviewIframeFilter:!0,codeviewIframeWhitelistSrc:[],codeviewIframeWhitelistSrcBase:["www.youtube.com","www.youtube-nocookie.com","www.facebook.com","vine.co","instagram.com","player.vimeo.com","www.dailymotion.com","player.youku.com","jumpingbean.tv","v.qq.com"],keyMap:{pc:{ESC:"escape",ENTER:"insertParagraph","CTRL+Z":"undo","CTRL+Y":"redo",TAB:"tab","SHIFT+TAB":"untab","CTRL+B":"bold","CTRL+I":"italic","CTRL+U":"underline","CTRL+SHIFT+S":"strikethrough","CTRL+BACKSLASH":"removeFormat","CTRL+SHIFT+L":"justifyLeft","CTRL+SHIFT+E":"justifyCenter","CTRL+SHIFT+R":"justifyRight","CTRL+SHIFT+J":"justifyFull","CTRL+SHIFT+NUM7":"insertUnorderedList","CTRL+SHIFT+NUM8":"insertOrderedList","CTRL+LEFTBRACKET":"outdent","CTRL+RIGHTBRACKET":"indent","CTRL+NUM0":"formatPara","CTRL+NUM1":"formatH1","CTRL+NUM2":"formatH2","CTRL+NUM3":"formatH3","CTRL+NUM4":"formatH4","CTRL+NUM5":"formatH5","CTRL+NUM6":"formatH6","CTRL+ENTER":"insertHorizontalRule","CTRL+K":"linkDialog.show"},mac:{ESC:"escape",ENTER:"insertParagraph","CMD+Z":"undo","CMD+SHIFT+Z":"redo",TAB:"tab","SHIFT+TAB":"untab","CMD+B":"bold","CMD+I":"italic","CMD+U":"underline","CMD+SHIFT+S":"strikethrough","CMD+BACKSLASH":"removeFormat","CMD+SHIFT+L":"justifyLeft","CMD+SHIFT+E":"justifyCenter","CMD+SHIFT+R":"justifyRight","CMD+SHIFT+J":"justifyFull","CMD+SHIFT+NUM7":"insertUnorderedList","CMD+SHIFT+NUM8":"insertOrderedList","CMD+LEFTBRACKET":"outdent","CMD+RIGHTBRACKET":"indent","CMD+NUM0":"formatPara","CMD+NUM1":"formatH1","CMD+NUM2":"formatH2","CMD+NUM3":"formatH3","CMD+NUM4":"formatH4","CMD+NUM5":"formatH5","CMD+NUM6":"formatH6","CMD+ENTER":"insertHorizontalRule","CMD+K":"linkDialog.show"}},icons:{align:"note-icon-align",alignCenter:"note-icon-align-center",alignJustify:"note-icon-align-justify",alignLeft:"note-icon-align-left",alignRight:"note-icon-align-right",rowBelow:"note-icon-row-below",colBefore:"note-icon-col-before",colAfter:"note-icon-col-after",rowAbove:"note-icon-row-above",rowRemove:"note-icon-row-remove",colRemove:"note-icon-col-remove",indent:"note-icon-align-indent",outdent:"note-icon-align-outdent",arrowsAlt:"note-icon-arrows-alt",bold:"note-icon-bold",caret:"note-icon-caret",circle:"note-icon-circle",close:"note-icon-close",code:"note-icon-code",eraser:"note-icon-eraser",floatLeft:"note-icon-float-left",floatRight:"note-icon-float-right",font:"note-icon-font",frame:"note-icon-frame",italic:"note-icon-italic",link:"note-icon-link",unlink:"note-icon-chain-broken",magic:"note-icon-magic",menuCheck:"note-icon-menu-check",minus:"note-icon-minus",orderedlist:"note-icon-orderedlist",pencil:"note-icon-pencil",picture:"note-icon-picture",question:"note-icon-question",redo:"note-icon-redo",rollback:"note-icon-rollback",square:"note-icon-square",strikethrough:"note-icon-strikethrough",subscript:"note-icon-subscript",superscript:"note-icon-superscript",table:"note-icon-table",textHeight:"note-icon-text-height",trash:"note-icon-trash",underline:"note-icon-underline",undo:"note-icon-undo",unorderedlist:"note-icon-unorderedlist",video:"note-icon-video"}}});var Xe=function(){function e(t,n,o,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.markup=t,this.children=n,this.options=o,this.callback=i}var n;return(n=[{key:"render",value:function(e){var n=t()(this.markup);if(this.options&&this.options.contents&&n.html(this.options.contents),this.options&&this.options.className&&n.addClass(this.options.className),this.options&&this.options.data&&t().each(this.options.data,(function(e,t){n.attr("data-"+e,t)})),this.options&&this.options.click&&n.on("click",this.options.click),this.children){var o=n.find(".note-children-container");this.children.forEach((function(e){e.render(o.length?o:n)}))}return this.callback&&this.callback(n,this.options),this.options&&this.options.callback&&this.options.callback(n),e&&e.append(n),n}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();const Ze=function(e,t){return function(){var n="object"===Ye(arguments[1])?arguments[1]:arguments[0],o=Array.isArray(arguments[0])?arguments[0]:[];return n&&n.children&&(o=n.children),new Xe(e,o,n,t)}};function Je(e){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Je(e)}var et=Ze('<div class="note-editor note-frame panel panel-default"></div>'),tt=Ze('<div class="panel-heading note-toolbar" role="toolbar"></div>'),nt=Ze('<div class="note-editing-area"></div>'),ot=Ze('<textarea class="note-codable" aria-multiline="true"></textarea>'),it=Ze('<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"></div>'),rt=Ze(['<output class="note-status-output" role="status" aria-live="polite"></output>','<div class="note-statusbar" role="status">','<div class="note-resizebar" aria-label="Resize">','<div class="note-icon-bar"></div>','<div class="note-icon-bar"></div>','<div class="note-icon-bar"></div>',"</div>","</div>"].join("")),at=Ze('<div class="note-editor note-airframe"></div>'),st=Ze(['<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"></div>','<output class="note-status-output" role="status" aria-live="polite"></output>'].join("")),lt=Ze('<div class="note-btn-group btn-group"></div>'),ct=Ze('<ul class="note-dropdown-menu dropdown-menu"></ul>',(function(e,t){var n=Array.isArray(t.items)?t.items.map((function(e){var n="string"==typeof e?e:e.value||"",o=t.template?t.template(e):e,i="object"===Je(e)?e.option:void 0;return'<li aria-label="'+n+'"><a href="#" data-value="'+n+'"'+(void 0!==i?' data-option="'+i+'"':"")+">"+o+"</a></li>"})).join(""):t.items;e.html(n).attr({"aria-label":t.title}),t&&t.codeviewKeepButton&&e.addClass("note-codeview-keep")})),ut=function(e,t){return e+" "+mt(t.icons.caret,"span")},dt=Ze('<ul class="note-dropdown-menu dropdown-menu note-check"></ul>',(function(e,t){var n=Array.isArray(t.items)?t.items.map((function(e){var n="string"==typeof e?e:e.value||"",o=t.template?t.template(e):e;return'<li aria-label="'+e+'"><a href="#" data-value="'+n+'">'+mt(t.checkClassName)+" "+o+"</a></li>"})).join(""):t.items;e.html(n).attr({"aria-label":t.title}),t&&t.codeviewKeepButton&&e.addClass("note-codeview-keep")})),ht=Ze('<div class="modal note-modal" aria-hidden="false" tabindex="-1" role="dialog"></div>',(function(e,t){t.fade&&e.addClass("fade"),e.attr({"aria-label":t.title}),e.html(['<div class="modal-dialog">','<div class="modal-content">',t.title?'<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close" aria-hidden="true">×</button><h4 class="modal-title">'+t.title+"</h4></div>":"",'<div class="modal-body">'+t.body+"</div>",t.footer?'<div class="modal-footer">'+t.footer+"</div>":"","</div>","</div>"].join(""))})),ft=Ze(['<div class="note-popover popover in">','<div class="arrow"></div>','<div class="popover-content note-children-container"></div>',"</div>"].join(""),(function(e,t){var n=void 0!==t.direction?t.direction:"bottom";e.addClass(n),t.hideArrow&&e.find(".arrow").hide()})),pt=Ze('<div class="checkbox"></div>',(function(e,t){e.html(["<label"+(t.id?' for="note-'+t.id+'"':"")+">",'<input type="checkbox"'+(t.id?' id="note-'+t.id+'"':""),t.checked?" checked":"",' aria-checked="'+(t.checked?"true":"false")+'"/>',t.text?t.text:"","</label>"].join(""))})),mt=function(e,t){return e.match(/^</)?e:"<"+(t=t||"i")+' class="'+e+'"></'+t+">"};t().summernote=t().extend(t().summernote,{ui_template:function(e){return{editor:et,toolbar:tt,editingArea:nt,codable:ot,editable:it,statusbar:rt,airEditor:at,airEditable:st,buttonGroup:lt,dropdown:ct,dropdownButtonContents:ut,dropdownCheck:dt,dialog:ht,popover:ft,checkbox:pt,icon:mt,options:e,palette:function(t,n){return Ze('<div class="note-color-palette"></div>',(function(t,n){for(var o=[],i=0,r=n.colors.length;i<r;i++){for(var a=n.eventName,s=n.colors[i],l=n.colorsName[i],c=[],u=0,d=s.length;u<d;u++){var h=s[u],f=l[u];c.push(['<button type="button" class="note-color-btn"','style="background-color:',h,'" ','data-event="',a,'" ','data-value="',h,'" ','title="',f,'" ','aria-label="',f,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}o.push('<div class="note-color-row">'+c.join("")+"</div>")}t.html(o.join("")),n.tooltip&&t.find(".note-color-btn").tooltip({container:n.container||e.container,trigger:"hover",placement:"bottom"})}))(t,n)},button:function(n,o){return Ze('<button type="button" class="note-btn btn btn-default btn-sm" tabindex="-1"></button>',(function(n,o){o&&o.tooltip&&n.attr({title:o.tooltip,"aria-label":o.tooltip}).tooltip({container:o.container||e.container,trigger:"hover",placement:"bottom"}).on("click",(function(e){t()(e.currentTarget).tooltip("hide")})),o&&o.codeviewButton&&n.addClass("note-codeview-keep")}))(n,o)},toggleBtn:function(e,t){e.toggleClass("disabled",!t),e.attr("disabled",!t)},toggleBtnActive:function(e,t){e.toggleClass("active",t)},onDialogShown:function(e,t){e.one("shown.bs.modal",t)},onDialogHidden:function(e,t){e.one("hidden.bs.modal",t)},showDialog:function(e){e.modal("show")},hideDialog:function(e){e.modal("hide")},createLayout:function(t){var n=(e.airMode?at([nt([ot(),st()])]):"bottom"===e.toolbarPosition?et([nt([ot(),it()]),tt(),rt()]):et([tt(),nt([ot(),it()]),rt()])).render();return n.insertAfter(t),{note:t,editor:n,toolbar:n.find(".note-toolbar"),editingArea:n.find(".note-editing-area"),editable:n.find(".note-editable"),codable:n.find(".note-codable"),statusbar:n.find(".note-statusbar")}},removeLayout:function(e,t){e.html(t.editable.html()),t.editor.remove(),e.show()}}},interface:"bs3"})})(),i})()})),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("ComponentRelay",[],t):"object"==typeof exports?exports.ComponentRelay=t():e.ComponentRelay=t()}(self,(()=>(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};let n;var o;e.d(t,{default:()=>w}),function(e){e[e.Web=1]="Web",e[e.Desktop=2]="Desktop",e[e.Mobile=3]="Mobile"}(n||(n={}));var i=new Uint8Array(16);function r(){if(!o&&!(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(i)}const a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,s=function(e){return"string"==typeof e&&a.test(e)};for(var l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));const u=e=>{var t;const o={[n.Web]:"web",[n.Desktop]:"desktop",[n.Mobile]:"mobile"};return null!==(t=o[e])&&void 0!==t?t:o[n.Web]},d=()=>{};class h{static get isSupported(){return!(!window.console&&!console)}static get info(){return h.isSupported&&this.enabled?console.log.bind(console):d}static get error(){return h.isSupported?console.error.bind(console):d}}var f,p;let m,g,v;function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(p="enabled")in(f=h)?Object.defineProperty(f,p,{value:!1,enumerable:!0,configurable:!0,writable:!0}):f[p]=!1,function(e){e.Shift="Shift",e.Ctrl="Control",e.Meta="Meta"}(m||(m={})),function(e){e.Component="component"}(g||(g={})),function(e){e.SetSize="set-size",e.StreamItems="stream-items",e.StreamContextItem="stream-context-item",e.SaveItems="save-items",e.CreateItem="create-item",e.CreateItems="create-items",e.DeleteItems="delete-items",e.SetComponentData="set-component-data",e.RequestPermissions="request-permissions",e.DuplicateItem="duplicate-item",e.ComponentRegistered="component-registered",e.ActivateThemes="themes",e.Reply="reply",e.ThemesActivated="themes-activated",e.KeyDown="key-down",e.KeyUp="key-up",e.Click="click"}(v||(v={}));class w{constructor(e){var t,n;if(k(this,"contentWindow",void 0),k(this,"component",{activeThemes:[],acceptsThemes:!0}),k(this,"sentMessages",[]),k(this,"messageQueue",[]),k(this,"lastStreamedItem",void 0),k(this,"pendingSaveItems",void 0),k(this,"pendingSaveTimeout",void 0),k(this,"pendingSaveParams",void 0),k(this,"messageHandler",void 0),k(this,"keyDownEventListener",void 0),k(this,"keyUpEventListener",void 0),k(this,"clickEventListener",void 0),k(this,"concernTimeouts",[]),k(this,"options",void 0),k(this,"params",void 0),!e||!e.targetWindow)throw new Error("contentWindow must be a valid Window object.");this.params=e,this.options=e.options||{},null==this.options.coallesedSaving&&(this.options.coallesedSaving=!0),null==this.options.coallesedSavingDelay&&(this.options.coallesedSavingDelay=250),null!=this.options.acceptsThemes&&(this.component.acceptsThemes=null===(n=this.options.acceptsThemes)||void 0===n||n),h.enabled=null!==(t=this.options.debug)&&void 0!==t&&t,this.contentWindow=e.targetWindow,this.registerMessageHandler(),this.registerKeyboardEventListeners(),this.registerMouseEventListeners()}deinit(){this.params.onReady=void 0,this.component={acceptsThemes:!0,activeThemes:[]},this.messageQueue=[],this.sentMessages=[],this.lastStreamedItem=void 0,this.pendingSaveItems=void 0,this.pendingSaveTimeout=void 0,this.pendingSaveParams=void 0,this.messageHandler&&(this.contentWindow.document.removeEventListener("message",this.messageHandler),this.contentWindow.removeEventListener("message",this.messageHandler)),this.keyDownEventListener&&this.contentWindow.removeEventListener("keydown",this.keyDownEventListener),this.keyUpEventListener&&this.contentWindow.removeEventListener("keyup",this.keyUpEventListener),this.clickEventListener&&this.contentWindow.removeEventListener("click",this.clickEventListener)}registerMessageHandler(){this.messageHandler=e=>{if(h.info("Components API Message received:",e.data),document.referrer&&new URL(document.referrer).origin!==new URL(e.origin).origin)return;const{data:t}=e,n=(e=>{if("string"!=typeof e)return!1;try{const t=JSON.parse(e),n=Object.prototype.toString.call(t);return"[object Object]"===n||"[object Array]"===n}catch(e){return!1}})(t)?JSON.parse(t):t;if(n){if(void 0===this.component.origin&&n.action===v.ComponentRegistered)this.component.origin=e.origin;else if(e.origin!==this.component.origin)return;this.handleMessage(n)}else h.error("Invalid data received. Skipping...")},this.contentWindow.document.addEventListener("message",this.messageHandler,!1),this.contentWindow.addEventListener("message",this.messageHandler,!1),h.info("Waiting for messages...")}registerKeyboardEventListeners(){this.keyDownEventListener=e=>{h.info("A key has been pressed: ".concat(e.key)),e.ctrlKey?this.keyDownEvent(m.Ctrl):e.shiftKey?this.keyDownEvent(m.Shift):(e.metaKey||"Meta"===e.key)&&this.keyDownEvent(m.Meta)},this.keyUpEventListener=e=>{h.info("A key has been released: ".concat(e.key)),"Control"===e.key?this.keyUpEvent(m.Ctrl):"Shift"===e.key?this.keyUpEvent(m.Shift):"Meta"===e.key&&this.keyUpEvent(m.Meta)},this.contentWindow.addEventListener("keydown",this.keyDownEventListener,!1),this.contentWindow.addEventListener("keyup",this.keyUpEventListener,!1)}registerMouseEventListeners(){this.clickEventListener=e=>{h.info("A click has been performed."),this.mouseClickEvent()},this.contentWindow.addEventListener("click",this.clickEventListener,!1)}handleMessage(e){switch(e.action){case v.ComponentRegistered:this.component.sessionKey=e.sessionKey,e.componentData&&(this.component.data=e.componentData),this.onReady(e.data),h.info("Component successfully registered with payload:",e);break;case v.ActivateThemes:this.activateThemes(e.data.themes);break;default:{var t,n;if(!e.original)return;const o=null===(t=this.sentMessages)||void 0===t?void 0:t.filter((t=>{var n;return t.messageId===(null===(n=e.original)||void 0===n?void 0:n.messageId)}))[0];if(!o){const e=this.contentWindow.document.title,t=("The extension '".concat(e,"' is attempting to communicate with Standard Notes, ")+"but an error is preventing it from doing so. Please restart this extension and try again.").replace(" "," ");return void h.info(t)}null==o||null===(n=o.callback)||void 0===n||n.call(o,e.data);break}}}onReady(e){this.component.environment=e.environment,this.component.platform=e.platform,this.component.uuid=e.uuid;for(const e of this.messageQueue)this.postMessage(e.action,e.data,e.callback);this.messageQueue=[],h.info("Data passed to onReady:",e),this.activateThemes(e.activeThemeUrls||[]),this.postMessage(v.ThemesActivated,{}),this.params.onReady&&this.params.onReady()}getSelfComponentUUID(){return this.component.uuid}isRunningInDesktopApplication(){return this.component.environment===u(n.Desktop)}isRunningInMobileApplication(){return this.component.environment===u(n.Mobile)}getComponentDataValueForKey(e){if(this.component.data)return this.component.data[e]}setComponentDataValueForKey(e,t){if(!this.component.data)throw new Error("The component has not been initialized.");if(!e||e&&0===e.length)throw new Error("The key for the data value should be a valid string.");this.component.data=b(b({},this.component.data),{},{[e]:t}),this.postMessage(v.SetComponentData,{componentData:this.component.data})}clearComponentData(){this.component.data={},this.postMessage(v.SetComponentData,{componentData:this.component.data})}postMessage(e,t,n){if(!this.component.sessionKey)return void this.messageQueue.push({action:e,data:t,api:g.Component,callback:n});e===v.SaveItems&&(t.height=this.params.handleRequestForContentHeight());const o={action:e,data:t,messageId:this.generateUUID(),sessionKey:this.component.sessionKey,api:g.Component},i=JSON.parse(JSON.stringify(o));let r;i.callback=n,this.sentMessages.push(i),r=this.isRunningInMobileApplication()?JSON.stringify(o):o,h.info("Posting message:",r),this.contentWindow.parent.postMessage(r,this.component.origin)}activateThemes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!this.component.acceptsThemes)return;h.info("Incoming themes:",e);const{activeThemes:t}=this.component;if(t&&t.sort().toString()==e.sort().toString())return;let n=e;const o=[];for(const i of t)e.includes(i)?n=n.filter((e=>e!==i)):o.push(i);h.info("Deactivating themes:",o),h.info("Activating themes:",n);for(const e of o)this.deactivateTheme(e);this.component.activeThemes=e;for(const e of n){if(!e)continue;const t=this.contentWindow.document.createElement("link");t.id=btoa(e),t.href=e,t.type="text/css",t.rel="stylesheet",t.media="screen,print",t.className="custom-theme",this.contentWindow.document.getElementsByTagName("head")[0].appendChild(t)}this.params.onThemesChange&&this.params.onThemesChange()}themeElementForUrl(e){return Array.from(this.contentWindow.document.getElementsByClassName("custom-theme")).slice().find((t=>t.id==btoa(e)))}deactivateTheme(e){const t=this.themeElementForUrl(e);t&&t.parentNode&&(t.setAttribute("disabled","true"),t.parentNode.removeChild(t))}generateUUID(){return function(e,t,n){var o=(e=e||{}).random||(e.rng||r)();return o[6]=15&o[6]|64,o[8]=63&o[8]|128,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n}(o)}()}get platform(){return this.component.platform}get environment(){return this.component.environment}streamItems(e,t){this.postMessage(v.StreamItems,{content_types:e},(e=>{t(e.items)}))}streamContextItem(e){this.postMessage(v.StreamContextItem,{},(t=>{const{item:n}=t;(!this.lastStreamedItem||this.lastStreamedItem.uuid!==n.uuid)&&this.pendingSaveTimeout&&(clearTimeout(this.pendingSaveTimeout),this.performSavingOfItems(this.pendingSaveParams),this.pendingSaveTimeout=void 0,this.pendingSaveParams=void 0),this.lastStreamedItem=n,e(this.lastStreamedItem)}))}createItem(e,t){this.postMessage(v.CreateItem,{item:this.jsonObjectForItem(e)},(e=>{let{item:n}=e;!n&&e.items&&e.items.length>0&&(n=e.items[0]),t&&t(n)}))}createItems(e,t){const n=e.map((e=>this.jsonObjectForItem(e)));this.postMessage(v.CreateItems,{items:n},(e=>{t&&t(e.items)}))}deleteItem(e,t){this.deleteItems([e],t)}deleteItems(e,t){const n={items:e.map((e=>this.jsonObjectForItem(e)))};this.postMessage(v.DeleteItems,n,(e=>{t&&t(e)}))}sendCustomEvent(e,t,n){this.postMessage(e,t,(e=>{n&&n(e)}))}saveItem(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.saveItems([e],t,n)}saveItemWithPresave(e,t,n){this.saveItemsWithPresave([e],t,n)}saveItemsWithPresave(e,t,n){this.saveItems(e,n,!1,t)}performSavingOfItems(e){let{items:t,presave:n,callback:o}=e;const i=setTimeout((()=>{this.concernTimeouts.forEach((e=>clearTimeout(e))),alert("This editor is unable to communicate with Standard Notes. Your changes may not be saved. Please backup your changes, then restart the application and try again.")}),5e3);this.concernTimeouts.push(i),n&&n();const r=[];for(const e of t)r.push(this.jsonObjectForItem(e));this.postMessage(v.SaveItems,{items:r},(()=>{this.concernTimeouts.forEach((e=>clearTimeout(e))),null==o||o()}))}saveItems(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3?arguments[3]:void 0;if(this.pendingSaveItems||(this.pendingSaveItems=[]),this.options.coallesedSaving&&!n){this.pendingSaveTimeout&&clearTimeout(this.pendingSaveTimeout);const n=e.map((e=>e.uuid)),i=this.pendingSaveItems.filter((e=>!n.includes(e.uuid)));this.pendingSaveItems=i.concat(e),this.pendingSaveParams={items:this.pendingSaveItems,presave:o,callback:t},this.pendingSaveTimeout=setTimeout((()=>{this.performSavingOfItems(this.pendingSaveParams),this.pendingSaveItems=[],this.pendingSaveTimeout=void 0,this.pendingSaveParams=null}),this.options.coallesedSavingDelay)}else this.performSavingOfItems({items:e,presave:o,callback:t})}setSize(e,t){this.postMessage(v.SetSize,{type:"container",width:e,height:t})}keyDownEvent(e){this.postMessage(v.KeyDown,{keyboardModifier:e})}keyUpEvent(e){this.postMessage(v.KeyUp,{keyboardModifier:e})}mouseClickEvent(){this.postMessage(v.Click,{})}jsonObjectForItem(e){const t=Object.assign({},e);return t.children=null,t.parent=null,t}getItemAppDataValue(e,t){var n,o;const i=null==e||null===(n=e.content)||void 0===n||null===(o=n.appData)||void 0===o?void 0:o["org.standardnotes.sn"];return null==i?void 0:i[t]}}return t.default})())),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function o(e,i,r){return o=n()?Reflect.construct:function(e,n,o){var i=[null];i.push.apply(i,n);var r=new(Function.bind.apply(e,i));return o&&t(r,o.prototype),r},o.apply(null,arguments)}function i(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var a=Object.hasOwnProperty,s=Object.setPrototypeOf,l=Object.isFrozen,c=Object.getPrototypeOf,u=Object.getOwnPropertyDescriptor,d=Object.freeze,h=Object.seal,f=Object.create,p="undefined"!=typeof Reflect&&Reflect,m=p.apply,g=p.construct;m||(m=function(e,t,n){return e.apply(t,n)}),d||(d=function(e){return e}),h||(h=function(e){return e}),g||(g=function(e,t){return o(e,i(t))});var v,y=A(Array.prototype.forEach),b=A(Array.prototype.pop),k=A(Array.prototype.push),w=A(String.prototype.toLowerCase),x=A(String.prototype.match),C=A(String.prototype.replace),T=A(String.prototype.indexOf),S=A(String.prototype.trim),E=A(RegExp.prototype.test),N=(v=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g(v,t)});function A(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return m(e,t,o)}}function I(e,t,n){n=n||w,s&&s(e,null);for(var o=t.length;o--;){var i=t[o];if("string"==typeof i){var r=n(i);r!==i&&(l(t)||(t[o]=r),i=r)}e[i]=!0}return e}function $(e){var t,n=f(null);for(t in e)m(a,e,[t])&&(n[t]=e[t]);return n}function D(e,t){for(;null!==e;){var n=u(e,t);if(n){if(n.get)return A(n.get);if("function"==typeof n.value)return A(n.value)}e=c(e)}return function(e){return console.warn("fallback value for",e),null}}var L=d(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=d(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),P=d(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),O=d(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),F=d(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),H=d(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),M=d(["#text"]),j=d(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),B=d(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z=d(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=d(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),W=h(/\{\{[\w\W]*|[\w\W]*\}\}/gm),_=h(/<%[\w\W]*|[\w\W]*%>/gm),q=h(/^data-[\-\w.\u00B7-\uFFFF]/),K=h(/^aria-[\-\w]+$/),V=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=h(/^(?:\w+script|data):/i),Q=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=h(/^html$/i),X=function(){return"undefined"==typeof window?null:window},Z=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var o=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(o=n.currentScript.getAttribute(i));var r="dompurify"+(o?"#"+o:"");try{return t.createPolicy(r,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}},J=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X(),o=function(e){return t(e)};if(o.version="2.4.0",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;var r=n.document,a=n.document,s=n.DocumentFragment,l=n.HTMLTemplateElement,c=n.Node,u=n.Element,h=n.NodeFilter,f=n.NamedNodeMap,p=void 0===f?n.NamedNodeMap||n.MozNamedAttrMap:f,m=n.HTMLFormElement,g=n.DOMParser,v=n.trustedTypes,A=u.prototype,J=D(A,"cloneNode"),ee=D(A,"nextSibling"),te=D(A,"childNodes"),ne=D(A,"parentNode");if("function"==typeof l){var oe=a.createElement("template");oe.content&&oe.content.ownerDocument&&(a=oe.content.ownerDocument)}var ie=Z(v,r),re=ie?ie.createHTML(""):"",ae=a,se=ae.implementation,le=ae.createNodeIterator,ce=ae.createDocumentFragment,ue=ae.getElementsByTagName,de=r.importNode,he={};try{he=$(a).documentMode?a.documentMode:{}}catch(e){}var fe={};o.isSupported="function"==typeof ne&&se&&void 0!==se.createHTMLDocument&&9!==he;var pe,me,ge=W,ve=_,ye=q,be=K,ke=G,we=Q,xe=V,Ce=null,Te=I({},[].concat(i(L),i(R),i(P),i(F),i(M))),Se=null,Ee=I({},[].concat(i(j),i(B),i(z),i(U))),Ne=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ae=null,Ie=null,$e=!0,De=!0,Le=!1,Re=!1,Pe=!1,Oe=!1,Fe=!1,He=!1,Me=!1,je=!1,Be=!0,ze=!1,Ue="user-content-",We=!0,_e=!1,qe={},Ke=null,Ve=I({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ge=null,Qe=I({},["audio","video","img","source","image","track"]),Ye=null,Xe=I({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ze="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml",tt=et,nt=!1,ot=["application/xhtml+xml","text/html"],it="text/html",rt=null,at=a.createElement("form"),st=function(e){return e instanceof RegExp||e instanceof Function},lt=function(t){rt&&rt===t||(t&&"object"===e(t)||(t={}),t=$(t),pe=pe=-1===ot.indexOf(t.PARSER_MEDIA_TYPE)?it:t.PARSER_MEDIA_TYPE,me="application/xhtml+xml"===pe?function(e){return e}:w,Ce="ALLOWED_TAGS"in t?I({},t.ALLOWED_TAGS,me):Te,Se="ALLOWED_ATTR"in t?I({},t.ALLOWED_ATTR,me):Ee,Ye="ADD_URI_SAFE_ATTR"in t?I($(Xe),t.ADD_URI_SAFE_ATTR,me):Xe,Ge="ADD_DATA_URI_TAGS"in t?I($(Qe),t.ADD_DATA_URI_TAGS,me):Qe,Ke="FORBID_CONTENTS"in t?I({},t.FORBID_CONTENTS,me):Ve,Ae="FORBID_TAGS"in t?I({},t.FORBID_TAGS,me):{},Ie="FORBID_ATTR"in t?I({},t.FORBID_ATTR,me):{},qe="USE_PROFILES"in t&&t.USE_PROFILES,$e=!1!==t.ALLOW_ARIA_ATTR,De=!1!==t.ALLOW_DATA_ATTR,Le=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=t.SAFE_FOR_TEMPLATES||!1,Pe=t.WHOLE_DOCUMENT||!1,He=t.RETURN_DOM||!1,Me=t.RETURN_DOM_FRAGMENT||!1,je=t.RETURN_TRUSTED_TYPE||!1,Fe=t.FORCE_BODY||!1,Be=!1!==t.SANITIZE_DOM,ze=t.SANITIZE_NAMED_PROPS||!1,We=!1!==t.KEEP_CONTENT,_e=t.IN_PLACE||!1,xe=t.ALLOWED_URI_REGEXP||xe,tt=t.NAMESPACE||et,t.CUSTOM_ELEMENT_HANDLING&&st(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ne.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&st(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ne.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ne.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(De=!1),Me&&(He=!0),qe&&(Ce=I({},i(M)),Se=[],!0===qe.html&&(I(Ce,L),I(Se,j)),!0===qe.svg&&(I(Ce,R),I(Se,B),I(Se,U)),!0===qe.svgFilters&&(I(Ce,P),I(Se,B),I(Se,U)),!0===qe.mathMl&&(I(Ce,F),I(Se,z),I(Se,U))),t.ADD_TAGS&&(Ce===Te&&(Ce=$(Ce)),I(Ce,t.ADD_TAGS,me)),t.ADD_ATTR&&(Se===Ee&&(Se=$(Se)),I(Se,t.ADD_ATTR,me)),t.ADD_URI_SAFE_ATTR&&I(Ye,t.ADD_URI_SAFE_ATTR,me),t.FORBID_CONTENTS&&(Ke===Ve&&(Ke=$(Ke)),I(Ke,t.FORBID_CONTENTS,me)),We&&(Ce["#text"]=!0),Pe&&I(Ce,["html","head","body"]),Ce.table&&(I(Ce,["tbody"]),delete Ae.tbody),d&&d(t),rt=t)},ct=I({},["mi","mo","mn","ms","mtext"]),ut=I({},["foreignobject","desc","title","annotation-xml"]),dt=I({},["title","style","font","a","script"]),ht=I({},R);I(ht,P),I(ht,O);var ft=I({},F);I(ft,H);var pt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:et,tagName:"template"});var n=w(e.tagName),o=w(t.tagName);return e.namespaceURI===Je?t.namespaceURI===et?"svg"===n:t.namespaceURI===Ze?"svg"===n&&("annotation-xml"===o||ct[o]):Boolean(ht[n]):e.namespaceURI===Ze?t.namespaceURI===et?"math"===n:t.namespaceURI===Je?"math"===n&&ut[o]:Boolean(ft[n]):e.namespaceURI===et&&!(t.namespaceURI===Je&&!ut[o])&&!(t.namespaceURI===Ze&&!ct[o])&&!ft[n]&&(dt[n]||!ht[n])},mt=function(e){k(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=re}catch(t){e.remove()}}},gt=function(e,t){try{k(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){k(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Se[e])if(He||Me)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},vt=function(e){var t,n;if(Fe)e="<remove></remove>"+e;else{var o=x(e,/^[\r\n\t ]+/);n=o&&o[0]}"application/xhtml+xml"===pe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=ie?ie.createHTML(e):e;if(tt===et)try{t=(new g).parseFromString(i,pe)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?"":i}catch(e){}}var r=t.body||t.documentElement;return e&&n&&r.insertBefore(a.createTextNode(n),r.childNodes[0]||null),tt===et?ue.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:r},yt=function(e){return le.call(e.ownerDocument||e,e,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT,null,!1)},bt=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof p)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},kt=function(t){return"object"===e(c)?t instanceof c:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},wt=function(e,t,n){fe[e]&&y(fe[e],(function(e){e.call(o,t,n,rt)}))},xt=function(e){var t;if(wt("beforeSanitizeElements",e,null),bt(e))return mt(e),!0;if(E(/[\u0080-\uFFFF]/,e.nodeName))return mt(e),!0;var n=me(e.nodeName);if(wt("uponSanitizeElement",e,{tagName:n,allowedTags:Ce}),e.hasChildNodes()&&!kt(e.firstElementChild)&&(!kt(e.content)||!kt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return mt(e),!0;if("select"===n&&E(/<template/i,e.innerHTML))return mt(e),!0;if(!Ce[n]||Ae[n]){if(!Ae[n]&&Tt(n)){if(Ne.tagNameCheck instanceof RegExp&&E(Ne.tagNameCheck,n))return!1;if(Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(n))return!1}if(We&&!Ke[n]){var i=ne(e)||e.parentNode,r=te(e)||e.childNodes;if(r&&i)for(var a=r.length-1;a>=0;--a)i.insertBefore(J(r[a],!0),ee(e))}return mt(e),!0}return e instanceof u&&!pt(e)?(mt(e),!0):"noscript"!==n&&"noembed"!==n||!E(/<\/no(script|embed)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=C(t,ge," "),t=C(t,ve," "),e.textContent!==t&&(k(o.removed,{element:e.cloneNode()}),e.textContent=t)),wt("afterSanitizeElements",e,null),!1):(mt(e),!0)},Ct=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in a||n in at))return!1;if(De&&!Ie[t]&&E(ye,t));else if($e&&E(be,t));else if(!Se[t]||Ie[t]){if(!(Tt(e)&&(Ne.tagNameCheck instanceof RegExp&&E(Ne.tagNameCheck,e)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(e))&&(Ne.attributeNameCheck instanceof RegExp&&E(Ne.attributeNameCheck,t)||Ne.attributeNameCheck instanceof Function&&Ne.attributeNameCheck(t))||"is"===t&&Ne.allowCustomizedBuiltInElements&&(Ne.tagNameCheck instanceof RegExp&&E(Ne.tagNameCheck,n)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(n))))return!1}else if(Ye[t]);else if(E(xe,C(n,we,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!Ge[e])if(Le&&!E(ke,C(n,we,"")));else if(n)return!1;return!0},Tt=function(e){return e.indexOf("-")>0},St=function(t){var n,i,r,a;wt("beforeSanitizeAttributes",t,null);var s=t.attributes;if(s){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se};for(a=s.length;a--;){var c=n=s[a],u=c.name,d=c.namespaceURI;if(i="value"===u?n.value:S(n.value),r=me(u),l.attrName=r,l.attrValue=i,l.keepAttr=!0,l.forceKeepAttr=void 0,wt("uponSanitizeAttribute",t,l),i=l.attrValue,!l.forceKeepAttr&&(gt(u,t),l.keepAttr))if(E(/\/>/i,i))gt(u,t);else{Re&&(i=C(i,ge," "),i=C(i,ve," "));var h=me(t.nodeName);if(Ct(h,r,i)){if(!ze||"id"!==r&&"name"!==r||(gt(u,t),i=Ue+i),ie&&"object"===e(v)&&"function"==typeof v.getAttributeType)if(d);else switch(v.getAttributeType(h,r)){case"TrustedHTML":i=ie.createHTML(i);break;case"TrustedScriptURL":i=ie.createScriptURL(i)}try{d?t.setAttributeNS(d,u,i):t.setAttribute(u,i),b(o.removed)}catch(e){}}}}wt("afterSanitizeAttributes",t,null)}},Et=function e(t){var n,o=yt(t);for(wt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)wt("uponSanitizeShadowNode",n,null),xt(n)||(n.content instanceof s&&e(n.content),St(n));wt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(t){var i,a,l,u,d,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((nt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!kt(t)){if("function"!=typeof t.toString)throw N("toString is not a function");if("string"!=typeof(t=t.toString()))throw N("dirty is not a string, aborting")}if(!o.isSupported){if("object"===e(n.toStaticHTML)||"function"==typeof n.toStaticHTML){if("string"==typeof t)return n.toStaticHTML(t);if(kt(t))return n.toStaticHTML(t.outerHTML)}return t}if(Oe||lt(h),o.removed=[],"string"==typeof t&&(_e=!1),_e){if(t.nodeName){var f=me(t.nodeName);if(!Ce[f]||Ae[f])throw N("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof c)1===(a=(i=vt("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?i=a:i.appendChild(a);else{if(!He&&!Re&&!Pe&&-1===t.indexOf("<"))return ie&&je?ie.createHTML(t):t;if(!(i=vt(t)))return He?null:je?re:""}i&&Fe&&mt(i.firstChild);for(var p=yt(_e?t:i);l=p.nextNode();)3===l.nodeType&&l===u||xt(l)||(l.content instanceof s&&Et(l.content),St(l),u=l);if(u=null,_e)return t;if(He){if(Me)for(d=ce.call(i.ownerDocument);i.firstChild;)d.appendChild(i.firstChild);else d=i;return Se.shadowroot&&(d=de.call(r,d,!0)),d}var m=Pe?i.outerHTML:i.innerHTML;return Pe&&Ce["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&E(Y,i.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+m),Re&&(m=C(m,ge," "),m=C(m,ve," ")),ie&&je?ie.createHTML(m):m},o.setConfig=function(e){lt(e),Oe=!0},o.clearConfig=function(){rt=null,Oe=!1},o.isValidAttribute=function(e,t,n){rt||lt({});var o=me(e),i=me(t);return Ct(o,i,n)},o.addHook=function(e,t){"function"==typeof t&&(fe[e]=fe[e]||[],k(fe[e],t))},o.removeHook=function(e){if(fe[e])return b(fe[e])},o.removeHooks=function(e){fe[e]&&(fe[e]=[])},o.removeAllHooks=function(){fe={}},o}();return J})),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("SK",[],t):"object"==typeof exports?exports.SK=t():(e.SK=e.SK||{},e.SK.stylekit=t())}(self,(function(){return(()=>{"use strict";var e={754:(e,t,n)=>{n.r(t),n.d(t,{SKAlert:()=>o});class o{constructor({title:e,text:t,buttons:n}){var o,i;i=e=>{if("Enter"===e.key){let e=this.primaryButton();e.action&&e.action(),this.dismiss()}},(o="keyupListener")in this?Object.defineProperty(this,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):this[o]=i,this.title=e,this.text=t,this.buttons=n}buttonsString(){return`\n <div class='sk-button-group'>\n ${this.buttons.map((function(e,t){return function(e,t){return`\n <div id='button-${t}' class='sk-button ${e.style}'>\n <div class='sk-label'>${e.text}</div>\n </div>\n `}(e,t)})).join("")}\n </div>\n `}templateString(){let e,t;return this.buttons?(e=`\n <div class="sk-panel-row" style='margin-top: 8px;'>\n ${this.buttonsString()}\n </div>\n `,t=""):(e="",t='style="padding-bottom: 8px"'),`\n <div class="sk-modal">\n <div class="sk-modal-background"></div>\n <div class="sk-modal-content">\n <div class="sn-component">\n <div class="sk-panel" style='max-width: 500px;'>\n <div class="sk-panel-content" ${t}>\n <div class="sk-panel-section">\n ${this.title?`<div class='sk-h3 sk-panel-section-title'>${this.title}</div>`:""}\n\n <div class="sk-panel-row">\n ${this.text?`<p class='sk-p'>${this.text}</p>`:""}\n </div>\n\n ${e}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n `}dismiss(){this.onElement.removeChild(this.element),document.removeEventListener("keyup",this.keyupListener)}primaryButton(){let e=this.buttons.find((e=>!0===e.primary));return e||(e=this.buttons[this.buttons.length-1]),e}present({onElement:e}={}){e||(e=document.body),this.onElement=e,this.element=document.createElement("div"),this.element.className="sn-component",this.element.innerHTML=this.templateString().trim(),this.buttons&&(document.addEventListener("keyup",this.keyupListener),this.buttons.forEach(((e,t)=>{this.element.querySelector(`#button-${t}`).onclick=()=>{e.action&&e.action(),this.dismiss()}}))),e.appendChild(this.element)}}}},t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}return n.m=e,n.x=e=>{},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={388:0},t=[[754]],o=e=>{},i=(i,r)=>{for(var a,s,[l,c,u,d]=r,h=0,f=[];h<l.length;h++)s=l[h],n.o(e,s)&&e[s]&&f.push(e[s][0]),e[s]=0;for(a in c)n.o(c,a)&&(n.m[a]=c[a]);for(u&&u(n),i&&i(r);f.length;)f.shift()();return d&&t.push.apply(t,d),o()},r=self.webpackChunkSK_name_=self.webpackChunkSK_name_||[];function a(){for(var o,i=0;i<t.length;i++){for(var r=t[i],a=!0,s=1;s<r.length;s++){var l=r[s];0!==e[l]&&(a=!1)}a&&(t.splice(i--,1),o=n(n.s=r[0]))}return 0===t.length&&(n.x(),n.x=e=>{}),o}r.forEach(i.bind(null,0)),r.push=i.bind(null,r.push.bind(r));var s=n.x;n.x=()=>(n.x=s||(e=>{}),(o=a)())})(),n.x()})()}));
|
|
2
|
+
if(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(e,t){"use strict";var n=[],o=Object.getPrototypeOf,i=n.slice,r=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},a=n.push,s=n.indexOf,l={},c=l.toString,u=l.hasOwnProperty,d=u.toString,h=d.call(Object),f={},p=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},m=function(e){return null!=e&&e===e.window},g=e.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,n){var o,i,r=(n=n||g).createElement("script");if(r.text=e,t)for(o in v)(i=t[o]||t.getAttribute&&t.getAttribute(o))&&r.setAttribute(o,i);n.head.appendChild(r).parentNode.removeChild(r)}function b(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var k="3.6.1",w=function(e,t){return new w.fn.init(e,t)};function x(e){var t=!!e&&"length"in e&&e.length,n=b(e);return!p(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}w.fn=w.prototype={jquery:k,constructor:w,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(w.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(w.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,o,i,r,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||p(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)o=e[t],"__proto__"!==t&&a!==o&&(c&&o&&(w.isPlainObject(o)||(i=Array.isArray(o)))?(n=a[t],r=i&&!Array.isArray(n)?[]:i||w.isPlainObject(n)?n:{},i=!1,a[t]=w.extend(c,r,o)):void 0!==o&&(a[t]=o));return a},w.extend({expando:"jQuery"+(k+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e)||(t=o(e))&&("function"!=typeof(n=u.call(t,"constructor")&&t.constructor)||d.call(n)!==h))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){y(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,o=0;if(x(e))for(n=e.length;o<n&&!1!==t.call(e[o],o,e[o]);o++);else for(o in e)if(!1===t.call(e[o],o,e[o]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(x(Object(e))?w.merge(n,"string"==typeof e?[e]:e):a.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:s.call(t,e,n)},merge:function(e,t){for(var n=+t.length,o=0,i=e.length;o<n;o++)e[i++]=t[o];return e.length=i,e},grep:function(e,t,n){for(var o=[],i=0,r=e.length,a=!n;i<r;i++)!t(e[i],i)!==a&&o.push(e[i]);return o},map:function(e,t,n){var o,i,a=0,s=[];if(x(e))for(o=e.length;a<o;a++)null!=(i=t(e[a],a,n))&&s.push(i);else for(a in e)null!=(i=t(e[a],a,n))&&s.push(i);return r(s)},guid:1,support:f}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){l["[object "+t+"]"]=t.toLowerCase()}));var C=function(e){var t,n,o,i,r,a,s,l,c,u,d,h,f,p,m,g,v,y,b,k="sizzle"+1*new Date,w=e.document,x=0,C=0,T=le(),S=le(),E=le(),N=le(),A=function(e,t){return e===t&&(d=!0),0},I={}.hasOwnProperty,$=[],D=$.pop,L=$.push,R=$.push,P=$.slice,O=function(e,t){for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},F="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",M="(?:\\\\[\\da-fA-F]{1,6}"+H+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",j="\\["+H+"*("+M+")(?:"+H+"*([*^$|!~]?=)"+H+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+H+"*\\]",B=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+j+")*)|.*)\\)|)",z=new RegExp(H+"+","g"),U=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),W=new RegExp("^"+H+"*,"+H+"*"),_=new RegExp("^"+H+"*([>+~]|"+H+")"+H+"*"),q=new RegExp(H+"|>"),K=new RegExp(B),V=new RegExp("^"+M+"$"),G={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),bool:new RegExp("^(?:"+F+")$","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},Q=/HTML$/i,Y=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+H+"?|\\\\([^\\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))},oe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){h()},ae=ke((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{R.apply($=P.call(w.childNodes),w.childNodes),$[w.childNodes.length].nodeType}catch(t){R={apply:$.length?function(e,t){L.apply(e,P.call(t))}:function(e,t){for(var n=e.length,o=0;e[n++]=t[o++];);e.length=n-1}}}function se(e,t,o,i){var r,s,c,u,d,p,v,y=t&&t.ownerDocument,w=t?t.nodeType:9;if(o=o||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return o;if(!i&&(h(t),t=t||f,m)){if(11!==w&&(d=J.exec(e)))if(r=d[1]){if(9===w){if(!(c=t.getElementById(r)))return o;if(c.id===r)return o.push(c),o}else if(y&&(c=y.getElementById(r))&&b(t,c)&&c.id===r)return o.push(c),o}else{if(d[2])return R.apply(o,t.getElementsByTagName(e)),o;if((r=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return R.apply(o,t.getElementsByClassName(r)),o}if(n.qsa&&!N[e+" "]&&(!g||!g.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===w&&(q.test(e)||_.test(e))){for((y=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((u=t.getAttribute("id"))?u=u.replace(oe,ie):t.setAttribute("id",u=k)),s=(p=a(e)).length;s--;)p[s]=(u?"#"+u:":scope")+" "+be(p[s]);v=p.join(",")}try{return R.apply(o,y.querySelectorAll(v)),o}catch(t){N(e,!0)}finally{u===k&&t.removeAttribute("id")}}}return l(e.replace(U,"$1"),t,o,i)}function le(){var e=[];return function t(n,i){return e.push(n+" ")>o.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ce(e){return e[k]=!0,e}function ue(e){var t=f.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),i=n.length;i--;)o.attrHandle[n[i]]=t}function he(e,t){var n=t&&e,o=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(o)return o;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return ce((function(t){return t=+t,ce((function(n,o){for(var i,r=e([],n.length,t),a=r.length;a--;)n[i=r[a]]&&(n[i]=!(o[i]=n[i]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},r=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Q.test(t||n&&n.nodeName||"HTML")},h=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!=f&&9===a.nodeType&&a.documentElement&&(p=(f=a).documentElement,m=!r(f),w!=f&&(i=f.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.scope=ue((function(e){return p.appendChild(e).appendChild(f.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ue((function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Z.test(f.getElementsByClassName),n.getById=ue((function(e){return p.appendChild(e).id=k,!f.getElementsByName||!f.getElementsByName(k).length})),n.getById?(o.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},o.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(o.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},o.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,o,i,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(i=t.getElementsByName(e),o=0;r=i[o++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),o.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,o=[],i=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[i++];)1===n.nodeType&&o.push(n);return o}return r},o.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},v=[],g=[],(n.qsa=Z.test(f.querySelectorAll))&&(ue((function(e){var t;p.appendChild(e).innerHTML="<a id='"+k+"'></a><select id='"+k+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+H+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+H+"*(?:value|"+F+")"),e.querySelectorAll("[id~="+k+"-]").length||g.push("~="),(t=f.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\["+H+"*name"+H+"*="+H+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+H+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=Z.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ue((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",B)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=Z.test(p.compareDocumentPosition),b=t||Z.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,o=t&&t.parentNode;return e===o||!(!o||1!==o.nodeType||!(n.contains?n.contains(o):e.compareDocumentPosition&&16&e.compareDocumentPosition(o)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return d=!0,0;var o=!e.compareDocumentPosition-!t.compareDocumentPosition;return o||(1&(o=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===o?e==f||e.ownerDocument==w&&b(w,e)?-1:t==f||t.ownerDocument==w&&b(w,t)?1:u?O(u,e)-O(u,t):0:4&o?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,o=0,i=e.parentNode,r=t.parentNode,a=[e],s=[t];if(!i||!r)return e==f?-1:t==f?1:i?-1:r?1:u?O(u,e)-O(u,t):0;if(i===r)return he(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[o]===s[o];)o++;return o?he(a[o],s[o]):a[o]==w?-1:s[o]==w?1:0}),f},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&m&&!N[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var o=y.call(e,t);if(o||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return o}catch(e){N(t,!0)}return 0<se(t,f,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=f&&h(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=f&&h(e);var i=o.attrHandle[t.toLowerCase()],r=i&&I.call(o.attrHandle,t.toLowerCase())?i(e,t,!m):void 0;return void 0!==r?r:n.attributes||!m?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(oe,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,o=[],i=0,r=0;if(d=!n.detectDuplicates,u=!n.sortStable&&e.slice(0),e.sort(A),d){for(;t=e[r++];)t===e[r]&&(i=o.push(r));for(;i--;)e.splice(o[i],1)}return u=null,e},i=se.getText=function(e){var t,n="",o=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[o++];)n+=i(t);return n},(o=se.selectors={cacheLength:50,createPseudo:ce,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(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&&K.test(n)&&(t=a(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=T[e+" "];return t||(t=new RegExp("(^|"+H+")"+e+"("+H+"|$)"))&&T(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(o){var i=se.attr(o,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&-1<i.indexOf(n):"$="===t?n&&i.slice(-n.length)===n:"~="===t?-1<(" "+i.replace(z," ")+" ").indexOf(n):"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,o,i){var r="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===o&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,f,p,m=r!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(g){if(r){for(;m;){for(h=t;h=h[m];)if(s?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(b=(f=(c=(u=(d=(h=g)[k]||(h[k]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===x&&c[1])&&c[2],h=f&&g.childNodes[f];h=++f&&h&&h[m]||(b=f=0)||p.pop();)if(1===h.nodeType&&++b&&h===t){u[e]=[x,f,b];break}}else if(y&&(b=f=(c=(u=(d=(h=t)[k]||(h[k]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===x&&c[1]),!1===b)for(;(h=++f&&h&&h[m]||(b=f=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(y&&((u=(d=h[k]||(h[k]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[x,b]),h!==t)););return(b-=i)===o||b%o==0&&0<=b/o}}},PSEUDO:function(e,t){var n,i=o.pseudos[e]||o.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[k]?i(t):1<i.length?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?ce((function(e,n){for(var o,r=i(e,t),a=r.length;a--;)e[o=O(e,r[a])]=!(n[o]=r[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:ce((function(e){var t=[],n=[],o=s(e.replace(U,"$1"));return o[k]?ce((function(e,t,n,i){for(var r,a=o(e,null,i,[]),s=e.length;s--;)(r=a[s])&&(e[s]=!(t[s]=r))})):function(e,i,r){return t[0]=e,o(t,null,r,n),t[0]=null,!n.pop()}})),has:ce((function(e){return function(t){return 0<se(e,t).length}})),contains:ce((function(e){return e=e.replace(te,ne),function(t){return-1<(t.textContent||i(t)).indexOf(e)}})),lang:ce((function(e){return V.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,n){return[n<0?n+t:n]})),even:ge((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ge((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ge((function(e,t,n){for(var o=n<0?n+t:t<n?t:n;0<=--o;)e.push(o);return e})),gt:ge((function(e,t,n){for(var o=n<0?n+t:n;++o<t;)e.push(o);return e}))}}).pseudos.nth=o.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})o.pseudos[t]=pe(t);function ye(){}function be(e){for(var t=0,n=e.length,o="";t<n;t++)o+=e[t].value;return o}function ke(e,t,n){var o=t.dir,i=t.next,r=i||o,a=n&&"parentNode"===r,s=C++;return t.first?function(t,n,i){for(;t=t[o];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,l){var c,u,d,h=[x,s];if(l){for(;t=t[o];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[o];)if(1===t.nodeType||a)if(u=(d=t[k]||(t[k]={}))[t.uniqueID]||(d[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[o]||t;else{if((c=u[r])&&c[0]===x&&c[1]===s)return h[2]=c[2];if((u[r]=h)[2]=e(t,n,l))return!0}return!1}}function we(e){return 1<e.length?function(t,n,o){for(var i=e.length;i--;)if(!e[i](t,n,o))return!1;return!0}:e[0]}function xe(e,t,n,o,i){for(var r,a=[],s=0,l=e.length,c=null!=t;s<l;s++)(r=e[s])&&(n&&!n(r,o,i)||(a.push(r),c&&t.push(s)));return a}function Ce(e,t,n,o,i,r){return o&&!o[k]&&(o=Ce(o)),i&&!i[k]&&(i=Ce(i,r)),ce((function(r,a,s,l){var c,u,d,h=[],f=[],p=a.length,m=r||function(e,t,n){for(var o=0,i=t.length;o<i;o++)se(e,t[o],n);return n}(t||"*",s.nodeType?[s]:s,[]),g=!e||!r&&t?m:xe(m,h,e,s,l),v=n?i||(r?e:p||o)?[]:a:g;if(n&&n(g,v,s,l),o)for(c=xe(v,f),o(c,[],s,l),u=c.length;u--;)(d=c[u])&&(v[f[u]]=!(g[f[u]]=d));if(r){if(i||e){if(i){for(c=[],u=v.length;u--;)(d=v[u])&&c.push(g[u]=d);i(null,v=[],c,l)}for(u=v.length;u--;)(d=v[u])&&-1<(c=i?O(r,d):h[u])&&(r[c]=!(a[c]=d))}}else v=xe(v===a?v.splice(p,v.length):v),i?i(null,a,v,l):R.apply(a,v)}))}function Te(e){for(var t,n,i,r=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,u=ke((function(e){return e===t}),s,!0),d=ke((function(e){return-1<O(t,e)}),s,!0),h=[function(e,n,o){var i=!a&&(o||n!==c)||((t=n).nodeType?u(e,n,o):d(e,n,o));return t=null,i}];l<r;l++)if(n=o.relative[e[l].type])h=[ke(we(h),n)];else{if((n=o.filter[e[l].type].apply(null,e[l].matches))[k]){for(i=++l;i<r&&!o.relative[e[i].type];i++);return Ce(1<l&&we(h),1<l&&be(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(U,"$1"),n,l<i&&Te(e.slice(l,i)),i<r&&Te(e=e.slice(i)),i<r&&be(e))}h.push(n)}return we(h)}return ye.prototype=o.filters=o.pseudos,o.setFilters=new ye,a=se.tokenize=function(e,t){var n,i,r,a,s,l,c,u=S[e+" "];if(u)return t?0:u.slice(0);for(s=e,l=[],c=o.preFilter;s;){for(a in n&&!(i=W.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(r=[])),n=!1,(i=_.exec(s))&&(n=i.shift(),r.push({value:n,type:i[0].replace(U," ")}),s=s.slice(n.length)),o.filter)!(i=G[a].exec(s))||c[a]&&!(i=c[a](i))||(n=i.shift(),r.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):S(e,l).slice(0)},s=se.compile=function(e,t){var n,i,r,s,l,u,d=[],p=[],g=E[e+" "];if(!g){for(t||(t=a(e)),n=t.length;n--;)(g=Te(t[n]))[k]?d.push(g):p.push(g);(g=E(e,(i=p,s=0<(r=d).length,l=0<i.length,u=function(e,t,n,a,u){var d,p,g,v=0,y="0",b=e&&[],k=[],w=c,C=e||l&&o.find.TAG("*",u),T=x+=null==w?1:Math.random()||.1,S=C.length;for(u&&(c=t==f||t||u);y!==S&&null!=(d=C[y]);y++){if(l&&d){for(p=0,t||d.ownerDocument==f||(h(d),n=!m);g=i[p++];)if(g(d,t||f,n)){a.push(d);break}u&&(x=T)}s&&((d=!g&&d)&&v--,e&&b.push(d))}if(v+=y,s&&y!==v){for(p=0;g=r[p++];)g(b,k,t,n);if(e){if(0<v)for(;y--;)b[y]||k[y]||(k[y]=D.call(a));k=xe(k)}R.apply(a,k),u&&!e&&0<k.length&&1<v+r.length&&se.uniqueSort(a)}return u&&(x=T,c=w),b},s?ce(u):u))).selector=e}return g},l=se.select=function(e,t,n,i){var r,l,c,u,d,h="function"==typeof e&&e,f=!i&&a(e=h.selector||e);if(n=n||[],1===f.length){if(2<(l=f[0]=f[0].slice(0)).length&&"ID"===(c=l[0]).type&&9===t.nodeType&&m&&o.relative[l[1].type]){if(!(t=(o.find.ID(c.matches[0].replace(te,ne),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(r=G.needsContext.test(e)?0:l.length;r--&&(c=l[r],!o.relative[u=c.type]);)if((d=o.find[u])&&(i=d(c.matches[0].replace(te,ne),ee.test(l[0].type)&&ve(t.parentNode)||t))){if(l.splice(r,1),!(e=i.length&&be(l)))return R.apply(n,i),n;break}}return(h||s(e,f))(i,t,!m,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=k.split("").sort(A).join("")===k,n.detectDuplicates=!!d,h(),n.sortDetached=ue((function(e){return 1&e.compareDocumentPosition(f.createElement("fieldset"))})),ue((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ue((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ue((function(e){return null==e.getAttribute("disabled")}))||de(F,(function(e,t,n){var o;if(!n)return!0===e[t]?t.toLowerCase():(o=e.getAttributeNode(t))&&o.specified?o.value:null})),se}(e);w.find=C,w.expr=C.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=C.uniqueSort,w.text=C.getText,w.isXMLDoc=C.isXML,w.contains=C.contains,w.escapeSelector=C.escape;var T=function(e,t,n){for(var o=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&w(e).is(n))break;o.push(e)}return o},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},E=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function I(e,t,n){return p(t)?w.grep(e,(function(e,o){return!!t.call(e,o,e)!==n})):t.nodeType?w.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?w.grep(e,(function(e){return-1<s.call(t,e)!==n})):w.filter(t,e,n)}w.filter=function(e,t,n){var o=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===o.nodeType?w.find.matchesSelector(o,e)?[o]:[]:w.find.matches(e,w.grep(t,(function(e){return 1===e.nodeType})))},w.fn.extend({find:function(e){var t,n,o=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter((function(){for(t=0;t<o;t++)if(w.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<o;t++)w.find(e,i[t],n);return 1<o?w.uniqueSort(n):n},filter:function(e){return this.pushStack(I(this,e||[],!1))},not:function(e){return this.pushStack(I(this,e||[],!0))},is:function(e){return!!I(this,"string"==typeof e&&E.test(e)?w(e):e||[],!1).length}});var $,D=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var o,i;if(!e)return this;if(n=n||$,"string"==typeof e){if(!(o="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:D.exec(e))||!o[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(o[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(o[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),A.test(o[1])&&w.isPlainObject(t))for(o in t)p(this[o])?this[o](t[o]):this.attr(o,t[o]);return this}return(i=g.getElementById(o[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):p(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,$=w(g);var L=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0}))},closest:function(e,t){var n,o=0,i=this.length,r=[],a="string"!=typeof e&&w(e);if(!E.test(e))for(;o<i;o++)for(n=this[o];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&w.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(1<r.length?w.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?s.call(w(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,n){return T(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,n){return T(e,"nextSibling",n)},prevUntil:function(e,t,n){return T(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return null!=e.contentDocument&&o(e.contentDocument)?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},(function(e,t){w.fn[e]=function(n,o){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(o=n),o&&"string"==typeof o&&(i=w.filter(o,i)),1<this.length&&(R[e]||w.uniqueSort(i),L.test(e)&&i.reverse()),this.pushStack(i)}}));var O=/[^\x20\t\r\n\f]+/g;function F(e){return e}function H(e){throw e}function M(e,t,n,o){var i;try{e&&p(i=e.promise)?i.call(e).done(t).fail(n):e&&p(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(o))}catch(e){n.apply(void 0,[e])}}w.Callbacks=function(e){var t,n;e="string"==typeof e?(t=e,n={},w.each(t.match(O)||[],(function(e,t){n[t]=!0})),n):w.extend({},e);var o,i,r,a,s=[],l=[],c=-1,u=function(){for(a=a||e.once,r=o=!0;l.length;c=-1)for(i=l.shift();++c<s.length;)!1===s[c].apply(i[0],i[1])&&e.stopOnFalse&&(c=s.length,i=!1);e.memory||(i=!1),o=!1,a&&(s=i?[]:"")},d={add:function(){return s&&(i&&!o&&(c=s.length-1,l.push(i)),function t(n){w.each(n,(function(n,o){p(o)?e.unique&&d.has(o)||s.push(o):o&&o.length&&"string"!==b(o)&&t(o)}))}(arguments),i&&!o&&u()),this},remove:function(){return w.each(arguments,(function(e,t){for(var n;-1<(n=w.inArray(t,s,n));)s.splice(n,1),n<=c&&c--})),this},has:function(e){return e?-1<w.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=l=[],s=i="",this},disabled:function(){return!s},lock:function(){return a=l=[],i||o||(s=i=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],l.push(t),o||u()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!r}};return d},w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],o="pending",i={state:function(){return o},always:function(){return r.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred((function(t){w.each(n,(function(n,o){var i=p(e[o[4]])&&e[o[4]];r[o[1]]((function(){var e=i&&i.apply(this,arguments);e&&p(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[o[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(t,o,i){var r=0;function a(t,n,o,i){return function(){var s=this,l=arguments,c=function(){var e,c;if(!(t<r)){if((e=o.apply(s,l))===n.promise())throw new TypeError("Thenable self-resolution");c=e&&("object"==typeof e||"function"==typeof e)&&e.then,p(c)?i?c.call(e,a(r,n,F,i),a(r,n,H,i)):(r++,c.call(e,a(r,n,F,i),a(r,n,H,i),a(r,n,F,n.notifyWith))):(o!==F&&(s=void 0,l=[e]),(i||n.resolveWith)(s,l))}},u=i?c:function(){try{c()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,u.stackTrace),r<=t+1&&(o!==H&&(s=void 0,l=[e]),n.rejectWith(s,l))}};t?u():(w.Deferred.getStackHook&&(u.stackTrace=w.Deferred.getStackHook()),e.setTimeout(u))}}return w.Deferred((function(e){n[0][3].add(a(0,e,p(i)?i:F,e.notifyWith)),n[1][3].add(a(0,e,p(t)?t:F)),n[2][3].add(a(0,e,p(o)?o:H))})).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},r={};return w.each(n,(function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add((function(){o=s}),n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),r[t[0]]=function(){return r[t[0]+"With"](this===r?void 0:this,arguments),this},r[t[0]+"With"]=a.fireWith})),i.promise(r),t&&t.call(r,r),r},when:function(e){var t=arguments.length,n=t,o=Array(n),r=i.call(arguments),a=w.Deferred(),s=function(e){return function(n){o[e]=this,r[e]=1<arguments.length?i.call(arguments):n,--t||a.resolveWith(o,r)}};if(t<=1&&(M(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||p(r[n]&&r[n].then)))return a.then();for(;n--;)M(r[n],s(n),a.reject);return a.promise()}});var j=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&j.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout((function(){throw t}))};var B=w.Deferred();function z(){g.removeEventListener("DOMContentLoaded",z),e.removeEventListener("load",z),w.ready()}w.fn.ready=function(e){return B.then(e).catch((function(e){w.readyException(e)})),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0)!==e&&0<--w.readyWait||B.resolveWith(g,[w])}}),w.ready.then=B.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?e.setTimeout(w.ready):(g.addEventListener("DOMContentLoaded",z),e.addEventListener("load",z));var U=function(e,t,n,o,i,r,a){var s=0,l=e.length,c=null==n;if("object"===b(n))for(s in i=!0,n)U(e,t,s,n[s],!0,r,a);else if(void 0!==o&&(i=!0,p(o)||(a=!0),c&&(a?(t.call(e,o),t=null):(c=t,t=function(e,t,n){return c.call(w(e),n)})),t))for(;s<l;s++)t(e[s],n,a?o:o.call(e[s],s,t(e[s],n)));return i?e:c?t.call(e):l?t(e[0],n):r},W=/^-ms-/,_=/-([a-z])/g;function q(e,t){return t.toUpperCase()}function K(e){return e.replace(W,"ms-").replace(_,q)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=w.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var o,i=this.cache(e);if("string"==typeof t)i[K(t)]=n;else for(o in t)i[K(o)]=t[o];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][K(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,o=e[this.expando];if(void 0!==o){if(void 0!==t){n=(t=Array.isArray(t)?t.map(K):(t=K(t))in o?[t]:t.match(O)||[]).length;for(;n--;)delete o[t[n]]}(void 0===t||w.isEmptyObject(o))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var Q=new G,Y=new G,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function J(e,t,n){var o,i;if(void 0===n&&1===e.nodeType)if(o="data-"+t.replace(Z,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(o))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:X.test(i)?JSON.parse(i):i)}catch(e){}Y.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return Y.hasData(e)||Q.hasData(e)},data:function(e,t,n){return Y.access(e,t,n)},removeData:function(e,t){Y.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,o,i,r=this[0],a=r&&r.attributes;if(void 0===e){if(this.length&&(i=Y.get(r),1===r.nodeType&&!Q.get(r,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(o=a[n].name).indexOf("data-")&&(o=K(o.slice(5)),J(r,o,i[o]));Q.set(r,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){Y.set(this,e)})):U(this,(function(t){var n;if(r&&void 0===t)return void 0!==(n=Y.get(r,e))||void 0!==(n=J(r,e))?n:void 0;this.each((function(){Y.set(this,e,t)}))}),null,t,1<arguments.length,null,!0)},removeData:function(e){return this.each((function(){Y.remove(this,e)}))}}),w.extend({queue:function(e,t,n){var o;if(e)return t=(t||"fx")+"queue",o=Q.get(e,t),n&&(!o||Array.isArray(n)?o=Q.access(e,t,w.makeArray(n)):o.push(n)),o||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),o=n.length,i=n.shift(),r=w._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),o--),i&&("fx"===t&&n.unshift("inprogress"),delete r.stop,i.call(e,(function(){w.dequeue(e,t)}),r)),!o&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:w.Callbacks("once memory").add((function(){Q.remove(e,[t+"queue",n])}))})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each((function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){w.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,o=1,i=w.Deferred(),r=this,a=this.length,s=function(){--o||i.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Q.get(r[a],e+"queueHooks"))&&n.empty&&(o++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],oe=g.documentElement,ie=function(e){return w.contains(e.ownerDocument,e)},re={composed:!0};oe.getRootNode&&(ie=function(e){return w.contains(e.ownerDocument,e)||e.getRootNode(re)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===w.css(e,"display")};function se(e,t,n,o){var i,r,a=20,s=o?function(){return o.cur()}:function(){return w.css(e,t,"")},l=s(),c=n&&n[3]||(w.cssNumber[t]?"":"px"),u=e.nodeType&&(w.cssNumber[t]||"px"!==c&&+l)&&te.exec(w.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;a--;)w.style(e,t,u+c),(1-r)*(1-(r=s()/l||.5))<=0&&(a=0),u/=r;u*=2,w.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],o&&(o.unit=c,o.start=u,o.end=i)),i}var le={};function ce(e,t){for(var n,o,i,r,a,s,l,c=[],u=0,d=e.length;u<d;u++)(o=e[u]).style&&(n=o.style.display,t?("none"===n&&(c[u]=Q.get(o,"display")||null,c[u]||(o.style.display="")),""===o.style.display&&ae(o)&&(c[u]=(l=a=r=void 0,a=(i=o).ownerDocument,s=i.nodeName,(l=le[s])||(r=a.body.appendChild(a.createElement(s)),l=w.css(r,"display"),r.parentNode.removeChild(r),"none"===l&&(l="block"),le[s]=l)))):"none"!==n&&(c[u]="none",Q.set(o,"display",n)));for(u=0;u<d;u++)null!=c[u]&&(e[u].style.display=c[u]);return e}w.fn.extend({show:function(){return ce(this,!0)},hide:function(){return ce(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){ae(this)?w(this).show():w(this).hide()}))}});var ue,de,he=/^(?:checkbox|radio)$/i,fe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,pe=/^$|^module$|\/(?:java|ecma)script/i;ue=g.createDocumentFragment().appendChild(g.createElement("div")),(de=g.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),ue.appendChild(de),f.checkClone=ue.cloneNode(!0).cloneNode(!0).lastChild.checked,ue.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!ue.cloneNode(!0).lastChild.defaultValue,ue.innerHTML="<option></option>",f.option=!!ue.lastChild;var me={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ge(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,o=e.length;n<o;n++)Q.set(e[n],"globalEval",!t||Q.get(t[n],"globalEval"))}me.tbody=me.tfoot=me.colgroup=me.caption=me.thead,me.th=me.td,f.option||(me.optgroup=me.option=[1,"<select multiple='multiple'>","</select>"]);var ye=/<|&#?\w+;/;function be(e,t,n,o,i){for(var r,a,s,l,c,u,d=t.createDocumentFragment(),h=[],f=0,p=e.length;f<p;f++)if((r=e[f])||0===r)if("object"===b(r))w.merge(h,r.nodeType?[r]:r);else if(ye.test(r)){for(a=a||d.appendChild(t.createElement("div")),s=(fe.exec(r)||["",""])[1].toLowerCase(),l=me[s]||me._default,a.innerHTML=l[1]+w.htmlPrefilter(r)+l[2],u=l[0];u--;)a=a.lastChild;w.merge(h,a.childNodes),(a=d.firstChild).textContent=""}else h.push(t.createTextNode(r));for(d.textContent="",f=0;r=h[f++];)if(o&&-1<w.inArray(r,o))i&&i.push(r);else if(c=ie(r),a=ge(d.appendChild(r),"script"),c&&ve(a),n)for(u=0;r=a[u++];)pe.test(r.type||"")&&n.push(r);return d}var ke=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function xe(){return!1}function Ce(e,t){return e===function(){try{return g.activeElement}catch(e){}}()==("focus"===t)}function Te(e,t,n,o,i,r){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(o=o||n,n=void 0),t)Te(e,s,n,o,t[s],r);return e}if(null==o&&null==i?(i=n,o=n=void 0):null==i&&("string"==typeof n?(i=o,o=void 0):(i=o,o=n,n=void 0)),!1===i)i=xe;else if(!i)return e;return 1===r&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each((function(){w.event.add(this,t,i,o,n)}))}function Se(e,t,n){n?(Q.set(e,t,!1),w.event.add(e,t,{namespace:!1,handler:function(e){var o,r,a=Q.get(this,t);if(1&e.isTrigger&&this[t]){if(a.length)(w.event.special[t]||{}).delegateType&&e.stopPropagation();else if(a=i.call(arguments),Q.set(this,t,a),o=n(this,t),this[t](),a!==(r=Q.get(this,t))||o?Q.set(this,t,!1):r={},a!==r)return e.stopImmediatePropagation(),e.preventDefault(),r&&r.value}else a.length&&(Q.set(this,t,{value:w.event.trigger(w.extend(a[0],w.Event.prototype),a.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,t)&&w.event.add(e,t,we)}w.event={global:{},add:function(e,t,n,o,i){var r,a,s,l,c,u,d,h,f,p,m,g=Q.get(e);if(V(e))for(n.handler&&(n=(r=n).handler,i=r.selector),i&&w.find.matchesSelector(oe,i),n.guid||(n.guid=w.guid++),(l=g.events)||(l=g.events=Object.create(null)),(a=g.handle)||(a=g.handle=function(t){return void 0!==w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(O)||[""]).length;c--;)f=m=(s=ke.exec(t[c])||[])[1],p=(s[2]||"").split(".").sort(),f&&(d=w.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=w.event.special[f]||{},u=w.extend({type:f,origType:m,data:o,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:p.join(".")},r),(h=l[f])||((h=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,o,p,a)||e.addEventListener&&e.addEventListener(f,a)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,u):h.push(u),w.event.global[f]=!0)},remove:function(e,t,n,o,i){var r,a,s,l,c,u,d,h,f,p,m,g=Q.hasData(e)&&Q.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(O)||[""]).length;c--;)if(f=m=(s=ke.exec(t[c])||[])[1],p=(s[2]||"").split(".").sort(),f){for(d=w.event.special[f]||{},h=l[f=(o?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=r=h.length;r--;)u=h[r],!i&&m!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||o&&o!==u.selector&&("**"!==o||!u.selector)||(h.splice(r,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));a&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,g.handle)||w.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)w.event.remove(e,f+t[c],n,o,!0);w.isEmptyObject(l)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,o,i,r,a,s=new Array(arguments.length),l=w.event.fix(e),c=(Q.get(this,"events")||Object.create(null))[l.type]||[],u=w.event.special[l.type]||{};for(s[0]=l,t=1;t<arguments.length;t++)s[t]=arguments[t];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){for(a=w.event.handlers.call(this,l,c),t=0;(i=a[t++])&&!l.isPropagationStopped();)for(l.currentTarget=i.elem,n=0;(r=i.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==r.namespace&&!l.rnamespace.test(r.namespace)||(l.handleObj=r,l.data=r.data,void 0!==(o=((w.event.special[r.origType]||{}).handle||r.handler).apply(i.elem,s))&&!1===(l.result=o)&&(l.preventDefault(),l.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,o,i,r,a,s=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&1<=e.button))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(r=[],a={},n=0;n<l;n++)void 0===a[i=(o=t[n]).selector+" "]&&(a[i]=o.needsContext?-1<w(i,this).index(c):w.find(i,this,null,[c]).length),a[i]&&r.push(o);r.length&&s.push({elem:c,handlers:r})}return c=this,l<t.length&&s.push({elem:c,handlers:t.slice(l)}),s},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:p(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return he.test(t.type)&&t.click&&N(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return he.test(t.type)&&t.click&&N(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return he.test(t.type)&&t.click&&N(t,"input")&&Q.get(t,"click")||N(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:xe,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:xe,isPropagationStopped:xe,isImmediatePropagationStopped:xe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},w.event.addProp),w.each({focus:"focusin",blur:"focusout"},(function(e,t){w.event.special[e]={setup:function(){return Se(this,e,Ce),!1},trigger:function(){return Se(this,e),!0},_default:function(t){return Q.get(t.target,e)},delegateType:t}})),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,o=e.relatedTarget,i=e.handleObj;return o&&(o===this||w.contains(this,o))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}})),w.fn.extend({on:function(e,t,n,o){return Te(this,e,t,n,o)},one:function(e,t,n,o){return Te(this,e,t,n,o,1)},off:function(e,t,n){var o,i;if(e&&e.preventDefault&&e.handleObj)return o=e.handleObj,w(e.delegateTarget).off(o.namespace?o.origType+"."+o.namespace:o.origType,o.selector,o.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=xe),this.each((function(){w.event.remove(this,e,n,t)}))}});var Ee=/<script|<style|<link/i,Ne=/checked\s*(?:[^=]|=\s*.checked.)/i,Ae=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ie(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")&&w(e).children("tbody")[0]||e}function $e(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function De(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,o,i,r,a,s;if(1===t.nodeType){if(Q.hasData(e)&&(s=Q.get(e).events))for(i in Q.remove(t,"handle events"),s)for(n=0,o=s[i].length;n<o;n++)w.event.add(t,i,s[i][n]);Y.hasData(e)&&(r=Y.access(e),a=w.extend({},r),Y.set(t,a))}}function Re(e,t,n,o){t=r(t);var i,a,s,l,c,u,d=0,h=e.length,m=h-1,g=t[0],v=p(g);if(v||1<h&&"string"==typeof g&&!f.checkClone&&Ne.test(g))return e.each((function(i){var r=e.eq(i);v&&(t[0]=g.call(this,i,r.html())),Re(r,t,n,o)}));if(h&&(a=(i=be(t,e[0].ownerDocument,!1,e,o)).firstChild,1===i.childNodes.length&&(i=a),a||o)){for(l=(s=w.map(ge(i,"script"),$e)).length;d<h;d++)c=i,d!==m&&(c=w.clone(c,!0,!0),l&&w.merge(s,ge(c,"script"))),n.call(e[d],c,d);if(l)for(u=s[s.length-1].ownerDocument,w.map(s,De),d=0;d<l;d++)c=s[d],pe.test(c.type||"")&&!Q.access(c,"globalEval")&&w.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?w._evalUrl&&!c.noModule&&w._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):y(c.textContent.replace(Ae,""),c,u))}return e}function Pe(e,t,n){for(var o,i=t?w.filter(t,e):e,r=0;null!=(o=i[r]);r++)n||1!==o.nodeType||w.cleanData(ge(o)),o.parentNode&&(n&&ie(o)&&ve(ge(o,"script")),o.parentNode.removeChild(o));return e}w.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var o,i,r,a,s,l,c,u=e.cloneNode(!0),d=ie(e);if(!(f.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ge(u),o=0,i=(r=ge(e)).length;o<i;o++)s=r[o],"input"===(c=(l=a[o]).nodeName.toLowerCase())&&he.test(s.type)?l.checked=s.checked:"input"!==c&&"textarea"!==c||(l.defaultValue=s.defaultValue);if(t)if(n)for(r=r||ge(e),a=a||ge(u),o=0,i=r.length;o<i;o++)Le(r[o],a[o]);else Le(e,u);return 0<(a=ge(u,"script")).length&&ve(a,!d&&ge(e,"script")),u},cleanData:function(e){for(var t,n,o,i=w.event.special,r=0;void 0!==(n=e[r]);r++)if(V(n)){if(t=n[Q.expando]){if(t.events)for(o in t.events)i[o]?w.event.remove(n,o):w.removeEvent(n,o,t.handle);n[Q.expando]=void 0}n[Y.expando]&&(n[Y.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Pe(this,e,!0)},remove:function(e){return Pe(this,e)},text:function(e){return U(this,(function(e){return void 0===e?w.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Re(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ie(this,e).appendChild(e)}))},prepend:function(){return Re(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ie(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Re(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Re(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ge(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return w.clone(this,e,t)}))},html:function(e){return U(this,(function(e){var t=this[0]||{},n=0,o=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ee.test(e)&&!me[(fe.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<o;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(ge(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Re(this,arguments,(function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(ge(this)),n&&n.replaceChild(t,this))}),e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){w.fn[e]=function(e){for(var n,o=[],i=w(e),r=i.length-1,s=0;s<=r;s++)n=s===r?this:this.clone(!0),w(i[s])[t](n),a.apply(o,n.get());return this.pushStack(o)}}));var Oe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Fe=/^--/,He=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Me=function(e,t,n){var o,i,r={};for(i in t)r[i]=e.style[i],e.style[i]=t[i];for(i in o=n.call(e),t)e.style[i]=r[i];return o},je=new RegExp(ne.join("|"),"i"),Be="[\\x20\\t\\r\\n\\f]",ze=new RegExp("^"+Be+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Be+"+$","g");function Ue(e,t,n){var o,i,r,a,s=Fe.test(t),l=e.style;return(n=n||He(e))&&(a=n.getPropertyValue(t)||n[t],s&&(a=a.replace(ze,"$1")),""!==a||ie(e)||(a=w.style(e,t)),!f.pixelBoxStyles()&&Oe.test(a)&&je.test(t)&&(o=l.width,i=l.minWidth,r=l.maxWidth,l.minWidth=l.maxWidth=l.width=a,a=n.width,l.width=o,l.minWidth=i,l.maxWidth=r)),void 0!==a?a+"":a}function We(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",oe.appendChild(c).appendChild(u);var t=e.getComputedStyle(u);o="1%"!==t.top,l=12===n(t.marginLeft),u.style.right="60%",a=36===n(t.right),i=36===n(t.width),u.style.position="absolute",r=12===n(u.offsetWidth/3),oe.removeChild(c),u=null}}function n(e){return Math.round(parseFloat(e))}var o,i,r,a,s,l,c=g.createElement("div"),u=g.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===u.style.backgroundClip,w.extend(f,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),o},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),r},reliableTrDimensions:function(){var t,n,o,i;return null==s&&(t=g.createElement("table"),n=g.createElement("tr"),o=g.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="border:1px solid",n.style.height="1px",o.style.height="9px",o.style.display="block",oe.appendChild(t).appendChild(n).appendChild(o),i=e.getComputedStyle(n),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===n.offsetHeight,oe.removeChild(t)),s}}))}();var _e=["Webkit","Moz","ms"],qe=g.createElement("div").style,Ke={};function Ve(e){return w.cssProps[e]||Ke[e]||(e in qe?e:Ke[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=_e.length;n--;)if((e=_e[n]+t)in qe)return e}(e)||e)}var Ge=/^(none|table(?!-c[ea]).+)/,Qe={position:"absolute",visibility:"hidden",display:"block"},Ye={letterSpacing:"0",fontWeight:"400"};function Xe(e,t,n){var o=te.exec(t);return o?Math.max(0,o[2]-(n||0))+(o[3]||"px"):t}function Ze(e,t,n,o,i,r){var a="width"===t?1:0,s=0,l=0;if(n===(o?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=w.css(e,n+ne[a],!0,i)),o?("content"===n&&(l-=w.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(l-=w.css(e,"border"+ne[a]+"Width",!0,i))):(l+=w.css(e,"padding"+ne[a],!0,i),"padding"!==n?l+=w.css(e,"border"+ne[a]+"Width",!0,i):s+=w.css(e,"border"+ne[a]+"Width",!0,i));return!o&&0<=r&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-r-l-s-.5))||0),l}function Je(e,t,n){var o=He(e),i=(!f.boxSizingReliable()||n)&&"border-box"===w.css(e,"boxSizing",!1,o),r=i,a=Ue(e,t,o),s="offset"+t[0].toUpperCase()+t.slice(1);if(Oe.test(a)){if(!n)return a;a="auto"}return(!f.boxSizingReliable()&&i||!f.reliableTrDimensions()&&N(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===w.css(e,"display",!1,o))&&e.getClientRects().length&&(i="border-box"===w.css(e,"boxSizing",!1,o),(r=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ze(e,t,n||(i?"border":"content"),r,o,a)+"px"}function et(e,t,n,o,i){return new et.prototype.init(e,t,n,o,i)}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ue(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,o){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,r,a,s=K(t),l=Fe.test(t),c=e.style;if(l||(t=Ve(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,o))?i:c[t];"string"==(r=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),r="number"),null!=n&&n==n&&("number"!==r||l||(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),f.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,o))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,o){var i,r,a,s=K(t);return Fe.test(t)||(t=Ve(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ue(e,t,o)),"normal"===i&&t in Ye&&(i=Ye[t]),""===n||n?(r=parseFloat(i),!0===n||isFinite(r)?r||0:i):i}}),w.each(["height","width"],(function(e,t){w.cssHooks[t]={get:function(e,n,o){if(n)return!Ge.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,t,o):Me(e,Qe,(function(){return Je(e,t,o)}))},set:function(e,n,o){var i,r=He(e),a=!f.scrollboxSize()&&"absolute"===r.position,s=(a||o)&&"border-box"===w.css(e,"boxSizing",!1,r),l=o?Ze(e,t,o,s,r):0;return s&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(r[t])-Ze(e,t,"border",!1,r)-.5)),l&&(i=te.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Xe(0,n,l)}}})),w.cssHooks.marginLeft=We(f.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ue(e,"marginLeft"))||e.getBoundingClientRect().left-Me(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),w.each({margin:"",padding:"",border:"Width"},(function(e,t){w.cssHooks[e+t]={expand:function(n){for(var o=0,i={},r="string"==typeof n?n.split(" "):[n];o<4;o++)i[e+ne[o]+t]=r[o]||r[o-2]||r[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Xe)})),w.fn.extend({css:function(e,t){return U(this,(function(e,t,n){var o,i,r={},a=0;if(Array.isArray(t)){for(o=He(e),i=t.length;a<i;a++)r[t[a]]=w.css(e,t[a],!1,o);return r}return void 0!==n?w.style(e,t,n):w.css(e,t)}),e,t,1<arguments.length)}}),((w.Tween=et).prototype={constructor:et,init:function(e,t,n,o,i,r){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=o,this.unit=r||(w.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||!w.cssHooks[e.prop]&&null==e.elem.style[Ve(e.prop)]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=et.prototype.init,w.fx.step={};var tt,nt,ot,it,rt=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===g.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(st):e.setTimeout(st,w.fx.interval),w.fx.tick())}function lt(){return e.setTimeout((function(){tt=void 0})),tt=Date.now()}function ct(e,t){var n,o=0,i={height:e};for(t=t?1:0;o<4;o+=2-t)i["margin"+(n=ne[o])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var o,i=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),r=0,a=i.length;r<a;r++)if(o=i[r].call(n,t,e))return o}function dt(e,t,n){var o,i,r=0,a=dt.prefilters.length,s=w.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var t=tt||lt(),n=Math.max(0,c.startTime+c.duration-t),o=1-(n/c.duration||0),r=0,a=c.tweens.length;r<a;r++)c.tweens[r].run(o);return s.notifyWith(e,[c,o,n]),o<1&&a?n:(a||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:tt||lt(),duration:n.duration,tweens:[],createTween:function(t,n){var o=w.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(o),o},stop:function(t){var n=0,o=t?c.tweens.length:0;if(i)return this;for(i=!0;n<o;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),u=c.props;for(function(e,t){var n,o,i,r,a;for(n in e)if(i=t[o=K(n)],r=e[n],Array.isArray(r)&&(i=r[1],r=e[n]=r[0]),n!==o&&(e[o]=r,delete e[n]),(a=w.cssHooks[o])&&"expand"in a)for(n in r=a.expand(r),delete e[o],r)n in e||(e[n]=r[n],t[n]=i);else t[o]=i}(u,c.opts.specialEasing);r<a;r++)if(o=dt.prefilters[r].call(c,e,u,c.opts))return p(o.stop)&&(w._queueHooks(c.elem,c.opts.queue).stop=o.stop.bind(o)),o;return w.map(u,ut,c),p(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),w.fx.timer(w.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}w.Animation=w.extend(dt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){p(e)?(t=e,e=["*"]):e=e.match(O);for(var n,o=0,i=e.length;o<i;o++)n=e[o],dt.tweeners[n]=dt.tweeners[n]||[],dt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var o,i,r,a,s,l,c,u,d="width"in t||"height"in t,h=this,f={},p=e.style,m=e.nodeType&&ae(e),g=Q.get(e,"fxshow");for(o in n.queue||(null==(a=w._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,w.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[o],rt.test(i)){if(delete t[o],r=r||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[o])continue;m=!0}f[o]=g&&g[o]||w.style(e,o)}if((l=!w.isEmptyObject(t))||!w.isEmptyObject(f))for(o in d&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(c=g&&g.display)&&(c=Q.get(e,"display")),"none"===(u=w.css(e,"display"))&&(c?u=c:(ce([e],!0),c=e.style.display||c,u=w.css(e,"display"),ce([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===w.css(e,"float")&&(l||(h.done((function(){p.display=c})),null==c&&(u=p.display,c="none"===u?"":u)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),l=!1,f)l||(g?"hidden"in g&&(m=g.hidden):g=Q.access(e,"fxshow",{display:c}),r&&(g.hidden=!m),m&&ce([e],!0),h.done((function(){for(o in m||ce([e]),Q.remove(e,"fxshow"),f)w.style(e,o,f[o])}))),l=ut(m?g[o]:0,o,h),o in g||(g[o]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?dt.prefilters.unshift(e):dt.prefilters.push(e)}}),w.speed=function(e,t,n){var o=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||p(e)&&e,duration:e,easing:n&&t||t&&!p(t)&&t};return w.fx.off?o.duration=0:"number"!=typeof o.duration&&(o.duration in w.fx.speeds?o.duration=w.fx.speeds[o.duration]:o.duration=w.fx.speeds._default),null!=o.queue&&!0!==o.queue||(o.queue="fx"),o.old=o.complete,o.complete=function(){p(o.old)&&o.old.call(this),o.queue&&w.dequeue(this,o.queue)},o},w.fn.extend({fadeTo:function(e,t,n,o){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,o)},animate:function(e,t,n,o){var i=w.isEmptyObject(e),r=w.speed(t,n,o),a=function(){var t=dt(this,w.extend({},e),r);(i||Q.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===r.queue?this.each(a):this.queue(r.queue,a)},stop:function(e,t,n){var o=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",r=w.timers,a=Q.get(this);if(i)a[i]&&a[i].stop&&o(a[i]);else for(i in a)a[i]&&a[i].stop&&at.test(i)&&o(a[i]);for(i=r.length;i--;)r[i].elem!==this||null!=e&&r[i].queue!==e||(r[i].anim.stop(n),t=!1,r.splice(i,1));!t&&n||w.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=Q.get(this),o=n[e+"queue"],i=n[e+"queueHooks"],r=w.timers,a=o?o.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<a;t++)o[t]&&o[t].finish&&o[t].finish.call(this);delete n.finish}))}}),w.each(["toggle","show","hide"],(function(e,t){var n=w.fn[t];w.fn[t]=function(e,o,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ct(t,!0),e,o,i)}})),w.each({slideDown:ct("show"),slideUp:ct("hide"),slideToggle:ct("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){w.fn[e]=function(e,n,o){return this.animate(t,e,n,o)}})),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),tt=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){nt||(nt=!0,st())},w.fx.stop=function(){nt=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(t,n){return t=w.fx&&w.fx.speeds[t]||t,n=n||"fx",this.queue(n,(function(n,o){var i=e.setTimeout(n,t);o.stop=function(){e.clearTimeout(i)}}))},ot=g.createElement("input"),it=g.createElement("select").appendChild(g.createElement("option")),ot.type="checkbox",f.checkOn=""!==ot.value,f.optSelected=it.selected,(ot=g.createElement("input")).value="t",ot.type="radio",f.radioValue="t"===ot.value;var ht,ft=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return U(this,w.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each((function(){w.removeAttr(this,e)}))}}),w.extend({attr:function(e,t,n){var o,i,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?w.prop(e,t,n):(1===r&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?ht:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(o=i.set(e,n,t))?o:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(o=i.get(e,t))?o:null==(o=w.find.attr(e,t))?void 0:o)},attrHooks:{type:{set:function(e,t){if(!f.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,o=0,i=t&&t.match(O);if(i&&1===e.nodeType)for(;n=i[o++];)e.removeAttribute(n)}}),ht={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=ft[t]||w.find.attr;ft[t]=function(e,t,o){var i,r,a=t.toLowerCase();return o||(r=ft[a],ft[a]=i,i=null!=n(e,t,o)?a:null,ft[a]=r),i}}));var pt=/^(?:input|select|textarea|button)$/i,mt=/^(?:a|area)$/i;function gt(e){return(e.match(O)||[]).join(" ")}function vt(e){return e.getAttribute&&e.getAttribute("class")||""}function yt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(O)||[]}w.fn.extend({prop:function(e,t){return U(this,w.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each((function(){delete this[w.propFix[e]||e]}))}}),w.extend({prop:function(e,t,n){var o,i,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(o=i.set(e,n,t))?o:e[t]=n:i&&"get"in i&&null!==(o=i.get(e,t))?o:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||mt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){w.propFix[this.toLowerCase()]=this})),w.fn.extend({addClass:function(e){var t,n,o,i,r,a;return p(e)?this.each((function(t){w(this).addClass(e.call(this,t,vt(this)))})):(t=yt(e)).length?this.each((function(){if(o=vt(this),n=1===this.nodeType&&" "+gt(o)+" "){for(r=0;r<t.length;r++)i=t[r],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=gt(n),o!==a&&this.setAttribute("class",a)}})):this},removeClass:function(e){var t,n,o,i,r,a;return p(e)?this.each((function(t){w(this).removeClass(e.call(this,t,vt(this)))})):arguments.length?(t=yt(e)).length?this.each((function(){if(o=vt(this),n=1===this.nodeType&&" "+gt(o)+" "){for(r=0;r<t.length;r++)for(i=t[r];-1<n.indexOf(" "+i+" ");)n=n.replace(" "+i+" "," ");a=gt(n),o!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,o,i,r,a=typeof e,s="string"===a||Array.isArray(e);return p(e)?this.each((function(n){w(this).toggleClass(e.call(this,n,vt(this),t),t)})):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=yt(e),this.each((function(){if(s)for(r=w(this),i=0;i<n.length;i++)o=n[i],r.hasClass(o)?r.removeClass(o):r.addClass(o);else void 0!==e&&"boolean"!==a||((o=vt(this))&&Q.set(this,"__className__",o),this.setAttribute&&this.setAttribute("class",o||!1===e?"":Q.get(this,"__className__")||""))})))},hasClass:function(e){var t,n,o=0;for(t=" "+e+" ";n=this[o++];)if(1===n.nodeType&&-1<(" "+gt(vt(n))+" ").indexOf(t))return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,o,i=this[0];return arguments.length?(o=p(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=o?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,(function(e){return null==e?"":e+""}))),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n:void 0}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:gt(w.text(e))}},select:{get:function(e){var t,n,o,i=e.options,r=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?r+1:i.length;for(o=r<0?l:a?r:0;o<l;o++)if(((n=i[o]).selected||o===r)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=w(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,o,i=e.options,r=w.makeArray(t),a=i.length;a--;)((o=i[a]).selected=-1<w.inArray(w.valHooks.option.get(o),r))&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),w.each(["radio","checkbox"],(function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<w.inArray(w(e).val(),t)}},f.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),f.focusin="onfocusin"in e;var kt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,o,i){var r,a,s,l,c,d,h,f,v=[o||g],y=u.call(t,"type")?t.type:t,b=u.call(t,"namespace")?t.namespace.split("."):[];if(a=f=s=o=o||g,3!==o.nodeType&&8!==o.nodeType&&!kt.test(y+w.event.triggered)&&(-1<y.indexOf(".")&&(y=(b=y.split(".")).shift(),b.sort()),c=y.indexOf(":")<0&&"on"+y,(t=t[w.expando]?t:new w.Event(y,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=b.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=o),n=null==n?[t]:w.makeArray(n,[t]),h=w.event.special[y]||{},i||!h.trigger||!1!==h.trigger.apply(o,n))){if(!i&&!h.noBubble&&!m(o)){for(l=h.delegateType||y,kt.test(l+y)||(a=a.parentNode);a;a=a.parentNode)v.push(a),s=a;s===(o.ownerDocument||g)&&v.push(s.defaultView||s.parentWindow||e)}for(r=0;(a=v[r++])&&!t.isPropagationStopped();)f=a,t.type=1<r?l:h.bindType||y,(d=(Q.get(a,"events")||Object.create(null))[t.type]&&Q.get(a,"handle"))&&d.apply(a,n),(d=c&&a[c])&&d.apply&&V(a)&&(t.result=d.apply(a,n),!1===t.result&&t.preventDefault());return t.type=y,i||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(v.pop(),n)||!V(o)||c&&p(o[y])&&!m(o)&&((s=o[c])&&(o[c]=null),w.event.triggered=y,t.isPropagationStopped()&&f.addEventListener(y,wt),o[y](),t.isPropagationStopped()&&f.removeEventListener(y,wt),w.event.triggered=void 0,s&&(o[c]=s)),t.result}},simulate:function(e,t,n){var o=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(o,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each((function(){w.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),f.focusin||w.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var o=this.ownerDocument||this.document||this,i=Q.access(o,t);i||o.addEventListener(e,n,!0),Q.access(o,t,(i||0)+1)},teardown:function(){var o=this.ownerDocument||this.document||this,i=Q.access(o,t)-1;i?Q.access(o,t,i):(o.removeEventListener(e,n,!0),Q.remove(o,t))}}}));var xt=e.location,Ct={guid:Date.now()},Tt=/\?/;w.parseXML=function(t){var n,o;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(t){}return o=n&&n.getElementsByTagName("parsererror")[0],n&&!o||w.error("Invalid XML: "+(o?w.map(o.childNodes,(function(e){return e.textContent})).join("\n"):t)),n};var St=/\[\]$/,Et=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function It(e,t,n,o){var i;if(Array.isArray(t))w.each(t,(function(t,i){n||St.test(e)?o(e,i):It(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,o)}));else if(n||"object"!==b(t))o(e,t);else for(i in t)It(e+"["+i+"]",t[i],n,o)}w.param=function(e,t){var n,o=[],i=function(e,t){var n=p(t)?t():t;o[o.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,(function(){i(this.name,this.value)}));else for(n in e)It(n,e[n],t,i);return o.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!he.test(e))})).map((function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,(function(e){return{name:t.name,value:e.replace(Et,"\r\n")}})):{name:t.name,value:n.replace(Et,"\r\n")}})).get()}});var $t=/%20/g,Dt=/#.*$/,Lt=/([?&])_=[^&]*/,Rt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:GET|HEAD)$/,Ot=/^\/\//,Ft={},Ht={},Mt="*/".concat("*"),jt=g.createElement("a");function Bt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var o,i=0,r=t.toLowerCase().match(O)||[];if(p(n))for(;o=r[i++];)"+"===o[0]?(o=o.slice(1)||"*",(e[o]=e[o]||[]).unshift(n)):(e[o]=e[o]||[]).push(n)}}function zt(e,t,n,o){var i={},r=e===Ht;function a(s){var l;return i[s]=!0,w.each(e[s]||[],(function(e,s){var c=s(t,n,o);return"string"!=typeof c||r||i[c]?r?!(l=c):void 0:(t.dataTypes.unshift(c),a(c),!1)})),l}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Ut(e,t){var n,o,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:o||(o={}))[n]=t[n]);return o&&w.extend(!0,e,o),e}jt.href=xt.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Mt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ut(Ut(e,w.ajaxSettings),t):Ut(w.ajaxSettings,e)},ajaxPrefilter:Bt(Ft),ajaxTransport:Bt(Ht),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var o,i,r,a,s,l,c,u,d,h,f=w.ajaxSetup({},n),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?w(p):w.event,v=w.Deferred(),y=w.Callbacks("once memory"),b=f.statusCode||{},k={},x={},C="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a)for(a={};t=Rt.exec(r);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?r:null},setRequestHeader:function(e,t){return null==c&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,k[e]=t),this},overrideMimeType:function(e){return null==c&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)T.always(e[T.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||C;return o&&o.abort(t),S(0,t),this}};if(v.promise(T),f.url=((t||f.url||xt.href)+"").replace(Ot,xt.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(O)||[""],null==f.crossDomain){l=g.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=jt.protocol+"//"+jt.host!=l.protocol+"//"+l.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=w.param(f.data,f.traditional)),zt(Ft,f,n,T),c)return T;for(d in(u=w.event&&f.global)&&0==w.active++&&w.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Pt.test(f.type),i=f.url.replace(Dt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace($t,"+")):(h=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Tt.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Lt,"$1"),h=(Tt.test(i)?"&":"?")+"_="+Ct.guid+++h),f.url=i+h),f.ifModified&&(w.lastModified[i]&&T.setRequestHeader("If-Modified-Since",w.lastModified[i]),w.etag[i]&&T.setRequestHeader("If-None-Match",w.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Mt+"; q=0.01":""):f.accepts["*"]),f.headers)T.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,T,f)||c))return T.abort();if(C="abort",y.add(f.complete),T.done(f.success),T.fail(f.error),o=zt(Ht,f,n,T)){if(T.readyState=1,u&&m.trigger("ajaxSend",[T,f]),c)return T;f.async&&0<f.timeout&&(s=e.setTimeout((function(){T.abort("timeout")}),f.timeout));try{c=!1,o.send(k,S)}catch(t){if(c)throw t;S(-1,t)}}else S(-1,"No Transport");function S(t,n,a,l){var d,h,g,k,x,C=n;c||(c=!0,s&&e.clearTimeout(s),o=void 0,r=l||"",T.readyState=0<t?4:0,d=200<=t&&t<300||304===t,a&&(k=function(e,t,n){for(var o,i,r,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===o&&(o=e.mimeType||t.getResponseHeader("Content-Type"));if(o)for(i in s)if(s[i]&&s[i].test(o)){l.unshift(i);break}if(l[0]in n)r=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){r=i;break}a||(a=i)}r=r||a}if(r)return r!==l[0]&&l.unshift(r),n[r]}(f,T,a)),!d&&-1<w.inArray("script",f.dataTypes)&&w.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),k=function(e,t,n,o){var i,r,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(r=u.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!l&&o&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(a=c[l+" "+r]||c["* "+r]))for(i in c)if((s=i.split(" "))[1]===r&&(a=c[l+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(r=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}(f,k,T,d),d?(f.ifModified&&((x=T.getResponseHeader("Last-Modified"))&&(w.lastModified[i]=x),(x=T.getResponseHeader("etag"))&&(w.etag[i]=x)),204===t||"HEAD"===f.type?C="nocontent":304===t?C="notmodified":(C=k.state,h=k.data,d=!(g=k.error))):(g=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",d?v.resolveWith(p,[h,C,T]):v.rejectWith(p,[T,C,g]),T.statusCode(b),b=void 0,u&&m.trigger(d?"ajaxSuccess":"ajaxError",[T,f,d?h:g]),y.fireWith(p,[T,C]),u&&(m.trigger("ajaxComplete",[T,f]),--w.active||w.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],(function(e,t){w[t]=function(e,n,o,i){return p(n)&&(i=i||o,o=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:o},w.isPlainObject(e)&&e))}})),w.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),w._evalUrl=function(e,t,n){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){w.globalEval(e,t,n)}})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(p(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return p(e)?this.each((function(t){w(this).wrapInner(e.call(this,t))})):this.each((function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=p(e);return this.each((function(n){w(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){w(this).replaceWith(this.childNodes)})),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Wt={0:200,1223:204},_t=w.ajaxSettings.xhr();f.cors=!!_t&&"withCredentials"in _t,f.ajax=_t=!!_t,w.ajaxTransport((function(t){var n,o;if(f.cors||_t&&!t.crossDomain)return{send:function(i,r){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=o=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?r(0,"error"):r(s.status,s.statusText):r(Wt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),o=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=o:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout((function(){n&&o()}))},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(i){if(n)throw i}},abort:function(){n&&n()}}})),w.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),w.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(o,i){t=w("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),g.head.appendChild(t[0])},abort:function(){n&&n()}}}));var qt,Kt=[],Vt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||w.expando+"_"+Ct.guid++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",(function(t,n,o){var i,r,a,s=!1!==t.jsonp&&(Vt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=p(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Vt,"$1"+i):!1!==t.jsonp&&(t.url+=(Tt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||w.error(i+" was not called"),a[0]},t.dataTypes[0]="json",r=e[i],e[i]=function(){a=arguments},o.always((function(){void 0===r?w(e).removeProp(i):e[i]=r,t[i]&&(t.jsonpCallback=n.jsonpCallback,Kt.push(i)),a&&p(r)&&r(a[0]),a=r=void 0})),"script"})),f.createHTMLDocument=((qt=g.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===qt.childNodes.length),w.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(f.createHTMLDocument?((o=(t=g.implementation.createHTMLDocument("")).createElement("base")).href=g.location.href,t.head.appendChild(o)):t=g),r=!n&&[],(i=A.exec(e))?[t.createElement(i[1])]:(i=be([e],t,r),r&&r.length&&w(r).remove(),w.merge([],i.childNodes)));var o,i,r},w.fn.load=function(e,t,n){var o,i,r,a=this,s=e.indexOf(" ");return-1<s&&(o=gt(e.slice(s)),e=e.slice(0,s)),p(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&w.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){r=arguments,a.html(o?w("<div>").append(w.parseHTML(e)).find(o):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,r||[e.responseText,t,e])}))}),this},w.expr.pseudos.animated=function(e){return w.grep(w.timers,(function(t){return e===t.elem})).length},w.offset={setOffset:function(e,t,n){var o,i,r,a,s,l,c=w.css(e,"position"),u=w(e),d={};"static"===c&&(e.style.position="relative"),s=u.offset(),r=w.css(e,"top"),l=w.css(e,"left"),("absolute"===c||"fixed"===c)&&-1<(r+l).indexOf("auto")?(a=(o=u.position()).top,i=o.left):(a=parseFloat(r)||0,i=parseFloat(l)||0),p(t)&&(t=t.call(e,n,w.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):u.css(d)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){w.offset.setOffset(this,e,t)}));var t,n,o=this[0];return o?o.getClientRects().length?(t=o.getBoundingClientRect(),n=o.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,o=this[0],i={top:0,left:0};if("fixed"===w.css(o,"position"))t=o.getBoundingClientRect();else{for(t=this.offset(),n=o.ownerDocument,e=o.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position");)e=e.parentNode;e&&e!==o&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(o,"marginTop",!0),left:t.left-i.left-w.css(o,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===w.css(e,"position");)e=e.offsetParent;return e||oe}))}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;w.fn[e]=function(o){return U(this,(function(e,o,i){var r;if(m(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===i)return r?r[t]:e[o];r?r.scrollTo(n?r.pageXOffset:i,n?i:r.pageYOffset):e[o]=i}),e,o,arguments.length)}})),w.each(["top","left"],(function(e,t){w.cssHooks[t]=We(f.pixelPosition,(function(e,n){if(n)return n=Ue(e,t),Oe.test(n)?w(e).position()[t]+"px":n}))})),w.each({Height:"height",Width:"width"},(function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,o){w.fn[o]=function(i,r){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===r?"margin":"border");return U(this,(function(t,n,i){var r;return m(t)?0===o.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===i?w.css(t,n,s):w.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){w.fn[t]=function(e){return this.on(t,e)}})),w.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,o){return this.on(t,e,n,o)},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)}}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){w.fn[t]=function(e,n){return 0<arguments.length?this.on(t,null,e,n):this.trigger(t)}}));var Gt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;w.proxy=function(e,t){var n,o,r;if("string"==typeof t&&(n=e[t],t=e,e=n),p(e))return o=i.call(arguments,2),(r=function(){return e.apply(t||this,o.concat(i.call(arguments)))}).guid=e.guid=e.guid||w.guid++,r},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=N,w.isFunction=p,w.isWindow=m,w.camelCase=K,w.type=b,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},w.trim=function(e){return null==e?"":(e+"").replace(Gt,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return w}));var Qt=e.jQuery,Yt=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=Yt),t&&e.jQuery===w&&(e.jQuery=Qt),w},void 0===t&&(e.jQuery=e.$=w),w})),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=jQuery.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||3<t[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(),function(e){"use strict";e.fn.emulateTransitionEnd=function(t){var n=!1,o=this;return e(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||e(o).trigger(e.support.transition.end)}),t),this},e((function(){e.support.transition=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})}))}(jQuery),function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(t){var o=e(this),i=o.attr("data-target");i||(i=(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var r=e(document).find(i);function a(){r.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),r.length||(r=o.closest(".alert")),r.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(r.removeClass("in"),e.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",a).emulateTransitionEnd(n.TRANSITION_DURATION):a())};var o=e.fn.alert;e.fn.alert=function(t){return this.each((function(){var o=e(this),i=o.data("bs.alert");i||o.data("bs.alert",i=new n(this)),"string"==typeof t&&i[t].call(o)}))},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=o,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),function(e){"use strict";var t=function(n,o){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,o),this.isLoading=!1};function n(n){return this.each((function(){var o=e(this),i=o.data("bs.button"),r="object"==typeof n&&n;i||o.data("bs.button",i=new t(this,r)),"toggle"==n?i.toggle():n&&i.setState(n)}))}t.VERSION="3.4.1",t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(t){var n="disabled",o=this.$element,i=o.is("input")?"val":"html",r=o.data();t+="Text",null==r.resetText&&o.data("resetText",o[i]()),setTimeout(e.proxy((function(){o[i](null==r[t]?this.options[t]:r[t]),"loadingText"==t?(this.isLoading=!0,o.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,o.removeClass(n).removeAttr(n).prop(n,!1))}),this),0)},t.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var o=e.fn.button;e.fn.button=n,e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=o,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var o=e(t.target).closest(".btn");n.call(o,"toggle"),e(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),o.is("input,button")?o.trigger("focus"):o.find("input:visible,button:visible").first().trigger("focus"))})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))}))}(jQuery),function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};function n(n){return this.each((function(){var o=e(this),i=o.data("bs.carousel"),r=e.extend({},t.DEFAULTS,o.data(),"object"==typeof n&&n),a="string"==typeof n?n:r.slide;i||o.data("bs.carousel",i=new t(this,r)),"number"==typeof n?i.to(n):a?i[a]():r.interval&&i.pause().cycle()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=600,t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},t.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},t.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t);if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var o=(n+("prev"==e?-1:1))%this.$items.length;return this.$items.eq(o)},t.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){t.to(e)})):n==e?this.pause().cycle():this.slide(n<e?"next":"prev",this.$items.eq(e))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(!this.sliding)return this.slide("next")},t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},t.prototype.slide=function(n,o){var i=this.$element.find(".item.active"),r=o||this.getItemForDirection(n,i),a=this.interval,s="next"==n?"left":"right",l=this;if(r.hasClass("active"))return this.sliding=!1;var c=r[0],u=e.Event("slide.bs.carousel",{relatedTarget:c,direction:s});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=e(this.$indicators.children()[this.getItemIndex(r)]);d&&d.addClass("active")}var h=e.Event("slid.bs.carousel",{relatedTarget:c,direction:s});return e.support.transition&&this.$element.hasClass("slide")?(r.addClass(n),"object"==typeof r&&r.length&&r[0].offsetWidth,i.addClass(s),r.addClass(s),i.one("bsTransitionEnd",(function(){r.removeClass([n,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),l.sliding=!1,setTimeout((function(){l.$element.trigger(h)}),0)})).emulateTransitionEnd(t.TRANSITION_DURATION)):(i.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(h)),a&&this.cycle(),this}};var o=e.fn.carousel;e.fn.carousel=n,e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=o,this};var i=function(t){var o=e(this),i=o.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var r=o.attr("data-target")||i,a=e(document).find(r);if(a.hasClass("carousel")){var s=e.extend({},a.data(),o.data()),l=o.attr("data-slide-to");l&&(s.interval=!1),n.call(a,s),l&&a.data("bs.carousel").to(l),t.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),e(window).on("load",(function(){e('[data-ride="carousel"]').each((function(){var t=e(this);n.call(t,t.data())}))}))}(jQuery),function(e){"use strict";var t=function(n,o){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,o),this.$trigger=e('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var n,o=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(document).find(o)}function o(n){return this.each((function(){var o=e(this),i=o.data("bs.collapse"),r=e.extend({},t.DEFAULTS,o.data(),"object"==typeof n&&n);!i&&r.toggle&&/show|hide/.test(n)&&(r.toggle=!1),i||o.data("bs.collapse",i=new t(this,r)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=350,t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var n,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(n=i.data("bs.collapse"))&&n.transitioning)){var r=e.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){i&&i.length&&(o.call(i,"hide"),n||i.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var l=e.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",e.proxy(s,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[a](this.$element[0][l])}}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var n=e.Event("hide.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){var o=this.dimension();this.$element[o](this.$element[o]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return i.call(this);this.$element[o](0).one("bsTransitionEnd",e.proxy(i,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},t.prototype.getParent=function(){return e(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy((function(t,o){var i=e(o);this.addAriaAndCollapsedClass(n(i),i)}),this)).end()},t.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var i=e.fn.collapse;e.fn.collapse=o,e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=i,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){var i=e(this);i.attr("data-target")||t.preventDefault();var r=n(i),a=r.data("bs.collapse")?"toggle":i.data();o.call(r,a)}))}(jQuery),function(e){"use strict";var t='[data-toggle="dropdown"]',n=function(t){e(t).on("click.bs.dropdown",this.toggle)};function o(t){var n=t.attr("data-target");n||(n=(n=t.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var o="#"!==n?e(document).find(n):null;return o&&o.length?o:t.parent()}function i(n){n&&3===n.which||(e(".dropdown-backdrop").remove(),e(t).each((function(){var t=e(this),i=o(t),r={relatedTarget:this};i.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&e.contains(i[0],n.target)||(i.trigger(n=e.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(t.attr("aria-expanded","false"),i.removeClass("open").trigger(e.Event("hidden.bs.dropdown",r)))))})))}n.VERSION="3.4.1",n.prototype.toggle=function(t){var n=e(this);if(!n.is(".disabled, :disabled")){var r=o(n),a=r.hasClass("open");if(i(),!a){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",i);var s={relatedTarget:this};if(r.trigger(t=e.Event("show.bs.dropdown",s)),t.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(e.Event("shown.bs.dropdown",s))}return!1}},n.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=e(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var r=o(i),a=r.hasClass("open");if(!a&&27!=n.which||a&&27==n.which)return 27==n.which&&r.find(t).trigger("focus"),i.trigger("click");var s=r.find(".dropdown-menu li:not(.disabled):visible a");if(s.length){var l=s.index(n.target);38==n.which&&0<l&&l--,40==n.which&&l<s.length-1&&l++,~l||(l=0),s.eq(l).trigger("focus")}}}};var r=e.fn.dropdown;e.fn.dropdown=function(t){return this.each((function(){var o=e(this),i=o.data("bs.dropdown");i||o.data("bs.dropdown",i=new n(this)),"string"==typeof t&&i[t].call(o)}))},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=r,this},e(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",(function(e){e.stopPropagation()})).on("click.bs.dropdown.data-api",t,n.prototype.toggle).on("keydown.bs.dropdown.data-api",t,n.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",n.prototype.keydown)}(jQuery),function(e){"use strict";var t=function(t,n){this.options=n,this.$body=e(document.body),this.$element=e(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,e.proxy((function(){this.$element.trigger("loaded.bs.modal")}),this))};function n(n,o){return this.each((function(){var i=e(this),r=i.data("bs.modal"),a=e.extend({},t.DEFAULTS,i.data(),"object"==typeof n&&n);r||i.data("bs.modal",r=new t(this,a)),"string"==typeof n?r[n](o):a.show&&r.show(o)}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=300,t.BACKDROP_TRANSITION_DURATION=150,t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},t.prototype.show=function(n){var o=this,i=e.Event("show.bs.modal",{relatedTarget:n});this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",(function(){o.$element.one("mouseup.dismiss.bs.modal",(function(t){e(t.target).is(o.$element)&&(o.ignoreBackdropClick=!0)}))})),this.backdrop((function(){var i=e.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),i&&o.$element[0].offsetWidth,o.$element.addClass("in"),o.enforceFocus();var r=e.Event("shown.bs.modal",{relatedTarget:n});i?o.$dialog.one("bsTransitionEnd",(function(){o.$element.trigger("focus").trigger(r)})).emulateTransitionEnd(t.TRANSITION_DURATION):o.$element.trigger("focus").trigger(r)})))},t.prototype.hide=function(n){n&&n.preventDefault(),n=e.Event("hide.bs.modal"),this.$element.trigger(n),this.isShown&&!n.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",e.proxy(this.hideModal,this)).emulateTransitionEnd(t.TRANSITION_DURATION):this.hideModal())},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy((function(e){document===e.target||this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")}),this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",e.proxy((function(e){27==e.which&&this.hide()}),this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},t.prototype.resize=function(){this.isShown?e(window).on("resize.bs.modal",e.proxy(this.handleUpdate,this)):e(window).off("resize.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop((function(){e.$body.removeClass("modal-open"),e.resetAdjustments(),e.resetScrollbar(),e.$element.trigger("hidden.bs.modal")}))},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(n){var o=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=e.support.transition&&i;if(this.$backdrop=e(document.createElement("div")).addClass("modal-backdrop "+i).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",e.proxy((function(e){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())}),this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!n)return;r?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):n()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var a=function(){o.removeBackdrop(),n&&n()};e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",a).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):a()}else n&&n()},t.prototype.handleUpdate=function(){this.adjustDialog()},t.prototype.adjustDialog=function(){var e=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},t.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth<e,this.scrollbarWidth=this.measureScrollbar()},t.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",t+n),e(this.fixedContent).each((function(t,o){var i=o.style.paddingRight,r=e(o).css("padding-right");e(o).data("padding-right",i).css("padding-right",parseFloat(r)+n+"px")})))},t.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),e(this.fixedContent).each((function(t,n){var o=e(n).data("padding-right");e(n).removeData("padding-right"),n.style.paddingRight=o||""}))},t.prototype.measureScrollbar=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",this.$body.append(e);var t=e.offsetWidth-e.clientWidth;return this.$body[0].removeChild(e),t};var o=e.fn.modal;e.fn.modal=n,e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=o,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(t){var o=e(this),i=o.attr("href"),r=o.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,""),a=e(document).find(r),s=a.data("bs.modal")?"toggle":e.extend({remote:!/#/.test(i)&&i},a.data(),o.data());o.is("a")&&t.preventDefault(),a.one("show.bs.modal",(function(e){e.isDefaultPrevented()||a.one("hidden.bs.modal",(function(){o.is(":visible")&&o.trigger("focus")}))})),n.call(a,s,this)}))}(jQuery),function(e){"use strict";var t=["sanitize","whiteList","sanitizeFn"],n=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],o=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,i=/^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 r(t,r){var a=t.nodeName.toLowerCase();if(-1!==e.inArray(a,r))return-1===e.inArray(a,n)||Boolean(t.nodeValue.match(o)||t.nodeValue.match(i));for(var s=e(r).filter((function(e,t){return t instanceof RegExp})),l=0,c=s.length;l<c;l++)if(a.match(s[l]))return!0;return!1}function a(t,n,o){if(0===t.length)return t;if(o&&"function"==typeof o)return o(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;var i=document.implementation.createHTMLDocument("sanitization");i.body.innerHTML=t;for(var a=e.map(n,(function(e,t){return t})),s=e(i.body).find("*"),l=0,c=s.length;l<c;l++){var u=s[l],d=u.nodeName.toLowerCase();if(-1!==e.inArray(d,a))for(var h=e.map(u.attributes,(function(e){return e})),f=[].concat(n["*"]||[],n[d]||[]),p=0,m=h.length;p<m;p++)r(h[p],f)||u.removeAttribute(h[p].nodeName);else u.parentNode.removeChild(u)}return i.body.innerHTML}var s=function(e,t){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",e,t)};s.VERSION="3.4.1",s.TRANSITION_DURATION=150,s.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}},s.prototype.init=function(t,n,o){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&e(document).find(e.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),r=i.length;r--;){var a=i[r];if("click"==a)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},s.prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.getOptions=function(n){var o=this.$element.data();for(var i in o)o.hasOwnProperty(i)&&-1!==e.inArray(i,t)&&delete o[i];return(n=e.extend({},this.getDefaults(),o,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=a(n.template,n.whiteList,n.sanitizeFn)),n},s.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,(function(e,o){n[e]!=o&&(t[e]=o)})),t},s.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},s.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},s.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},s.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var n=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!n)return;var o=this,i=this.tip(),r=this.getUID(this.type);this.setContent(),i.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&i.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(a);c&&(a=a.replace(l,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?i.appendTo(e(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var u=this.getPosition(),d=i[0].offsetWidth,h=i[0].offsetHeight;if(c){var f=a,p=this.getPosition(this.$viewport);a="bottom"==a&&u.bottom+h>p.bottom?"top":"top"==a&&u.top-h<p.top?"bottom":"right"==a&&u.right+d>p.width?"left":"left"==a&&u.left-d<p.left?"right":a,i.removeClass(f).addClass(a)}var m=this.getCalculatedOffset(a,u,d,h);this.applyPlacement(m,a);var g=function(){var e=o.hoverState;o.$element.trigger("shown.bs."+o.type),o.hoverState=null,"out"==e&&o.leave(o)};e.support.transition&&this.$tip.hasClass("fade")?i.one("bsTransitionEnd",g).emulateTransitionEnd(s.TRANSITION_DURATION):g()}},s.prototype.applyPlacement=function(t,n){var o=this.tip(),i=o[0].offsetWidth,r=o[0].offsetHeight,a=parseInt(o.css("margin-top"),10),s=parseInt(o.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(s)&&(s=0),t.top+=a,t.left+=s,e.offset.setOffset(o[0],e.extend({using:function(e){o.css({top:Math.round(e.top),left:Math.round(e.left)})}},t),0),o.addClass("in");var l=o[0].offsetWidth,c=o[0].offsetHeight;"top"==n&&c!=r&&(t.top=t.top+r-c);var u=this.getViewportAdjustedDelta(n,t,l,c);u.left?t.left+=u.left:t.top+=u.top;var d=/top|bottom/.test(n),h=d?2*u.left-i+l:2*u.top-r+c,f=d?"offsetWidth":"offsetHeight";o.offset(t),this.replaceArrow(h,o[0][f],d)},s.prototype.replaceArrow=function(e,t,n){this.arrow().css(n?"left":"top",50*(1-e/t)+"%").css(n?"top":"left","")},s.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();this.options.html?(this.options.sanitize&&(t=a(t,this.options.whiteList,this.options.sanitizeFn)),e.find(".tooltip-inner").html(t)):e.find(".tooltip-inner").text(t),e.removeClass("fade in top bottom left right")},s.prototype.hide=function(t){var n=this,o=e(this.$tip),i=e.Event("hide.bs."+this.type);function r(){"in"!=n.hoverState&&o.detach(),n.$element&&n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),t&&t()}if(this.$element.trigger(i),!i.isDefaultPrevented())return o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",r).emulateTransitionEnd(s.TRANSITION_DURATION):r(),this.hoverState=null,this},s.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},s.prototype.hasContent=function(){return this.getTitle()},s.prototype.getPosition=function(t){var n=(t=t||this.$element)[0],o="BODY"==n.tagName,i=n.getBoundingClientRect();null==i.width&&(i=e.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var r=window.SVGElement&&n instanceof window.SVGElement,a=o?{top:0,left:0}:r?null:t.offset(),s={scroll:o?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},l=o?{width:e(window).width(),height:e(window).height()}:null;return e.extend({},i,s,l,a)},s.prototype.getCalculatedOffset=function(e,t,n,o){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-o,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-o/2,left:t.left-n}:{top:t.top+t.height/2-o/2,left:t.left+t.width}},s.prototype.getViewportAdjustedDelta=function(e,t,n,o){var i={top:0,left:0};if(!this.$viewport)return i;var r=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(e)){var s=t.top-r-a.scroll,l=t.top+r-a.scroll+o;s<a.top?i.top=a.top-s:l>a.top+a.height&&(i.top=a.top+a.height-l)}else{var c=t.left-r,u=t.left+r+n;c<a.left?i.left=a.left-c:u>a.right&&(i.left=a.left+a.width-u)}return i},s.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},s.prototype.getUID=function(e){for(;e+=~~(1e6*Math.random()),document.getElementById(e););return e},s.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},s.prototype.enable=function(){this.enabled=!0},s.prototype.disable=function(){this.enabled=!1},s.prototype.toggleEnabled=function(){this.enabled=!this.enabled},s.prototype.toggle=function(t){var n=this;t&&((n=e(t.currentTarget).data("bs."+this.type))||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},s.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide((function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null}))},s.prototype.sanitizeHtml=function(e){return a(e,this.options.whiteList,this.options.sanitizeFn)};var l=e.fn.tooltip;e.fn.tooltip=function(t){return this.each((function(){var n=e(this),o=n.data("bs.tooltip"),i="object"==typeof t&&t;!o&&/destroy|hide/.test(t)||(o||n.data("bs.tooltip",o=new s(this,i)),"string"==typeof t&&o[t]())}))},e.fn.tooltip.Constructor=s,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=l,this}}(jQuery),function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.4.1",t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype)).constructor=t).prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();if(this.options.html){var o=typeof n;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===o&&(n=this.sanitizeHtml(n))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===o?"html":"append"](n)}else e.find(".popover-title").text(t),e.find(".popover-content").children().detach().end().text(n);e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=e.fn.popover;e.fn.popover=function(n){return this.each((function(){var o=e(this),i=o.data("bs.popover"),r="object"==typeof n&&n;!i&&/destroy|hide/.test(n)||(i||o.data("bs.popover",i=new t(this,r)),"string"==typeof n&&i[n]())}))},e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(jQuery),function(e){"use strict";function t(n,o){this.$body=e(document.body),this.$scrollElement=e(n).is(document.body)?e(window):e(n),this.options=e.extend({},t.DEFAULTS,o),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each((function(){var o=e(this),i=o.data("bs.scrollspy"),r="object"==typeof n&&n;i||o.data("bs.scrollspy",i=new t(this,r)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",o=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",o=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var t=e(this),i=t.data("target")||t.attr("href"),r=/^#./.test(i)&&e(i);return r&&r.length&&r.is(":visible")&&[[r[n]().top+o,i]]||null})).sort((function(e,t){return e[0]-t[0]})).each((function(){t.offsets.push(this[0]),t.targets.push(this[1])}))},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),o=this.options.offset+n-this.$scrollElement.height(),i=this.offsets,r=this.targets,a=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),o<=t)return a!=(e=r[r.length-1])&&this.activate(e);if(a&&t<i[0])return this.activeTarget=null,this.clear();for(e=i.length;e--;)a!=r[e]&&t>=i[e]&&(void 0===i[e+1]||t<i[e+1])&&this.activate(r[e])},t.prototype.activate=function(t){this.activeTarget=t,this.clear();var n=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',o=e(n).parents("li").addClass("active");o.parent(".dropdown-menu").length&&(o=o.closest("li.dropdown").addClass("active")),o.trigger("activate.bs.scrollspy")},t.prototype.clear=function(){e(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var o=e.fn.scrollspy;e.fn.scrollspy=n,e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=o,this},e(window).on("load.bs.scrollspy.data-api",(function(){e('[data-spy="scroll"]').each((function(){var t=e(this);n.call(t,t.data())}))}))}(jQuery),function(e){"use strict";var t=function(t){this.element=e(t)};function n(n){return this.each((function(){var o=e(this),i=o.data("bs.tab");i||o.data("bs.tab",i=new t(this)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=150,t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),o=t.data("target");if(o||(o=(o=t.attr("href"))&&o.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var i=n.find(".active:last a"),r=e.Event("hide.bs.tab",{relatedTarget:t[0]}),a=e.Event("show.bs.tab",{relatedTarget:i[0]});if(i.trigger(r),t.trigger(a),!a.isDefaultPrevented()&&!r.isDefaultPrevented()){var s=e(document).find(o);this.activate(t.closest("li"),n),this.activate(s,s.parent(),(function(){i.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:i[0]})}))}}},t.prototype.activate=function(n,o,i){var r=o.find("> .active"),a=i&&e.support.transition&&(r.length&&r.hasClass("fade")||!!o.find("> .fade").length);function s(){r.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),n.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(n[0].offsetWidth,n.addClass("in")):n.removeClass("fade"),n.parent(".dropdown-menu").length&&n.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}r.length&&a?r.one("bsTransitionEnd",s).emulateTransitionEnd(t.TRANSITION_DURATION):s(),r.removeClass("in")};var o=e.fn.tab;e.fn.tab=n,e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=o,this};var i=function(t){t.preventDefault(),n.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(e){"use strict";var t=function(n,o){this.options=e.extend({},t.DEFAULTS,o);var i=this.options.target===t.DEFAULTS.target?e(this.options.target):e(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var o=e(this),i=o.data("bs.affix"),r="object"==typeof n&&n;i||o.data("bs.affix",i=new t(this,r)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0,target:window},t.prototype.getState=function(e,t,n,o){var i=this.$target.scrollTop(),r=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return i<n&&"top";if("bottom"==this.affixed)return null!=n?!(i+this.unpin<=r.top)&&"bottom":!(i+a<=e-o)&&"bottom";var s=null==this.affixed,l=s?i:r.top;return null!=n&&i<=n?"top":null!=o&&e-o<=l+(s?a:t)&&"bottom"},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var e=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),o=this.options.offset,i=o.top,r=o.bottom,a=Math.max(e(document).height(),e(document.body).height());"object"!=typeof o&&(r=i=o),"function"==typeof i&&(i=o.top(this.$element)),"function"==typeof r&&(r=o.bottom(this.$element));var s=this.getState(a,n,i,r);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var l="affix"+(s?"-"+s:""),c=e.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:a-n-r})}};var o=e.fn.affix;e.fn.affix=n,e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=o,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var t=e(this),o=t.data();o.offset=o.offset||{},null!=o.offsetBottom&&(o.offset.bottom=o.offsetBottom),null!=o.offsetTop&&(o.offset.top=o.offsetTop),n.call(t,o)}))}))}(jQuery),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("jQuery"));else if("function"==typeof define&&define.amd)define(["jQuery"],t);else{var n="object"==typeof exports?t(require("jQuery")):t(e.jQuery);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,(function(e){return(()=>{"use strict";var t={9770:(e,t,n)=>{var o=n(1145),i=n.n(o);i().summernote=i().summernote||{lang:{}},i().extend(i().summernote.lang,{"en-US":{font:{bold:"Bold",italic:"Italic",underline:"Underline",clear:"Remove Font Style",height:"Line Height",name:"Font Family",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript",size:"Font Size",sizeunit:"Font Size Unit"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize full",resizeHalf:"Resize half",resizeQuarter:"Resize quarter",resizeNone:"Original size",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Remove float",shapeRounded:"Shape: Rounded",shapeCircle:"Shape: Circle",shapeThumbnail:"Shape: Thumbnail",shapeNone:"Shape: None",dragImageHere:"Drag image or text here",dropImage:"Drop image or Text",selectFromFiles:"Select from files",maximumFileSize:"Maximum file size",maximumFileSizeError:"Maximum file size exceeded.",url:"Image URL",remove:"Remove Image",original:"Original"},video:{video:"Video",videoLink:"Video Link",insert:"Insert Video",url:"Video URL",providers:"(YouTube, Google Drive, Vimeo, Vine, Instagram, DailyMotion, Youku, Peertube)"},link:{link:"Link",insert:"Insert Link",unlink:"Unlink",edit:"Edit",textToDisplay:"Text to display",url:"To what URL should this link go?",openInNewWindow:"Open in new window",useProtocol:"Use default protocol"},table:{table:"Table",addRowAbove:"Add row above",addRowBelow:"Add row below",addColLeft:"Add column left",addColRight:"Add column right",delRow:"Delete row",delCol:"Delete column",delTable:"Delete table"},hr:{insert:"Insert Horizontal Rule"},style:{style:"Style",p:"Normal",blockquote:"Quote",pre:"Code",h1:"Header 1",h2:"Header 2",h3:"Header 3",h4:"Header 4",h5:"Header 5",h6:"Header 6"},lists:{unordered:"Unordered list",ordered:"Ordered list"},options:{help:"Help",fullscreen:"Full Screen",codeview:"Code View"},paragraph:{paragraph:"Paragraph",outdent:"Outdent",indent:"Indent",left:"Align left",center:"Align center",right:"Align right",justify:"Justify full"},color:{recent:"Recent Color",more:"More Color",background:"Background Color",foreground:"Text Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default",cpSelect:"Select"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style",extraKeys:"Extra keys"},help:{escape:"Escape",insertParagraph:"Insert Paragraph",undo:"Undo the last command",redo:"Redo the last command",tab:"Tab",untab:"Untab",bold:"Set a bold style",italic:"Set a italic style",underline:"Set a underline style",strikethrough:"Set a strikethrough style",removeFormat:"Clean a style",justifyLeft:"Set left align",justifyCenter:"Set center align",justifyRight:"Set right align",justifyFull:"Set full align",insertUnorderedList:"Toggle unordered list",insertOrderedList:"Toggle ordered list",outdent:"Outdent on current paragraph",indent:"Indent on current paragraph",formatPara:"Change current block's format as a paragraph(P tag)",formatH1:"Change current block's format as H1",formatH2:"Change current block's format as H2",formatH3:"Change current block's format as H3",formatH4:"Change current block's format as H4",formatH5:"Change current block's format as H5",formatH6:"Change current block's format as H6",insertHorizontalRule:"Insert horizontal rule","linkDialog.show":"Show Link Dialog"},history:{undo:"Undo",redo:"Redo"},specialChar:{specialChar:"SPECIAL CHARACTERS",select:"Select Special characters"},output:{noSelection:"No Selection Made!"}}})},1145:t=>{t.exports=e}},n={};function o(e){var i=n[e];if(void 0!==i)return i.exports;var r=n[e]={exports:{}};return t[e](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{o.r(i);var e=o(1145),t=o.n(e),n=(o(9770),["sans-serif","serif","monospace","cursive","fantasy"]);function r(e){return-1===t().inArray(e.toLowerCase(),n)?"'".concat(e,"'"):e}var a,s=navigator.userAgent,l=/MSIE|Trident/i.test(s);if(l){var c=/MSIE (\d+[.]\d+)/.exec(s);c&&(a=parseFloat(c[1])),(c=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(s))&&(a=parseFloat(c[1]))}var u=/Edge\/\d+/.test(s),d="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,h=l?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input";const f={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:l,isEdge:u,isFF:!u&&/firefox/i.test(s),isPhantom:/PhantomJS/i.test(s),isWebkit:!u&&/webkit/i.test(s),isChrome:!u&&/chrome/i.test(s),isSafari:!u&&/safari/i.test(s)&&!/chrome/i.test(s),browserVersion:a,isSupportTouch:d,isFontInstalled:function(e){var t="Comic Sans MS"===e?"Courier New":"Comic Sans MS",n="mmmmmmmmmmwwwww",o=document.createElement("canvas").getContext("2d");o.font="200px '"+t+"'";var i=o.measureText(n).width;return o.font="200px "+r(e)+', "'+t+'"',i!==o.measureText(n).width},isW3CRangeSupport:!!document.createRange,inputEventName:h,genericFontFamilies:n,validFontName:r};var p=0;const m={eq:function(e){return function(t){return e===t}},eq2:function(e,t){return e===t},peq2:function(e){return function(t,n){return t[e]===n[e]}},ok:function(){return!0},fail:function(){return!1},self:function(e){return e},not:function(e){return function(){return!e.apply(e,arguments)}},and:function(e,t){return function(n){return e(n)&&t(n)}},invoke:function(e,t){return function(){return e[t].apply(e,arguments)}},resetUniqueId:function(){p=0},uniqueId:function(e){var t=++p+"";return e?e+t:t},rect2bnd:function(e){var n=t()(document);return{top:e.top+n.scrollTop(),left:e.left+n.scrollLeft(),width:e.right-e.left,height:e.bottom-e.top}},invertObject:function(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[e[n]]=n);return t},namespaceToCamel:function(e,t){return(t=t||"")+e.split(".").map((function(e){return e.substring(0,1).toUpperCase()+e.substring(1)})).join("")},debounce:function(e,t,n){var o;return function(){var i=this,r=arguments,a=function(){o=null,n||e.apply(i,r)},s=n&&!o;clearTimeout(o),o=setTimeout(a,t),s&&e.apply(i,r)}},isValidUrl:function(e){return/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi.test(e)}};function g(e){return e[0]}function v(e){return e[e.length-1]}function y(e){return e.slice(1)}function b(e,t){if(e&&e.length&&t){if(e.indexOf)return-1!==e.indexOf(t);if(e.contains)return e.contains(t)}return!1}const k={head:g,last:v,initial:function(e){return e.slice(0,e.length-1)},tail:y,prev:function(e,t){if(e&&e.length&&t){var n=e.indexOf(t);return-1===n?null:e[n-1]}return null},next:function(e,t){if(e&&e.length&&t){var n=e.indexOf(t);return-1===n?null:e[n+1]}return null},find:function(e,t){for(var n=0,o=e.length;n<o;n++){var i=e[n];if(t(i))return i}},contains:b,all:function(e,t){for(var n=0,o=e.length;n<o;n++)if(!t(e[n]))return!1;return!0},sum:function(e,t){return t=t||m.self,e.reduce((function(e,n){return e+t(n)}),0)},from:function(e){for(var t=[],n=e.length,o=-1;++o<n;)t[o]=e[o];return t},isEmpty:function(e){return!e||!e.length},clusterBy:function(e,t){return e.length?y(e).reduce((function(e,n){var o=v(e);return t(v(o),n)?o[o.length]=n:e[e.length]=[n],e}),[[g(e)]]):[]},compact:function(e){for(var t=[],n=0,o=e.length;n<o;n++)e[n]&&t.push(e[n]);return t},unique:function(e){for(var t=[],n=0,o=e.length;n<o;n++)b(t,e[n])||t.push(e[n]);return t}};var w=String.fromCharCode(160);function x(e){return e&&t()(e).hasClass("note-editable")}function C(e){return e=e.toUpperCase(),function(t){return t&&t.nodeName.toUpperCase()===e}}function T(e){return e&&3===e.nodeType}function S(e){return e&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT|^AUDIO|^VIDEO|^EMBED/.test(e.nodeName.toUpperCase())}function E(e){return!x(e)&&e&&/^DIV|^P|^LI|^H[1-7]/.test(e.nodeName.toUpperCase())}var N=C("PRE"),A=C("LI"),I=C("TABLE"),$=C("DATA");function D(e){return!(F(e)||L(e)||R(e)||E(e)||I(e)||O(e)||$(e))}function L(e){return e&&/^UL|^OL/.test(e.nodeName.toUpperCase())}var R=C("HR");function P(e){return e&&/^TD|^TH/.test(e.nodeName.toUpperCase())}var O=C("BLOCKQUOTE");function F(e){return P(e)||O(e)||x(e)}var H=C("A"),M=C("BODY"),j=f.isMSIE&&f.browserVersion<11?" ":"<br>";function B(e){return T(e)?e.nodeValue.length:e?e.childNodes.length:0}function z(e){var t=B(e);return 0===t||!T(e)&&1===t&&e.innerHTML===j||!(!k.all(e.childNodes,T)||""!==e.innerHTML)}function U(e){S(e)||B(e)||(e.innerHTML=j)}function W(e,t){for(;e;){if(t(e))return e;if(x(e))break;e=e.parentNode}return null}function _(e,t){t=t||m.fail;var n=[];return W(e,(function(e){return x(e)||n.push(e),t(e)})),n}function q(e,t){t=t||m.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.nextSibling;return n}function K(e,t){var n=t.nextSibling,o=t.parentNode;return n?o.insertBefore(e,n):o.appendChild(e),e}function V(e,n){return t().each(n,(function(t,n){e.appendChild(n)})),e}function G(e){return 0===e.offset}function Q(e){return e.offset===B(e.node)}function Y(e){return G(e)||Q(e)}function X(e,t){for(;e&&e!==t;){if(0!==J(e))return!1;e=e.parentNode}return!0}function Z(e,t){if(!t)return!1;for(;e&&e!==t;){if(J(e)!==B(e.parentNode)-1)return!1;e=e.parentNode}return!0}function J(e){for(var t=0;e=e.previousSibling;)t+=1;return t}function ee(e){return!!(e&&e.childNodes&&e.childNodes.length)}function te(e,t){var n,o;if(0===e.offset){if(x(e.node))return null;n=e.node.parentNode,o=J(e.node)}else ee(e.node)?o=B(n=e.node.childNodes[e.offset-1]):(n=e.node,o=t?0:e.offset-1);return{node:n,offset:o}}function ne(e,t){var n,o;if(B(e.node)===e.offset){if(x(e.node))return null;var i=ie(e.node);i?(n=i,o=0):(n=e.node.parentNode,o=J(e.node)+1)}else ee(e.node)?(n=e.node.childNodes[e.offset],o=0):(n=e.node,o=t?B(e.node):e.offset+1);return{node:n,offset:o}}function oe(e,t){var n,o=0;if(z(e.node))return null===e.node?null:{node:n=e.node.nextSibling,offset:o=0};if(B(e.node)===e.offset){if(x(e.node))return null;n=e.node.parentNode,o=J(e.node)+1,x(n)&&(n=e.node.nextSibling,o=0)}else if(ee(e.node)){if(o=0,z(n=e.node.childNodes[e.offset]))return z(e.node.nextSibling)?null:{node:e.node.nextSibling,offset:o}}else if(n=e.node,o=t?B(e.node):e.offset+1,z(n))return null;return{node:n,offset:o}}function ie(e){if(e.nextSibling&&e.parent===e.nextSibling.parent)return T(e.nextSibling)?e.nextSibling:ie(e.nextSibling)}function re(e,t){return e.node===t.node&&e.offset===t.offset}function ae(e,t){var n=t&&t.isSkipPaddingBlankHTML,o=t&&t.isNotSplitEdgePoint,i=t&&t.isDiscardEmptySplits;if(i&&(n=!0),Y(e)&&(T(e.node)||o)){if(G(e))return e.node;if(Q(e))return e.node.nextSibling}if(T(e.node))return e.node.splitText(e.offset);var r=e.node.childNodes[e.offset],a=K(e.node.cloneNode(!1),e.node);return V(a,q(r)),n||(U(e.node),U(a)),i&&(z(e.node)&&ce(e.node),z(a))?(ce(a),e.node.nextSibling):a}function se(e,t,n){var o=_(t.node,m.eq(e));return o.length?1===o.length?ae(t,n):o.reduce((function(e,o){return e===t.node&&(e=ae(t,n)),ae({node:o,offset:e?J(e):B(o)},n)})):null}function le(e){return document.createElement(e)}function ce(e,t){if(e&&e.parentNode){if(e.removeNode)return e.removeNode(t);var n=e.parentNode;if(!t){for(var o=[],i=0,r=e.childNodes.length;i<r;i++)o.push(e.childNodes[i]);for(var a=0,s=o.length;a<s;a++)n.insertBefore(o[a],e)}n.removeChild(e)}}var ue=C("TEXTAREA");function de(e,t){var n=ue(e[0])?e.val():e.html();return t?n.replace(/[\n\r]/g,""):n}const he={NBSP_CHAR:w,ZERO_WIDTH_NBSP_CHAR:"\ufeff",blank:j,emptyPara:"<p>".concat(j,"</p>"),makePredByNodeName:C,isEditable:x,isControlSizing:function(e){return e&&t()(e).hasClass("note-control-sizing")},isText:T,isElement:function(e){return e&&1===e.nodeType},isVoid:S,isPara:E,isPurePara:function(e){return E(e)&&!A(e)},isHeading:function(e){return e&&/^H[1-7]/.test(e.nodeName.toUpperCase())},isInline:D,isBlock:m.not(D),isBodyInline:function(e){return D(e)&&!W(e,E)},isBody:M,isParaInline:function(e){return D(e)&&!!W(e,E)},isPre:N,isList:L,isTable:I,isData:$,isCell:P,isBlockquote:O,isBodyContainer:F,isAnchor:H,isDiv:C("DIV"),isLi:A,isBR:C("BR"),isSpan:C("SPAN"),isB:C("B"),isU:C("U"),isS:C("S"),isI:C("I"),isImg:C("IMG"),isTextarea:ue,deepestChildIsEmpty:function(e){do{if(null===e.firstElementChild||""===e.firstElementChild.innerHTML)break}while(e=e.firstElementChild);return z(e)},isEmpty:z,isEmptyAnchor:m.and(H,z),isClosestSibling:function(e,t){return e.nextSibling===t||e.previousSibling===t},withClosestSiblings:function(e,t){t=t||m.ok;var n=[];return e.previousSibling&&t(e.previousSibling)&&n.push(e.previousSibling),n.push(e),e.nextSibling&&t(e.nextSibling)&&n.push(e.nextSibling),n},nodeLength:B,isLeftEdgePoint:G,isRightEdgePoint:Q,isEdgePoint:Y,isLeftEdgeOf:X,isRightEdgeOf:Z,isLeftEdgePointOf:function(e,t){return G(e)&&X(e.node,t)},isRightEdgePointOf:function(e,t){return Q(e)&&Z(e.node,t)},prevPoint:te,nextPoint:ne,nextPointWithEmptyNode:oe,isSamePoint:re,isVisiblePoint:function(e){if(T(e.node)||!ee(e.node)||z(e.node))return!0;var t=e.node.childNodes[e.offset-1],n=e.node.childNodes[e.offset];return!((t&&!S(t)||n&&!S(n))&&!I(n))},prevPointUntil:function(e,t){for(;e;){if(t(e))return e;e=te(e)}return null},nextPointUntil:function(e,t){for(;e;){if(t(e))return e;e=ne(e)}return null},isCharPoint:function(e){if(!T(e.node))return!1;var t=e.node.nodeValue.charAt(e.offset-1);return t&&" "!==t&&t!==w},isSpacePoint:function(e){if(!T(e.node))return!1;var t=e.node.nodeValue.charAt(e.offset-1);return" "===t||t===w},walkPoint:function(e,t,n,o){for(var i=e;i&&(n(i),!re(i,t));)i=oe(i,o&&e.node!==i.node&&t.node!==i.node)},ancestor:W,singleChildAncestor:function(e,t){for(e=e.parentNode;e&&1===B(e);){if(t(e))return e;if(x(e))break;e=e.parentNode}return null},listAncestor:_,lastAncestor:function(e,t){var n=_(e);return k.last(n.filter(t))},listNext:q,listPrev:function(e,t){t=t||m.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.previousSibling;return n},listDescendant:function(e,t){var n=[];return t=t||m.ok,function o(i){e!==i&&t(i)&&n.push(i);for(var r=0,a=i.childNodes.length;r<a;r++)o(i.childNodes[r])}(e),n},commonAncestor:function(e,t){for(var n=_(e),o=t;o;o=o.parentNode)if(n.indexOf(o)>-1)return o;return null},wrap:function(e,n){var o=e.parentNode,i=t()("<"+n+">")[0];return o.insertBefore(i,e),i.appendChild(e),i},insertAfter:K,appendChildNodes:V,position:J,hasChildren:ee,makeOffsetPath:function(e,t){return _(t,m.eq(e)).map(J).reverse()},fromOffsetPath:function(e,t){for(var n=e,o=0,i=t.length;o<i;o++)n=n.childNodes.length<=t[o]?n.childNodes[n.childNodes.length-1]:n.childNodes[t[o]];return n},splitTree:se,splitPoint:function(e,t){var n,o,i=t?E:F,r=_(e.node,i),a=k.last(r)||e.node;i(a)?(n=r[r.length-2],o=a):o=(n=a).parentNode;var s=n&&se(n,e,{isSkipPaddingBlankHTML:t,isNotSplitEdgePoint:t});return s||o!==e.node||(s=e.node.childNodes[e.offset]),{rightNode:s,container:o}},create:le,createText:function(e){return document.createTextNode(e)},remove:ce,removeWhile:function(e,t){for(;e&&!x(e)&&t(e);){var n=e.parentNode;ce(e),e=n}},replace:function(e,t){if(e.nodeName.toUpperCase()===t.toUpperCase())return e;var n=le(t);return e.style.cssText&&(n.style.cssText=e.style.cssText),V(n,k.from(e.childNodes)),K(n,e),ce(e),n},html:function(e,t){var n=de(e);return t&&(n=(n=n.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g,(function(e,t,n){n=n.toUpperCase();var o=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(n)&&!!t,i=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(n);return e+(o||i?"\n":"")}))).trim()),n},value:de,posFromPlaceholder:function(e){var n=t()(e),o=n.offset(),i=n.outerHeight(!0);return{left:o.left,top:o.top+i}},attachEvents:function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},detachEvents:function(e,t){Object.keys(t).forEach((function(n){e.off(n,t[n])}))},isCustomStyleTag:function(e){return e&&!T(e)&&k.contains(e.classList,"note-styletag")}};var fe=function(){function e(n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$note=n,this.memos={},this.modules={},this.layoutInfo={},this.options=t().extend(!0,{},o),t().summernote.ui=t().summernote.ui_template(this.options),this.ui=t().summernote.ui,this.initialize()}var n;return n=[{key:"initialize",value:function(){return this.layoutInfo=this.ui.createLayout(this.$note),this._initialize(),this.$note.hide(),this}},{key:"destroy",value:function(){this._destroy(),this.$note.removeData("summernote"),this.ui.removeLayout(this.$note,this.layoutInfo)}},{key:"reset",value:function(){var e=this.isDisabled();this.code(he.emptyPara),this._destroy(),this._initialize(),e&&this.disable()}},{key:"_initialize",value:function(){var e=this;this.options.id=m.uniqueId(t().now()),this.options.container=this.options.container||this.layoutInfo.editor;var n=t().extend({},this.options.buttons);Object.keys(n).forEach((function(t){e.memo("button."+t,n[t])}));var o=t().extend({},this.options.modules,t().summernote.plugins||{});Object.keys(o).forEach((function(t){e.module(t,o[t],!0)})),Object.keys(this.modules).forEach((function(t){e.initializeModule(t)}))}},{key:"_destroy",value:function(){var e=this;Object.keys(this.modules).reverse().forEach((function(t){e.removeModule(t)})),Object.keys(this.memos).forEach((function(t){e.removeMemo(t)})),this.triggerEvent("destroy",this)}},{key:"code",value:function(e){var t=this.invoke("codeview.isActivated");if(void 0===e)return this.invoke("codeview.sync"),t?this.layoutInfo.codable.val():this.layoutInfo.editable.html();t?this.invoke("codeview.sync",e):this.layoutInfo.editable.html(e),this.$note.val(e),this.triggerEvent("change",e,this.layoutInfo.editable)}},{key:"isDisabled",value:function(){return"false"===this.layoutInfo.editable.attr("contenteditable")}},{key:"enable",value:function(){this.layoutInfo.editable.attr("contenteditable",!0),this.invoke("toolbar.activate",!0),this.triggerEvent("disable",!1),this.options.editing=!0}},{key:"disable",value:function(){this.invoke("codeview.isActivated")&&this.invoke("codeview.deactivate"),this.layoutInfo.editable.attr("contenteditable",!1),this.options.editing=!1,this.invoke("toolbar.deactivate",!0),this.triggerEvent("disable",!0)}},{key:"triggerEvent",value:function(){var e=k.head(arguments),t=k.tail(k.from(arguments)),n=this.options.callbacks[m.namespaceToCamel(e,"on")];n&&n.apply(this.$note[0],t),this.$note.trigger("summernote."+e,t)}},{key:"initializeModule",value:function(e){var t=this.modules[e];t.shouldInitialize=t.shouldInitialize||m.ok,t.shouldInitialize()&&(t.initialize&&t.initialize(),t.events&&he.attachEvents(this.$note,t.events))}},{key:"module",value:function(e,t,n){if(1===arguments.length)return this.modules[e];this.modules[e]=new t(this),n||this.initializeModule(e)}},{key:"removeModule",value:function(e){var t=this.modules[e];t.shouldInitialize()&&(t.events&&he.detachEvents(this.$note,t.events),t.destroy&&t.destroy()),delete this.modules[e]}},{key:"memo",value:function(e,t){if(1===arguments.length)return this.memos[e];this.memos[e]=t}},{key:"removeMemo",value:function(e){this.memos[e]&&this.memos[e].destroy&&this.memos[e].destroy(),delete this.memos[e]}},{key:"createInvokeHandlerAndUpdateState",value:function(e,t){var n=this;return function(o){n.createInvokeHandler(e,t)(o),n.invoke("buttons.updateCurrentStyle")}}},{key:"createInvokeHandler",value:function(e,n){var o=this;return function(i){i.preventDefault();var r=t()(i.target);o.invoke(e,n||r.closest("[data-value]").data("value"),r)}}},{key:"invoke",value:function(){var e=k.head(arguments),t=k.tail(k.from(arguments)),n=e.split("."),o=n.length>1,i=o&&k.head(n),r=o?k.last(n):k.head(n),a=this.modules[i||"editor"];return!i&&this[r]?this[r].apply(this,t):a&&a[r]&&a.shouldInitialize()?a[r].apply(a,t):void 0}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();function pe(e,t){var n,o,i=e.parentElement(),r=document.body.createTextRange(),a=k.from(i.childNodes);for(n=0;n<a.length;n++)if(!he.isText(a[n])){if(r.moveToElementText(a[n]),r.compareEndPoints("StartToStart",e)>=0)break;o=a[n]}if(0!==n&&he.isText(a[n-1])){var s=document.body.createTextRange(),l=null;s.moveToElementText(o||i),s.collapse(!o),l=o?o.nextSibling:i.firstChild;var c=e.duplicate();c.setEndPoint("StartToStart",s);for(var u=c.text.replace(/[\r\n]/g,"").length;u>l.nodeValue.length&&l.nextSibling;)u-=l.nodeValue.length,l=l.nextSibling;l.nodeValue,t&&l.nextSibling&&he.isText(l.nextSibling)&&u===l.nodeValue.length&&(u-=l.nodeValue.length,l=l.nextSibling),i=l,n=u}return{cont:i,offset:n}}function me(e){var t=document.body.createTextRange(),n=function e(t,n){var o,i;if(he.isText(t)){var r=he.listPrev(t,m.not(he.isText)),a=k.last(r).previousSibling;o=a||t.parentNode,n+=k.sum(k.tail(r),he.nodeLength),i=!a}else{if(o=t.childNodes[n]||t,he.isText(o))return e(o,0);n=0,i=!1}return{node:o,collapseToStart:i,offset:n}}(e.node,e.offset);return t.moveToElementText(n.node),t.collapse(n.collapseToStart),t.moveStart("character",n.offset),t}t().fn.extend({summernote:function(){var e=t().type(k.head(arguments)),n="string"===e,o="object"===e,i=t().extend({},t().summernote.options,o?k.head(arguments):{});i.langInfo=t().extend(!0,{},t().summernote.lang["en-US"],t().summernote.lang[i.lang]),i.icons=t().extend(!0,{},t().summernote.options.icons,i.icons),i.tooltip="auto"===i.tooltip?!f.isSupportTouch:i.tooltip,this.each((function(e,n){var o=t()(n);if(!o.data("summernote")){var r=new fe(o,i);o.data("summernote",r),o.data("summernote").triggerEvent("init",r.layoutInfo)}}));var r=this.first();if(r.length){var a=r.data("summernote");if(n)return a.invoke.apply(a,k.from(arguments));i.focus&&a.invoke("editor.focus")}return this}});var ge=function(){function e(t,n,o,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sc=t,this.so=n,this.ec=o,this.eo=i,this.isOnEditable=this.makeIsOn(he.isEditable),this.isOnList=this.makeIsOn(he.isList),this.isOnAnchor=this.makeIsOn(he.isAnchor),this.isOnCell=this.makeIsOn(he.isCell),this.isOnData=this.makeIsOn(he.isData)}var n;return n=[{key:"nativeRange",value:function(){if(f.isW3CRangeSupport){var e=document.createRange();return e.setStart(this.sc,this.so),e.setEnd(this.ec,this.eo),e}var t=me({node:this.sc,offset:this.so});return t.setEndPoint("EndToEnd",me({node:this.ec,offset:this.eo})),t}},{key:"getPoints",value:function(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}}},{key:"getStartPoint",value:function(){return{node:this.sc,offset:this.so}}},{key:"getEndPoint",value:function(){return{node:this.ec,offset:this.eo}}},{key:"select",value:function(){var e=this.nativeRange();if(f.isW3CRangeSupport){var t=document.getSelection();t.rangeCount>0&&t.removeAllRanges(),t.addRange(e)}else e.select();return this}},{key:"scrollIntoView",value:function(e){var n=t()(e).height();return e.scrollTop+n<this.sc.offsetTop&&(e.scrollTop+=Math.abs(e.scrollTop+n-this.sc.offsetTop)),this}},{key:"normalize",value:function(){var t=function(e,t){if(!e)return e;if(he.isVisiblePoint(e)&&(!he.isEdgePoint(e)||he.isRightEdgePoint(e)&&!t||he.isLeftEdgePoint(e)&&t||he.isRightEdgePoint(e)&&t&&he.isVoid(e.node.nextSibling)||he.isLeftEdgePoint(e)&&!t&&he.isVoid(e.node.previousSibling)||he.isBlock(e.node)&&he.isEmpty(e.node)))return e;var n=he.ancestor(e.node,he.isBlock),o=!1;if(!o){var i=he.prevPoint(e)||{node:null};o=(he.isLeftEdgePointOf(e,n)||he.isVoid(i.node))&&!t}var r=!1;if(!r){var a=he.nextPoint(e)||{node:null};r=(he.isRightEdgePointOf(e,n)||he.isVoid(a.node))&&t}if(o||r){if(he.isVisiblePoint(e))return e;t=!t}return(t?he.nextPointUntil(he.nextPoint(e),he.isVisiblePoint):he.prevPointUntil(he.prevPoint(e),he.isVisiblePoint))||e},n=t(this.getEndPoint(),!1),o=this.isCollapsed()?n:t(this.getStartPoint(),!0);return new e(o.node,o.offset,n.node,n.offset)}},{key:"nodes",value:function(e,t){e=e||m.ok;var n=t&&t.includeAncestor,o=t&&t.fullyContains,i=this.getStartPoint(),r=this.getEndPoint(),a=[],s=[];return he.walkPoint(i,r,(function(t){var i;he.isEditable(t.node)||(o?(he.isLeftEdgePoint(t)&&s.push(t.node),he.isRightEdgePoint(t)&&k.contains(s,t.node)&&(i=t.node)):i=n?he.ancestor(t.node,e):t.node,i&&e(i)&&a.push(i))}),!0),k.unique(a)}},{key:"commonAncestor",value:function(){return he.commonAncestor(this.sc,this.ec)}},{key:"expand",value:function(t){var n=he.ancestor(this.sc,t),o=he.ancestor(this.ec,t);if(!n&&!o)return new e(this.sc,this.so,this.ec,this.eo);var i=this.getPoints();return n&&(i.sc=n,i.so=0),o&&(i.ec=o,i.eo=he.nodeLength(o)),new e(i.sc,i.so,i.ec,i.eo)}},{key:"collapse",value:function(t){return t?new e(this.sc,this.so,this.sc,this.so):new e(this.ec,this.eo,this.ec,this.eo)}},{key:"splitText",value:function(){var t=this.sc===this.ec,n=this.getPoints();return he.isText(this.ec)&&!he.isEdgePoint(this.getEndPoint())&&this.ec.splitText(this.eo),he.isText(this.sc)&&!he.isEdgePoint(this.getStartPoint())&&(n.sc=this.sc.splitText(this.so),n.so=0,t&&(n.ec=n.sc,n.eo=this.eo-this.so)),new e(n.sc,n.so,n.ec,n.eo)}},{key:"deleteContents",value:function(){if(this.isCollapsed())return this;var n=this.splitText(),o=n.nodes(null,{fullyContains:!0}),i=he.prevPointUntil(n.getStartPoint(),(function(e){return!k.contains(o,e.node)})),r=[];return t().each(o,(function(e,t){var n=t.parentNode;i.node!==n&&1===he.nodeLength(n)&&r.push(n),he.remove(t,!1)})),t().each(r,(function(e,t){he.remove(t,!1)})),new e(i.node,i.offset,i.node,i.offset).normalize()}},{key:"makeIsOn",value:function(e){return function(){var t=he.ancestor(this.sc,e);return!!t&&t===he.ancestor(this.ec,e)}}},{key:"isLeftEdgeOf",value:function(e){if(!he.isLeftEdgePoint(this.getStartPoint()))return!1;var t=he.ancestor(this.sc,e);return t&&he.isLeftEdgeOf(this.sc,t)}},{key:"isCollapsed",value:function(){return this.sc===this.ec&&this.so===this.eo}},{key:"wrapBodyInlineWithPara",value:function(){if(he.isBodyContainer(this.sc)&&he.isEmpty(this.sc))return this.sc.innerHTML=he.emptyPara,new e(this.sc.firstChild,0,this.sc.firstChild,0);var t,n=this.normalize();if(he.isParaInline(this.sc)||he.isPara(this.sc))return n;if(he.isInline(n.sc)){var o=he.listAncestor(n.sc,m.not(he.isInline));t=k.last(o),he.isInline(t)||(t=o[o.length-2]||n.sc.childNodes[n.so])}else t=n.sc.childNodes[n.so>0?n.so-1:0];if(t){var i=he.listPrev(t,he.isParaInline).reverse();if((i=i.concat(he.listNext(t.nextSibling,he.isParaInline))).length){var r=he.wrap(k.head(i),"p");he.appendChildNodes(r,k.tail(i))}}return this.normalize()}},{key:"insertNode",value:function(e){var t=this;(he.isText(e)||he.isInline(e))&&(t=this.wrapBodyInlineWithPara().deleteContents());var n=he.splitPoint(t.getStartPoint(),he.isInline(e));return n.rightNode?(n.rightNode.parentNode.insertBefore(e,n.rightNode),he.isEmpty(n.rightNode)&&he.isPara(e)&&n.rightNode.parentNode.removeChild(n.rightNode)):n.container.appendChild(e),e}},{key:"pasteHTML",value:function(e){e=t().trim(e);var n=t()("<div></div>").html(e)[0],o=k.from(n.childNodes),i=this,r=!1;return i.so>=0&&(o=o.reverse(),r=!0),o=o.map((function(e){return i.insertNode(e)})),r&&(o=o.reverse()),o}},{key:"toString",value:function(){var e=this.nativeRange();return f.isW3CRangeSupport?e.toString():e.text}},{key:"getWordRange",value:function(t){var n=this.getEndPoint();if(!he.isCharPoint(n))return this;var o=he.prevPointUntil(n,(function(e){return!he.isCharPoint(e)}));return t&&(n=he.nextPointUntil(n,(function(e){return!he.isCharPoint(e)}))),new e(o.node,o.offset,n.node,n.offset)}},{key:"getWordsRange",value:function(t){var n=this.getEndPoint(),o=function(e){return!he.isCharPoint(e)&&!he.isSpacePoint(e)};if(o(n))return this;var i=he.prevPointUntil(n,o);return t&&(n=he.nextPointUntil(n,o)),new e(i.node,i.offset,n.node,n.offset)}},{key:"getWordsMatchRange",value:function(t){var n=this.getEndPoint(),o=he.prevPointUntil(n,(function(o){if(!he.isCharPoint(o)&&!he.isSpacePoint(o))return!0;var i=new e(o.node,o.offset,n.node,n.offset),r=t.exec(i.toString());return r&&0===r.index})),i=new e(o.node,o.offset,n.node,n.offset),r=i.toString(),a=t.exec(r);return a&&a[0].length===r.length?i:null}},{key:"bookmark",value:function(e){return{s:{path:he.makeOffsetPath(e,this.sc),offset:this.so},e:{path:he.makeOffsetPath(e,this.ec),offset:this.eo}}}},{key:"paraBookmark",value:function(e){return{s:{path:k.tail(he.makeOffsetPath(k.head(e),this.sc)),offset:this.so},e:{path:k.tail(he.makeOffsetPath(k.last(e),this.ec)),offset:this.eo}}}},{key:"getClientRects",value:function(){return this.nativeRange().getClientRects()}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();const ve={create:function(e,t,n,o){if(4===arguments.length)return new ge(e,t,n,o);if(2===arguments.length)return new ge(e,t,n=e,o=t);var i=this.createFromSelection();if(!i&&1===arguments.length){var r=arguments[0];return he.isEditable(r)&&(r=r.lastChild),this.createFromBodyElement(r,he.emptyPara===arguments[0].innerHTML)}return i},createFromBodyElement:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.createFromNode(e);return n.collapse(t)},createFromSelection:function(){var e,t,n,o;if(f.isW3CRangeSupport){var i=document.getSelection();if(!i||0===i.rangeCount)return null;if(he.isBody(i.anchorNode))return null;var r=i.getRangeAt(0);e=r.startContainer,t=r.startOffset,n=r.endContainer,o=r.endOffset}else{var a=document.selection.createRange(),s=a.duplicate();s.collapse(!1);var l=a;l.collapse(!0);var c=pe(l,!0),u=pe(s,!1);he.isText(c.node)&&he.isLeftEdgePoint(c)&&he.isTextNode(u.node)&&he.isRightEdgePoint(u)&&u.node.nextSibling===c.node&&(c=u),e=c.cont,t=c.offset,n=u.cont,o=u.offset}return new ge(e,t,n,o)},createFromNode:function(e){var t=e,n=0,o=e,i=he.nodeLength(o);return he.isVoid(t)&&(n=he.listPrev(t).length-1,t=t.parentNode),he.isBR(o)?(i=he.listPrev(o).length-1,o=o.parentNode):he.isVoid(o)&&(i=he.listPrev(o).length,o=o.parentNode),this.create(t,n,o,i)},createFromNodeBefore:function(e){return this.createFromNode(e).collapse(!0)},createFromNodeAfter:function(e){return this.createFromNode(e).collapse()},createFromBookmark:function(e,t){var n=he.fromOffsetPath(e,t.s.path),o=t.s.offset,i=he.fromOffsetPath(e,t.e.path),r=t.e.offset;return new ge(n,o,i,r)},createFromParaBookmark:function(e,t){var n=e.s.offset,o=e.e.offset,i=he.fromOffsetPath(k.head(t),e.s.path),r=he.fromOffsetPath(k.last(t),e.e.path);return new ge(i,n,r,o)}};var ye={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};const be={isEdit:function(e){return k.contains([ye.BACKSPACE,ye.TAB,ye.ENTER,ye.SPACE,ye.DELETE],e)},isMove:function(e){return k.contains([ye.LEFT,ye.UP,ye.RIGHT,ye.DOWN],e)},isNavigation:function(e){return k.contains([ye.HOME,ye.END,ye.PAGEUP,ye.PAGEDOWN],e)},nameFromCode:m.invertObject(ye),code:ye};var ke=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.stack=[],this.stackOffset=-1,this.context=t,this.$editable=t.layoutInfo.editable,this.editable=this.$editable[0]}var t;return(t=[{key:"makeSnapshot",value:function(){var e=ve.create(this.editable);return{contents:this.$editable.html(),bookmark:e&&e.isOnEditable()?e.bookmark(this.editable):{s:{path:[],offset:0},e:{path:[],offset:0}}}}},{key:"applySnapshot",value:function(e){null!==e.contents&&this.$editable.html(e.contents),null!==e.bookmark&&ve.createFromBookmark(this.editable,e.bookmark).select()}},{key:"rewind",value:function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset=0,this.applySnapshot(this.stack[this.stackOffset])}},{key:"commit",value:function(){this.stack=[],this.stackOffset=-1,this.recordUndo()}},{key:"reset",value:function(){this.stack=[],this.stackOffset=-1,this.$editable.html(""),this.recordUndo()}},{key:"undo",value:function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset>0&&(this.stackOffset--,this.applySnapshot(this.stack[this.stackOffset]))}},{key:"redo",value:function(){this.stack.length-1>this.stackOffset&&(this.stackOffset++,this.applySnapshot(this.stack[this.stackOffset]))}},{key:"recordUndo",value:function(){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)}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,t),e}();var we=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var n;return n=[{key:"jQueryCSS",value:function(e,n){var o={};return t().each(n,(function(t,n){o[n]=e.css(n)})),o}},{key:"fromNode",value:function(e){var t=this.jQueryCSS(e,["font-family","font-size","text-align","list-style-type","line-height"])||{},n=e[0].style.fontSize||t["font-size"];return t["font-size"]=parseInt(n,10),t["font-size-unit"]=n.match(/[a-z%]+$/),t}},{key:"stylePara",value:function(e,n){t().each(e.nodes(he.isPara,{includeAncestor:!0}),(function(e,o){t()(o).css(n)}))}},{key:"styleNodes",value:function(e,n){e=e.splitText();var o=n&&n.nodeName||"SPAN",i=!(!n||!n.expandClosestSibling),r=!(!n||!n.onlyPartialContains);if(e.isCollapsed())return[e.insertNode(he.create(o))];var a=he.makePredByNodeName(o),s=e.nodes(he.isText,{fullyContains:!0}).map((function(e){return he.singleChildAncestor(e,a)||he.wrap(e,o)}));if(i){if(r){var l=e.nodes();a=m.and(a,(function(e){return k.contains(l,e)}))}return s.map((function(e){var n=he.withClosestSiblings(e,a),o=k.head(n),i=k.tail(n);return t().each(i,(function(e,t){he.appendChildNodes(o,t.childNodes),he.remove(t)})),k.head(n)}))}return s}},{key:"current",value:function(e){var n=t()(he.isElement(e.sc)?e.sc:e.sc.parentNode),o=this.fromNode(n);try{o=t().extend(o,{"font-bold":document.queryCommandState("bold")?"bold":"normal","font-italic":document.queryCommandState("italic")?"italic":"normal","font-underline":document.queryCommandState("underline")?"underline":"normal","font-subscript":document.queryCommandState("subscript")?"subscript":"normal","font-superscript":document.queryCommandState("superscript")?"superscript":"normal","font-strikethrough":document.queryCommandState("strikethrough")?"strikethrough":"normal","font-family":document.queryCommandValue("fontname")||o["font-family"]})}catch(e){}if(e.isOnList()){var i=["circle","disc","disc-leading-zero","square"].indexOf(o["list-style-type"])>-1;o["list-style"]=i?"unordered":"ordered"}else o["list-style"]="none";var r=he.ancestor(e.sc,he.isPara);if(r&&r.style["line-height"])o["line-height"]=r.style.lineHeight;else{var a=parseInt(o["line-height"],10)/parseInt(o["font-size"],10);o["line-height"]=a.toFixed(1)}return o.anchor=e.isOnAnchor()&&he.ancestor(e.sc,he.isAnchor),o.ancestors=he.listAncestor(e.sc,he.isEditable),o.range=e,o}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var xe=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var n;return n=[{key:"insertOrderedList",value:function(e){this.toggleList("OL",e)}},{key:"insertUnorderedList",value:function(e){this.toggleList("UL",e)}},{key:"indent",value:function(e){var n=this,o=ve.create(e).wrapBodyInlineWithPara(),i=o.nodes(he.isPara,{includeAncestor:!0}),r=k.clusterBy(i,m.peq2("parentNode"));t().each(r,(function(e,o){var i=k.head(o);if(he.isLi(i)){var r=n.findList(i.previousSibling);r?o.map((function(e){return r.appendChild(e)})):(n.wrapList(o,i.parentNode.nodeName),o.map((function(e){return e.parentNode})).map((function(e){return n.appendToPrevious(e)})))}else t().each(o,(function(e,n){t()(n).css("marginLeft",(function(e,t){return(parseInt(t,10)||0)+25}))}))})),o.select()}},{key:"outdent",value:function(e){var n=this,o=ve.create(e).wrapBodyInlineWithPara(),i=o.nodes(he.isPara,{includeAncestor:!0}),r=k.clusterBy(i,m.peq2("parentNode"));t().each(r,(function(e,o){var i=k.head(o);he.isLi(i)?n.releaseList([o]):t().each(o,(function(e,n){t()(n).css("marginLeft",(function(e,t){return(t=parseInt(t,10)||0)>25?t-25:""}))}))})),o.select()}},{key:"toggleList",value:function(e,n){var o=this,i=ve.create(n).wrapBodyInlineWithPara(),r=i.nodes(he.isPara,{includeAncestor:!0}),a=i.paraBookmark(r),s=k.clusterBy(r,m.peq2("parentNode"));if(k.find(r,he.isPurePara)){var l=[];t().each(s,(function(t,n){l=l.concat(o.wrapList(n,e))})),r=l}else{var c=i.nodes(he.isList,{includeAncestor:!0}).filter((function(n){return!t().nodeName(n,e)}));c.length?t().each(c,(function(t,n){he.replace(n,e)})):r=this.releaseList(s,!0)}ve.createFromParaBookmark(a,r).select()}},{key:"wrapList",value:function(e,t){var n=k.head(e),o=k.last(e),i=he.isList(n.previousSibling)&&n.previousSibling,r=he.isList(o.nextSibling)&&o.nextSibling,a=i||he.insertAfter(he.create(t||"UL"),o);return e=e.map((function(e){return he.isPurePara(e)?he.replace(e,"LI"):e})),he.appendChildNodes(a,e),r&&(he.appendChildNodes(a,k.from(r.childNodes)),he.remove(r)),e}},{key:"releaseList",value:function(e,n){var o=this,i=[];return t().each(e,(function(e,r){var a=k.head(r),s=k.last(r),l=n?he.lastAncestor(a,he.isList):a.parentNode,c=l.parentNode;if("LI"===l.parentNode.nodeName)r.map((function(e){var t=o.findNextSiblings(e);c.nextSibling?c.parentNode.insertBefore(e,c.nextSibling):c.parentNode.appendChild(e),t.length&&(o.wrapList(t,l.nodeName),e.appendChild(t[0].parentNode))})),0===l.children.length&&c.removeChild(l),0===c.childNodes.length&&c.parentNode.removeChild(c);else{var u=l.childNodes.length>1?he.splitTree(l,{node:s.parentNode,offset:he.position(s)+1},{isSkipPaddingBlankHTML:!0}):null,d=he.splitTree(l,{node:a.parentNode,offset:he.position(a)},{isSkipPaddingBlankHTML:!0});r=n?he.listDescendant(d,he.isLi):k.from(d.childNodes).filter(he.isLi),!n&&he.isList(l.parentNode)||(r=r.map((function(e){return he.replace(e,"P")}))),t().each(k.from(r).reverse(),(function(e,t){he.insertAfter(t,l)}));var h=k.compact([l,d,u]);t().each(h,(function(e,n){var o=[n].concat(he.listDescendant(n,he.isList));t().each(o.reverse(),(function(e,t){he.nodeLength(t)||he.remove(t,!0)}))}))}i=i.concat(r)})),i}},{key:"appendToPrevious",value:function(e){return e.previousSibling?he.appendChildNodes(e.previousSibling,[e]):this.wrapList([e],"LI")}},{key:"findList",value:function(e){return e?k.find(e.children,(function(e){return["OL","UL"].indexOf(e.nodeName)>-1})):null}},{key:"findNextSiblings",value:function(e){for(var t=[];e.nextSibling;)t.push(e.nextSibling),e=e.nextSibling;return t}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Ce=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bullet=new xe,this.options=t.options}var n;return n=[{key:"insertTab",value:function(e,t){var n=he.createText(new Array(t+1).join(he.NBSP_CHAR));(e=e.deleteContents()).insertNode(n,!0),(e=ve.create(n,t)).select()}},{key:"insertParagraph",value:function(e,n){n=(n=(n=n||ve.create(e)).deleteContents()).wrapBodyInlineWithPara();var o,i=he.ancestor(n.sc,he.isPara);if(i){if(he.isLi(i)&&(he.isEmpty(i)||he.deepestChildIsEmpty(i)))return void this.bullet.toggleList(i.parentNode.nodeName);var r=null;if(1===this.options.blockquoteBreakingLevel?r=he.ancestor(i,he.isBlockquote):2===this.options.blockquoteBreakingLevel&&(r=he.lastAncestor(i,he.isBlockquote)),r){o=t()(he.emptyPara)[0],he.isRightEdgePoint(n.getStartPoint())&&he.isBR(n.sc.nextSibling)&&t()(n.sc.nextSibling).remove();var a=he.splitTree(r,n.getStartPoint(),{isDiscardEmptySplits:!0});a?a.parentNode.insertBefore(o,a):he.insertAfter(o,r)}else{o=he.splitTree(i,n.getStartPoint());var s=he.listDescendant(i,he.isEmptyAnchor);s=s.concat(he.listDescendant(o,he.isEmptyAnchor)),t().each(s,(function(e,t){he.remove(t)})),(he.isHeading(o)||he.isPre(o)||he.isCustomStyleTag(o))&&he.isEmpty(o)&&(o=he.replace(o,"p"))}}else{var l=n.sc.childNodes[n.so];o=t()(he.emptyPara)[0],l?n.sc.insertBefore(o,l):n.sc.appendChild(o)}ve.create(o,0).normalize().select().scrollIntoView(e)}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Te=function e(t,n,o,i){var r={colPos:0,rowPos:0},a=[],s=[];function l(e,t,n,o,i,r,s){var l={baseRow:n,baseCell:o,isRowSpan:i,isColSpan:r,isVirtual:s};a[e]||(a[e]=[]),a[e][t]=l}function c(e,t,n,o){return{baseCell:e.baseCell,action:t,virtualTable:{rowIndex:n,cellIndex:o}}}function u(e,t){if(!a[e])return t;if(!a[e][t])return t;for(var n=t;a[e][n];)if(n++,!a[e][n])return n}function d(e,t){var n=u(e.rowIndex,t.cellIndex),o=t.colSpan>1,i=t.rowSpan>1,a=e.rowIndex===r.rowPos&&t.cellIndex===r.colPos;l(e.rowIndex,n,e,t,i,o,!1);var s=t.attributes.rowSpan?parseInt(t.attributes.rowSpan.value,10):0;if(s>1)for(var c=1;c<s;c++){var d=e.rowIndex+c;h(d,n,t,a),l(d,n,e,t,!0,o,!0)}var f=t.attributes.colSpan?parseInt(t.attributes.colSpan.value,10):0;if(f>1)for(var p=1;p<f;p++){var m=u(e.rowIndex,n+p);h(e.rowIndex,m,t,a),l(e.rowIndex,m,e,t,i,!0,!0)}}function h(e,t,n,o){e===r.rowPos&&r.colPos>=n.cellIndex&&n.cellIndex<=t&&!o&&r.colPos++}function f(t){switch(n){case e.where.Column:if(t.isColSpan)return e.resultAction.SubtractSpanCount;break;case e.where.Row:if(!t.isVirtual&&t.isRowSpan)return e.resultAction.AddCell;if(t.isRowSpan)return e.resultAction.SubtractSpanCount}return e.resultAction.RemoveCell}function p(t){switch(n){case e.where.Column:if(t.isColSpan)return e.resultAction.SumSpanCount;if(t.isRowSpan&&t.isVirtual)return e.resultAction.Ignore;break;case e.where.Row:if(t.isRowSpan)return e.resultAction.SumSpanCount;if(t.isColSpan&&t.isVirtual)return e.resultAction.Ignore}return e.resultAction.AddCell}this.getActionList=function(){for(var t=n===e.where.Row?r.rowPos:-1,i=n===e.where.Column?r.colPos:-1,l=0,u=!0;u;){var d=t>=0?t:l,h=i>=0?i:l,m=a[d];if(!m)return u=!1,s;var g=m[h];if(!g)return u=!1,s;var v=e.resultAction.Ignore;switch(o){case e.requestAction.Add:v=p(g);break;case e.requestAction.Delete:v=f(g)}s.push(c(g,v,d,h)),l++}return s},t&&t.tagName&&("td"===t.tagName.toLowerCase()||"th"===t.tagName.toLowerCase())&&(r.colPos=t.cellIndex,t.parentElement&&t.parentElement.tagName&&"tr"===t.parentElement.tagName.toLowerCase()&&(r.rowPos=t.parentElement.rowIndex)),function(){for(var e=i.rows,t=0;t<e.length;t++)for(var n=e[t].cells,o=0;o<n.length;o++)d(e[t],n[o])}()};Te.where={Row:0,Column:1},Te.requestAction={Add:0,Delete:1},Te.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var Se=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var n;return n=[{key:"tab",value:function(e,t){var n=he.ancestor(e.commonAncestor(),he.isCell),o=he.ancestor(n,he.isTable),i=he.listDescendant(o,he.isCell),r=k[t?"prev":"next"](i,n);r&&ve.create(r,0).select()}},{key:"addRow",value:function(e,n){for(var o=he.ancestor(e.commonAncestor(),he.isCell),i=t()(o).closest("tr"),r=this.recoverAttributes(i),a=t()("<tr"+r+"></tr>"),s=new Te(o,Te.where.Row,Te.requestAction.Add,t()(i).closest("table")[0]).getActionList(),l=0;l<s.length;l++){var c=s[l],u=this.recoverAttributes(c.baseCell);switch(c.action){case Te.resultAction.AddCell:a.append("<td"+u+">"+he.blank+"</td>");break;case Te.resultAction.SumSpanCount:if("top"===n&&(c.baseCell.parent?c.baseCell.closest("tr").rowIndex:0)<=i[0].rowIndex){var d=t()("<div></div>").append(t()("<td"+u+">"+he.blank+"</td>").removeAttr("rowspan")).html();a.append(d);break}var h=parseInt(c.baseCell.rowSpan,10);h++,c.baseCell.setAttribute("rowSpan",h)}}if("top"===n)i.before(a);else{if(o.rowSpan>1){var f=i[0].rowIndex+(o.rowSpan-2);return void t()(t()(i).parent().find("tr")[f]).after(t()(a))}i.after(a)}}},{key:"addCol",value:function(e,n){var o=he.ancestor(e.commonAncestor(),he.isCell),i=t()(o).closest("tr");t()(i).siblings().push(i);for(var r=new Te(o,Te.where.Column,Te.requestAction.Add,t()(i).closest("table")[0]).getActionList(),a=0;a<r.length;a++){var s=r[a],l=this.recoverAttributes(s.baseCell);switch(s.action){case Te.resultAction.AddCell:"right"===n?t()(s.baseCell).after("<td"+l+">"+he.blank+"</td>"):t()(s.baseCell).before("<td"+l+">"+he.blank+"</td>");break;case Te.resultAction.SumSpanCount:if("right"===n){var c=parseInt(s.baseCell.colSpan,10);c++,s.baseCell.setAttribute("colSpan",c)}else t()(s.baseCell).before("<td"+l+">"+he.blank+"</td>")}}}},{key:"recoverAttributes",value:function(e){var t="";if(!e)return t;for(var n=e.attributes||[],o=0;o<n.length;o++)"id"!==n[o].name.toLowerCase()&&n[o].specified&&(t+=" "+n[o].name+"='"+n[o].value+"'");return t}},{key:"deleteRow",value:function(e){for(var n=he.ancestor(e.commonAncestor(),he.isCell),o=t()(n).closest("tr"),i=o.children("td, th").index(t()(n)),r=o[0].rowIndex,a=new Te(n,Te.where.Row,Te.requestAction.Delete,t()(o).closest("table")[0]).getActionList(),s=0;s<a.length;s++)if(a[s]){var l=a[s].baseCell,c=a[s].virtualTable,u=l.rowSpan&&l.rowSpan>1,d=u?parseInt(l.rowSpan,10):0;switch(a[s].action){case Te.resultAction.Ignore:continue;case Te.resultAction.AddCell:var h=o.next("tr")[0];if(!h)continue;var f=o[0].cells[i];u&&(d>2?(d--,h.insertBefore(f,h.cells[i]),h.cells[i].setAttribute("rowSpan",d),h.cells[i].innerHTML=""):2===d&&(h.insertBefore(f,h.cells[i]),h.cells[i].removeAttribute("rowSpan"),h.cells[i].innerHTML=""));continue;case Te.resultAction.SubtractSpanCount:u&&(d>2?(d--,l.setAttribute("rowSpan",d),c.rowIndex!==r&&l.cellIndex===i&&(l.innerHTML="")):2===d&&(l.removeAttribute("rowSpan"),c.rowIndex!==r&&l.cellIndex===i&&(l.innerHTML="")));continue;case Te.resultAction.RemoveCell:continue}}o.remove()}},{key:"deleteCol",value:function(e){for(var n=he.ancestor(e.commonAncestor(),he.isCell),o=t()(n).closest("tr"),i=o.children("td, th").index(t()(n)),r=new Te(n,Te.where.Column,Te.requestAction.Delete,t()(o).closest("table")[0]).getActionList(),a=0;a<r.length;a++)if(r[a])switch(r[a].action){case Te.resultAction.Ignore:continue;case Te.resultAction.SubtractSpanCount:var s=r[a].baseCell;if(s.colSpan&&s.colSpan>1){var l=s.colSpan?parseInt(s.colSpan,10):0;l>2?(l--,s.setAttribute("colSpan",l),s.cellIndex===i&&(s.innerHTML="")):2===l&&(s.removeAttribute("colSpan"),s.cellIndex===i&&(s.innerHTML=""))}continue;case Te.resultAction.RemoveCell:he.remove(r[a].baseCell,!0);continue}}},{key:"createTable",value:function(e,n,o){for(var i,r=[],a=0;a<e;a++)r.push("<td>"+he.blank+"</td>");i=r.join("");for(var s,l=[],c=0;c<n;c++)l.push("<tr>"+i+"</tr>");s=l.join("");var u=t()("<table>"+s+"</table>");return o&&o.tableClassName&&u.addClass(o.tableClassName),u[0]}},{key:"deleteTable",value:function(e){var n=he.ancestor(e.commonAncestor(),he.isCell);t()(n).closest("table").remove()}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Ee=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.$note=n.layoutInfo.note,this.$editor=n.layoutInfo.editor,this.$editable=n.layoutInfo.editable,this.options=n.options,this.lang=this.options.langInfo,this.editable=this.$editable[0],this.lastRange=null,this.snapshot=null,this.style=new we,this.table=new Se,this.typing=new Ce(n),this.bullet=new xe,this.history=new ke(n),this.context.memo("help.escape",this.lang.help.escape),this.context.memo("help.undo",this.lang.help.undo),this.context.memo("help.redo",this.lang.help.redo),this.context.memo("help.tab",this.lang.help.tab),this.context.memo("help.untab",this.lang.help.untab),this.context.memo("help.insertParagraph",this.lang.help.insertParagraph),this.context.memo("help.insertOrderedList",this.lang.help.insertOrderedList),this.context.memo("help.insertUnorderedList",this.lang.help.insertUnorderedList),this.context.memo("help.indent",this.lang.help.indent),this.context.memo("help.outdent",this.lang.help.outdent),this.context.memo("help.formatPara",this.lang.help.formatPara),this.context.memo("help.insertHorizontalRule",this.lang.help.insertHorizontalRule),this.context.memo("help.fontName",this.lang.help.fontName);for(var i=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor"],r=0,a=i.length;r<a;r++)this[i[r]]=function(e){return function(t){o.beforeCommand(),document.execCommand(e,!1,t),o.afterCommand(!0)}}(i[r]),this.context.memo("help."+i[r],this.lang.help[i[r]]);this.fontName=this.wrapCommand((function(e){return o.fontStyling("font-family",f.validFontName(e))})),this.fontSize=this.wrapCommand((function(e){var t=o.currentStyle()["font-size-unit"];return o.fontStyling("font-size",e+t)})),this.fontSizeUnit=this.wrapCommand((function(e){var t=o.currentStyle()["font-size"];return o.fontStyling("font-size",t+e)}));for(var s=1;s<=6;s++)this["formatH"+s]=function(e){return function(){o.formatBlock("H"+e)}}(s),this.context.memo("help.formatH"+s,this.lang.help["formatH"+s]);this.insertParagraph=this.wrapCommand((function(){o.typing.insertParagraph(o.editable)})),this.insertOrderedList=this.wrapCommand((function(){o.bullet.insertOrderedList(o.editable)})),this.insertUnorderedList=this.wrapCommand((function(){o.bullet.insertUnorderedList(o.editable)})),this.indent=this.wrapCommand((function(){o.bullet.indent(o.editable)})),this.outdent=this.wrapCommand((function(){o.bullet.outdent(o.editable)})),this.insertNode=this.wrapCommand((function(e){o.isLimited(t()(e).text().length)||(o.getLastRange().insertNode(e),o.setLastRange(ve.createFromNodeAfter(e).select()))})),this.insertText=this.wrapCommand((function(e){if(!o.isLimited(e.length)){var t=o.getLastRange().insertNode(he.createText(e));o.setLastRange(ve.create(t,he.nodeLength(t)).select())}})),this.pasteHTML=this.wrapCommand((function(e){if(!o.isLimited(e.length)){e=o.context.invoke("codeview.purify",e);var t=o.getLastRange().pasteHTML(e);o.setLastRange(ve.createFromNodeAfter(k.last(t)).select())}})),this.formatBlock=this.wrapCommand((function(e,t){var n=o.options.callbacks.onApplyCustomStyle;n?n.call(o,t,o.context,o.onFormatBlock):o.onFormatBlock(e,t)})),this.insertHorizontalRule=this.wrapCommand((function(){var e=o.getLastRange().insertNode(he.create("HR"));e.nextSibling&&o.setLastRange(ve.create(e.nextSibling,0).normalize().select())})),this.lineHeight=this.wrapCommand((function(e){o.style.stylePara(o.getLastRange(),{lineHeight:e})})),this.createLink=this.wrapCommand((function(e){var n=e.url,i=e.text,r=e.isNewWindow,a=e.checkProtocol,s=e.range||o.getLastRange(),l=i.length-s.toString().length;if(!(l>0&&o.isLimited(l))){var c=s.toString()!==i;"string"==typeof n&&(n=n.trim()),o.options.onCreateLink?n=o.options.onCreateLink(n):a&&(n=/^([A-Za-z][A-Za-z0-9+-.]*\:|#|\/)/.test(n)?n:o.options.defaultProtocol+n);var u=[];if(c){var d=(s=s.deleteContents()).insertNode(t()("<A>"+i+"</A>")[0]);u.push(d)}else u=o.style.styleNodes(s,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});t().each(u,(function(e,o){t()(o).attr("href",n),r?t()(o).attr("target","_blank"):t()(o).removeAttr("target")})),o.setLastRange(o.createRangeFromList(u).select())}})),this.color=this.wrapCommand((function(e){var t=e.foreColor,n=e.backColor;t&&document.execCommand("foreColor",!1,t),n&&document.execCommand("backColor",!1,n)})),this.foreColor=this.wrapCommand((function(e){document.execCommand("foreColor",!1,e)})),this.insertTable=this.wrapCommand((function(e){var t=e.split("x");o.getLastRange().deleteContents().insertNode(o.table.createTable(t[0],t[1],o.options))})),this.removeMedia=this.wrapCommand((function(){var e=t()(o.restoreTarget()).parent();e.closest("figure").length?e.closest("figure").remove():e=t()(o.restoreTarget()).detach(),o.context.triggerEvent("media.delete",e,o.$editable)})),this.floatMe=this.wrapCommand((function(e){var n=t()(o.restoreTarget());n.toggleClass("note-float-left","left"===e),n.toggleClass("note-float-right","right"===e),n.css("float","none"===e?"":e)})),this.resize=this.wrapCommand((function(e){var n=t()(o.restoreTarget());0===(e=parseFloat(e))?n.css("width",""):n.css({width:100*e+"%",height:""})}))}var n;return n=[{key:"initialize",value:function(){var e=this;this.$editable.on("keydown",(function(t){if(t.keyCode===be.code.ENTER&&e.context.triggerEvent("enter",t),e.context.triggerEvent("keydown",t),e.snapshot=e.history.makeSnapshot(),e.hasKeyShortCut=!1,t.isDefaultPrevented()||(e.options.shortcuts?e.hasKeyShortCut=e.handleKeyMap(t):e.preventDefaultEditableShortCuts(t)),e.isLimited(1,t)){var n=e.getLastRange();if(n.eo-n.so==0)return!1}e.setLastRange(),e.options.recordEveryKeystroke&&!1===e.hasKeyShortCut&&e.history.recordUndo()})).on("keyup",(function(t){e.setLastRange(),e.context.triggerEvent("keyup",t)})).on("focus",(function(t){e.setLastRange(),e.context.triggerEvent("focus",t)})).on("blur",(function(t){e.context.triggerEvent("blur",t)})).on("mousedown",(function(t){e.context.triggerEvent("mousedown",t)})).on("mouseup",(function(t){e.setLastRange(),e.history.recordUndo(),e.context.triggerEvent("mouseup",t)})).on("scroll",(function(t){e.context.triggerEvent("scroll",t)})).on("paste",(function(t){e.setLastRange(),e.context.triggerEvent("paste",t)})).on("input",(function(){e.isLimited(0)&&e.snapshot&&e.history.applySnapshot(e.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(he.html(this.$note)||he.emptyPara),this.$editable.on(f.inputEventName,m.debounce((function(){e.context.triggerEvent("change",e.$editable.html(),e.$editable)}),10)),this.$editable.on("focusin",(function(t){e.context.triggerEvent("focusin",t)})).on("focusout",(function(t){e.context.triggerEvent("focusout",t)})),this.options.airMode?this.options.overrideContextMenu&&this.$editor.on("contextmenu",(function(t){return e.context.triggerEvent("contextmenu",t),!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(){this.$editable.off()}},{key:"handleKeyMap",value:function(e){var t=this.options.keyMap[f.isMac?"mac":"pc"],n=[];e.metaKey&&n.push("CMD"),e.ctrlKey&&!e.altKey&&n.push("CTRL"),e.shiftKey&&n.push("SHIFT");var o=be.nameFromCode[e.keyCode];o&&n.push(o);var i=t[n.join("+")];if("TAB"!==o||this.options.tabDisable)if(i){if(!1!==this.context.invoke(i))return e.preventDefault(),!0}else be.isEdit(e.keyCode)&&this.afterCommand();else this.afterCommand();return!1}},{key:"preventDefaultEditableShortCuts",value:function(e){(e.ctrlKey||e.metaKey)&&k.contains([66,73,85],e.keyCode)&&e.preventDefault()}},{key:"isLimited",value:function(e,t){return e=e||0,(void 0===t||!(be.isMove(t.keyCode)||be.isNavigation(t.keyCode)||t.ctrlKey||t.metaKey||k.contains([be.code.BACKSPACE,be.code.DELETE],t.keyCode)))&&this.options.maxTextLength>0&&this.$editable.text().length+e>this.options.maxTextLength}},{key:"createRange",value:function(){return this.focus(),this.setLastRange(),this.getLastRange()}},{key:"createRangeFromList",value:function(e){var t=ve.createFromNodeBefore(k.head(e)).getStartPoint(),n=ve.createFromNodeAfter(k.last(e)).getEndPoint();return ve.create(t.node,t.offset,n.node,n.offset)}},{key:"setLastRange",value:function(e){e?this.lastRange=e:(this.lastRange=ve.create(this.editable),0===t()(this.lastRange.sc).closest(".note-editable").length&&(this.lastRange=ve.createFromBodyElement(this.editable)))}},{key:"getLastRange",value:function(){return this.lastRange||this.setLastRange(),this.lastRange}},{key:"saveRange",value:function(e){e&&this.getLastRange().collapse().select()}},{key:"restoreRange",value:function(){this.lastRange&&(this.lastRange.select(),this.focus())}},{key:"saveTarget",value:function(e){this.$editable.data("target",e)}},{key:"clearTarget",value:function(){this.$editable.removeData("target")}},{key:"restoreTarget",value:function(){return this.$editable.data("target")}},{key:"currentStyle",value:function(){var e=ve.create();return e&&(e=e.normalize()),e?this.style.current(e):this.style.fromNode(this.$editable)}},{key:"styleFromNode",value:function(e){return this.style.fromNode(e)}},{key:"undo",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.undo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"commit",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.commit(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"redo",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.redo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"beforeCommand",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),document.execCommand("styleWithCSS",!1,this.options.styleWithCSS),this.focus()}},{key:"afterCommand",value:function(e){this.normalizeContent(),this.history.recordUndo(),e||this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"tab",value:function(){var e=this.getLastRange();if(e.isCollapsed()&&e.isOnCell())this.table.tab(e);else{if(0===this.options.tabSize)return!1;this.isLimited(this.options.tabSize)||(this.beforeCommand(),this.typing.insertTab(e,this.options.tabSize),this.afterCommand())}}},{key:"untab",value:function(){var e=this.getLastRange();if(e.isCollapsed()&&e.isOnCell())this.table.tab(e,!0);else if(0===this.options.tabSize)return!1}},{key:"wrapCommand",value:function(e){return function(){this.beforeCommand(),e.apply(this,arguments),this.afterCommand()}}},{key:"insertImage",value:function(e,n){var o,i=this;return(o=e,t().Deferred((function(e){var n=t()("<img>");n.one("load",(function(){n.off("error abort"),e.resolve(n)})).one("error abort",(function(){n.off("load").detach(),e.reject(n)})).css({display:"none"}).appendTo(document.body).attr("src",o)})).promise()).then((function(e){i.beforeCommand(),"function"==typeof n?n(e):("string"==typeof n&&e.attr("data-filename",n),e.css("width",Math.min(i.$editable.width(),e.width()))),e.show(),i.getLastRange().insertNode(e[0]),i.setLastRange(ve.createFromNodeAfter(e[0]).select()),i.afterCommand()})).fail((function(e){i.context.triggerEvent("image.upload.error",e)}))}},{key:"insertImagesAsDataURL",value:function(e){var n=this;t().each(e,(function(e,o){var i=o.name;n.options.maximumImageFileSize&&n.options.maximumImageFileSize<o.size?n.context.triggerEvent("image.upload.error",n.lang.image.maximumFileSizeError):function(e){return t().Deferred((function(n){t().extend(new FileReader,{onload:function(e){var t=e.target.result;n.resolve(t)},onerror:function(e){n.reject(e)}}).readAsDataURL(e)})).promise()}(o).then((function(e){return n.insertImage(e,i)})).fail((function(){n.context.triggerEvent("image.upload.error")}))}))}},{key:"insertImagesOrCallback",value:function(e){this.options.callbacks.onImageUpload?this.context.triggerEvent("image.upload",e):this.insertImagesAsDataURL(e)}},{key:"getSelectedText",value:function(){var e=this.getLastRange();return e.isOnAnchor()&&(e=ve.createFromNode(he.ancestor(e.sc,he.isAnchor))),e.toString()}},{key:"onFormatBlock",value:function(e,n){if(document.execCommand("FormatBlock",!1,f.isMSIE?"<"+e+">":e),n&&n.length&&(n[0].tagName.toUpperCase()!==e.toUpperCase()&&(n=n.find(e)),n&&n.length)){var o=this.createRange(),i=t()([o.sc,o.ec]).closest(e);i.removeClass();var r=n[0].className||"";r&&i.addClass(r)}}},{key:"formatPara",value:function(){this.formatBlock("P")}},{key:"fontStyling",value:function(e,n){var o=this.getLastRange();if(""!==o){var i=this.style.styleNodes(o);if(this.$editor.find(".note-status-output").html(""),t()(i).css(e,n),o.isCollapsed()){var r=k.head(i);r&&!he.nodeLength(r)&&(r.innerHTML=he.ZERO_WIDTH_NBSP_CHAR,ve.createFromNode(r.firstChild).select(),this.setLastRange(),this.$editable.data("bogus",r))}else this.setLastRange(this.createRangeFromList(i).select())}else{var a=t().now();this.$editor.find(".note-status-output").html('<div id="note-status-output-'+a+'" class="alert alert-info">'+this.lang.output.noSelection+"</div>"),setTimeout((function(){t()("#note-status-output-"+a).remove()}),5e3)}}},{key:"unlink",value:function(){var e=this.getLastRange();if(e.isOnAnchor()){var t=he.ancestor(e.sc,he.isAnchor);(e=ve.createFromNode(t)).select(),this.setLastRange(),this.beforeCommand(),document.execCommand("unlink"),this.afterCommand()}}},{key:"getLinkInfo",value:function(){var e=this.getLastRange().expand(he.isAnchor),n=t()(k.head(e.nodes(he.isAnchor))),o={range:e,text:e.toString(),url:n.length?n.attr("href"):""};return n.length&&(o.isNewWindow="_blank"===n.attr("target")),o}},{key:"addRow",value:function(e){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addRow(t,e),this.afterCommand())}},{key:"addCol",value:function(e){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addCol(t,e),this.afterCommand())}},{key:"deleteRow",value:function(){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteRow(e),this.afterCommand())}},{key:"deleteCol",value:function(){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteCol(e),this.afterCommand())}},{key:"deleteTable",value:function(){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteTable(e),this.afterCommand())}},{key:"resizeTo",value:function(e,t,n){var o;if(n){var i=e.y/e.x,r=t.data("ratio");o={width:r>i?e.x:e.y/r,height:r>i?e.x*r:e.y}}else o={width:e.x,height:e.y};t.css(o)}},{key:"hasFocus",value:function(){return this.$editable.is(":focus")}},{key:"focus",value:function(){this.hasFocus()||this.$editable.focus()}},{key:"isEmpty",value:function(){return he.isEmpty(this.$editable[0])||he.emptyPara===this.$editable.html()}},{key:"empty",value:function(){this.context.invoke("code",he.emptyPara)}},{key:"normalizeContent",value:function(){this.$editable[0].normalize()}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Ne=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editable=t.layoutInfo.editable}var t;return(t=[{key:"initialize",value:function(){this.$editable.on("paste",this.pasteByEvent.bind(this))}},{key:"pasteByEvent",value:function(e){var t=this,n=e.originalEvent.clipboardData;if(n&&n.items&&n.items.length){var o=n.items.length>1?n.items[1]:k.head(n.items);"file"===o.kind&&-1!==o.type.indexOf("image/")?(this.context.invoke("editor.insertImagesOrCallback",[o.getAsFile()]),e.preventDefault()):"string"===o.kind&&this.context.invoke("editor.isLimited",n.getData("Text").length)&&e.preventDefault()}else if(window.clipboardData){var i=window.clipboardData.getData("text");this.context.invoke("editor.isLimited",i.length)&&e.preventDefault()}setTimeout((function(){t.context.invoke("editor.afterCommand")}),10)}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,t),e}();var Ae=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.$eventListener=t()(document),this.$editor=n.layoutInfo.editor,this.$editable=n.layoutInfo.editable,this.options=n.options,this.lang=this.options.langInfo,this.documentEventHandlers={},this.$dropzone=t()(['<div class="note-dropzone">','<div class="note-dropzone-message"></div>',"</div>"].join("")).prependTo(this.$editor)}var n;return n=[{key:"initialize",value:function(){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(){var e=this,n=t()(),o=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(t){var i=e.context.invoke("codeview.isActivated"),r=e.$editor.width()>0&&e.$editor.height()>0;i||n.length||!r||(e.$editor.addClass("dragover"),e.$dropzone.width(e.$editor.width()),e.$dropzone.height(e.$editor.height()),o.text(e.lang.image.dragImageHere)),n=n.add(t.target)},this.documentEventHandlers.onDragleave=function(o){(n=n.not(o.target)).length&&"BODY"!==o.target.nodeName||(n=t()(),e.$editor.removeClass("dragover"))},this.documentEventHandlers.onDrop=function(){n=t()(),e.$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(){e.$dropzone.addClass("hover"),o.text(e.lang.image.dropImage)})).on("dragleave",(function(){e.$dropzone.removeClass("hover"),o.text(e.lang.image.dragImageHere)})),this.$dropzone.on("drop",(function(n){var o=n.originalEvent.dataTransfer;n.preventDefault(),o&&o.files&&o.files.length?(e.$editable.focus(),e.context.invoke("editor.insertImagesOrCallback",o.files)):t().each(o.types,(function(n,i){if(!(i.toLowerCase().indexOf("_moz_")>-1)){var r=o.getData(i);i.toLowerCase().indexOf("text")>-1?e.context.invoke("editor.pasteHTML",r):t()(r).each((function(t,n){e.context.invoke("editor.insertNode",n)}))}}))})).on("dragover",!1)}},{key:"destroy",value:function(){var e=this;Object.keys(this.documentEventHandlers).forEach((function(t){e.$eventListener.off(t.substr(2).toLowerCase(),e.documentEventHandlers[t])})),this.documentEventHandlers={}}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();function Ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var $e=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.$codable=t.layoutInfo.codable,this.options=t.options,this.CodeMirrorConstructor=window.CodeMirror,this.options.codemirror.CodeMirrorConstructor&&(this.CodeMirrorConstructor=this.options.codemirror.CodeMirrorConstructor)}var t;return t=[{key:"sync",value:function(e){var t=this.isActivated(),n=this.CodeMirrorConstructor;t&&(e?n?this.$codable.data("cmEditor").getDoc().setValue(e):this.$codable.val(e):n&&this.$codable.data("cmEditor").save())}},{key:"initialize",value:function(){var e=this;this.$codable.on("keyup",(function(t){t.keyCode===be.code.ESCAPE&&e.deactivate()}))}},{key:"isActivated",value:function(){return this.$editor.hasClass("codeview")}},{key:"toggle",value:function(){this.isActivated()?this.deactivate():this.activate(),this.context.triggerEvent("codeview.toggled")}},{key:"purify",value:function(e){if(this.options.codeviewFilter&&(e=e.replace(this.options.codeviewFilterRegex,""),this.options.codeviewIframeFilter)){var t=this.options.codeviewIframeWhitelistSrc.concat(this.options.codeviewIframeWhitelistSrcBase);e=e.replace(/(<iframe.*?>.*?(?:<\/iframe>)?)/gi,(function(e){if(/<.+src(?==?('|"|\s)?)[\s\S]+src(?=('|"|\s)?)[^>]*?>/i.test(e))return"";var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ie(e,t):void 0}}(e))){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(new RegExp('src="(https?:)?//'+i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+'/(.+)"').test(e))return e}}catch(e){o.e(e)}finally{o.f()}return""}))}return e}},{key:"activate",value:function(){var e=this,t=this.CodeMirrorConstructor;if(this.$codable.val(he.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(),t){var n=t.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var o=new t.TernServer(this.options.codemirror.tern);n.ternServer=o,n.on("cursorActivity",(function(e){o.updateArgHints(e)}))}n.on("blur",(function(t){e.context.triggerEvent("blur.codeview",n.getValue(),t)})),n.on("change",(function(){e.context.triggerEvent("change.codeview",n.getValue(),n)})),n.setSize(null,this.$editable.outerHeight()),this.$codable.data("cmEditor",n)}else this.$codable.on("blur",(function(t){e.context.triggerEvent("blur.codeview",e.$codable.val(),t)})),this.$codable.on("input",(function(){e.context.triggerEvent("change.codeview",e.$codable.val(),e.$codable)}))}},{key:"deactivate",value:function(){if(this.CodeMirrorConstructor){var e=this.$codable.data("cmEditor");this.$codable.val(e.getValue()),e.toTextArea()}var t=this.purify(he.value(this.$codable,this.options.prettifyHtml)||he.emptyPara),n=this.$editable.html()!==t;this.$editable.html(t),this.$editable.height(this.options.height?this.$codable.height():"auto"),this.$editor.removeClass("codeview"),n&&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(){this.isActivated()&&this.deactivate()}}],t&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,t),e}();var De=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$document=t()(document),this.$statusbar=n.layoutInfo.statusbar,this.$editable=n.layoutInfo.editable,this.$codable=n.layoutInfo.codable,this.options=n.options}var n;return(n=[{key:"initialize",value:function(){var e=this;this.options.airMode||this.options.disableResizeEditor?this.destroy():this.$statusbar.on("mousedown",(function(t){t.preventDefault(),t.stopPropagation();var n=e.$editable.offset().top-e.$document.scrollTop(),o=e.$codable.offset().top-e.$document.scrollTop(),i=function(t){var i=t.clientY-(n+24),r=t.clientY-(o+24);i=e.options.minheight>0?Math.max(i,e.options.minheight):i,i=e.options.maxHeight>0?Math.min(i,e.options.maxHeight):i,r=e.options.minheight>0?Math.max(r,e.options.minheight):r,r=e.options.maxHeight>0?Math.min(r,e.options.maxHeight):r,e.$editable.height(i),e.$codable.height(r)};e.$document.on("mousemove",i).one("mouseup",(function(){e.$document.off("mousemove",i)}))}))}},{key:"destroy",value:function(){this.$statusbar.off(),this.$statusbar.addClass("locked")}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Le=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.$editor=n.layoutInfo.editor,this.$toolbar=n.layoutInfo.toolbar,this.$editable=n.layoutInfo.editable,this.$codable=n.layoutInfo.codable,this.$window=t()(window),this.$scrollbar=t()("html, body"),this.scrollbarClassName="note-fullscreen-body",this.onResize=function(){o.resizeTo({h:o.$window.height()-o.$toolbar.outerHeight()})}}var n;return(n=[{key:"resizeTo",value:function(e){this.$editable.css("height",e.h),this.$codable.css("height",e.h),this.$codable.data("cmeditor")&&this.$codable.data("cmeditor").setsize(null,e.h)}},{key:"toggle",value:function(){this.$editor.toggleClass("fullscreen");var e=this.isFullscreen();this.$scrollbar.toggleClass(this.scrollbarClassName,e),e?(this.$editable.data("orgHeight",this.$editable.css("height")),this.$editable.data("orgMaxHeight",this.$editable.css("maxHeight")),this.$editable.css("maxHeight",""),this.$window.on("resize",this.onResize).trigger("resize")):(this.$window.off("resize",this.onResize),this.resizeTo({h:this.$editable.data("orgHeight")}),this.$editable.css("maxHeight",this.$editable.css("orgMaxHeight"))),this.context.invoke("toolbar.updateFullscreen",e)}},{key:"isFullscreen",value:function(){return this.$editor.hasClass("fullscreen")}},{key:"destroy",value:function(){this.$scrollbar.removeClass(this.scrollbarClassName)}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Re=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.$document=t()(document),this.$editingArea=n.layoutInfo.editingArea,this.options=n.options,this.lang=this.options.langInfo,this.events={"summernote.mousedown":function(e,t){o.update(t.target,t)&&t.preventDefault()},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function(){o.update()},"summernote.disable summernote.blur":function(){o.hide()},"summernote.codeview.toggled":function(){o.update()}}}var n;return n=[{key:"initialize",value:function(){var e=this;this.$handle=t()(['<div class="note-handle">','<div class="note-control-selection">','<div class="note-control-selection-bg"></div>','<div class="note-control-holder note-control-nw"></div>','<div class="note-control-holder note-control-ne"></div>','<div class="note-control-holder note-control-sw"></div>','<div class="',this.options.disableResizeImage?"note-control-holder":"note-control-sizing",' note-control-se"></div>',this.options.disableResizeImage?"":'<div class="note-control-selection-info"></div>',"</div>","</div>"].join("")).prependTo(this.$editingArea),this.$handle.on("mousedown",(function(t){if(he.isControlSizing(t.target)){t.preventDefault(),t.stopPropagation();var n=e.$handle.find(".note-control-selection").data("target"),o=n.offset(),i=e.$document.scrollTop(),r=function(t){e.context.invoke("editor.resizeTo",{x:t.clientX-o.left,y:t.clientY-(o.top-i)},n,!t.shiftKey),e.update(n[0],t)};e.$document.on("mousemove",r).one("mouseup",(function(t){t.preventDefault(),e.$document.off("mousemove",r),e.context.invoke("editor.afterCommand")})),n.data("ratio")||n.data("ratio",n.height()/n.width())}})),this.$handle.on("wheel",(function(t){t.preventDefault(),e.update()}))}},{key:"destroy",value:function(){this.$handle.remove()}},{key:"update",value:function(e,n){if(this.context.isDisabled())return!1;var o=he.isImg(e),i=this.$handle.find(".note-control-selection");if(this.context.invoke("imagePopover.update",e,n),o){var r=t()(e),a=r.position(),s={left:a.left+parseInt(r.css("marginLeft"),10),top:a.top+parseInt(r.css("marginTop"),10)},l={w:r.outerWidth(!1),h:r.outerHeight(!1)};i.css({display:"block",left:s.left,top:s.top,width:l.w,height:l.h}).data("target",r);var c=new Image;c.src=r.attr("src");var u=l.w+"x"+l.h+" ("+this.lang.image.original+": "+c.width+"x"+c.height+")";i.find(".note-control-selection-info").text(u),this.context.invoke("editor.saveTarget",e)}else this.hide();return o}},{key:"hide",value:function(){this.context.invoke("editor.clearTarget"),this.$handle.children().hide()}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Pe=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/]{2}|tel:|mailto:[A-Z0-9._%+-]+@|xmpp:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i,Oe=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.options=t.options,this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||n.handleKeyup(t)},"summernote.keydown":function(e,t){n.handleKeydown(t)}}}var n;return(n=[{key:"initialize",value:function(){this.lastWordRange=null}},{key:"destroy",value:function(){this.lastWordRange=null}},{key:"replace",value:function(){if(this.lastWordRange){var e=this.lastWordRange.toString(),n=e.match(Pe);if(n&&(n[1]||n[2])){var o=n[1]?e:"http://"+e,i=this.options.showDomainOnlyForAutolink?e.replace(/^(?:https?:\/\/)?(?:tel?:?)?(?:mailto?:?)?(?:xmpp?:?)?(?:www\.)?/i,"").split("/")[0]:e,r=t()("<a></a>").html(i).attr("href",o)[0];this.context.options.linkTargetBlank&&t()(r).attr("target","_blank"),this.lastWordRange.insertNode(r),this.lastWordRange=null,this.context.invoke("editor.focus")}}}},{key:"handleKeydown",value:function(e){if(k.contains([be.code.ENTER,be.code.SPACE],e.keyCode)){var t=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=t}}},{key:"handleKeyup",value:function(e){k.contains([be.code.ENTER,be.code.SPACE],e.keyCode)&&this.replace()}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Fe=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$note=t.layoutInfo.note,this.events={"summernote.change":function(){n.$note.val(t.invoke("code"))}}}var t;return(t=[{key:"shouldInitialize",value:function(){return he.isTextarea(this.$note[0])}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,t),e}();var He=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.options=t.options.replace||{},this.keys=[be.code.ENTER,be.code.SPACE,be.code.PERIOD,be.code.COMMA,be.code.SEMICOLON,be.code.SLASH],this.previousKeydownCode=null,this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||n.handleKeyup(t)},"summernote.keydown":function(e,t){n.handleKeydown(t)}}}var t;return(t=[{key:"shouldInitialize",value:function(){return!!this.options.match}},{key:"initialize",value:function(){this.lastWord=null}},{key:"destroy",value:function(){this.lastWord=null}},{key:"replace",value:function(){if(this.lastWord){var e=this,t=this.lastWord.toString();this.options.match(t,(function(t){if(t){var n="";if("string"==typeof t?n=he.createText(t):t instanceof jQuery?n=t[0]:t instanceof Node&&(n=t),!n)return;e.lastWord.insertNode(n),e.lastWord=null,e.context.invoke("editor.focus")}}))}}},{key:"handleKeydown",value:function(e){if(this.previousKeydownCode&&k.contains(this.keys,this.previousKeydownCode))this.previousKeydownCode=e.keyCode;else{if(k.contains(this.keys,e.keyCode)){var t=this.context.invoke("editor.createRange").getWordRange();this.lastWord=t}this.previousKeydownCode=e.keyCode}}},{key:"handleKeyup",value:function(e){k.contains(this.keys,e.keyCode)&&this.replace()}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,t),e}();var Me=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editingArea=t.layoutInfo.editingArea,this.options=t.options,!0===this.options.inheritPlaceholder&&(this.options.placeholder=this.context.$note.attr("placeholder")||this.options.placeholder),this.events={"summernote.init summernote.change":function(){n.update()},"summernote.codeview.toggled":function(){n.update()}}}var n;return(n=[{key:"shouldInitialize",value:function(){return!!this.options.placeholder}},{key:"initialize",value:function(){var e=this;this.$placeholder=t()('<div class="note-placeholder"></div>'),this.$placeholder.on("click",(function(){e.context.invoke("focus")})).html(this.options.placeholder).prependTo(this.$editingArea),this.update()}},{key:"destroy",value:function(){this.$placeholder.remove()}},{key:"update",value:function(){var e=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(e)}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var je=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.ui=t().summernote.ui,this.context=n,this.$toolbar=n.layoutInfo.toolbar,this.options=n.options,this.lang=this.options.langInfo,this.invertedKeyMap=m.invertObject(this.options.keyMap[f.isMac?"mac":"pc"])}var n;return n=[{key:"representShortcut",value:function(e){var t=this.invertedKeyMap[e];return this.options.shortcuts&&t?(f.isMac&&(t=t.replace("CMD","⌘").replace("SHIFT","⇧"))," ("+(t=t.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]"))+")"):""}},{key:"button",value:function(e){return!this.options.tooltip&&e.tooltip&&delete e.tooltip,e.container=this.options.container,this.ui.button(e)}},{key:"initialize",value:function(){this.addToolbarButtons(),this.addImagePopoverButtons(),this.addLinkPopoverButtons(),this.addTablePopoverButtons(),this.fontInstalledMap={}}},{key:"destroy",value:function(){delete this.fontInstalledMap}},{key:"isFontInstalled",value:function(e){return Object.prototype.hasOwnProperty.call(this.fontInstalledMap,e)||(this.fontInstalledMap[e]=f.isFontInstalled(e)||k.contains(this.options.fontNamesIgnoreCheck,e)),this.fontInstalledMap[e]}},{key:"isFontDeservedToAdd",value:function(e){return""!==(e=e.toLowerCase())&&this.isFontInstalled(e)&&-1===f.genericFontFamilies.indexOf(e)}},{key:"colorPalette",value:function(e,n,o,i){var r=this;return this.ui.buttonGroup({className:"note-color "+e,children:[this.button({className:"note-current-color-button",contents:this.ui.icon(this.options.icons.font+" note-recent-color"),tooltip:n,click:function(e){var n=t()(e.currentTarget);o&&i?r.context.invoke("editor.color",{backColor:n.attr("data-backColor"),foreColor:n.attr("data-foreColor")}):o?r.context.invoke("editor.color",{backColor:n.attr("data-backColor")}):i&&r.context.invoke("editor.color",{foreColor:n.attr("data-foreColor")})},callback:function(e){var t=e.find(".note-recent-color");o&&(t.css("background-color",r.options.colorButton.backColor),e.attr("data-backColor",r.options.colorButton.backColor)),i?(t.css("color",r.options.colorButton.foreColor),e.attr("data-foreColor",r.options.colorButton.foreColor)):t.css("color","transparent")}}),this.button({className:"dropdown-toggle",contents:this.ui.dropdownButtonContents("",this.options),tooltip:this.lang.color.more,data:{toggle:"dropdown"}}),this.ui.dropdown({items:(o?['<div class="note-palette">','<div class="note-palette-title">'+this.lang.color.background+"</div>","<div>",'<button type="button" class="note-color-reset btn btn-light btn-default" data-event="backColor" data-value="transparent">',this.lang.color.transparent,"</button>","</div>",'<div class="note-holder" data-event="backColor">\x3c!-- back colors --\x3e</div>',"<div>",'<button type="button" class="note-color-select btn btn-light btn-default" data-event="openPalette" data-value="backColorPicker-'+this.options.id+'">',this.lang.color.cpSelect,"</button>",'<input type="color" id="backColorPicker-'+this.options.id+'" class="note-btn note-color-select-btn" value="'+this.options.colorButton.backColor+'" data-event="backColorPalette-'+this.options.id+'">',"</div>",'<div class="note-holder-custom" id="backColorPalette-'+this.options.id+'" data-event="backColor"></div>',"</div>"].join(""):"")+(i?['<div class="note-palette">','<div class="note-palette-title">'+this.lang.color.foreground+"</div>","<div>",'<button type="button" class="note-color-reset btn btn-light btn-default" data-event="removeFormat" data-value="foreColor">',this.lang.color.resetToDefault,"</button>","</div>",'<div class="note-holder" data-event="foreColor">\x3c!-- fore colors --\x3e</div>',"<div>",'<button type="button" class="note-color-select btn btn-light btn-default" data-event="openPalette" data-value="foreColorPicker-'+this.options.id+'">',this.lang.color.cpSelect,"</button>",'<input type="color" id="foreColorPicker-'+this.options.id+'" class="note-btn note-color-select-btn" value="'+this.options.colorButton.foreColor+'" data-event="foreColorPalette-'+this.options.id+'">',"</div>",'<div class="note-holder-custom" id="foreColorPalette-'+this.options.id+'" data-event="foreColor"></div>',"</div>"].join(""):""),callback:function(e){e.find(".note-holder").each((function(e,n){var o=t()(n);o.append(r.ui.palette({colors:r.options.colors,colorsName:r.options.colorsName,eventName:o.data("event"),container:r.options.container,tooltip:r.options.tooltip}).render())}));var n=[["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"]];e.find(".note-holder-custom").each((function(e,o){var i=t()(o);i.append(r.ui.palette({colors:n,colorsName:n,eventName:i.data("event"),container:r.options.container,tooltip:r.options.tooltip}).render())})),e.find("input[type=color]").each((function(n,o){t()(o).change((function(){var n=e.find("#"+t()(this).data("event")).find(".note-color-btn").first(),o=this.value.toUpperCase();n.css("background-color",o).attr("aria-label",o).attr("data-value",o).attr("data-original-title",o),n.click()}))}))},click:function(n){n.stopPropagation();var o=t()("."+e).find(".note-dropdown-menu"),i=t()(n.target),a=i.data("event"),s=i.attr("data-value");if("openPalette"===a){var l=o.find("#"+s),c=t()(o.find("#"+l.data("event")).find(".note-color-row")[0]),u=c.find(".note-color-btn").last().detach(),d=l.val();u.css("background-color",d).attr("aria-label",d).attr("data-value",d).attr("data-original-title",d),c.prepend(u),l.click()}else{if(k.contains(["backColor","foreColor"],a)){var h="backColor"===a?"background-color":"color",f=i.closest(".note-color").find(".note-recent-color"),p=i.closest(".note-color").find(".note-current-color-button");f.css(h,s),p.attr("data-"+a,s)}r.context.invoke("editor."+a,s)}}})]}).render()}},{key:"addToolbarButtons",value:function(){var e=this;this.context.memo("button.style",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.magic),e.options),tooltip:e.lang.style.style,data:{toggle:"dropdown"}}),e.ui.dropdown({className:"dropdown-style",items:e.options.styleTags,title:e.lang.style.style,template:function(t){"string"==typeof t&&(t={tag:t,title:Object.prototype.hasOwnProperty.call(e.lang.style,t)?e.lang.style[t]:t});var n=t.tag,o=t.title;return"<"+n+(t.style?' style="'+t.style+'" ':"")+(t.className?' class="'+t.className+'"':"")+">"+o+"</"+n+">"},click:e.context.createInvokeHandler("editor.formatBlock")})]).render()}));for(var n=function(t,n){var o=e.options.styleTags[t];e.context.memo("button.style."+o,(function(){return e.button({className:"note-btn-style-"+o,contents:'<div data-value="'+o+'">'+o.toUpperCase()+"</div>",tooltip:e.lang.style[o],click:e.context.createInvokeHandler("editor.formatBlock")}).render()}))},o=0,i=this.options.styleTags.length;o<i;o++)n(o);this.context.memo("button.bold",(function(){return e.button({className:"note-btn-bold",contents:e.ui.icon(e.options.icons.bold),tooltip:e.lang.font.bold+e.representShortcut("bold"),click:e.context.createInvokeHandlerAndUpdateState("editor.bold")}).render()})),this.context.memo("button.italic",(function(){return e.button({className:"note-btn-italic",contents:e.ui.icon(e.options.icons.italic),tooltip:e.lang.font.italic+e.representShortcut("italic"),click:e.context.createInvokeHandlerAndUpdateState("editor.italic")}).render()})),this.context.memo("button.underline",(function(){return e.button({className:"note-btn-underline",contents:e.ui.icon(e.options.icons.underline),tooltip:e.lang.font.underline+e.representShortcut("underline"),click:e.context.createInvokeHandlerAndUpdateState("editor.underline")}).render()})),this.context.memo("button.clear",(function(){return e.button({contents:e.ui.icon(e.options.icons.eraser),tooltip:e.lang.font.clear+e.representShortcut("removeFormat"),click:e.context.createInvokeHandler("editor.removeFormat")}).render()})),this.context.memo("button.strikethrough",(function(){return e.button({className:"note-btn-strikethrough",contents:e.ui.icon(e.options.icons.strikethrough),tooltip:e.lang.font.strikethrough+e.representShortcut("strikethrough"),click:e.context.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()})),this.context.memo("button.superscript",(function(){return e.button({className:"note-btn-superscript",contents:e.ui.icon(e.options.icons.superscript),tooltip:e.lang.font.superscript,click:e.context.createInvokeHandlerAndUpdateState("editor.superscript")}).render()})),this.context.memo("button.subscript",(function(){return e.button({className:"note-btn-subscript",contents:e.ui.icon(e.options.icons.subscript),tooltip:e.lang.font.subscript,click:e.context.createInvokeHandlerAndUpdateState("editor.subscript")}).render()})),this.context.memo("button.fontname",(function(){var n=e.context.invoke("editor.currentStyle");return e.options.addDefaultFonts&&t().each(n["font-family"].split(","),(function(t,n){n=n.trim().replace(/['"]+/g,""),e.isFontDeservedToAdd(n)&&-1===e.options.fontNames.indexOf(n)&&e.options.fontNames.push(n)})),e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontname"></span>',e.options),tooltip:e.lang.font.name,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:e.options.icons.menuCheck,items:e.options.fontNames.filter(e.isFontInstalled.bind(e)),title:e.lang.font.name,template:function(e){return'<span style="font-family: '+f.validFontName(e)+'">'+e+"</span>"},click:e.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()})),this.context.memo("button.fontsize",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontsize"></span>',e.options),tooltip:e.lang.font.size,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:e.options.icons.menuCheck,items:e.options.fontSizes,title:e.lang.font.size,click:e.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()})),this.context.memo("button.fontsizeunit",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontsizeunit"></span>',e.options),tooltip:e.lang.font.sizeunit,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontsizeunit",checkClassName:e.options.icons.menuCheck,items:e.options.fontSizeUnits,title:e.lang.font.sizeunit,click:e.context.createInvokeHandlerAndUpdateState("editor.fontSizeUnit")})]).render()})),this.context.memo("button.color",(function(){return e.colorPalette("note-color-all",e.lang.color.recent,!0,!0)})),this.context.memo("button.forecolor",(function(){return e.colorPalette("note-color-fore",e.lang.color.foreground,!1,!0)})),this.context.memo("button.backcolor",(function(){return e.colorPalette("note-color-back",e.lang.color.background,!0,!1)})),this.context.memo("button.ul",(function(){return e.button({contents:e.ui.icon(e.options.icons.unorderedlist),tooltip:e.lang.lists.unordered+e.representShortcut("insertUnorderedList"),click:e.context.createInvokeHandler("editor.insertUnorderedList")}).render()})),this.context.memo("button.ol",(function(){return e.button({contents:e.ui.icon(e.options.icons.orderedlist),tooltip:e.lang.lists.ordered+e.representShortcut("insertOrderedList"),click:e.context.createInvokeHandler("editor.insertOrderedList")}).render()}));var r=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")}),a=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")}),s=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")}),l=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")}),c=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")}),u=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",m.invoke(r,"render")),this.context.memo("button.justifyCenter",m.invoke(a,"render")),this.context.memo("button.justifyRight",m.invoke(s,"render")),this.context.memo("button.justifyFull",m.invoke(l,"render")),this.context.memo("button.outdent",m.invoke(c,"render")),this.context.memo("button.indent",m.invoke(u,"render")),this.context.memo("button.paragraph",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.alignLeft),e.options),tooltip:e.lang.paragraph.paragraph,data:{toggle:"dropdown"}}),e.ui.dropdown([e.ui.buttonGroup({className:"note-align",children:[r,a,s,l]}),e.ui.buttonGroup({className:"note-list",children:[c,u]})])]).render()})),this.context.memo("button.height",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.textHeight),e.options),tooltip:e.lang.font.height,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({items:e.options.lineHeights,checkClassName:e.options.icons.menuCheck,className:"dropdown-line-height",title:e.lang.font.height,click:e.context.createInvokeHandler("editor.lineHeight")})]).render()})),this.context.memo("button.table",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.table),e.options),tooltip:e.lang.table.table,data:{toggle:"dropdown"}}),e.ui.dropdown({title:e.lang.table.table,className:"note-table",items:['<div class="note-dimension-picker">','<div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"></div>','<div class="note-dimension-picker-highlighted"></div>','<div class="note-dimension-picker-unhighlighted"></div>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function(t){t.find(".note-dimension-picker-mousecatcher").css({width:e.options.insertTableMaxSize.col+"em",height:e.options.insertTableMaxSize.row+"em"}).mouseup(e.context.createInvokeHandler("editor.insertTable")).on("mousemove",e.tableMoveHandler.bind(e))}}).render()})),this.context.memo("button.link",(function(){return e.button({contents:e.ui.icon(e.options.icons.link),tooltip:e.lang.link.link+e.representShortcut("linkDialog.show"),click:e.context.createInvokeHandler("linkDialog.show")}).render()})),this.context.memo("button.picture",(function(){return e.button({contents:e.ui.icon(e.options.icons.picture),tooltip:e.lang.image.image,click:e.context.createInvokeHandler("imageDialog.show")}).render()})),this.context.memo("button.video",(function(){return e.button({contents:e.ui.icon(e.options.icons.video),tooltip:e.lang.video.video,click:e.context.createInvokeHandler("videoDialog.show")}).render()})),this.context.memo("button.hr",(function(){return e.button({contents:e.ui.icon(e.options.icons.minus),tooltip:e.lang.hr.insert+e.representShortcut("insertHorizontalRule"),click:e.context.createInvokeHandler("editor.insertHorizontalRule")}).render()})),this.context.memo("button.fullscreen",(function(){return e.button({className:"btn-fullscreen note-codeview-keep",contents:e.ui.icon(e.options.icons.arrowsAlt),tooltip:e.lang.options.fullscreen,click:e.context.createInvokeHandler("fullscreen.toggle")}).render()})),this.context.memo("button.codeview",(function(){return e.button({className:"btn-codeview note-codeview-keep",contents:e.ui.icon(e.options.icons.code),tooltip:e.lang.options.codeview,click:e.context.createInvokeHandler("codeview.toggle")}).render()})),this.context.memo("button.redo",(function(){return e.button({contents:e.ui.icon(e.options.icons.redo),tooltip:e.lang.history.redo+e.representShortcut("redo"),click:e.context.createInvokeHandler("editor.redo")}).render()})),this.context.memo("button.undo",(function(){return e.button({contents:e.ui.icon(e.options.icons.undo),tooltip:e.lang.history.undo+e.representShortcut("undo"),click:e.context.createInvokeHandler("editor.undo")}).render()})),this.context.memo("button.help",(function(){return e.button({contents:e.ui.icon(e.options.icons.question),tooltip:e.lang.options.help,click:e.context.createInvokeHandler("helpDialog.show")}).render()}))}},{key:"addImagePopoverButtons",value:function(){var e=this;this.context.memo("button.resizeFull",(function(){return e.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:e.lang.image.resizeFull,click:e.context.createInvokeHandler("editor.resize","1")}).render()})),this.context.memo("button.resizeHalf",(function(){return e.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:e.lang.image.resizeHalf,click:e.context.createInvokeHandler("editor.resize","0.5")}).render()})),this.context.memo("button.resizeQuarter",(function(){return e.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:e.lang.image.resizeQuarter,click:e.context.createInvokeHandler("editor.resize","0.25")}).render()})),this.context.memo("button.resizeNone",(function(){return e.button({contents:e.ui.icon(e.options.icons.rollback),tooltip:e.lang.image.resizeNone,click:e.context.createInvokeHandler("editor.resize","0")}).render()})),this.context.memo("button.floatLeft",(function(){return e.button({contents:e.ui.icon(e.options.icons.floatLeft),tooltip:e.lang.image.floatLeft,click:e.context.createInvokeHandler("editor.floatMe","left")}).render()})),this.context.memo("button.floatRight",(function(){return e.button({contents:e.ui.icon(e.options.icons.floatRight),tooltip:e.lang.image.floatRight,click:e.context.createInvokeHandler("editor.floatMe","right")}).render()})),this.context.memo("button.floatNone",(function(){return e.button({contents:e.ui.icon(e.options.icons.rollback),tooltip:e.lang.image.floatNone,click:e.context.createInvokeHandler("editor.floatMe","none")}).render()})),this.context.memo("button.removeMedia",(function(){return e.button({contents:e.ui.icon(e.options.icons.trash),tooltip:e.lang.image.remove,click:e.context.createInvokeHandler("editor.removeMedia")}).render()}))}},{key:"addLinkPopoverButtons",value:function(){var e=this;this.context.memo("button.linkDialogShow",(function(){return e.button({contents:e.ui.icon(e.options.icons.link),tooltip:e.lang.link.edit,click:e.context.createInvokeHandler("linkDialog.show")}).render()})),this.context.memo("button.unlink",(function(){return e.button({contents:e.ui.icon(e.options.icons.unlink),tooltip:e.lang.link.unlink,click:e.context.createInvokeHandler("editor.unlink")}).render()}))}},{key:"addTablePopoverButtons",value:function(){var e=this;this.context.memo("button.addRowUp",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowAbove),tooltip:e.lang.table.addRowAbove,click:e.context.createInvokeHandler("editor.addRow","top")}).render()})),this.context.memo("button.addRowDown",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowBelow),tooltip:e.lang.table.addRowBelow,click:e.context.createInvokeHandler("editor.addRow","bottom")}).render()})),this.context.memo("button.addColLeft",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colBefore),tooltip:e.lang.table.addColLeft,click:e.context.createInvokeHandler("editor.addCol","left")}).render()})),this.context.memo("button.addColRight",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colAfter),tooltip:e.lang.table.addColRight,click:e.context.createInvokeHandler("editor.addCol","right")}).render()})),this.context.memo("button.deleteRow",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowRemove),tooltip:e.lang.table.delRow,click:e.context.createInvokeHandler("editor.deleteRow")}).render()})),this.context.memo("button.deleteCol",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colRemove),tooltip:e.lang.table.delCol,click:e.context.createInvokeHandler("editor.deleteCol")}).render()})),this.context.memo("button.deleteTable",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.trash),tooltip:e.lang.table.delTable,click:e.context.createInvokeHandler("editor.deleteTable")}).render()}))}},{key:"build",value:function(e,t){for(var n=0,o=t.length;n<o;n++){for(var i=t[n],r=Array.isArray(i)?i[0]:i,a=Array.isArray(i)?1===i.length?[i[0]]:i[1]:[i],s=this.ui.buttonGroup({className:"note-"+r}).render(),l=0,c=a.length;l<c;l++){var u=this.context.memo("button."+a[l]);u&&s.append("function"==typeof u?u(this.context):u)}s.appendTo(e)}}},{key:"updateCurrentStyle",value:function(e){var n=e||this.$toolbar,o=this.context.invoke("editor.currentStyle");if(this.updateBtnStates(n,{".note-btn-bold":function(){return"bold"===o["font-bold"]},".note-btn-italic":function(){return"italic"===o["font-italic"]},".note-btn-underline":function(){return"underline"===o["font-underline"]},".note-btn-subscript":function(){return"subscript"===o["font-subscript"]},".note-btn-superscript":function(){return"superscript"===o["font-superscript"]},".note-btn-strikethrough":function(){return"strikethrough"===o["font-strikethrough"]}}),o["font-family"]){var i=o["font-family"].split(",").map((function(e){return e.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")})),r=k.find(i,this.isFontInstalled.bind(this));n.find(".dropdown-fontname a").each((function(e,n){var o=t()(n),i=o.data("value")+""==r+"";o.toggleClass("checked",i)})),n.find(".note-current-fontname").text(r).css("font-family",r)}if(o["font-size"]){var a=o["font-size"];n.find(".dropdown-fontsize a").each((function(e,n){var o=t()(n),i=o.data("value")+""==a+"";o.toggleClass("checked",i)})),n.find(".note-current-fontsize").text(a);var s=o["font-size-unit"];n.find(".dropdown-fontsizeunit a").each((function(e,n){var o=t()(n),i=o.data("value")+""==s+"";o.toggleClass("checked",i)})),n.find(".note-current-fontsizeunit").text(s)}if(o["line-height"]){var l=o["line-height"];n.find(".dropdown-line-height a").each((function(e,n){var o=t()(n),i=t()(n).data("value")+""==l+"";o.toggleClass("checked",i)})),n.find(".note-current-line-height").text(l)}}},{key:"updateBtnStates",value:function(e,n){var o=this;t().each(n,(function(t,n){o.ui.toggleBtnActive(e.find(t),n())}))}},{key:"tableMoveHandler",value:function(e){var n,o=t()(e.target.parentNode),i=o.next(),r=o.find(".note-dimension-picker-mousecatcher"),a=o.find(".note-dimension-picker-highlighted"),s=o.find(".note-dimension-picker-unhighlighted");if(void 0===e.offsetX){var l=t()(e.target).offset();n={x:e.pageX-l.left,y:e.pageY-l.top}}else n={x:e.offsetX,y:e.offsetY};var c=Math.ceil(n.x/18)||1,u=Math.ceil(n.y/18)||1;a.css({width:c+"em",height:u+"em"}),r.data("value",c+"x"+u),c>3&&c<this.options.insertTableMaxSize.col&&s.css({width:c+1+"em"}),u>3&&u<this.options.insertTableMaxSize.row&&s.css({height:u+1+"em"}),i.html(c+" x "+u)}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Be=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.$window=t()(window),this.$document=t()(document),this.ui=t().summernote.ui,this.$note=n.layoutInfo.note,this.$editor=n.layoutInfo.editor,this.$toolbar=n.layoutInfo.toolbar,this.$editable=n.layoutInfo.editable,this.$statusbar=n.layoutInfo.statusbar,this.options=n.options,this.isFollowing=!1,this.followScroll=this.followScroll.bind(this)}var n;return(n=[{key:"shouldInitialize",value:function(){return!this.options.airMode}},{key:"initialize",value:function(){var e=this;this.options.toolbar=this.options.toolbar||[],this.options.toolbar.length?this.context.invoke("buttons.build",this.$toolbar,this.options.toolbar):this.$toolbar.hide(),this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.changeContainer(!1),this.$note.on("summernote.keyup summernote.mouseup summernote.change",(function(){e.context.invoke("buttons.updateCurrentStyle")})),this.context.invoke("buttons.updateCurrentStyle"),this.options.followingToolbar&&this.$window.on("scroll resize",this.followScroll)}},{key:"destroy",value:function(){this.$toolbar.children().remove(),this.options.followingToolbar&&this.$window.off("scroll resize",this.followScroll)}},{key:"followScroll",value:function(){if(this.$editor.hasClass("fullscreen"))return!1;var e=this.$editor.outerHeight(),n=this.$editor.width(),o=this.$toolbar.height(),i=this.$statusbar.height(),r=0;this.options.otherStaticBar&&(r=t()(this.options.otherStaticBar).outerHeight());var a=this.$document.scrollTop(),s=this.$editor.offset().top,l=s-r,c=s+e-r-o-i;!this.isFollowing&&a>l&&a<c-o?(this.isFollowing=!0,this.$editable.css({marginTop:this.$toolbar.outerHeight()}),this.$toolbar.css({position:"fixed",top:r,width:n,zIndex:1e3})):this.isFollowing&&(a<l||a>c)&&(this.isFollowing=!1,this.$toolbar.css({position:"relative",top:0,width:"100%",zIndex:"auto"}),this.$editable.css({marginTop:""}))}},{key:"changeContainer",value:function(e){e?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.options.followingToolbar&&this.followScroll()}},{key:"updateFullscreen",value:function(e){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),e),this.changeContainer(e)}},{key:"updateCodeview",value:function(e){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),e),e?this.deactivate():this.activate()}},{key:"activate",value:function(e){var t=this.$toolbar.find("button");e||(t=t.not(".note-codeview-keep")),this.ui.toggleBtn(t,!0)}},{key:"deactivate",value:function(e){var t=this.$toolbar.find("button");e||(t=t.not(".note-codeview-keep")),this.ui.toggleBtn(t,!1)}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var ze=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.$body=t()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo,n.memo("help.linkDialog.show",this.options.langInfo.help["linkDialog.show"])}var n;return(n=[{key:"initialize",value:function(){var e=this.options.dialogsInBody?this.$body:this.options.container,n=['<div class="form-group note-form-group">','<label for="note-dialog-link-txt-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.link.textToDisplay,"</label>"),'<input id="note-dialog-link-txt-'.concat(this.options.id,'" class="note-link-text form-control note-form-control note-input" type="text"/>'),"</div>",'<div class="form-group note-form-group">','<label for="note-dialog-link-url-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.link.url,"</label>"),'<input id="note-dialog-link-url-'.concat(this.options.id,'" class="note-link-url form-control note-form-control note-input" type="text" value="http://"/>'),"</div>",this.options.disableLinkTarget?"":t()("<div></div>").append(this.ui.checkbox({className:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:!0}).render()).html(),t()("<div></div>").append(this.ui.checkbox({className:"sn-checkbox-use-protocol",text:this.lang.link.useProtocol,checked:!0}).render()).html()].join(""),o='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-link-btn",'" value="').concat(this.lang.link.insert,'" disabled>');this.$dialog=this.ui.dialog({className:"link-dialog",title:this.lang.link.insert,fade:this.options.dialogsFade,body:n,footer:o}).render().appendTo(e)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(e,t){e.on("keypress",(function(e){e.keyCode===be.code.ENTER&&(e.preventDefault(),t.trigger("click"))}))}},{key:"toggleLinkBtn",value:function(e,t,n){this.ui.toggleBtn(e,t.val()&&n.val())}},{key:"showLinkDialog",value:function(e){var n=this;return t().Deferred((function(t){var o=n.$dialog.find(".note-link-text"),i=n.$dialog.find(".note-link-url"),r=n.$dialog.find(".note-link-btn"),a=n.$dialog.find(".sn-checkbox-open-in-new-window input[type=checkbox]"),s=n.$dialog.find(".sn-checkbox-use-protocol input[type=checkbox]");n.ui.onDialogShown(n.$dialog,(function(){n.context.triggerEvent("dialog.shown"),!e.url&&m.isValidUrl(e.text)&&(e.url=e.text),o.on("input paste propertychange",(function(){e.text=o.val(),n.toggleLinkBtn(r,o,i)})).val(e.text),i.on("input paste propertychange",(function(){e.text||o.val(i.val()),n.toggleLinkBtn(r,o,i)})).val(e.url),f.isSupportTouch||i.trigger("focus"),n.toggleLinkBtn(r,o,i),n.bindEnterKey(i,r),n.bindEnterKey(o,r);var l=void 0!==e.isNewWindow?e.isNewWindow:n.context.options.linkTargetBlank;a.prop("checked",l);var c=!e.url&&n.context.options.useProtocol;s.prop("checked",c),r.one("click",(function(r){r.preventDefault(),t.resolve({range:e.range,url:i.val(),text:o.val(),isNewWindow:a.is(":checked"),checkProtocol:s.is(":checked")}),n.ui.hideDialog(n.$dialog)}))})),n.ui.onDialogHidden(n.$dialog,(function(){o.off(),i.off(),r.off(),"pending"===t.state()&&t.reject()})),n.ui.showDialog(n.$dialog)})).promise()}},{key:"show",value:function(){var e=this,t=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange"),this.showLinkDialog(t).then((function(t){e.context.invoke("editor.restoreRange"),e.context.invoke("editor.createLink",t)})).fail((function(){e.context.invoke("editor.restoreRange")}))}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Ue=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.options=n.options,this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function(){o.update()},"summernote.disable summernote.dialog.shown":function(){o.hide()},"summernote.blur":function(e,t){t.originalEvent&&t.originalEvent.relatedTarget&&o.$popover[0].contains(t.originalEvent.relatedTarget)||o.hide()}}}var n;return(n=[{key:"shouldInitialize",value:function(){return!k.isEmpty(this.options.popover.link)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-link-popover",callback:function(e){e.find(".popover-content,.note-popover-content").prepend('<span><a target="_blank"></a> </span>')}}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.link),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(){if(this.context.invoke("editor.hasFocus")){var e=this.context.invoke("editor.getLastRange");if(e.isCollapsed()&&e.isOnAnchor()){var n=he.ancestor(e.sc,he.isAnchor),o=t()(n).attr("href");this.$popover.find("a").attr("href",o).text(o);var i=he.posFromPlaceholder(n),r=t()(this.options.container).offset();i.top-=r.top,i.left-=r.left,this.$popover.css({display:"block",left:i.left,top:i.top})}else this.hide()}else this.hide()}},{key:"hide",value:function(){this.$popover.hide()}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var We=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.$body=t()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo}var n;return(n=[{key:"initialize",value:function(){var e="";if(this.options.maximumImageFileSize){var t=Math.floor(Math.log(this.options.maximumImageFileSize)/Math.log(1024)),n=1*(this.options.maximumImageFileSize/Math.pow(1024,t)).toFixed(2)+" "+" KMGTP"[t]+"B";e="<small>".concat(this.lang.image.maximumFileSize+" : "+n,"</small>")}var o=this.options.dialogsInBody?this.$body:this.options.container,i=['<div class="form-group note-form-group note-group-select-from-files">','<label for="note-dialog-image-file-'+this.options.id+'" class="note-form-label">'+this.lang.image.selectFromFiles+"</label>",'<input id="note-dialog-image-file-'+this.options.id+'" class="note-image-input form-control-file note-form-control note-input" ',' type="file" name="files" accept="'+this.options.acceptImageFileTypes+'" multiple="multiple"/>',e,"</div>",'<div class="form-group note-group-image-url">','<label for="note-dialog-image-url-'+this.options.id+'" class="note-form-label">'+this.lang.image.url+"</label>",'<input id="note-dialog-image-url-'+this.options.id+'" class="note-image-url form-control note-form-control note-input" type="text"/>',"</div>"].join(""),r='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-image-btn",'" value="').concat(this.lang.image.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:i,footer:r}).render().appendTo(o)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(e,t){e.on("keypress",(function(e){e.keyCode===be.code.ENTER&&(e.preventDefault(),t.trigger("click"))}))}},{key:"show",value:function(){var e=this;this.context.invoke("editor.saveRange"),this.showImageDialog().then((function(t){e.ui.hideDialog(e.$dialog),e.context.invoke("editor.restoreRange"),"string"==typeof t?e.options.callbacks.onImageLinkInsert?e.context.triggerEvent("image.link.insert",t):e.context.invoke("editor.insertImage",t):e.context.invoke("editor.insertImagesOrCallback",t)})).fail((function(){e.context.invoke("editor.restoreRange")}))}},{key:"showImageDialog",value:function(){var e=this;return t().Deferred((function(t){var n=e.$dialog.find(".note-image-input"),o=e.$dialog.find(".note-image-url"),i=e.$dialog.find(".note-image-btn");e.ui.onDialogShown(e.$dialog,(function(){e.context.triggerEvent("dialog.shown"),n.replaceWith(n.clone().on("change",(function(e){t.resolve(e.target.files||e.target.value)})).val("")),o.on("input paste propertychange",(function(){e.ui.toggleBtn(i,o.val())})).val(""),f.isSupportTouch||o.trigger("focus"),i.click((function(e){e.preventDefault(),t.resolve(o.val())})),e.bindEnterKey(o,i)})),e.ui.onDialogHidden(e.$dialog,(function(){n.off(),o.off(),i.off(),"pending"===t.state()&&t.reject()})),e.ui.showDialog(e.$dialog)}))}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var _e=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.editable=n.layoutInfo.editable[0],this.options=n.options,this.events={"summernote.disable summernote.dialog.shown":function(){o.hide()},"summernote.blur":function(e,t){t.originalEvent&&t.originalEvent.relatedTarget&&o.$popover[0].contains(t.originalEvent.relatedTarget)||o.hide()}}}var n;return n=[{key:"shouldInitialize",value:function(){return!k.isEmpty(this.options.popover.image)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-image-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.image),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(e,n){if(he.isImg(e)){var o=t()(e).offset(),i=t()(this.options.container).offset(),r={};this.options.popatmouse?(r.left=n.pageX-20,r.top=n.pageY):r=o,r.top-=i.top,r.left-=i.left,this.$popover.css({display:"block",left:r.left,top:r.top})}else this.hide()}},{key:"hide",value:function(){this.$popover.hide()}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var qe=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.options=n.options,this.events={"summernote.mousedown":function(e,t){o.update(t.target)},"summernote.keyup summernote.scroll summernote.change":function(){o.update()},"summernote.disable summernote.dialog.shown":function(){o.hide()},"summernote.blur":function(e,t){t.originalEvent&&t.originalEvent.relatedTarget&&o.$popover[0].contains(t.originalEvent.relatedTarget)||o.hide()}}}var n;return n=[{key:"shouldInitialize",value:function(){return!k.isEmpty(this.options.popover.table)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-table-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.table),f.isFF&&document.execCommand("enableInlineTableEditing",!1,!1),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(e){if(this.context.isDisabled())return!1;var n=he.isCell(e)||he.isCell(null==e?void 0:e.parentElement);if(n){var o=he.posFromPlaceholder(e),i=t()(this.options.container).offset();o.top-=i.top,o.left-=i.left,this.$popover.css({display:"block",left:o.left,top:o.top})}else this.hide();return n}},{key:"hide",value:function(){this.$popover.hide()}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Ke=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.$body=t()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo}var n;return(n=[{key:"initialize",value:function(){var e=this.options.dialogsInBody?this.$body:this.options.container,t=['<div class="form-group note-form-group row-fluid">','<label for="note-dialog-video-url-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.video.url,' <small class="text-muted">').concat(this.lang.video.providers,"</small></label>"),'<input id="note-dialog-video-url-'.concat(this.options.id,'" class="note-video-url form-control note-form-control note-input" type="text"/>'),"</div>"].join(""),n='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-video-btn",'" value="').concat(this.lang.video.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:t,footer:n}).render().appendTo(e)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(e,t){e.on("keypress",(function(e){e.keyCode===be.code.ENTER&&(e.preventDefault(),t.trigger("click"))}))}},{key:"createVideoNode",value:function(e){var n,o=e.match(/\/\/(?:(?:www|m)\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?$/),i=e.match(/(?:\.|\/\/)drive\.google\.com\/file\/d\/(.[a-zA-Z0-9_-]*)\/view/),r=e.match(/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/),a=e.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/),s=e.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/),l=e.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/),c=e.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),u=e.match(/\/\/(.*)\/videos\/watch\/([^?]*)(?:\?(?:start=(\w*))?(?:&stop=(\w*))?(?:&loop=([10]))?(?:&autoplay=([10]))?(?:&muted=([10]))?)?/),d=e.match(/\/\/v\.qq\.com.*?vid=(.+)/),h=e.match(/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/),f=e.match(/^.+.(mp4|m4v)$/),p=e.match(/^.+.(ogg|ogv)$/),m=e.match(/^.+.(webm)$/),g=e.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/);if(o&&11===o[1].length){var v=o[1],y=0;if(void 0!==o[2]){var b=o[2].match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/);if(b)for(var k=[3600,60,1],w=0,x=k.length;w<x;w++)y+=void 0!==b[w+1]?k[w]*parseInt(b[w+1],10):0}n=t()("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+v+(y>0?"?start="+y:"")).attr("width","640").attr("height","360")}else if(i&&i[0].length)n=t()("<iframe>").attr("frameborder",0).attr("src","https://drive.google.com/file/d/"+i[1]+"/preview").attr("width","640").attr("height","480");else if(r&&r[0].length)n=t()("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+r[1]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true");else if(a&&a[0].length)n=t()("<iframe>").attr("frameborder",0).attr("src",a[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(s&&s[3].length)n=t()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+s[3]).attr("width","640").attr("height","360");else if(l&&l[2].length)n=t()("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+l[2]).attr("width","640").attr("height","360");else if(c&&c[1].length)n=t()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+c[1]);else if(u&&u[0].length){var C=0;"undefined"!==u[2]&&(C=u[2]);var T=0;"undefined"!==u[3]&&(T=u[3]);var S=0;"undefined"!==u[4]&&(S=u[4]);var E=0;"undefined"!==u[5]&&(E=u[5]);var N=0;"undefined"!==u[6]&&(N=u[6]),n=t()('<iframe allowfullscreen sandbox="allow-same-origin allow-scripts allow-popups">').attr("frameborder",0).attr("src","//"+u[1]+"/videos/embed/"+u[2]+"?loop="+S+"&autoplay="+E+"&muted="+N+(C>0?"&start="+C:"")+(T>0?"&end="+y:"")).attr("width","560").attr("height","315")}else if(d&&d[1].length||h&&h[2].length){var A=d&&d[1].length?d[1]:h[2];n=t()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","https://v.qq.com/txp/iframe/player.html?vid="+A+"&auto=0")}else if(f||p||m)n=t()("<video controls>").attr("src",e).attr("width","640").attr("height","360");else{if(!g||!g[0].length)return!1;n=t()("<iframe>").attr("frameborder",0).attr("src","https://www.facebook.com/plugins/video.php?href="+encodeURIComponent(g[0])+"&show_text=0&width=560").attr("width","560").attr("height","301").attr("scrolling","no").attr("allowtransparency","true")}return n.addClass("note-video-clip"),n[0]}},{key:"show",value:function(){var e=this,t=this.context.invoke("editor.getSelectedText");this.context.invoke("editor.saveRange"),this.showVideoDialog(t).then((function(t){e.ui.hideDialog(e.$dialog),e.context.invoke("editor.restoreRange");var n=e.createVideoNode(t);n&&e.context.invoke("editor.insertNode",n)})).fail((function(){e.context.invoke("editor.restoreRange")}))}},{key:"showVideoDialog",value:function(){var e=this;return t().Deferred((function(t){var n=e.$dialog.find(".note-video-url"),o=e.$dialog.find(".note-video-btn");e.ui.onDialogShown(e.$dialog,(function(){e.context.triggerEvent("dialog.shown"),n.on("input paste propertychange",(function(){e.ui.toggleBtn(o,n.val())})),f.isSupportTouch||n.trigger("focus"),o.click((function(e){e.preventDefault(),t.resolve(n.val())})),e.bindEnterKey(n,o)})),e.ui.onDialogHidden(e.$dialog,(function(){n.off(),o.off(),"pending"===t.state()&&t.reject()})),e.ui.showDialog(e.$dialog)}))}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Ve=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.$body=t()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo}var n;return n=[{key:"initialize",value:function(){var e=this.options.dialogsInBody?this.$body:this.options.container,t=['<p class="text-center">','<a href="http://summernote.org/" target="_blank" rel="noopener noreferrer">Summernote 0.8.20</a> · ','<a href="https://github.com/summernote/summernote" target="_blank" rel="noopener noreferrer">Project</a> · ','<a href="https://github.com/summernote/summernote/issues" target="_blank" rel="noopener noreferrer">Issues</a>',"</p>"].join("");this.$dialog=this.ui.dialog({title:this.lang.options.help,fade:this.options.dialogsFade,body:this.createShortcutList(),footer:t,callback:function(e){e.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(e)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"createShortcutList",value:function(){var e=this,n=this.options.keyMap[f.isMac?"mac":"pc"];return Object.keys(n).map((function(o){var i=n[o],r=t()('<div><div class="help-list-item"></div></div>');return r.append(t()("<label><kbd>"+o+"</kdb></label>").css({width:180,"margin-right":10})).append(t()("<span></span>").html(e.context.memo("help."+i)||i)),r.html()})).join("")}},{key:"showHelpDialog",value:function(){var e=this;return t().Deferred((function(t){e.ui.onDialogShown(e.$dialog,(function(){e.context.triggerEvent("dialog.shown"),t.resolve()})),e.ui.showDialog(e.$dialog)})).promise()}},{key:"show",value:function(){var e=this;this.context.invoke("editor.saveRange"),this.showHelpDialog().then((function(){e.context.invoke("editor.restoreRange")}))}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Ge=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.options=n.options,this.hidable=!0,this.onContextmenu=!1,this.pageX=null,this.pageY=null,this.events={"summernote.contextmenu":function(e){o.options.editing&&(e.preventDefault(),e.stopPropagation(),o.onContextmenu=!0,o.update(!0))},"summernote.mousedown":function(e,t){o.pageX=t.pageX,o.pageY=t.pageY},"summernote.keyup summernote.mouseup summernote.scroll":function(e,t){o.options.editing&&!o.onContextmenu&&(o.pageX=t.pageX,o.pageY=t.pageY,o.update()),o.onContextmenu=!1},"summernote.disable summernote.change summernote.dialog.shown summernote.blur":function(){o.hide()},"summernote.focusout":function(){o.$popover.is(":active,:focus")||o.hide()}}}var n;return(n=[{key:"shouldInitialize",value:function(){return this.options.airMode&&!k.isEmpty(this.options.popover.air)}},{key:"initialize",value:function(){var e=this;this.$popover=this.ui.popover({className:"note-air-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content");this.context.invoke("buttons.build",t,this.options.popover.air),this.$popover.on("mousedown",(function(){e.hidable=!1})),this.$popover.on("mouseup",(function(){e.hidable=!0}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(e){var n=this.context.invoke("editor.currentStyle");if(!n.range||n.range.isCollapsed()&&!e)this.hide();else{var o={left:this.pageX,top:this.pageY},i=t()(this.options.container).offset();o.top-=i.top,o.left-=i.left,this.$popover.css({display:"block",left:Math.max(o.left,0)+-5,top:o.top+5}),this.context.invoke("buttons.updateCurrentStyle",this.$popover)}}},{key:"updateCodeview",value:function(e){this.ui.toggleBtnActive(this.$popover.find(".btn-codeview"),e),e&&this.hide()}},{key:"hide",value:function(){this.hidable&&this.$popover.hide()}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();var Qe=function(){function e(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.$editable=n.layoutInfo.editable,this.options=n.options,this.hint=this.options.hint||[],this.direction=this.options.hintDirection||"bottom",this.hints=Array.isArray(this.hint)?this.hint:[this.hint],this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||o.handleKeyup(t)},"summernote.keydown":function(e,t){o.handleKeydown(t)},"summernote.disable summernote.dialog.shown summernote.blur":function(){o.hide()}}}var n;return n=[{key:"shouldInitialize",value:function(){return this.hints.length>0}},{key:"initialize",value:function(){var e=this;this.lastWordRange=null,this.matchingWord=null,this.$popover=this.ui.popover({className:"note-hint-popover",hideArrow:!0,direction:""}).render().appendTo(this.options.container),this.$popover.hide(),this.$content=this.$popover.find(".popover-content,.note-popover-content"),this.$content.on("click",".note-hint-item",(function(n){e.$content.find(".active").removeClass("active"),t()(n.currentTarget).addClass("active"),e.replace()})),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"selectItem",value:function(e){this.$content.find(".active").removeClass("active"),e.addClass("active"),this.$content[0].scrollTop=e[0].offsetTop-this.$content.innerHeight()/2}},{key:"moveDown",value:function(){var e=this.$content.find(".note-hint-item.active"),t=e.next();if(t.length)this.selectItem(t);else{var n=e.parent().next();n.length||(n=this.$content.find(".note-hint-group").first()),this.selectItem(n.find(".note-hint-item").first())}}},{key:"moveUp",value:function(){var e=this.$content.find(".note-hint-item.active"),t=e.prev();if(t.length)this.selectItem(t);else{var n=e.parent().prev();n.length||(n=this.$content.find(".note-hint-group").last()),this.selectItem(n.find(".note-hint-item").last())}}},{key:"replace",value:function(){var e=this.$content.find(".note-hint-item.active");if(e.length){var n=this.nodeFromItem(e);if(null!==this.matchingWord&&0===this.matchingWord.length)this.lastWordRange.so=this.lastWordRange.eo;else if(null!==this.matchingWord&&this.matchingWord.length>0&&!this.lastWordRange.isCollapsed()){var o=this.lastWordRange.eo-this.lastWordRange.so-this.matchingWord.length;o>0&&(this.lastWordRange.so+=o)}if(this.lastWordRange.insertNode(n),"next"===this.options.hintSelect){var i=document.createTextNode("");t()(n).after(i),ve.createFromNodeBefore(i).select()}else ve.createFromNodeAfter(n).select();this.lastWordRange=null,this.hide(),this.context.invoke("editor.focus"),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}}},{key:"nodeFromItem",value:function(e){var t=this.hints[e.data("index")],n=e.data("item"),o=t.content?t.content(n):n;return"string"==typeof o&&(o=he.createText(o)),o}},{key:"createItemTemplates",value:function(e,n){var o=this.hints[e];return n.map((function(n){var i=t()('<div class="note-hint-item"></div>');return i.append(o.template?o.template(n):n+""),i.data({index:e,item:n}),i}))}},{key:"handleKeydown",value:function(e){this.$popover.is(":visible")&&(e.keyCode===be.code.ENTER?(e.preventDefault(),this.replace()):e.keyCode===be.code.UP?(e.preventDefault(),this.moveUp()):e.keyCode===be.code.DOWN&&(e.preventDefault(),this.moveDown()))}},{key:"searchKeyword",value:function(e,t,n){var o=this.hints[e];if(o&&o.match.test(t)&&o.search){var i=o.match.exec(t);this.matchingWord=i[0],o.search(i[1],n)}else n()}},{key:"createGroup",value:function(e,n){var o=this,i=t()('<div class="note-hint-group note-hint-group-'+e+'"></div>');return this.searchKeyword(e,n,(function(t){(t=t||[]).length&&(i.html(o.createItemTemplates(e,t)),o.show())})),i}},{key:"handleKeyup",value:function(e){var n=this;if(!k.contains([be.code.ENTER,be.code.UP,be.code.DOWN],e.keyCode)){var o,i,r=this.context.invoke("editor.getLastRange");if("words"===this.options.hintMode){if(o=r.getWordsRange(r),i=o.toString(),this.hints.forEach((function(e){if(e.match.test(i))return o=r.getWordsMatchRange(e.match),!1})),!o)return void this.hide();i=o.toString()}else o=r.getWordRange(),i=o.toString();if(this.hints.length&&i){this.$content.empty();var a=m.rect2bnd(k.last(o.getClientRects())),s=t()(this.options.container).offset();a&&(a.top-=s.top,a.left-=s.left,this.$popover.hide(),this.lastWordRange=o,this.hints.forEach((function(e,t){e.match.test(i)&&n.createGroup(t,i).appendTo(n.$content)})),this.$content.find(".note-hint-item:first").addClass("active"),"top"===this.direction?this.$popover.css({left:a.left,top:a.top-this.$popover.outerHeight()-5}):this.$popover.css({left:a.left,top:a.top+a.height+5}))}else this.hide()}}},{key:"show",value:function(){this.$popover.show()}},{key:"hide",value:function(){this.$popover.hide()}}],n&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();function Ye(e){return Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(e)}t().summernote=t().extend(t().summernote,{version:"0.8.20",plugins:{},dom:he,range:ve,lists:k,options:{langInfo:t().summernote.lang["en-US"],editing:!0,modules:{editor:Ee,clipboard:Ne,dropzone:Ae,codeview:$e,statusbar:De,fullscreen:Le,handle:Re,hintPopover:Qe,autoLink:Oe,autoSync:Fe,autoReplace:He,placeholder:Me,buttons:je,toolbar:Be,linkDialog:ze,linkPopover:Ue,imageDialog:We,imagePopover:_e,tablePopover:qe,videoDialog:Ke,helpDialog:Ve,airPopover:Ge},buttons:{},lang:"en-US",followingToolbar:!1,toolbarPosition:"top",otherStaticBar:"",codeviewKeepButton:!1,toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popatmouse:!0,popover:{image:[["resize",["resizeFull","resizeHalf","resizeQuarter","resizeNone"]],["float",["floatLeft","floatRight","floatNone"]],["remove",["removeMedia"]]],link:[["link",["linkDialogShow","unlink"]]],table:[["add",["addRowDown","addRowUp","addColLeft","addColRight"]],["delete",["deleteRow","deleteCol","deleteTable"]]],air:[["color",["color"]],["font",["bold","underline","clear"]],["para",["ul","paragraph"]],["table",["table"]],["insert",["link","picture"]],["view",["fullscreen","codeview"]]]},airMode:!1,overrideContextMenu:!1,width:null,height:null,linkTargetBlank:!0,useProtocol:!0,defaultProtocol:"http://",focus:!1,tabDisabled:!1,tabSize:4,styleWithCSS:!1,shortcuts:!0,textareaAutoSync:!0,tooltip:"auto",container:null,maxTextLength:0,blockquoteBreakingLevel:2,spellCheck:!0,disableGrammar:!1,placeholder:null,inheritPlaceholder:!1,recordEveryKeystroke:!1,historyLimit:200,showDomainOnlyForAutolink:!1,hintMode:"word",hintSelect:"after",hintDirection:"bottom",styleTags:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Tahoma","Times New Roman","Verdana"],fontNamesIgnoreCheck:[],addDefaultFonts:!0,fontSizes:["8","9","10","11","12","14","18","24","36"],fontSizeUnits:["px","pt"],colors:[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],colorsName:[["Black","Tundora","Dove Gray","Star Dust","Pale Slate","Gallery","Alabaster","White"],["Red","Orange Peel","Yellow","Green","Cyan","Blue","Electric Violet","Magenta"],["Azalea","Karry","Egg White","Zanah","Botticelli","Tropical Blue","Mischka","Twilight"],["Tonys Pink","Peach Orange","Cream Brulee","Sprout","Casper","Perano","Cold Purple","Careys Pink"],["Mandy","Rajah","Dandelion","Olivine","Gulf Stream","Viking","Blue Marguerite","Puce"],["Guardsman Red","Fire Bush","Golden Dream","Chelsea Cucumber","Smalt Blue","Boston Blue","Butterfly Bush","Cadillac"],["Sangria","Mai Tai","Buddha Gold","Forest Green","Eden","Venice Blue","Meteorite","Claret"],["Rosewood","Cinnamon","Olive","Parsley","Tiber","Midnight Blue","Valentino","Loulou"]],colorButton:{foreColor:"#000000",backColor:"#FFFF00"},lineHeights:["1.0","1.2","1.4","1.5","1.6","1.8","2.0","3.0"],tableClassName:"table table-bordered",insertTableMaxSize:{col:10,row:10},dialogsInBody:!1,dialogsFade:!1,maximumImageFileSize:null,acceptImageFileTypes:"image/*",callbacks:{onBeforeCommand:null,onBlur:null,onBlurCodeview:null,onChange:null,onChangeCodeview:null,onDialogShown:null,onEnter:null,onFocus:null,onImageLinkInsert:null,onImageUpload:null,onImageUploadError:null,onInit:null,onKeydown:null,onKeyup:null,onMousedown:null,onMouseup:null,onPaste:null,onScroll:null},codemirror:{mode:"text/html",htmlMode:!0,lineNumbers:!0},codeviewFilter:!0,codeviewFilterRegex:/<\/*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|ilayer|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|t(?:itle|extarea)|xml)[^>]*?>/gi,codeviewIframeFilter:!0,codeviewIframeWhitelistSrc:[],codeviewIframeWhitelistSrcBase:["www.youtube.com","www.youtube-nocookie.com","www.facebook.com","vine.co","instagram.com","player.vimeo.com","www.dailymotion.com","player.youku.com","jumpingbean.tv","v.qq.com"],keyMap:{pc:{ESC:"escape",ENTER:"insertParagraph","CTRL+Z":"undo","CTRL+Y":"redo",TAB:"tab","SHIFT+TAB":"untab","CTRL+B":"bold","CTRL+I":"italic","CTRL+U":"underline","CTRL+SHIFT+S":"strikethrough","CTRL+BACKSLASH":"removeFormat","CTRL+SHIFT+L":"justifyLeft","CTRL+SHIFT+E":"justifyCenter","CTRL+SHIFT+R":"justifyRight","CTRL+SHIFT+J":"justifyFull","CTRL+SHIFT+NUM7":"insertUnorderedList","CTRL+SHIFT+NUM8":"insertOrderedList","CTRL+LEFTBRACKET":"outdent","CTRL+RIGHTBRACKET":"indent","CTRL+NUM0":"formatPara","CTRL+NUM1":"formatH1","CTRL+NUM2":"formatH2","CTRL+NUM3":"formatH3","CTRL+NUM4":"formatH4","CTRL+NUM5":"formatH5","CTRL+NUM6":"formatH6","CTRL+ENTER":"insertHorizontalRule","CTRL+K":"linkDialog.show"},mac:{ESC:"escape",ENTER:"insertParagraph","CMD+Z":"undo","CMD+SHIFT+Z":"redo",TAB:"tab","SHIFT+TAB":"untab","CMD+B":"bold","CMD+I":"italic","CMD+U":"underline","CMD+SHIFT+S":"strikethrough","CMD+BACKSLASH":"removeFormat","CMD+SHIFT+L":"justifyLeft","CMD+SHIFT+E":"justifyCenter","CMD+SHIFT+R":"justifyRight","CMD+SHIFT+J":"justifyFull","CMD+SHIFT+NUM7":"insertUnorderedList","CMD+SHIFT+NUM8":"insertOrderedList","CMD+LEFTBRACKET":"outdent","CMD+RIGHTBRACKET":"indent","CMD+NUM0":"formatPara","CMD+NUM1":"formatH1","CMD+NUM2":"formatH2","CMD+NUM3":"formatH3","CMD+NUM4":"formatH4","CMD+NUM5":"formatH5","CMD+NUM6":"formatH6","CMD+ENTER":"insertHorizontalRule","CMD+K":"linkDialog.show"}},icons:{align:"note-icon-align",alignCenter:"note-icon-align-center",alignJustify:"note-icon-align-justify",alignLeft:"note-icon-align-left",alignRight:"note-icon-align-right",rowBelow:"note-icon-row-below",colBefore:"note-icon-col-before",colAfter:"note-icon-col-after",rowAbove:"note-icon-row-above",rowRemove:"note-icon-row-remove",colRemove:"note-icon-col-remove",indent:"note-icon-align-indent",outdent:"note-icon-align-outdent",arrowsAlt:"note-icon-arrows-alt",bold:"note-icon-bold",caret:"note-icon-caret",circle:"note-icon-circle",close:"note-icon-close",code:"note-icon-code",eraser:"note-icon-eraser",floatLeft:"note-icon-float-left",floatRight:"note-icon-float-right",font:"note-icon-font",frame:"note-icon-frame",italic:"note-icon-italic",link:"note-icon-link",unlink:"note-icon-chain-broken",magic:"note-icon-magic",menuCheck:"note-icon-menu-check",minus:"note-icon-minus",orderedlist:"note-icon-orderedlist",pencil:"note-icon-pencil",picture:"note-icon-picture",question:"note-icon-question",redo:"note-icon-redo",rollback:"note-icon-rollback",square:"note-icon-square",strikethrough:"note-icon-strikethrough",subscript:"note-icon-subscript",superscript:"note-icon-superscript",table:"note-icon-table",textHeight:"note-icon-text-height",trash:"note-icon-trash",underline:"note-icon-underline",undo:"note-icon-undo",unorderedlist:"note-icon-unorderedlist",video:"note-icon-video"}}});var Xe=function(){function e(t,n,o,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.markup=t,this.children=n,this.options=o,this.callback=i}var n;return(n=[{key:"render",value:function(e){var n=t()(this.markup);if(this.options&&this.options.contents&&n.html(this.options.contents),this.options&&this.options.className&&n.addClass(this.options.className),this.options&&this.options.data&&t().each(this.options.data,(function(e,t){n.attr("data-"+e,t)})),this.options&&this.options.click&&n.on("click",this.options.click),this.children){var o=n.find(".note-children-container");this.children.forEach((function(e){e.render(o.length?o:n)}))}return this.callback&&this.callback(n,this.options),this.options&&this.options.callback&&this.options.callback(n),e&&e.append(n),n}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,n),e}();const Ze=function(e,t){return function(){var n="object"===Ye(arguments[1])?arguments[1]:arguments[0],o=Array.isArray(arguments[0])?arguments[0]:[];return n&&n.children&&(o=n.children),new Xe(e,o,n,t)}};function Je(e){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Je(e)}var et=Ze('<div class="note-editor note-frame panel panel-default"></div>'),tt=Ze('<div class="panel-heading note-toolbar" role="toolbar"></div>'),nt=Ze('<div class="note-editing-area"></div>'),ot=Ze('<textarea class="note-codable" aria-multiline="true"></textarea>'),it=Ze('<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"></div>'),rt=Ze(['<output class="note-status-output" role="status" aria-live="polite"></output>','<div class="note-statusbar" role="status">','<div class="note-resizebar" aria-label="Resize">','<div class="note-icon-bar"></div>','<div class="note-icon-bar"></div>','<div class="note-icon-bar"></div>',"</div>","</div>"].join("")),at=Ze('<div class="note-editor note-airframe"></div>'),st=Ze(['<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"></div>','<output class="note-status-output" role="status" aria-live="polite"></output>'].join("")),lt=Ze('<div class="note-btn-group btn-group"></div>'),ct=Ze('<ul class="note-dropdown-menu dropdown-menu"></ul>',(function(e,t){var n=Array.isArray(t.items)?t.items.map((function(e){var n="string"==typeof e?e:e.value||"",o=t.template?t.template(e):e,i="object"===Je(e)?e.option:void 0;return'<li aria-label="'+n+'"><a href="#" data-value="'+n+'"'+(void 0!==i?' data-option="'+i+'"':"")+">"+o+"</a></li>"})).join(""):t.items;e.html(n).attr({"aria-label":t.title}),t&&t.codeviewKeepButton&&e.addClass("note-codeview-keep")})),ut=function(e,t){return e+" "+mt(t.icons.caret,"span")},dt=Ze('<ul class="note-dropdown-menu dropdown-menu note-check"></ul>',(function(e,t){var n=Array.isArray(t.items)?t.items.map((function(e){var n="string"==typeof e?e:e.value||"",o=t.template?t.template(e):e;return'<li aria-label="'+e+'"><a href="#" data-value="'+n+'">'+mt(t.checkClassName)+" "+o+"</a></li>"})).join(""):t.items;e.html(n).attr({"aria-label":t.title}),t&&t.codeviewKeepButton&&e.addClass("note-codeview-keep")})),ht=Ze('<div class="modal note-modal" aria-hidden="false" tabindex="-1" role="dialog"></div>',(function(e,t){t.fade&&e.addClass("fade"),e.attr({"aria-label":t.title}),e.html(['<div class="modal-dialog">','<div class="modal-content">',t.title?'<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close" aria-hidden="true">×</button><h4 class="modal-title">'+t.title+"</h4></div>":"",'<div class="modal-body">'+t.body+"</div>",t.footer?'<div class="modal-footer">'+t.footer+"</div>":"","</div>","</div>"].join(""))})),ft=Ze(['<div class="note-popover popover in">','<div class="arrow"></div>','<div class="popover-content note-children-container"></div>',"</div>"].join(""),(function(e,t){var n=void 0!==t.direction?t.direction:"bottom";e.addClass(n),t.hideArrow&&e.find(".arrow").hide()})),pt=Ze('<div class="checkbox"></div>',(function(e,t){e.html(["<label"+(t.id?' for="note-'+t.id+'"':"")+">",'<input type="checkbox"'+(t.id?' id="note-'+t.id+'"':""),t.checked?" checked":"",' aria-checked="'+(t.checked?"true":"false")+'"/>',t.text?t.text:"","</label>"].join(""))})),mt=function(e,t){return e.match(/^</)?e:"<"+(t=t||"i")+' class="'+e+'"></'+t+">"};t().summernote=t().extend(t().summernote,{ui_template:function(e){return{editor:et,toolbar:tt,editingArea:nt,codable:ot,editable:it,statusbar:rt,airEditor:at,airEditable:st,buttonGroup:lt,dropdown:ct,dropdownButtonContents:ut,dropdownCheck:dt,dialog:ht,popover:ft,checkbox:pt,icon:mt,options:e,palette:function(t,n){return Ze('<div class="note-color-palette"></div>',(function(t,n){for(var o=[],i=0,r=n.colors.length;i<r;i++){for(var a=n.eventName,s=n.colors[i],l=n.colorsName[i],c=[],u=0,d=s.length;u<d;u++){var h=s[u],f=l[u];c.push(['<button type="button" class="note-color-btn"','style="background-color:',h,'" ','data-event="',a,'" ','data-value="',h,'" ','title="',f,'" ','aria-label="',f,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}o.push('<div class="note-color-row">'+c.join("")+"</div>")}t.html(o.join("")),n.tooltip&&t.find(".note-color-btn").tooltip({container:n.container||e.container,trigger:"hover",placement:"bottom"})}))(t,n)},button:function(n,o){return Ze('<button type="button" class="note-btn btn btn-default btn-sm" tabindex="-1"></button>',(function(n,o){o&&o.tooltip&&n.attr({title:o.tooltip,"aria-label":o.tooltip}).tooltip({container:o.container||e.container,trigger:"hover",placement:"bottom"}).on("click",(function(e){t()(e.currentTarget).tooltip("hide")})),o&&o.codeviewButton&&n.addClass("note-codeview-keep")}))(n,o)},toggleBtn:function(e,t){e.toggleClass("disabled",!t),e.attr("disabled",!t)},toggleBtnActive:function(e,t){e.toggleClass("active",t)},onDialogShown:function(e,t){e.one("shown.bs.modal",t)},onDialogHidden:function(e,t){e.one("hidden.bs.modal",t)},showDialog:function(e){e.modal("show")},hideDialog:function(e){e.modal("hide")},createLayout:function(t){var n=(e.airMode?at([nt([ot(),st()])]):"bottom"===e.toolbarPosition?et([nt([ot(),it()]),tt(),rt()]):et([tt(),nt([ot(),it()]),rt()])).render();return n.insertAfter(t),{note:t,editor:n,toolbar:n.find(".note-toolbar"),editingArea:n.find(".note-editing-area"),editable:n.find(".note-editable"),codable:n.find(".note-codable"),statusbar:n.find(".note-statusbar")}},removeLayout:function(e,t){e.html(t.editable.html()),t.editor.remove(),e.show()}}},interface:"bs3"})})(),i})()})),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("ComponentRelay",[],t):"object"==typeof exports?exports.ComponentRelay=t():e.ComponentRelay=t()}(self,(()=>(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};let n;var o;e.d(t,{default:()=>w}),function(e){e[e.Web=1]="Web",e[e.Desktop=2]="Desktop",e[e.Mobile=3]="Mobile"}(n||(n={}));var i=new Uint8Array(16);function r(){if(!o&&!(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(i)}const a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,s=function(e){return"string"==typeof e&&a.test(e)};for(var l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));const u=e=>{var t;const o={[n.Web]:"web",[n.Desktop]:"desktop",[n.Mobile]:"mobile"};return null!==(t=o[e])&&void 0!==t?t:o[n.Web]},d=()=>{};class h{static get isSupported(){return!(!window.console&&!console)}static get info(){return h.isSupported&&this.enabled?console.log.bind(console):d}static get error(){return h.isSupported?console.error.bind(console):d}}var f,p;let m,g,v;function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(p="enabled")in(f=h)?Object.defineProperty(f,p,{value:!1,enumerable:!0,configurable:!0,writable:!0}):f[p]=!1,function(e){e.Shift="Shift",e.Ctrl="Control",e.Meta="Meta"}(m||(m={})),function(e){e.Component="component"}(g||(g={})),function(e){e.SetSize="set-size",e.StreamItems="stream-items",e.StreamContextItem="stream-context-item",e.SaveItems="save-items",e.CreateItem="create-item",e.CreateItems="create-items",e.DeleteItems="delete-items",e.SetComponentData="set-component-data",e.RequestPermissions="request-permissions",e.DuplicateItem="duplicate-item",e.ComponentRegistered="component-registered",e.ActivateThemes="themes",e.Reply="reply",e.ThemesActivated="themes-activated",e.KeyDown="key-down",e.KeyUp="key-up",e.Click="click"}(v||(v={}));class w{constructor(e){var t,n;if(k(this,"contentWindow",void 0),k(this,"component",{activeThemes:[],acceptsThemes:!0}),k(this,"sentMessages",[]),k(this,"messageQueue",[]),k(this,"lastStreamedItem",void 0),k(this,"pendingSaveItems",void 0),k(this,"pendingSaveTimeout",void 0),k(this,"pendingSaveParams",void 0),k(this,"messageHandler",void 0),k(this,"keyDownEventListener",void 0),k(this,"keyUpEventListener",void 0),k(this,"clickEventListener",void 0),k(this,"concernTimeouts",[]),k(this,"options",void 0),k(this,"params",void 0),!e||!e.targetWindow)throw new Error("contentWindow must be a valid Window object.");this.params=e,this.options=e.options||{},null==this.options.coallesedSaving&&(this.options.coallesedSaving=!0),null==this.options.coallesedSavingDelay&&(this.options.coallesedSavingDelay=250),null!=this.options.acceptsThemes&&(this.component.acceptsThemes=null===(n=this.options.acceptsThemes)||void 0===n||n),h.enabled=null!==(t=this.options.debug)&&void 0!==t&&t,this.contentWindow=e.targetWindow,this.registerMessageHandler(),this.registerKeyboardEventListeners(),this.registerMouseEventListeners()}deinit(){this.params.onReady=void 0,this.component={acceptsThemes:!0,activeThemes:[]},this.messageQueue=[],this.sentMessages=[],this.lastStreamedItem=void 0,this.pendingSaveItems=void 0,this.pendingSaveTimeout=void 0,this.pendingSaveParams=void 0,this.messageHandler&&(this.contentWindow.document.removeEventListener("message",this.messageHandler),this.contentWindow.removeEventListener("message",this.messageHandler)),this.keyDownEventListener&&this.contentWindow.removeEventListener("keydown",this.keyDownEventListener),this.keyUpEventListener&&this.contentWindow.removeEventListener("keyup",this.keyUpEventListener),this.clickEventListener&&this.contentWindow.removeEventListener("click",this.clickEventListener)}registerMessageHandler(){this.messageHandler=e=>{if(h.info("Components API Message received:",e.data),document.referrer&&new URL(document.referrer).origin!==new URL(e.origin).origin)return;const{data:t}=e,n=(e=>{if("string"!=typeof e)return!1;try{const t=JSON.parse(e),n=Object.prototype.toString.call(t);return"[object Object]"===n||"[object Array]"===n}catch(e){return!1}})(t)?JSON.parse(t):t;if(n){if(void 0===this.component.origin&&n.action===v.ComponentRegistered)this.component.origin=e.origin;else if(e.origin!==this.component.origin)return;this.handleMessage(n)}else h.error("Invalid data received. Skipping...")},this.contentWindow.document.addEventListener("message",this.messageHandler,!1),this.contentWindow.addEventListener("message",this.messageHandler,!1),h.info("Waiting for messages...")}registerKeyboardEventListeners(){this.keyDownEventListener=e=>{h.info("A key has been pressed: ".concat(e.key)),e.ctrlKey?this.keyDownEvent(m.Ctrl):e.shiftKey?this.keyDownEvent(m.Shift):(e.metaKey||"Meta"===e.key)&&this.keyDownEvent(m.Meta)},this.keyUpEventListener=e=>{h.info("A key has been released: ".concat(e.key)),"Control"===e.key?this.keyUpEvent(m.Ctrl):"Shift"===e.key?this.keyUpEvent(m.Shift):"Meta"===e.key&&this.keyUpEvent(m.Meta)},this.contentWindow.addEventListener("keydown",this.keyDownEventListener,!1),this.contentWindow.addEventListener("keyup",this.keyUpEventListener,!1)}registerMouseEventListeners(){this.clickEventListener=e=>{h.info("A click has been performed."),this.mouseClickEvent()},this.contentWindow.addEventListener("click",this.clickEventListener,!1)}handleMessage(e){switch(e.action){case v.ComponentRegistered:this.component.sessionKey=e.sessionKey,e.componentData&&(this.component.data=e.componentData),this.onReady(e.data),h.info("Component successfully registered with payload:",e);break;case v.ActivateThemes:this.activateThemes(e.data.themes);break;default:{var t,n;if(!e.original)return;const o=null===(t=this.sentMessages)||void 0===t?void 0:t.filter((t=>{var n;return t.messageId===(null===(n=e.original)||void 0===n?void 0:n.messageId)}))[0];if(!o){const e=this.contentWindow.document.title,t=("The extension '".concat(e,"' is attempting to communicate with Standard Notes, ")+"but an error is preventing it from doing so. Please restart this extension and try again.").replace(" "," ");return void h.info(t)}null==o||null===(n=o.callback)||void 0===n||n.call(o,e.data);break}}}onReady(e){this.component.environment=e.environment,this.component.platform=e.platform,this.component.uuid=e.uuid;for(const e of this.messageQueue)this.postMessage(e.action,e.data,e.callback);this.messageQueue=[],h.info("Data passed to onReady:",e),this.activateThemes(e.activeThemeUrls||[]),this.postMessage(v.ThemesActivated,{}),this.params.onReady&&this.params.onReady()}getSelfComponentUUID(){return this.component.uuid}isRunningInDesktopApplication(){return this.component.environment===u(n.Desktop)}isRunningInMobileApplication(){return this.component.environment===u(n.Mobile)}getComponentDataValueForKey(e){if(this.component.data)return this.component.data[e]}setComponentDataValueForKey(e,t){if(!this.component.data)throw new Error("The component has not been initialized.");if(!e||e&&0===e.length)throw new Error("The key for the data value should be a valid string.");this.component.data=b(b({},this.component.data),{},{[e]:t}),this.postMessage(v.SetComponentData,{componentData:this.component.data})}clearComponentData(){this.component.data={},this.postMessage(v.SetComponentData,{componentData:this.component.data})}postMessage(e,t,n){if(!this.component.sessionKey)return void this.messageQueue.push({action:e,data:t,api:g.Component,callback:n});e===v.SaveItems&&(t.height=this.params.handleRequestForContentHeight());const o={action:e,data:t,messageId:this.generateUUID(),sessionKey:this.component.sessionKey,api:g.Component},i=JSON.parse(JSON.stringify(o));let r;i.callback=n,this.sentMessages.push(i),r=this.isRunningInMobileApplication()?JSON.stringify(o):o,h.info("Posting message:",r);const a=this.component.origin&&"null"!==this.component.origin?this.component.origin:"*";this.contentWindow.parent.postMessage(r,a)}activateThemes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!this.component.acceptsThemes)return;h.info("Incoming themes:",e);const{activeThemes:t}=this.component;if(t&&t.sort().toString()==e.sort().toString())return;let n=e;const o=[];for(const i of t)e.includes(i)?n=n.filter((e=>e!==i)):o.push(i);h.info("Deactivating themes:",o),h.info("Activating themes:",n);for(const e of o)this.deactivateTheme(e);this.component.activeThemes=e;for(const e of n){if(!e)continue;const t=this.contentWindow.document.createElement("link");t.id=btoa(e),t.href=e,t.type="text/css",t.rel="stylesheet",t.media="screen,print",t.className="custom-theme",this.contentWindow.document.getElementsByTagName("head")[0].appendChild(t)}this.params.onThemesChange&&this.params.onThemesChange()}themeElementForUrl(e){return Array.from(this.contentWindow.document.getElementsByClassName("custom-theme")).slice().find((t=>t.id==btoa(e)))}deactivateTheme(e){const t=this.themeElementForUrl(e);t&&t.parentNode&&(t.setAttribute("disabled","true"),t.parentNode.removeChild(t))}generateUUID(){return function(e,t,n){var o=(e=e||{}).random||(e.rng||r)();return o[6]=15&o[6]|64,o[8]=63&o[8]|128,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n}(o)}()}get platform(){return this.component.platform}get environment(){return this.component.environment}streamItems(e,t){this.postMessage(v.StreamItems,{content_types:e},(e=>{t(e.items)}))}streamContextItem(e){this.postMessage(v.StreamContextItem,{},(t=>{const{item:n}=t;(!this.lastStreamedItem||this.lastStreamedItem.uuid!==n.uuid)&&this.pendingSaveTimeout&&(clearTimeout(this.pendingSaveTimeout),this.performSavingOfItems(this.pendingSaveParams),this.pendingSaveTimeout=void 0,this.pendingSaveParams=void 0),this.lastStreamedItem=n,e(this.lastStreamedItem)}))}createItem(e,t){this.postMessage(v.CreateItem,{item:this.jsonObjectForItem(e)},(e=>{let{item:n}=e;!n&&e.items&&e.items.length>0&&(n=e.items[0]),t&&t(n)}))}createItems(e,t){const n=e.map((e=>this.jsonObjectForItem(e)));this.postMessage(v.CreateItems,{items:n},(e=>{t&&t(e.items)}))}deleteItem(e,t){this.deleteItems([e],t)}deleteItems(e,t){const n={items:e.map((e=>this.jsonObjectForItem(e)))};this.postMessage(v.DeleteItems,n,(e=>{t&&t(e)}))}sendCustomEvent(e,t,n){this.postMessage(e,t,(e=>{n&&n(e)}))}saveItem(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.saveItems([e],t,n)}saveItemWithPresave(e,t,n){this.saveItemsWithPresave([e],t,n)}saveItemsWithPresave(e,t,n){this.saveItems(e,n,!1,t)}performSavingOfItems(e){let{items:t,presave:n,callback:o}=e;const i=setTimeout((()=>{this.concernTimeouts.forEach((e=>clearTimeout(e))),alert("This editor is unable to communicate with Standard Notes. Your changes may not be saved. Please backup your changes, then restart the application and try again.")}),5e3);this.concernTimeouts.push(i),n&&n();const r=[];for(const e of t)r.push(this.jsonObjectForItem(e));this.postMessage(v.SaveItems,{items:r},(()=>{this.concernTimeouts.forEach((e=>clearTimeout(e))),null==o||o()}))}saveItems(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3?arguments[3]:void 0;if(this.pendingSaveItems||(this.pendingSaveItems=[]),this.options.coallesedSaving&&!n){this.pendingSaveTimeout&&clearTimeout(this.pendingSaveTimeout);const n=e.map((e=>e.uuid)),i=this.pendingSaveItems.filter((e=>!n.includes(e.uuid)));this.pendingSaveItems=i.concat(e),this.pendingSaveParams={items:this.pendingSaveItems,presave:o,callback:t},this.pendingSaveTimeout=setTimeout((()=>{this.performSavingOfItems(this.pendingSaveParams),this.pendingSaveItems=[],this.pendingSaveTimeout=void 0,this.pendingSaveParams=null}),this.options.coallesedSavingDelay)}else this.performSavingOfItems({items:e,presave:o,callback:t})}setSize(e,t){this.postMessage(v.SetSize,{type:"container",width:e,height:t})}keyDownEvent(e){this.postMessage(v.KeyDown,{keyboardModifier:e})}keyUpEvent(e){this.postMessage(v.KeyUp,{keyboardModifier:e})}mouseClickEvent(){this.postMessage(v.Click,{})}jsonObjectForItem(e){const t=Object.assign({},e);return t.children=null,t.parent=null,t}getItemAppDataValue(e,t){var n,o;const i=null==e||null===(n=e.content)||void 0===n||null===(o=n.appData)||void 0===o?void 0:o["org.standardnotes.sn"];return null==i?void 0:i[t]}}return t.default})())),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function o(e,i,r){return o=n()?Reflect.construct:function(e,n,o){var i=[null];i.push.apply(i,n);var r=new(Function.bind.apply(e,i));return o&&t(r,o.prototype),r},o.apply(null,arguments)}function i(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var a=Object.hasOwnProperty,s=Object.setPrototypeOf,l=Object.isFrozen,c=Object.getPrototypeOf,u=Object.getOwnPropertyDescriptor,d=Object.freeze,h=Object.seal,f=Object.create,p="undefined"!=typeof Reflect&&Reflect,m=p.apply,g=p.construct;m||(m=function(e,t,n){return e.apply(t,n)}),d||(d=function(e){return e}),h||(h=function(e){return e}),g||(g=function(e,t){return o(e,i(t))});var v,y=A(Array.prototype.forEach),b=A(Array.prototype.pop),k=A(Array.prototype.push),w=A(String.prototype.toLowerCase),x=A(String.prototype.match),C=A(String.prototype.replace),T=A(String.prototype.indexOf),S=A(String.prototype.trim),E=A(RegExp.prototype.test),N=(v=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g(v,t)});function A(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return m(e,t,o)}}function I(e,t,n){n=n||w,s&&s(e,null);for(var o=t.length;o--;){var i=t[o];if("string"==typeof i){var r=n(i);r!==i&&(l(t)||(t[o]=r),i=r)}e[i]=!0}return e}function $(e){var t,n=f(null);for(t in e)m(a,e,[t])&&(n[t]=e[t]);return n}function D(e,t){for(;null!==e;){var n=u(e,t);if(n){if(n.get)return A(n.get);if("function"==typeof n.value)return A(n.value)}e=c(e)}return function(e){return console.warn("fallback value for",e),null}}var L=d(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=d(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),P=d(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),O=d(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),F=d(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),H=d(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),M=d(["#text"]),j=d(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),B=d(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z=d(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=d(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),W=h(/\{\{[\w\W]*|[\w\W]*\}\}/gm),_=h(/<%[\w\W]*|[\w\W]*%>/gm),q=h(/^data-[\-\w.\u00B7-\uFFFF]/),K=h(/^aria-[\-\w]+$/),V=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=h(/^(?:\w+script|data):/i),Q=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=h(/^html$/i),X=function(){return"undefined"==typeof window?null:window},Z=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var o=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(o=n.currentScript.getAttribute(i));var r="dompurify"+(o?"#"+o:"");try{return t.createPolicy(r,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}},J=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X(),o=function(e){return t(e)};if(o.version="2.4.0",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;var r=n.document,a=n.document,s=n.DocumentFragment,l=n.HTMLTemplateElement,c=n.Node,u=n.Element,h=n.NodeFilter,f=n.NamedNodeMap,p=void 0===f?n.NamedNodeMap||n.MozNamedAttrMap:f,m=n.HTMLFormElement,g=n.DOMParser,v=n.trustedTypes,A=u.prototype,J=D(A,"cloneNode"),ee=D(A,"nextSibling"),te=D(A,"childNodes"),ne=D(A,"parentNode");if("function"==typeof l){var oe=a.createElement("template");oe.content&&oe.content.ownerDocument&&(a=oe.content.ownerDocument)}var ie=Z(v,r),re=ie?ie.createHTML(""):"",ae=a,se=ae.implementation,le=ae.createNodeIterator,ce=ae.createDocumentFragment,ue=ae.getElementsByTagName,de=r.importNode,he={};try{he=$(a).documentMode?a.documentMode:{}}catch(e){}var fe={};o.isSupported="function"==typeof ne&&se&&void 0!==se.createHTMLDocument&&9!==he;var pe,me,ge=W,ve=_,ye=q,be=K,ke=G,we=Q,xe=V,Ce=null,Te=I({},[].concat(i(L),i(R),i(P),i(F),i(M))),Se=null,Ee=I({},[].concat(i(j),i(B),i(z),i(U))),Ne=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ae=null,Ie=null,$e=!0,De=!0,Le=!1,Re=!1,Pe=!1,Oe=!1,Fe=!1,He=!1,Me=!1,je=!1,Be=!0,ze=!1,Ue="user-content-",We=!0,_e=!1,qe={},Ke=null,Ve=I({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ge=null,Qe=I({},["audio","video","img","source","image","track"]),Ye=null,Xe=I({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ze="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml",tt=et,nt=!1,ot=["application/xhtml+xml","text/html"],it="text/html",rt=null,at=a.createElement("form"),st=function(e){return e instanceof RegExp||e instanceof Function},lt=function(t){rt&&rt===t||(t&&"object"===e(t)||(t={}),t=$(t),pe=pe=-1===ot.indexOf(t.PARSER_MEDIA_TYPE)?it:t.PARSER_MEDIA_TYPE,me="application/xhtml+xml"===pe?function(e){return e}:w,Ce="ALLOWED_TAGS"in t?I({},t.ALLOWED_TAGS,me):Te,Se="ALLOWED_ATTR"in t?I({},t.ALLOWED_ATTR,me):Ee,Ye="ADD_URI_SAFE_ATTR"in t?I($(Xe),t.ADD_URI_SAFE_ATTR,me):Xe,Ge="ADD_DATA_URI_TAGS"in t?I($(Qe),t.ADD_DATA_URI_TAGS,me):Qe,Ke="FORBID_CONTENTS"in t?I({},t.FORBID_CONTENTS,me):Ve,Ae="FORBID_TAGS"in t?I({},t.FORBID_TAGS,me):{},Ie="FORBID_ATTR"in t?I({},t.FORBID_ATTR,me):{},qe="USE_PROFILES"in t&&t.USE_PROFILES,$e=!1!==t.ALLOW_ARIA_ATTR,De=!1!==t.ALLOW_DATA_ATTR,Le=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=t.SAFE_FOR_TEMPLATES||!1,Pe=t.WHOLE_DOCUMENT||!1,He=t.RETURN_DOM||!1,Me=t.RETURN_DOM_FRAGMENT||!1,je=t.RETURN_TRUSTED_TYPE||!1,Fe=t.FORCE_BODY||!1,Be=!1!==t.SANITIZE_DOM,ze=t.SANITIZE_NAMED_PROPS||!1,We=!1!==t.KEEP_CONTENT,_e=t.IN_PLACE||!1,xe=t.ALLOWED_URI_REGEXP||xe,tt=t.NAMESPACE||et,t.CUSTOM_ELEMENT_HANDLING&&st(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ne.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&st(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ne.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ne.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(De=!1),Me&&(He=!0),qe&&(Ce=I({},i(M)),Se=[],!0===qe.html&&(I(Ce,L),I(Se,j)),!0===qe.svg&&(I(Ce,R),I(Se,B),I(Se,U)),!0===qe.svgFilters&&(I(Ce,P),I(Se,B),I(Se,U)),!0===qe.mathMl&&(I(Ce,F),I(Se,z),I(Se,U))),t.ADD_TAGS&&(Ce===Te&&(Ce=$(Ce)),I(Ce,t.ADD_TAGS,me)),t.ADD_ATTR&&(Se===Ee&&(Se=$(Se)),I(Se,t.ADD_ATTR,me)),t.ADD_URI_SAFE_ATTR&&I(Ye,t.ADD_URI_SAFE_ATTR,me),t.FORBID_CONTENTS&&(Ke===Ve&&(Ke=$(Ke)),I(Ke,t.FORBID_CONTENTS,me)),We&&(Ce["#text"]=!0),Pe&&I(Ce,["html","head","body"]),Ce.table&&(I(Ce,["tbody"]),delete Ae.tbody),d&&d(t),rt=t)},ct=I({},["mi","mo","mn","ms","mtext"]),ut=I({},["foreignobject","desc","title","annotation-xml"]),dt=I({},["title","style","font","a","script"]),ht=I({},R);I(ht,P),I(ht,O);var ft=I({},F);I(ft,H);var pt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:et,tagName:"template"});var n=w(e.tagName),o=w(t.tagName);return e.namespaceURI===Je?t.namespaceURI===et?"svg"===n:t.namespaceURI===Ze?"svg"===n&&("annotation-xml"===o||ct[o]):Boolean(ht[n]):e.namespaceURI===Ze?t.namespaceURI===et?"math"===n:t.namespaceURI===Je?"math"===n&&ut[o]:Boolean(ft[n]):e.namespaceURI===et&&!(t.namespaceURI===Je&&!ut[o])&&!(t.namespaceURI===Ze&&!ct[o])&&!ft[n]&&(dt[n]||!ht[n])},mt=function(e){k(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=re}catch(t){e.remove()}}},gt=function(e,t){try{k(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){k(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Se[e])if(He||Me)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},vt=function(e){var t,n;if(Fe)e="<remove></remove>"+e;else{var o=x(e,/^[\r\n\t ]+/);n=o&&o[0]}"application/xhtml+xml"===pe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=ie?ie.createHTML(e):e;if(tt===et)try{t=(new g).parseFromString(i,pe)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?"":i}catch(e){}}var r=t.body||t.documentElement;return e&&n&&r.insertBefore(a.createTextNode(n),r.childNodes[0]||null),tt===et?ue.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:r},yt=function(e){return le.call(e.ownerDocument||e,e,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT,null,!1)},bt=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof p)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},kt=function(t){return"object"===e(c)?t instanceof c:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},wt=function(e,t,n){fe[e]&&y(fe[e],(function(e){e.call(o,t,n,rt)}))},xt=function(e){var t;if(wt("beforeSanitizeElements",e,null),bt(e))return mt(e),!0;if(E(/[\u0080-\uFFFF]/,e.nodeName))return mt(e),!0;var n=me(e.nodeName);if(wt("uponSanitizeElement",e,{tagName:n,allowedTags:Ce}),e.hasChildNodes()&&!kt(e.firstElementChild)&&(!kt(e.content)||!kt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return mt(e),!0;if("select"===n&&E(/<template/i,e.innerHTML))return mt(e),!0;if(!Ce[n]||Ae[n]){if(!Ae[n]&&Tt(n)){if(Ne.tagNameCheck instanceof RegExp&&E(Ne.tagNameCheck,n))return!1;if(Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(n))return!1}if(We&&!Ke[n]){var i=ne(e)||e.parentNode,r=te(e)||e.childNodes;if(r&&i)for(var a=r.length-1;a>=0;--a)i.insertBefore(J(r[a],!0),ee(e))}return mt(e),!0}return e instanceof u&&!pt(e)?(mt(e),!0):"noscript"!==n&&"noembed"!==n||!E(/<\/no(script|embed)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=C(t,ge," "),t=C(t,ve," "),e.textContent!==t&&(k(o.removed,{element:e.cloneNode()}),e.textContent=t)),wt("afterSanitizeElements",e,null),!1):(mt(e),!0)},Ct=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in a||n in at))return!1;if(De&&!Ie[t]&&E(ye,t));else if($e&&E(be,t));else if(!Se[t]||Ie[t]){if(!(Tt(e)&&(Ne.tagNameCheck instanceof RegExp&&E(Ne.tagNameCheck,e)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(e))&&(Ne.attributeNameCheck instanceof RegExp&&E(Ne.attributeNameCheck,t)||Ne.attributeNameCheck instanceof Function&&Ne.attributeNameCheck(t))||"is"===t&&Ne.allowCustomizedBuiltInElements&&(Ne.tagNameCheck instanceof RegExp&&E(Ne.tagNameCheck,n)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(n))))return!1}else if(Ye[t]);else if(E(xe,C(n,we,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!Ge[e])if(Le&&!E(ke,C(n,we,"")));else if(n)return!1;return!0},Tt=function(e){return e.indexOf("-")>0},St=function(t){var n,i,r,a;wt("beforeSanitizeAttributes",t,null);var s=t.attributes;if(s){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se};for(a=s.length;a--;){var c=n=s[a],u=c.name,d=c.namespaceURI;if(i="value"===u?n.value:S(n.value),r=me(u),l.attrName=r,l.attrValue=i,l.keepAttr=!0,l.forceKeepAttr=void 0,wt("uponSanitizeAttribute",t,l),i=l.attrValue,!l.forceKeepAttr&&(gt(u,t),l.keepAttr))if(E(/\/>/i,i))gt(u,t);else{Re&&(i=C(i,ge," "),i=C(i,ve," "));var h=me(t.nodeName);if(Ct(h,r,i)){if(!ze||"id"!==r&&"name"!==r||(gt(u,t),i=Ue+i),ie&&"object"===e(v)&&"function"==typeof v.getAttributeType)if(d);else switch(v.getAttributeType(h,r)){case"TrustedHTML":i=ie.createHTML(i);break;case"TrustedScriptURL":i=ie.createScriptURL(i)}try{d?t.setAttributeNS(d,u,i):t.setAttribute(u,i),b(o.removed)}catch(e){}}}}wt("afterSanitizeAttributes",t,null)}},Et=function e(t){var n,o=yt(t);for(wt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)wt("uponSanitizeShadowNode",n,null),xt(n)||(n.content instanceof s&&e(n.content),St(n));wt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(t){var i,a,l,u,d,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((nt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!kt(t)){if("function"!=typeof t.toString)throw N("toString is not a function");if("string"!=typeof(t=t.toString()))throw N("dirty is not a string, aborting")}if(!o.isSupported){if("object"===e(n.toStaticHTML)||"function"==typeof n.toStaticHTML){if("string"==typeof t)return n.toStaticHTML(t);if(kt(t))return n.toStaticHTML(t.outerHTML)}return t}if(Oe||lt(h),o.removed=[],"string"==typeof t&&(_e=!1),_e){if(t.nodeName){var f=me(t.nodeName);if(!Ce[f]||Ae[f])throw N("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof c)1===(a=(i=vt("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?i=a:i.appendChild(a);else{if(!He&&!Re&&!Pe&&-1===t.indexOf("<"))return ie&&je?ie.createHTML(t):t;if(!(i=vt(t)))return He?null:je?re:""}i&&Fe&&mt(i.firstChild);for(var p=yt(_e?t:i);l=p.nextNode();)3===l.nodeType&&l===u||xt(l)||(l.content instanceof s&&Et(l.content),St(l),u=l);if(u=null,_e)return t;if(He){if(Me)for(d=ce.call(i.ownerDocument);i.firstChild;)d.appendChild(i.firstChild);else d=i;return Se.shadowroot&&(d=de.call(r,d,!0)),d}var m=Pe?i.outerHTML:i.innerHTML;return Pe&&Ce["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&E(Y,i.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+m),Re&&(m=C(m,ge," "),m=C(m,ve," ")),ie&&je?ie.createHTML(m):m},o.setConfig=function(e){lt(e),Oe=!0},o.clearConfig=function(){rt=null,Oe=!1},o.isValidAttribute=function(e,t,n){rt||lt({});var o=me(e),i=me(t);return Ct(o,i,n)},o.addHook=function(e,t){"function"==typeof t&&(fe[e]=fe[e]||[],k(fe[e],t))},o.removeHook=function(e){if(fe[e])return b(fe[e])},o.removeHooks=function(e){fe[e]&&(fe[e]=[])},o.removeAllHooks=function(){fe={}},o}();return J})),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("SK",[],t):"object"==typeof exports?exports.SK=t():(e.SK=e.SK||{},e.SK.stylekit=t())}(self,(function(){return(()=>{"use strict";var e={754:(e,t,n)=>{n.r(t),n.d(t,{SKAlert:()=>o});class o{constructor({title:e,text:t,buttons:n}){var o,i;i=e=>{if("Enter"===e.key){let e=this.primaryButton();e.action&&e.action(),this.dismiss()}},(o="keyupListener")in this?Object.defineProperty(this,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):this[o]=i,this.title=e,this.text=t,this.buttons=n}buttonsString(){return`\n <div class='sk-button-group'>\n ${this.buttons.map((function(e,t){return function(e,t){return`\n <div id='button-${t}' class='sk-button ${e.style}'>\n <div class='sk-label'>${e.text}</div>\n </div>\n `}(e,t)})).join("")}\n </div>\n `}templateString(){let e,t;return this.buttons?(e=`\n <div class="sk-panel-row" style='margin-top: 8px;'>\n ${this.buttonsString()}\n </div>\n `,t=""):(e="",t='style="padding-bottom: 8px"'),`\n <div class="sk-modal">\n <div class="sk-modal-background"></div>\n <div class="sk-modal-content">\n <div class="sn-component">\n <div class="sk-panel" style='max-width: 500px;'>\n <div class="sk-panel-content" ${t}>\n <div class="sk-panel-section">\n ${this.title?`<div class='sk-h3 sk-panel-section-title'>${this.title}</div>`:""}\n\n <div class="sk-panel-row">\n ${this.text?`<p class='sk-p'>${this.text}</p>`:""}\n </div>\n\n ${e}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n `}dismiss(){this.onElement.removeChild(this.element),document.removeEventListener("keyup",this.keyupListener)}primaryButton(){let e=this.buttons.find((e=>!0===e.primary));return e||(e=this.buttons[this.buttons.length-1]),e}present({onElement:e}={}){e||(e=document.body),this.onElement=e,this.element=document.createElement("div"),this.element.className="sn-component",this.element.innerHTML=this.templateString().trim(),this.buttons&&(document.addEventListener("keyup",this.keyupListener),this.buttons.forEach(((e,t)=>{this.element.querySelector(`#button-${t}`).onclick=()=>{e.action&&e.action(),this.dismiss()}}))),e.appendChild(this.element)}}}},t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}return n.m=e,n.x=e=>{},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={388:0},t=[[754]],o=e=>{},i=(i,r)=>{for(var a,s,[l,c,u,d]=r,h=0,f=[];h<l.length;h++)s=l[h],n.o(e,s)&&e[s]&&f.push(e[s][0]),e[s]=0;for(a in c)n.o(c,a)&&(n.m[a]=c[a]);for(u&&u(n),i&&i(r);f.length;)f.shift()();return d&&t.push.apply(t,d),o()},r=self.webpackChunkSK_name_=self.webpackChunkSK_name_||[];function a(){for(var o,i=0;i<t.length;i++){for(var r=t[i],a=!0,s=1;s<r.length;s++){var l=r[s];0!==e[l]&&(a=!1)}a&&(t.splice(i--,1),o=n(n.s=r[0]))}return 0===t.length&&(n.x(),n.x=e=>{}),o}r.forEach(i.bind(null,0)),r.push=i.bind(null,r.push.bind(r));var s=n.x;n.x=()=>(n.x=s||(e=>{}),(o=a)())})(),n.x()})()}));
|