=d.length?c.length:d.length,m=h.length>=f.length?h.length:f.length,g="",v=[],y="~";c.length0;){var a=o.pop();["submit","reset"].includes(r)?null!==t.form&&n(t.form).off(r,a):n(t).off(r,a)}delete t.inputmask.events[r]}}}};e.EventRuler=l},219:function(t,e,n){var i=d(n(2394)),r=n(2839),o=d(n(7184)),a=n(8711),s=n(4713);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&e--,Date.prototype.setMonth.call(this,e)},"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",function(t){var e=t?parseInt(t):0;return e>0&&e--,Date.prototype.setMonth.call(this,e)},"month",function(){return C(Date.prototype.getMonth.call(this)+1,2)}],mmm:[""],mmmm:[""],yy:["[0-9]{2}",Date.prototype.setFullYear,"year",function(){return C(Date.prototype.getFullYear.call(this),2)}],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return C(Date.prototype.getFullYear.call(this),4)}],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return C(Date.prototype.getHours.call(this),2)}],hx:[function(t){return"[0-9]{".concat(t,"}")},Date.prototype.setHours,"hours",function(t){return Date.prototype.getHours}],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["0[0-9]|1[0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return C(Date.prototype.getHours.call(this),2)}],Hx:[function(t){return"[0-9]{".concat(t,"}")},Date.prototype.setHours,"hours",function(t){return function(){return C(Date.prototype.getHours.call(this),t)}}],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setMinutes,"minutes",function(){return C(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setSeconds,"seconds",function(){return C(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return C(Date.prototype.getMilliseconds.call(this),3)},3],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return C(Date.prototype.getMilliseconds.call(this),2)},2],t:["[ap]",b,"ampm",_,1],tt:["[ap]m",b,"ampm",_,2],T:["[AP]",b,"ampm",_,1],TT:["[AP]M",b,"ampm",_,2],Z:[".*",void 0,"Z",function(){var t=this.toString().match(/\((.+)\)/)[1];return t.includes(" ")&&(t=(t=t.replace("-"," ").toUpperCase()).split(" ").map((function(t){return l(t,1)[0]})).join("")),t}],o:[""],S:[""]},y={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};function b(t){var e=this.getHours();t.toLowerCase().includes("p")?this.setHours(e+12):t.toLowerCase().includes("a")&&e>=12&&this.setHours(e-12)}function _(){var t=this.getHours();return(t=t||12)>=12?"PM":"AM"}function w(t){var e=new RegExp("\\d+$").exec(t[0]);if(e&&void 0!==e[0]){var n=v[t[0][0]+"x"].slice("");return n[0]=n[0](e[0]),n[3]=n[3](e[0]),n}if(v[t[0]])return v[t[0]]}function x(t){if(!t.tokenizer){var e=[],n=[];for(var i in v)if(/\.*x$/.test(i)){var r=i[0]+"\\d+";-1===n.indexOf(r)&&n.push(r)}else-1===e.indexOf(i[0])&&e.push(i[0]);t.tokenizer="("+(n.length>0?n.join("|")+"|":"")+e.join("+|")+")+?|.",t.tokenizer=new RegExp(t.tokenizer,"g")}return t.tokenizer}function k(t,e,n){if(!g)return!0;if(void 0===t.rawday||!isFinite(t.rawday)&&new Date(t.date.getFullYear(),isFinite(t.rawmonth)?t.month:t.date.getMonth()+1,0).getDate()>=t.day||"29"==t.day&&(!isFinite(t.rawyear)||void 0===t.rawyear||""===t.rawyear)||new Date(t.date.getFullYear(),isFinite(t.rawmonth)?t.month:t.date.getMonth()+1,0).getDate()>=t.day)return e;if("29"==t.day){var i=E(e.pos,n);if("yyyy"===i.targetMatch[0]&&e.pos-i.targetMatchIndex==2)return e.remove=e.pos+1,e}else if("02"==t.month&&"30"==t.day&&void 0!==e.c)return t.day="03",t.date.setDate(3),t.date.setMonth(1),e.insert=[{pos:e.pos,c:"0"},{pos:e.pos+1,c:e.c}],e.caret=a.seekNext.call(this,e.pos+1),e;return!1}function S(t,e,n,i){var r,a,s="";for(x(n).lastIndex=0;r=x(n).exec(t);)if(void 0===e)if(a=w(r))s+="("+a[0]+")";else switch(r[0]){case"[":s+="(";break;case"]":s+=")?";break;default:s+=(0,o.default)(r[0])}else(a=w(r))?!0!==i&&a[3]?s+=a[3].call(e.date):a[2]?s+=e["raw"+a[2]]:s+=r[0]:s+=r[0];return s}function C(t,e,n){for(t=String(t),e=e||2;t.length=t+1){n=i,i=x(e).exec(e.inputFormat);break}}return{targetMatchIndex:r-o,nextMatch:i,targetMatch:n}}i.default.extendAliases({datetime:{mask:function(t){return t.numericInput=!1,v.S=t.i18n.ordinalSuffix.join("|"),t.inputFormat=y[t.inputFormat]||t.inputFormat,t.displayFormat=y[t.displayFormat]||t.displayFormat||t.inputFormat,t.outputFormat=y[t.outputFormat]||t.outputFormat||t.inputFormat,t.placeholder=""!==t.placeholder?t.placeholder:t.inputFormat.replace(/[[\]]/,""),t.regex=S(t.inputFormat,void 0,t),t.min=T(t.min,t.inputFormat,t),t.max=T(t.max,t.inputFormat,t),null},placeholder:"",inputFormat:"isoDateTime",displayFormat:null,outputFormat:null,min:null,max:null,skipOptionalPartCharacter:"",i18n:{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]},preValidation:function(t,e,n,i,r,o,a,s){if(s)return!0;if(isNaN(n)&&t[e]!==n){var l=E(e,r);if(l.nextMatch&&l.nextMatch[0]===n&&l.targetMatch[0].length>1){var u=v[l.targetMatch[0]][0];if(new RegExp(u).test("0"+t[e-1]))return t[e]=t[e-1],t[e-1]="0",{fuzzy:!0,buffer:t,refreshFromBuffer:{start:e-1,end:e+1},pos:e+1}}}return!0},postValidation:function(t,e,n,i,r,o,a,l){var u,c;if(a)return!0;if(!1===i&&(((u=E(e+1,r)).targetMatch&&u.targetMatchIndex===e&&u.targetMatch[0].length>1&&void 0!==v[u.targetMatch[0]]||(u=E(e+2,r)).targetMatch&&u.targetMatchIndex===e+1&&u.targetMatch[0].length>1&&void 0!==v[u.targetMatch[0]])&&(c=v[u.targetMatch[0]][0]),void 0!==c&&(void 0!==o.validPositions[e+1]&&new RegExp(c).test(n+"0")?(t[e]=n,t[e+1]="0",i={pos:e+2,caret:e}):new RegExp(c).test("0"+n)&&(t[e]="0",t[e+1]=n,i={pos:e+2})),!1===i))return i;if(i.fuzzy&&(t=i.buffer,e=i.pos),(u=E(e,r)).targetMatch&&u.targetMatch[0]&&void 0!==v[u.targetMatch[0]]){var h=v[u.targetMatch[0]];c=h[0];var d=t.slice(u.targetMatchIndex,u.targetMatchIndex+u.targetMatch[0].length);if(!1===new RegExp(c).test(d.join(""))&&2===u.targetMatch[0].length&&o.validPositions[u.targetMatchIndex]&&o.validPositions[u.targetMatchIndex+1]&&(o.validPositions[u.targetMatchIndex+1].input="0"),"year"==h[2])for(var f=s.getMaskTemplate.call(this,!1,1,void 0,!0),p=e+1;p=s.getTime())&&(t.date.setFullYear(m),t.year=i,e.insert=[{pos:e.pos+1,c:a[0]},{pos:e.pos+2,c:a[1]}])}}return e}(y,g,r)),g=function(t,e,n,i,r){if(!e)return e;if(e&&n.min&&!isNaN(n.min.date.getTime())){var o;for(t.reset(),x(n).lastIndex=0;o=x(n).exec(n.inputFormat);){var a;if((a=w(o))&&a[3]){for(var s=a[1],l=t[a[2]],u=n.min[a[2]],c=n.max?n.max[a[2]]:u,h=[],d=!1,f=0;fu[f]):(h[f]=u[f],"year"===a[2]&&l.length-1==f&&u!=c&&(h=(parseInt(h.join(""))+1).toString().split("")),"ampm"===a[2]&&u!=c&&n.min.date.getTime()>t.date.getTime()&&(h[f]=c[f]));s.call(t._date,h.join(""))}}e=n.min.date.getTime()<=t.date.getTime(),t.reInit()}return e&&n.max&&(isNaN(n.max.date.getTime())||(e=n.max.date.getTime()>=t.date.getTime())),e}(y,g=k.call(this,y,g,r),r,o)),void 0!==e&&g&&i.pos!==e?{buffer:S(r.inputFormat,y,r).split(""),refreshFromBuffer:{start:e,end:i.pos},pos:i.caret||i.pos}:g},onKeyDown:function(t,e,n,i){t.ctrlKey&&t.key===r.keys.ArrowRight&&(this.inputmask._valueSet(O(new Date,i)),f(this).trigger("setvalue"))},onUnMask:function(t,e,n){return e?S(n.outputFormat,T(t,n.inputFormat,n),n,!0):e},casing:function(t,e,n,i){return 0==e.nativeDef.indexOf("[ap]")?t.toLowerCase():0==e.nativeDef.indexOf("[AP]")?t.toUpperCase():t},onBeforeMask:function(t,e){return"[object Date]"===Object.prototype.toString.call(t)&&(t=O(t,e)),t},insertMode:!1,insertModeVisual:!1,shiftPositions:!1,keepStatic:!1,inputmode:"numeric",prefillYear:!0}})},3851:function(t,e,n){var i,r=(i=n(2394))&&i.__esModule?i:{default:i},o=n(8711),a=n(4713);r.default.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}});var s=new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]");function l(t,e,n,i,r){return n-1>-1&&"."!==e.buffer[n-1]?(t=e.buffer[n-1]+t,t=n-2>-1&&"."!==e.buffer[n-2]?e.buffer[n-2]+t:"0"+t):t="00"+t,s.test(t)}r.default.extendAliases({cssunit:{regex:"[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"},url:{regex:"(https?|ftp)://.*",autoUnmask:!1,keepStatic:!1,tabThrough:!0},ip:{mask:"i{1,3}.j{1,3}.k{1,3}.l{1,3}",definitions:{i:{validator:l},j:{validator:l},k:{validator:l},l:{validator:l}},onUnMask:function(t,e,n){return t},inputmode:"decimal",substitutes:{",":"."}},email:{mask:function(t){var e=t.separator,n=t.quantifier,i="*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",r=i;if(e)for(var o=0;o0&&e>0&&(!n.digitsOptional||i)){var r=t.indexOf(n.radixPoint),o=!1;n.negationSymbol.back===t[t.length-1]&&(o=!0,t.length--),-1===r&&(t.push(n.radixPoint),r=t.length-1);for(var a=1;a<=e;a++)isFinite(t[r+a])||(t[r+a]="0")}return o&&t.push(n.negationSymbol.back),t}function h(t,e){var n=0;for(var i in"+"===t&&(n=o.seekNext.call(this,e.validPositions.length-1)),e.tests)if((i=parseInt(i))>=n)for(var r=0,a=e.tests[i].length;r1&&(t.placeholder=t.placeholder.charAt(0)),"radixFocus"===t.positionCaretOnClick&&""===t.placeholder&&(t.positionCaretOnClick="lvp");var e="0",n=t.radixPoint;!0===t.numericInput&&void 0===t.__financeInput?(e="1",t.positionCaretOnClick="radixFocus"===t.positionCaretOnClick?"lvp":t.positionCaretOnClick,t.digitsOptional=!1,isNaN(t.digits)&&(t.digits=2),t._radixDance=!1,n=","===t.radixPoint?"?":"!",""!==t.radixPoint&&void 0===t.definitions[n]&&(t.definitions[n]={},t.definitions[n].validator="["+t.radixPoint+"]",t.definitions[n].placeholder=t.radixPoint,t.definitions[n].static=!0,t.definitions[n].generated=!0)):(t.__financeInput=!1,t.numericInput=!0);var i,o="[+]";if(o+=u(t.prefix,t),""!==t.groupSeparator?(void 0===t.definitions[t.groupSeparator]&&(t.definitions[t.groupSeparator]={},t.definitions[t.groupSeparator].validator="["+t.groupSeparator+"]",t.definitions[t.groupSeparator].placeholder=t.groupSeparator,t.definitions[t.groupSeparator].static=!0,t.definitions[t.groupSeparator].generated=!0),o+=t._mask(t)):o+="9{+}",void 0!==t.digits&&0!==t.digits){var a=t.digits.toString().split(",");isFinite(a[0])&&a[1]&&isFinite(a[1])?o+=n+e+"{"+t.digits+"}":(isNaN(t.digits)||parseInt(t.digits)>0)&&(t.digitsOptional||t.jitMasking?(i=o+n+e+"{0,"+t.digits+"}",t.keepStatic=!0):o+=n+e+"{"+t.digits+"}")}else t.inputmode="numeric";return o+=u(t.suffix,t),o+="[-]",i&&(o=[i+u(t.suffix,t)+"[-]",o]),t.greedy=!1,function(t){void 0===t.parseMinMaxOptions&&(null!==t.min&&(t.min=t.min.toString().replace(new RegExp((0,r.default)(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.min=t.min.replace(t.radixPoint,".")),t.min=isFinite(t.min)?parseFloat(t.min):NaN,isNaN(t.min)&&(t.min=Number.MIN_VALUE)),null!==t.max&&(t.max=t.max.toString().replace(new RegExp((0,r.default)(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.max=t.max.replace(t.radixPoint,".")),t.max=isFinite(t.max)?parseFloat(t.max):NaN,isNaN(t.max)&&(t.max=Number.MAX_VALUE)),t.parseMinMaxOptions="done")}(t),""!==t.radixPoint&&t.substituteRadixPoint&&(t.substitutes["."==t.radixPoint?",":"."]=t.radixPoint),o},_mask:function(t){return"("+t.groupSeparator+"999){+|1}"},digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",_radixDance:!0,groupSeparator:"",allowMinus:!0,negationSymbol:{front:"-",back:""},prefix:"",suffix:"",min:null,max:null,SetMaxOnOverflow:!1,step:1,inputType:"text",unmaskAsNumber:!1,roundingFN:Math.round,inputmode:"decimal",shortcuts:{k:"1000",m:"1000000"},placeholder:"0",greedy:!1,rightAlign:!0,insertMode:!0,autoUnmask:!1,skipOptionalPartCharacter:"",usePrototypeDefinitions:!1,stripLeadingZeroes:!0,substituteRadixPoint:!0,definitions:{0:{validator:f},1:{validator:f,definitionSymbol:"9"},9:{validator:"[0-90-9٠-٩۰-۹]",definitionSymbol:"*"},"+":{validator:function(t,e,n,i,r){return r.allowMinus&&("-"===t||t===r.negationSymbol.front)}},"-":{validator:function(t,e,n,i,r){return r.allowMinus&&t===r.negationSymbol.back}}},preValidation:function(t,e,n,i,r,o,a,s){if(!1!==r.__financeInput&&n===r.radixPoint)return!1;var l=t.indexOf(r.radixPoint),u=e;if(e=function(t,e,n,i,r){return r._radixDance&&r.numericInput&&e!==r.negationSymbol.back&&t<=n&&(n>0||e==r.radixPoint)&&(void 0===i.validPositions[t-1]||i.validPositions[t-1].input!==r.negationSymbol.back)&&(t-=1),t}(e,n,l,o,r),"-"===n||n===r.negationSymbol.front){if(!0!==r.allowMinus)return!1;var c=!1,f=d("+",o),p=d("-",o);return-1!==f&&(c=[f,p]),!1!==c?{remove:c,caret:u-r.negationSymbol.back.length}:{insert:[{pos:h.call(this,"+",o),c:r.negationSymbol.front,fromIsValid:!0},{pos:h.call(this,"-",o),c:r.negationSymbol.back,fromIsValid:void 0}],caret:u+r.negationSymbol.back.length}}if(n===r.groupSeparator)return{caret:u};if(s)return!0;if(-1!==l&&!0===r._radixDance&&!1===i&&n===r.radixPoint&&void 0!==r.digits&&(isNaN(r.digits)||parseInt(r.digits)>0)&&l!==e)return{caret:r._radixDance&&e===l-1?l+1:l};if(!1===r.__financeInput)if(i){if(r.digitsOptional)return{rewritePosition:a.end};if(!r.digitsOptional){if(a.begin>l&&a.end<=l)return n===r.radixPoint?{insert:{pos:l+1,c:"0",fromIsValid:!0},rewritePosition:l}:{rewritePosition:l+1};if(a.begin0&&""===this.__valueGet.call(this.el))return{rewritePosition:l};return{rewritePosition:e}},postValidation:function(t,e,n,i,r,o,a){if(!1===i)return i;if(a)return!0;if(null!==r.min||null!==r.max){var s=r.onUnMask(t.slice().reverse().join(""),void 0,l.extend({},r,{unmaskAsNumber:!0}));if(null!==r.min&&sr.min.toString().length||s<0))return!1;if(null!==r.max&&s>r.max)return!!r.SetMaxOnOverflow&&{refreshFromBuffer:!0,buffer:c(r.max.toString().replace(".",r.radixPoint).split(""),r.digits,r).reverse()}}return i},onUnMask:function(t,e,n){if(""===e&&!0===n.nullable)return e;var i=t.replace(n.prefix,"");return i=(i=i.replace(n.suffix,"")).replace(new RegExp((0,r.default)(n.groupSeparator),"g"),""),""!==n.placeholder.charAt(0)&&(i=i.replace(new RegExp(n.placeholder.charAt(0),"g"),"0")),n.unmaskAsNumber?(""!==n.radixPoint&&-1!==i.indexOf(n.radixPoint)&&(i=i.replace(r.default.call(this,n.radixPoint),".")),i=(i=i.replace(new RegExp("^"+(0,r.default)(n.negationSymbol.front)),"-")).replace(new RegExp((0,r.default)(n.negationSymbol.back)+"$"),""),Number(i)):i},isComplete:function(t,e){var n=(e.numericInput?t.slice().reverse():t).join("");return n=(n=(n=(n=(n=n.replace(new RegExp("^"+(0,r.default)(e.negationSymbol.front)),"-")).replace(new RegExp((0,r.default)(e.negationSymbol.back)+"$"),"")).replace(e.prefix,"")).replace(e.suffix,"")).replace(new RegExp((0,r.default)(e.groupSeparator)+"([0-9]{3})","g"),"$1"),","===e.radixPoint&&(n=n.replace((0,r.default)(e.radixPoint),".")),isFinite(n)},onBeforeMask:function(t,e){var n=e.radixPoint||",";isFinite(e.digits)&&(e.digits=parseInt(e.digits)),"number"!=typeof t&&"number"!==e.inputType||""===n||(t=t.toString().replace(".",n));var i="-"===t.charAt(0)||t.charAt(0)===e.negationSymbol.front,o=t.split(n),a=o[0].replace(/[^\-0-9]/g,""),s=o.length>1?o[1].replace(/[^0-9]/g,""):"",l=o.length>1;t=a+(""!==s?n+s:s);var u=0;if(""!==n&&(u=e.digitsOptional?e.digitse.max&&(t=e.max.toString().replace(".",n))}return i&&"-"!==t.charAt(0)&&(t="-"+t),c(t.toString().split(""),u,e,l).join("")},onBeforeWrite:function(t,e,n,i){function o(t,e){if(!1!==i.__financeInput||e){var n=t.indexOf(i.radixPoint);-1!==n&&t.splice(n,1)}if(""!==i.groupSeparator)for(;-1!==(n=t.indexOf(i.groupSeparator));)t.splice(n,1);return t}var a,s;if(i.stripLeadingZeroes&&(s=function(t,e){var n=new RegExp("(^"+(""!==e.negationSymbol.front?(0,r.default)(e.negationSymbol.front)+"?":"")+(0,r.default)(e.prefix)+")(.*)("+(0,r.default)(e.suffix)+(""!=e.negationSymbol.back?(0,r.default)(e.negationSymbol.back)+"?":"")+"$)").exec(t.slice().reverse().join("")),i=n?n[2]:"",o=!1;return i&&(i=i.split(e.radixPoint.charAt(0))[0],o=new RegExp("^[0"+e.groupSeparator+"]*").exec(i)),!(!o||!(o[0].length>1||o[0].length>0&&o[0].length0;d--)delete this.maskset.validPositions[u+d],delete e[u+d];if(t)switch(t.type){case"blur":case"checkval":if(null!==i.min){var f=i.onUnMask(e.slice().reverse().join(""),void 0,l.extend({},i,{unmaskAsNumber:!0}));if(null!==i.min&&f1)return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())*parseInt(s)),o.trigger("setvalue"),!1}if(t.ctrlKey)switch(t.key){case a.keys.ArrowUp:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())+parseInt(i.step)),o.trigger("setvalue"),!1;case a.keys.ArrowDown:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())-parseInt(i.step)),o.trigger("setvalue"),!1}if(!t.shiftKey&&(t.key===a.keys.Delete||t.key===a.keys.Backspace||t.key===a.keys.BACKSPACE_SAFARI)&&n.begin!==e.length){if(e[t.key===a.keys.Delete?n.begin-1:n.end]===i.negationSymbol.front)return r=e.slice().reverse(),""!==i.negationSymbol.front&&r.shift(),""!==i.negationSymbol.back&&r.pop(),o.trigger("setvalue",[r.join(""),n.begin]),!1;if(!0===i._radixDance){var h=e.indexOf(i.radixPoint);if(i.digitsOptional){if(0===h)return(r=e.slice().reverse()).pop(),o.trigger("setvalue",[r.join(""),n.begin>=r.length?r.length:n.begin]),!1}else if(-1!==h&&(n.begin=r.length?h+1:n.begin]),!1}}}}},currency:{prefix:"",groupSeparator:",",alias:"numeric",digits:2,digitsOptional:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",inputmode:"numeric",digits:0},percentage:{alias:"numeric",min:0,max:100,suffix:" %",digits:0,allowMinus:!1},indianns:{alias:"numeric",_mask:function(t){return"("+t.groupSeparator+"99){*|1}("+t.groupSeparator+"999){1|1}"},groupSeparator:",",radixPoint:".",placeholder:"0",digits:2,digitsOptional:!1}})},9380:function(t,e,n){var i;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=((i=n(8741))&&i.__esModule?i:{default:i}).default?window:{};e.default=r},7760:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.HandleNativePlaceholder=function(t,e){var n=t?t.inputmask:this;if(s.ie){if(t.inputmask._valueGet()!==e&&(t.placeholder!==e||""===t.placeholder)){var i=o.getBuffer.call(n).slice(),r=t.inputmask._valueGet();if(r!==e){var a=o.getLastValidPosition.call(n);-1===a&&r===o.getBufferTemplate.call(n).join("")?i=[]:-1!==a&&c.call(n,i),d(t,i)}}}else t.placeholder!==e&&(t.placeholder=e,""===t.placeholder&&t.removeAttribute("placeholder"))},e.applyInputValue=u,e.checkVal=h,e.clearOptionalTail=c,e.unmaskedvalue=function(t){var e=t?t.inputmask:this,n=e.opts,i=e.maskset;if(t){if(void 0===t.inputmask)return t.value;t.inputmask&&t.inputmask.refreshValue&&u(t,t.inputmask._valueGet(!0))}for(var r=[],a=i.validPositions,s=0,l=a.length;s0&&" "===n[i-1];)i--;var a=0===i&&!o.isMask.call(u,t)&&(r.getTest.call(u,t).match.nativeDef===e.charAt(0)||!0===r.getTest.call(u,t).match.static&&r.getTest.call(u,t).match.nativeDef==="'"+e.charAt(0)||" "===r.getTest.call(u,t).match.nativeDef&&(r.getTest.call(u,t+1).match.nativeDef===e.charAt(0)||!0===r.getTest.call(u,t+1).match.static&&r.getTest.call(u,t+1).match.nativeDef==="'"+e.charAt(0)));if(!a&&i>0&&!o.isMask.call(u,t,!1,!0)){var s=o.seekNext.call(u,t);u.caretPos.begin0){var w,x,k=o.seekNext.call(u,-1,void 0,!1);if(!a.isComplete.call(u,o.getBuffer.call(u))&&b.length<=k||a.isComplete.call(u,o.getBuffer.call(u))&&b.length>0&&b.length!==k&&0===b[0])for(var S=k;void 0!==(w=b.shift());){var C=new f.Event("_checkval");if((x=c.validPositions[w]).generatedInput=!0,C.key=x.input,(v=l.EventHandlers.keypressEvent.call(u,C,!0,!1,n,S))&&void 0!==v.pos&&v.pos!==w&&c.validPositions[v.pos]&&!0===c.validPositions[v.pos].match.static)b.push(v.pos);else if(!v)break;S++}}e&&d.call(u,t,o.getBuffer.call(u),v?v.forwardPosition:u.caretPos.begin,s||new f.Event("checkval"),s&&("input"===s.type&&u.undoValue!==o.getBuffer.call(u).join("")||"paste"===s.type)),h.skipOptionalPartCharacter=y}function d(t,e,n,r,s){var l=t?t.inputmask:this,u=l.opts,c=l.dependencyLib;if(r&&"function"==typeof u.onBeforeWrite){var h=u.onBeforeWrite.call(l,r,e,n,u);if(h){if(h.refreshFromBuffer){var d=h.refreshFromBuffer;a.refreshFromBuffer.call(l,!0===d?d:d.start,d.end,h.buffer||e),e=o.getBuffer.call(l,!0)}void 0!==n&&(n=void 0!==h.caret?h.caret:n)}}if(void 0!==t&&(t.inputmask._valueSet(e.join("")),void 0===n||void 0!==r&&"blur"===r.type||o.caret.call(l,t,n,void 0,void 0,void 0!==r&&"keydown"===r.type&&(r.key===i.keys.Delete||r.key===i.keys.Backspace)),!0===s)){var f=c(t),p=t.inputmask._valueGet();t.inputmask.skipInputEvent=!0,f.trigger("input"),setTimeout((function(){p===o.getBufferTemplate.call(l).join("")?f.trigger("cleared"):!0===a.isComplete.call(l,e)&&f.trigger("complete")}),0)}}},2394:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(157),r=g(n(4963)),o=g(n(9380)),a=n(2391),s=n(4713),l=n(8711),u=n(7215),c=n(7760),h=n(9716),d=g(n(7392)),f=g(n(3976)),p=g(n(8741));function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function g(t){return t&&t.__esModule?t:{default:t}}var v=o.default.document,y="_inputmask_opts";function b(t,e,n){if(p.default){if(!(this instanceof b))return new b(t,e,n);this.dependencyLib=r.default,this.el=void 0,this.events={},this.maskset=void 0,!0!==n&&("[object Object]"===Object.prototype.toString.call(t)?e=t:(e=e||{},t&&(e.alias=t)),this.opts=r.default.extend(!0,{},this.defaults,e),this.noMasksCache=e&&void 0!==e.definitions,this.userOptions=e||{},_(this.opts.alias,e,this.opts)),this.refreshValue=!1,this.undoValue=void 0,this.$el=void 0,this.skipInputEvent=!1,this.validationEvent=!1,this.ignorable=!1,this.maxLength,this.mouseEnter=!1,this.clicked=0,this.originalPlaceholder=void 0,this.isComposing=!1,this.hasAlternator=!1}}function _(t,e,n){var i=b.prototype.aliases[t];return i?(i.alias&&_(i.alias,void 0,n),r.default.extend(!0,n,i),r.default.extend(!0,n,e),!0):(null===n.mask&&(n.mask=t),!1)}b.prototype={dataAttribute:"data-inputmask",defaults:f.default,definitions:d.default,aliases:{},masksCache:{},get isRTL(){return this.opts.isRTL||this.opts.numericInput},mask:function(t){var e=this;return"string"==typeof t&&(t=v.getElementById(t)||v.querySelectorAll(t)),(t=t.nodeName?[t]:Array.isArray(t)?t:[].slice.call(t)).forEach((function(t,n){var s=r.default.extend(!0,{},e.opts);if(function(t,e,n,i){function a(e,r){var a=""===i?e:i+"-"+e;null!==(r=void 0!==r?r:t.getAttribute(a))&&("string"==typeof r&&(0===e.indexOf("on")?r=o.default[r]:"false"===r?r=!1:"true"===r&&(r=!0)),n[e]=r)}if(!0===e.importDataAttributes){var s,l,u,c,h=t.getAttribute(i);if(h&&""!==h&&(h=h.replace(/'/g,'"'),l=JSON.parse("{"+h+"}")),l)for(c in u=void 0,l)if("alias"===c.toLowerCase()){u=l[c];break}for(s in a("alias",u),n.alias&&_(n.alias,n,e),e){if(l)for(c in u=void 0,l)if(c.toLowerCase()===s.toLowerCase()){u=l[c];break}a(s,u)}}return r.default.extend(!0,e,n),("rtl"===t.dir||e.rightAlign)&&(t.style.textAlign="right"),("rtl"===t.dir||e.numericInput)&&(t.dir="ltr",t.removeAttribute("dir"),e.isRTL=!0),Object.keys(n).length}(t,s,r.default.extend(!0,{},e.userOptions),e.dataAttribute)){var l=(0,a.generateMaskSet)(s,e.noMasksCache);void 0!==l&&(void 0!==t.inputmask&&(t.inputmask.opts.autoUnmask=!0,t.inputmask.remove()),t.inputmask=new b(void 0,void 0,!0),t.inputmask.opts=s,t.inputmask.noMasksCache=e.noMasksCache,t.inputmask.userOptions=r.default.extend(!0,{},e.userOptions),t.inputmask.el=t,t.inputmask.$el=(0,r.default)(t),t.inputmask.maskset=l,r.default.data(t,y,e.userOptions),i.mask.call(t.inputmask))}})),t&&t[0]&&t[0].inputmask||this},option:function(t,e){return"string"==typeof t?this.opts[t]:"object"===m(t)?(r.default.extend(this.userOptions,t),this.el&&!0!==e&&this.mask(this.el),this):void 0},unmaskedvalue:function(t){if(this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache),void 0===this.el||void 0!==t){var e=("function"==typeof this.opts.onBeforeMask&&this.opts.onBeforeMask.call(this,t,this.opts)||t).split("");c.checkVal.call(this,void 0,!1,!1,e),"function"==typeof this.opts.onBeforeWrite&&this.opts.onBeforeWrite.call(this,void 0,l.getBuffer.call(this),0,this.opts)}return c.unmaskedvalue.call(this,this.el)},remove:function(){if(this.el){r.default.data(this.el,y,null);var t=this.opts.autoUnmask?(0,c.unmaskedvalue)(this.el):this._valueGet(this.opts.autoUnmask);t!==l.getBufferTemplate.call(this).join("")?this._valueSet(t,this.opts.autoUnmask):this._valueSet(""),h.EventRuler.off(this.el),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el),"value")&&this.__valueGet&&Object.defineProperty(this.el,"value",{get:this.__valueGet,set:this.__valueSet,configurable:!0}):v.__lookupGetter__&&this.el.__lookupGetter__("value")&&this.__valueGet&&(this.el.__defineGetter__("value",this.__valueGet),this.el.__defineSetter__("value",this.__valueSet)),this.el.inputmask=void 0}return this.el},getemptymask:function(){return this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache),(this.isRTL?l.getBufferTemplate.call(this).reverse():l.getBufferTemplate.call(this)).join("")},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache),u.isComplete.call(this,l.getBuffer.call(this))},getmetadata:function(){if(this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache),Array.isArray(this.maskset.metadata)){var t=s.getMaskTemplate.call(this,!0,0,!1).join("");return this.maskset.metadata.forEach((function(e){return e.mask!==t||(t=e,!1)})),t}return this.maskset.metadata},isValid:function(t){if(this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache),t){var e=("function"==typeof this.opts.onBeforeMask&&this.opts.onBeforeMask.call(this,t,this.opts)||t).split("");c.checkVal.call(this,void 0,!0,!1,e)}else t=this.isRTL?l.getBuffer.call(this).slice().reverse().join(""):l.getBuffer.call(this).join("");for(var n=l.getBuffer.call(this),i=l.determineLastRequiredPosition.call(this),r=n.length-1;r>i&&!l.isMask.call(this,r);r--);return n.splice(i,r+1-i),u.isComplete.call(this,n)&&t===(this.isRTL?l.getBuffer.call(this).slice().reverse().join(""):l.getBuffer.call(this).join(""))},format:function(t,e){this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache);var n=("function"==typeof this.opts.onBeforeMask&&this.opts.onBeforeMask.call(this,t,this.opts)||t).split("");c.checkVal.call(this,void 0,!0,!1,n);var i=this.isRTL?l.getBuffer.call(this).slice().reverse().join(""):l.getBuffer.call(this).join("");return e?{value:i,metadata:this.getmetadata()}:i},setValue:function(t){this.el&&(0,r.default)(this.el).trigger("setvalue",[t])},analyseMask:a.analyseMask},b.extendDefaults=function(t){r.default.extend(!0,b.prototype.defaults,t)},b.extendDefinitions=function(t){r.default.extend(!0,b.prototype.definitions,t)},b.extendAliases=function(t){r.default.extend(!0,b.prototype.aliases,t)},b.format=function(t,e,n){return b(e).format(t,n)},b.unmask=function(t,e){return b(e).unmaskedvalue(t)},b.isValid=function(t,e){return b(e).isValid(t)},b.remove=function(t){"string"==typeof t&&(t=v.getElementById(t)||v.querySelectorAll(t)),(t=t.nodeName?[t]:t).forEach((function(t){t.inputmask&&t.inputmask.remove()}))},b.setValue=function(t,e){"string"==typeof t&&(t=v.getElementById(t)||v.querySelectorAll(t)),(t=t.nodeName?[t]:t).forEach((function(t){t.inputmask?t.inputmask.setValue(e):(0,r.default)(t).trigger("setvalue",[e])}))},b.dependencyLib=r.default,o.default.Inputmask=b;var w=b;e.default=w},5296:function(t,e,n){function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var r=p(n(9380)),o=p(n(2394)),a=p(n(8741));function s(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,i=new Array(e);n0){if(y(l=m[m.length-1],a),l.isAlternator){u=m.pop();for(var t=0;t0?(l=m[m.length-1]).matches.push(u):p.matches.push(u)}}else y(p,a)}function _(t){var e=new r.default(!0);return e.openGroup=!1,e.matches=t,e}function w(){if((s=m.pop()).openGroup=!1,void 0!==s)if(m.length>0){if((l=m[m.length-1]).matches.push(s),l.isAlternator){for(var t=(u=m.pop()).matches[0].matches?u.matches[0].matches.length:1,e=0;e0?(l=m[m.length-1]).matches.push(u):p.matches.push(u)}}else p.matches.push(s);else b()}function x(t){var e=t.pop();return e.isQuantifier&&(e=_([t.pop(),e])),e}for(e&&(n.optionalmarker[0]=void 0,n.optionalmarker[1]=void 0);i=e?d.exec(t):h.exec(t);){if(a=i[0],e){switch(a.charAt(0)){case"?":a="{0,1}";break;case"+":case"*":a="{"+a+"}";break;case"|":if(0===m.length){var k=_(p.matches);k.openGroup=!0,m.push(k),p.matches=[],v=!0}}switch(a){case"\\d":a="[0-9]";break;case"\\p":a+=d.exec(t)[0],a+=d.exec(t)[0]}}if(f)b();else switch(a.charAt(0)){case"$":case"^":e||b();break;case n.escapeChar:f=!0,e&&b();break;case n.optionalmarker[1]:case n.groupmarker[1]:w();break;case n.optionalmarker[0]:m.push(new r.default(!1,!0));break;case n.groupmarker[0]:m.push(new r.default(!0));break;case n.quantifiermarker[0]:var S=new r.default(!1,!1,!0),C=(a=a.replace(/[{}?]/g,"")).split("|"),T=C[0].split(","),O=isNaN(T[0])?T[0]:parseInt(T[0]),E=1===T.length?O:isNaN(T[1])?T[1]:parseInt(T[1]),A=isNaN(C[1])?C[1]:parseInt(C[1]);"*"!==O&&"+"!==O||(O="*"===E?0:1),S.quantifier={min:O,max:E,jit:A};var L=m.length>0?m[m.length-1].matches:p.matches;(i=L.pop()).isGroup||(i=_([i])),L.push(i),L.push(S);break;case n.alternatormarker:if(m.length>0){var M=(l=m[m.length-1]).matches[l.matches.length-1];c=l.openGroup&&(void 0===M.matches||!1===M.isGroup&&!1===M.isAlternator)?m.pop():x(l.matches)}else c=x(p.matches);if(c.isAlternator)m.push(c);else if(c.alternatorGroup?(u=m.pop(),c.alternatorGroup=!1):u=new r.default(!1,!1,!1,!0),u.matches.push(c),m.push(u),c.openGroup){c.openGroup=!1;var P=new r.default(!0);P.alternatorGroup=!0,m.push(P)}break;default:b()}}for(v&&w();m.length>0;)s=m.pop(),p.matches.push(s);return p.matches.length>0&&(function t(i){i&&i.matches&&i.matches.forEach((function(r,o){var a=i.matches[o+1];(void 0===a||void 0===a.matches||!1===a.isQuantifier)&&r&&r.isGroup&&(r.isGroup=!1,e||(y(r,n.groupmarker[0],0),!0!==r.openGroup&&y(r,n.groupmarker[1]))),t(r)}))}(p),g.push(p)),(n.numericInput||n.isRTL)&&function t(e){for(var i in e.matches=e.matches.reverse(),e.matches)if(Object.prototype.hasOwnProperty.call(e.matches,i)){var r=parseInt(i);if(e.matches[i].isQuantifier&&e.matches[r+1]&&e.matches[r+1].isGroup){var o=e.matches[i];e.matches.splice(i,1),e.matches.splice(r+1,0,o)}void 0!==e.matches[i].matches?e.matches[i]=t(e.matches[i]):e.matches[i]=((a=e.matches[i])===n.optionalmarker[0]?a=n.optionalmarker[1]:a===n.optionalmarker[1]?a=n.optionalmarker[0]:a===n.groupmarker[0]?a=n.groupmarker[1]:a===n.groupmarker[1]&&(a=n.groupmarker[0]),a)}var a;return e}(g[0]),g},e.generateMaskSet=function(t,e){var n;function r(t,e){var n=e.repeat,i=e.groupmarker,r=e.quantifiermarker,o=e.keepStatic;if(n>0||"*"===n||"+"===n){var l="*"===n?0:"+"===n?1:n;t=i[0]+t+i[1]+r[0]+l+","+n+r[1]}if(!0===o){var u=t.match(new RegExp("(.)\\[([^\\]]*)\\]","g"));u&&u.forEach((function(e,n){var i=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.split("["),2),r=i[0],o=i[1];o=o.replace("]",""),t=t.replace(new RegExp("".concat((0,a.default)(r),"\\[").concat((0,a.default)(o),"\\]")),r.charAt(0)===o.charAt(0)?"(".concat(r,"|").concat(r).concat(o,")"):"".concat(r,"[").concat(o,"]"))}))}return t}function l(t,n,a){var s,l,u=!1;return null!==t&&""!==t||((u=null!==a.regex)?t=(t=a.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(u=!0,t=".*")),1===t.length&&!1===a.greedy&&0!==a.repeat&&(a.placeholder=""),t=r(t,a),l=u?"regex_"+a.regex:a.numericInput?t.split("").reverse().join(""):t,null!==a.keepStatic&&(l="ks_"+a.keepStatic+l),void 0===o.default.prototype.masksCache[l]||!0===e?(s={mask:t,maskToken:o.default.prototype.analyseMask(t,u,a),validPositions:[],_buffer:void 0,buffer:void 0,tests:{},excludes:{},metadata:n,maskLength:void 0,jitOffset:{}},!0!==e&&(o.default.prototype.masksCache[l]=s,s=i.default.extend(!0,{},o.default.prototype.masksCache[l]))):s=i.default.extend(!0,{},o.default.prototype.masksCache[l]),s}if("function"==typeof t.mask&&(t.mask=t.mask(t)),Array.isArray(t.mask)){if(t.mask.length>1){null===t.keepStatic&&(t.keepStatic=!0);var u=t.groupmarker[0];return(t.isRTL?t.mask.reverse():t.mask).forEach((function(e){u.length>1&&(u+=t.alternatormarker),void 0!==e.mask&&"function"!=typeof e.mask?u+=e.mask:u+=e})),l(u+=t.groupmarker[1],t.mask,t)}t.mask=t.mask.pop()}return n=t.mask&&void 0!==t.mask.mask&&"function"!=typeof t.mask.mask?l(t.mask.mask,t.mask,t):l(t.mask,t.mask,t),null===t.keepStatic&&(t.keepStatic=!1),n};var i=l(n(4963)),r=l(n(9695)),o=l(n(2394)),a=l(n(7184));function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n>>0;if(0===i)return!1;for(var r=0|e,o=Math.max(r>=0?r:i-Math.abs(r),0);othis.length)&&-1!==this.indexOf(t,e)})},8711:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.caret=function(t,e,n,i,r){var o,a=this,s=this.opts;if(void 0===e)return"selectionStart"in t&&"selectionEnd"in t?(e=t.selectionStart,n=t.selectionEnd):window.getSelection?(o=window.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==t&&o.commonAncestorContainer!==t||(e=o.startOffset,n=o.endOffset):document.selection&&document.selection.createRange&&(n=(e=0-(o=document.selection.createRange()).duplicate().moveStart("character",-t.inputmask._valueGet().length))+o.text.length),{begin:i?e:u.call(a,e),end:i?n:u.call(a,n)};if(Array.isArray(e)&&(n=a.isRTL?e[0]:e[1],e=a.isRTL?e[1]:e[0]),void 0!==e.begin&&(n=a.isRTL?e.begin:e.end,e=a.isRTL?e.end:e.begin),"number"==typeof e){e=i?e:u.call(a,e),n="number"==typeof(n=i?n:u.call(a,n))?n:e;var l=parseInt(((t.ownerDocument.defaultView||window).getComputedStyle?(t.ownerDocument.defaultView||window).getComputedStyle(t,null):t.currentStyle).fontSize)*n;if(t.scrollLeft=l>t.scrollWidth?l:0,t.inputmask.caretPos={begin:e,end:n},s.insertModeVisual&&!1===s.insertMode&&e===n&&(r||n++),t===(t.inputmask.shadowRoot||t.ownerDocument).activeElement)if("setSelectionRange"in t)t.setSelectionRange(e,n);else if(window.getSelection){if(o=document.createRange(),void 0===t.firstChild||null===t.firstChild){var c=document.createTextNode("");t.appendChild(c)}o.setStart(t.firstChild,eh&&((n=d[e]).match.optionality||n.match.optionalQuantifier&&n.match.newBlockMarker||m&&(m!==d[e].locator[f.alternation]&&1!=n.match.static||!0===n.match.static&&n.locator[f.alternation]&&r.checkAlternationMatch.call(o,n.locator[f.alternation].toString().split(","),m.toString().split(","))&&""!==i.getTests.call(o,e)[0].def))&&u[e]===i.getPlaceholder.call(o,e,n.match);e--)c--;return t?{l:c,def:d[c]?d[c].match:void 0}:c},e.determineNewCaretPosition=function(t,e,n){var r=this,u=r.maskset,c=r.opts;if(e&&(r.isRTL?t.end=t.begin:t.begin=t.end),t.begin===t.end){switch(n=n||c.positionCaretOnClick){case"none":break;case"select":t={begin:0,end:o.call(r).length};break;case"ignore":t.end=t.begin=l.call(r,a.call(r));break;case"radixFocus":if(r.clicked>1&&0==u.validPositions.length)break;if(function(t){if(""!==c.radixPoint&&0!==c.digits){var e=u.validPositions;if(void 0===e[t]||e[t].input===i.getPlaceholder.call(r,t)){if(t=y||d===p)&&(p=y)}t.end=t.begin=p}}return t}},e.getBuffer=o,e.getBufferTemplate=function(){var t=this.maskset;return void 0===t._buffer&&(t._buffer=i.getMaskTemplate.call(this,!1,1),void 0===t.buffer&&(t.buffer=t._buffer.slice())),t._buffer},e.getLastValidPosition=a,e.isMask=s,e.resetMaskSet=function(t){var e=this.maskset;e.buffer=void 0,!0!==t&&(e.validPositions=[],e.p=0)},e.seekNext=l,e.seekPrevious=function(t,e){var n=this,r=t-1;if(t<=0)return 0;for(;r>0&&(!0===e&&(!0!==i.getTest.call(n,r).match.newBlockMarker||!s.call(n,r,void 0,!0))||!0!==e&&!s.call(n,r,void 0,!0));)r--;return r},e.translatePosition=u;var i=n(4713),r=n(7215);function o(t){var e=this,n=e.maskset;return void 0!==n.buffer&&!0!==t||(n.buffer=i.getMaskTemplate.call(e,!0,a.call(e),!0),void 0===n._buffer&&(n._buffer=n.buffer.slice())),n.buffer}function a(t,e,n){var i=this.maskset,r=-1,o=-1,a=n||i.validPositions;void 0===t&&(t=-1);for(var s=0,l=a.length;s=t&&(o=s));return-1===r||r==t?o:-1==o||t-r-1){if(n){var s=i.getTests.call(r,t);return s.length>1+(""===s[s.length-1].match.def?1:0)}var l=i.determineTestTemplate.call(r,t,i.getTests.call(r,t)),u=i.getPlaceholder.call(r,t,l.match);return l.match.def!==u}return!1}function l(t,e,n){var r=this;void 0===n&&(n=!0);for(var o=t+1;""!==i.getTest.call(r,o).match.def&&(!0===e&&(!0!==i.getTest.call(r,o).match.newBlockMarker||!s.call(r,o,void 0,!0))||!0!==e&&!s.call(r,o,void 0,n));)o++;return o}function u(t){var e=this.opts,n=this.el;return!this.isRTL||"number"!=typeof t||e.greedy&&""===e.placeholder||!n||(t=this._valueGet().length-t)<0&&(t=0),t}},4713:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.determineTestTemplate=u,e.getDecisionTaker=a,e.getMaskTemplate=function(t,e,n,i,r){var o=this,a=this.opts,c=this.maskset,h=a.greedy;r&&a.greedy&&(a.greedy=!1,o.maskset.tests={}),e=e||0;var f,p,m,g,v=[],y=0;do{if(!0===t&&c.validPositions[y])p=(m=r&&c.validPositions[y].match.optionality&&void 0===c.validPositions[y+1]&&(!0===c.validPositions[y].generatedInput||c.validPositions[y].input==a.skipOptionalPartCharacter&&y>0)?u.call(o,y,d.call(o,y,f,y-1)):c.validPositions[y]).match,f=m.locator.slice(),v.push(!0===n?m.input:!1===n?p.nativeDef:s.call(o,y,p));else{p=(m=l.call(o,y,f,y-1)).match,f=m.locator.slice();var b=!0!==i&&(!1!==a.jitMasking?a.jitMasking:p.jit);(g=(g&&p.static&&p.def!==a.groupSeparator&&null===p.fn||c.validPositions[y-1]&&p.static&&p.def!==a.groupSeparator&&null===p.fn)&&c.tests[y])||!1===b||void 0===b||"number"==typeof b&&isFinite(b)&&b>y?v.push(!1===n?p.nativeDef:s.call(o,v.length,p)):g=!1}y++}while(!0!==p.static||""!==p.def||e>y);return""===v[v.length-1]&&v.pop(),!1===n&&void 0!==c.maskLength||(c.maskLength=y-1),a.greedy=h,v},e.getPlaceholder=s,e.getTest=c,e.getTestTemplate=l,e.getTests=d,e.isSubsetOf=h;var i,r=(i=n(2394))&&i.__esModule?i:{default:i};function o(t,e){var n=(null!=t.alternation?t.mloc[a(t)]:t.locator).join("");if(""!==n)for(;n.length0&&(e=e.split(",")[0]),void 0!==e?e.toString():""}function s(t,e,n){var i=this.opts,r=this.maskset;if(void 0!==(e=e||c.call(this,t).match).placeholder||!0===n)return"function"==typeof e.placeholder?e.placeholder(i):e.placeholder;if(!0===e.static){if(t>-1&&void 0===r.validPositions[t]){var o,a=d.call(this,t),s=[];if(a.length>1+(""===a[a.length-1].match.def?1:0))for(var l=0;l1&&/[0-9a-bA-Z]/.test(s[0].match.def)))return i.placeholder.charAt(t%i.placeholder.length)}return e.def}return i.placeholder.charAt(t%i.placeholder.length)}function l(t,e,n){return this.maskset.validPositions[t]||u.call(this,t,d.call(this,t,e?e.slice():e,n))}function u(t,e){var n=this.opts,i=0,r=function(t,e){var n=0,i=!1;return e.forEach((function(t){t.match.optionality&&(0!==n&&n!==t.match.optionality&&(i=!0),(0===n||n>t.match.optionality)&&(n=t.match.optionality))})),n&&(0==t||1==e.length?n=0:i||(n=0)),n}(t,e);t=t>0?t-1:0;var a,s,l,u=o(c.call(this,t));n.greedy&&e.length>1&&""===e[e.length-1].match.def&&(i=1);for(var h=0;h0&&"master"===l.match.newBlockMarker&&(!d.match.optionality||d.match.optionality-r<1||!d.match.newBlockMarker)||l&&!n.greedy&&l.match.optionalQuantifier&&!d.match.optionalQuantifier)&&(s=f,l=d)}return l}function c(t,e){var n=this.maskset;return n.validPositions[t]?n.validPositions[t]:(e||d.call(this,t))[0]}function h(t,e,n){function i(t){for(var e,n=[],i=-1,r=0,o=t.length;re.alternation)for(var r=e.alternation;rt+c._maxTestPos)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+l.mask;if(p===t&&void 0===o.matches){if(g.push({match:o,locator:s.reverse(),cd:y,mloc:{}}),!o.optionality||void 0!==f||!(c.definitions&&c.definitions[o.nativeDef]&&c.definitions[o.nativeDef].optional||r.default.prototype.definitions[o.nativeDef]&&r.default.prototype.definitions[o.nativeDef].optional))return!0;v=!0,p=t}else if(void 0!==o.matches){if(o.isGroup&&f!==o)return function(){if(o=u(e.matches[e.matches.indexOf(o)+1],s,f))return!0}();if(o.isOptional)return function(){var e=o,r=g.length;if(o=b(o,n,s,f),g.length>0){if(g.forEach((function(t,e){e>=r&&(t.match.optionality=t.match.optionality?t.match.optionality+1:1)})),i=g[g.length-1].match,void 0!==f||!m(i,e))return o;v=!0,p=t}}();if(o.isAlternator)return function(){a.hasAlternator=!0;var i,r,m,y=o,b=[],_=g.slice(),S=s.length,C=!1,T=n.length>0?n.shift():-1;if(-1===T||"string"==typeof T){var O,E=p,A=n.slice(),L=[];if("string"==typeof T)L=T.split(",");else for(O=0;O=c.keepStatic)&&(L=L.slice(0,1));for(var j=0;jy.matches[0].matches.length)break;i=g.slice(),p=E,g=[];for(var R=0;R0,o=b.length>0,n=A.slice()}else o=u(y.matches[T]||e.matches[T],[T].concat(s),f);if(o)return!0}();if(o.isQuantifier&&f!==e.matches[e.matches.indexOf(o)-1])return function(){for(var r=o,a=!1,h=n.length>0?n.shift():0;h<(isNaN(r.quantifier.max)?h+1:r.quantifier.max)&&p<=t;h++){var d=e.matches[e.matches.indexOf(r)-1];if(o=u(d,[h].concat(s),d)){if(g.forEach((function(e,n){(i=_(d,e.match)?e.match:g[g.length-1].match).optionalQuantifier=h>=r.quantifier.min,i.jit=(h+1)*(d.matches.indexOf(i)+1)>r.quantifier.jit,i.optionalQuantifier&&m(i,d)&&(v=!0,p=t,c.greedy&&null==l.validPositions[t-1]&&h>r.quantifier.min&&-1!=["*","+"].indexOf(r.quantifier.max)&&(g.pop(),y=void 0),a=!0,o=!1),!a&&i.jit&&(l.jitOffset[t]=d.matches.length-d.matches.indexOf(i))})),a)break;return!0}}}();if(o=b(o,n,s,f))return!0}else p++}for(var f=n.length>0?n.shift():0;ft)break}}function _(t,e){var n=-1!=t.matches.indexOf(e);return n||t.matches.forEach((function(t,i){void 0===t.matches||n||(n=_(t,e))})),n}if(t>-1){if(void 0===e){for(var w,x=t-1;void 0===(w=l.validPositions[x]||l.tests[x])&&x>-1;)x--;void 0!==w&&x>-1&&(m=function(t,e){var n,i=[];return Array.isArray(e)||(e=[e]),e.length>0&&(void 0===e[0].alternation||!0===c.keepStatic?0===(i=u.call(a,t,e.slice()).locator.slice()).length&&(i=e[0].locator.slice()):e.forEach((function(t){""!==t.def&&(0===i.length?(n=t.alternation,i=t.locator.slice()):t.locator[n]&&-1===i[n].toString().indexOf(t.locator[n])&&(i[n]+=","+t.locator[n]))}))),i}(x,w),y=m.join(""),p=x)}if(l.tests[t]&&l.tests[t][0].cd===y)return l.tests[t];for(var k=m.shift();kt);k++);}return(0===g.length||v)&&g.push({match:{fn:null,static:!0,optionality:!1,casing:null,def:"",placeholder:""},locator:[],mloc:{},cd:y}),void 0!==e&&l.tests[t]?o=s.extend(!0,[],g):(l.tests[t]=s.extend(!0,[],g),o=l.tests[t]),g.forEach((function(t){t.match.optionality=t.match.defOptionality||!1})),o}},7215:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.alternate=s,e.checkAlternationMatch=function(t,e,n){for(var i,r=this.opts.greedy?e:e.slice(0,1),o=!1,a=void 0!==n?n.split(","):[],s=0;s=o.getBuffer.call(u).length&&p>=n.end&&(n.end=p+1),e===r.keys.Backspace?n.end-n.begin<1&&(n.begin=o.seekPrevious.call(u,n.begin)):e===r.keys.Delete&&n.begin===n.end&&(n.end=o.isMask.call(u,n.end,!0,!0)?n.end+1:o.seekNext.call(u,n.end)+1),!1!==(f=m.call(u,n))){if(!0!==a&&!1!==h.keepStatic||null!==h.regex&&-1!==i.getTest.call(u,n.begin).match.def.indexOf("|")){var g=s.call(u,!0);if(g){var v=void 0!==g.caret?g.caret:g.pos?o.seekNext.call(u,g.pos.begin?g.pos.begin:g.pos):o.getLastValidPosition.call(u,-1,!0);(e!==r.keys.Delete||n.begin>v)&&n.begin}}!0!==a&&(c.p=e===r.keys.Delete?n.begin+f:n.begin,c.p=o.determineNewCaretPosition.call(u,{begin:c.p,end:c.p},!1,!1===h.insertMode&&e===r.keys.Backspace?"none":void 0).begin)}},e.isComplete=u,e.isSelection=c,e.isValid=h,e.refreshFromBuffer=f,e.revalidateMask=m;var i=n(4713),r=n(2839),o=n(8711),a=n(6030);function s(t,e,n,r,a,l){var u,c,d,f,p,m,g,v,y,b,_,w=this,x=this.dependencyLib,k=this.opts,S=w.maskset,C=x.extend(!0,[],S.validPositions),T=x.extend(!0,{},S.tests),O=!1,E=!1,A=void 0!==a?a:o.getLastValidPosition.call(w);if(l&&(b=l.begin,_=l.end,l.begin>l.end&&(b=l.end,_=l.begin)),-1===A&&void 0===a)u=0,c=(f=i.getTest.call(w,u)).alternation;else for(;A>=0;A--)if((d=S.validPositions[A])&&void 0!==d.alternation){if(A<=(t||0)&&f&&f.locator[d.alternation]!==d.locator[d.alternation])break;u=A,c=S.validPositions[u].alternation,f=d}if(void 0!==c){g=parseInt(u),S.excludes[g]=S.excludes[g]||[],!0!==t&&S.excludes[g].push((0,i.getDecisionTaker)(f)+":"+f.alternation);var L=[],M=-1;for(p=g;p=_)&&L.push(m.input),delete S.validPositions[p];for(-1===M&&void 0!==e&&(L.push(e),M=L.length-1);void 0!==S.excludes[g]&&S.excludes[g].length<10;){for(S.tests={},o.resetMaskSet.call(w,!0),O=!0,p=0;pe:t.end-t.begin>e}function h(t,e,n,r,a,d,g){var v=this,y=this.dependencyLib,b=this.opts,_=v.maskset;n=!0===n;var w=t;function x(t){if(void 0!==t){if(void 0!==t.remove&&(Array.isArray(t.remove)||(t.remove=[t.remove]),t.remove.sort((function(t,e){return v.isRTL?t.pos-e.pos:e.pos-t.pos})).forEach((function(t){m.call(v,{begin:t,end:t+1})})),t.remove=void 0),void 0!==t.insert&&(Array.isArray(t.insert)||(t.insert=[t.insert]),t.insert.sort((function(t,e){return v.isRTL?e.pos-t.pos:t.pos-e.pos})).forEach((function(t){""!==t.c&&h.call(v,t.pos,t.c,void 0===t.strict||t.strict,void 0!==t.fromIsValid?t.fromIsValid:r)})),t.insert=void 0),t.refreshFromBuffer&&t.buffer){var e=t.refreshFromBuffer;f.call(v,!0===e?e:e.start,e.end,t.buffer),t.refreshFromBuffer=void 0}void 0!==t.rewritePosition&&(w=t.rewritePosition,t=!0)}return t}function k(e,n,a){var s=!1;return i.getTests.call(v,e).every((function(u,h){var d=u.match;if(o.getBuffer.call(v,!0),!1!==(s=(!d.jit||void 0!==_.validPositions[o.seekPrevious.call(v,e)])&&(null!=d.fn?d.fn.test(n,_,e,a,b,c.call(v,t)):(n===d.def||n===b.skipOptionalPartCharacter)&&""!==d.def&&{c:i.getPlaceholder.call(v,e,d,!0)||d.def,pos:e}))){var f=void 0!==s.c?s.c:n,p=e;return f=f===b.skipOptionalPartCharacter&&!0===d.static?i.getPlaceholder.call(v,e,d,!0)||d.def:f,!0!==(s=x(s))&&void 0!==s.pos&&s.pos!==e&&(p=s.pos),!0!==s&&void 0===s.pos&&void 0===s.c||!1===m.call(v,t,y.extend({},u,{input:l.call(v,f,d,p)}),r,p)&&(s=!1),!1}return!0})),s}void 0!==t.begin&&(w=v.isRTL?t.end:t.begin);var S=!0,C=y.extend(!0,{},_.validPositions);if(!1===b.keepStatic&&void 0!==_.excludes[w]&&!0!==a&&!0!==r)for(var T=w;T<(v.isRTL?t.begin:t.end);T++)void 0!==_.excludes[T]&&(_.excludes[T]=void 0,delete _.tests[T]);if("function"==typeof b.preValidation&&!0!==r&&!0!==d&&(S=x(S=b.preValidation.call(v,o.getBuffer.call(v),w,e,c.call(v,t),b,_,t,n||a))),!0===S){if(S=k(w,e,n),(!n||!0===r)&&!1===S&&!0!==d){var O=_.validPositions[w];if(!O||!0!==O.match.static||O.match.def!==e&&e!==b.skipOptionalPartCharacter){if(b.insertMode||void 0===_.validPositions[o.seekNext.call(v,w)]||t.end>w){var E=!1;if(_.jitOffset[w]&&void 0===_.validPositions[o.seekNext.call(v,w)]&&!1!==(S=h.call(v,w+_.jitOffset[w],e,!0,!0))&&(!0!==a&&(S.caret=w),E=!0),t.end>w&&(_.validPositions[w]=void 0),!E&&!o.isMask.call(v,w,b.keepStatic&&0===w))for(var A=w+1,L=o.seekNext.call(v,w,!1,0!==w);A<=L;A++)if(!1!==(S=k(A,e,n))){S=p.call(v,w,void 0!==S.pos?S.pos:A)||S,w=A;break}}}else S={caret:o.seekNext.call(v,w)}}v.hasAlternator&&!0!==a&&!n&&(!1===S&&b.keepStatic&&(u.call(v,o.getBuffer.call(v))||0===w)?S=s.call(v,w,e,n,r,void 0,t):(c.call(v,t)&&_.tests[w]&&_.tests[w].length>1&&b.keepStatic||1==S&&!0!==b.numericInput&&_.tests[w]&&_.tests[w].length>1&&o.getLastValidPosition.call(v,void 0,!0)>w)&&(S=s.call(v,!0))),!0===S&&(S={pos:w})}if("function"==typeof b.postValidation&&!0!==r&&!0!==d){var M=b.postValidation.call(v,o.getBuffer.call(v,!0),void 0!==t.begin?v.isRTL?t.end:t.begin:t,e,S,b,_,n,g);void 0!==M&&(S=!0===M?S:M)}S&&void 0===S.pos&&(S.pos=w),!1===S||!0===d?(o.resetMaskSet.call(v,!0),_.validPositions=y.extend(!0,[],C)):p.call(v,void 0,w,!0);var P=x(S);return void 0!==v.maxLength&&o.getBuffer.call(v).length>v.maxLength&&!r&&(o.resetMaskSet.call(v,!0),_.validPositions=y.extend(!0,[],C),P=!1),P}function d(t,e,n){for(var r=this.maskset,o=!1,a=i.getTests.call(this,t),s=0;s0&&!a.validPositions[t];t--);for(var l=t;lt+1?e[t+1]&&!0===e[t+1].match.static&&e[t+1]:e[t+1];return r&&o}return!1}var f=0,p=void 0!==t.begin?t.begin:t,m=void 0!==t.end?t.end:t,g=!0;if(t.begin>t.end&&(p=t.end,m=t.begin),r=void 0!==r?r:p,void 0===n&&(p!==m||l.insertMode&&void 0!==s.validPositions[r]||void 0===e||e.match.optionalQuantifier||e.match.optionality)){var v,y=u.extend(!0,{},s.validPositions),b=o.getLastValidPosition.call(a,void 0,!0);for(s.p=p,v=b;v>=p;v--)delete s.validPositions[v],void 0===e&&delete s.tests[v+1];var _,w,x=r,k=x;for(e&&(s.validPositions[r]=u.extend(!0,{},e),k++,x++),v=e?m:m-1;v<=b;v++){if(void 0!==(_=y[v])&&!0!==_.generatedInput&&(v>=m||v>=p&&c(v,y,{begin:p,end:m}))){for(;""!==i.getTest.call(a,k).match.def;){if(!1!==(w=d.call(a,k,_,l))||"+"===_.match.def){"+"===_.match.def&&o.getBuffer.call(a,!0);var S=h.call(a,k,_.input,"+"!==_.match.def,!0);if(g=!1!==S,x=(S.pos||k)+1,!g&&w)break}else g=!1;if(g){void 0===e&&_.match.static&&v===t.begin&&f++;break}if(!g&&o.getBuffer.call(a),k>s.maskLength)break;k++}""==i.getTest.call(a,k).match.def&&(g=!1),k=x}if(!g)break}if(!g)return s.validPositions=u.extend(!0,[],y),o.resetMaskSet.call(a,!0),!1}else e&&i.getTest.call(a,r).match.cd===e.match.cd&&(s.validPositions[r]=u.extend(!0,{},e));return o.resetMaskSet.call(a,!0),f}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}var i={};return function(){var t,e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n(7149),n(3194),n(9302),n(4013),n(3851),n(219),n(207),n(5296);var r=((t=n(2394))&&t.__esModule?t:{default:t}).default;e.default=r}(),i}()},3481:function(t,e){!function(t){"use strict";var e="1.9.4";function n(t){var e,n,i,r;for(n=1,i=arguments.length;n0?Math.floor(t):Math.ceil(t)};function j(t,e,n){return t instanceof N?t:v(t)?new N(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new N(t.x,t.y):new N(t,e,n)}function I(t,e){if(t)for(var n=e?[t,e]:t,i=0,r=n.length;i=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=t.max,o=r.x>=e.x&&i.x<=n.x,a=r.y>=e.y&&i.y<=n.y;return o&&a},overlaps:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=t.max,o=r.x>e.x&&i.xe.y&&i.y=i.lat&&n.lat<=r.lat&&e.lng>=i.lng&&n.lng<=r.lng},intersects:function(t){t=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>=e.lat&&i.lat<=n.lat,a=r.lng>=e.lng&&i.lng<=n.lng;return o&&a},overlaps:function(t){t=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>e.lat&&i.late.lng&&i.lng1,Lt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",u,e),window.removeEventListener("testPassiveEventSupport",u,e)}catch(t){}return t}(),Mt=!!document.createElement("canvas").getContext,Pt=!(!document.createElementNS||!X("svg").createSVGRect),Nt=!!Pt&&((Q=document.createElement("div")).innerHTML="","http://www.w3.org/2000/svg"===(Q.firstChild&&Q.firstChild.namespaceURI)),Dt=!Pt&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),jt=0===navigator.platform.indexOf("Mac"),It=0===navigator.platform.indexOf("Linux");function Rt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Ft={ie:et,ielt9:nt,edge:it,webkit:rt,android:ot,android23:at,androidStock:lt,opera:ut,chrome:ct,gecko:ht,safari:dt,phantom:ft,opera12:pt,win:mt,ie3d:gt,webkit3d:vt,gecko3d:yt,any3d:bt,mobile:_t,mobileWebkit:wt,mobileWebkit3d:xt,msPointer:kt,pointer:St,touch:Tt,touchNative:Ct,mobileOpera:Ot,mobileGecko:Et,retina:At,passiveEvents:Lt,canvas:Mt,svg:Pt,vml:Dt,inlineSvg:Nt,mac:jt,linux:It},Bt=Ft.msPointer?"MSPointerDown":"pointerdown",zt=Ft.msPointer?"MSPointerMove":"pointermove",qt=Ft.msPointer?"MSPointerUp":"pointerup",Ht=Ft.msPointer?"MSPointerCancel":"pointercancel",Wt={touchstart:Bt,touchmove:zt,touchend:qt,touchcancel:Ht},Ut={touchstart:te,touchmove:Qt,touchend:Qt,touchcancel:Qt},Vt={},Zt=!1;function Yt(t,e,n){return"touchstart"===e&&Jt(),Ut[e]?(n=Ut[e].bind(this,n),t.addEventListener(Wt[e],n,!1),n):u}function $t(t,e,n){Wt[e]&&t.removeEventListener(Wt[e],n,!1)}function Gt(t){Vt[t.pointerId]=t}function Kt(t){Vt[t.pointerId]&&(Vt[t.pointerId]=t)}function Xt(t){delete Vt[t.pointerId]}function Jt(){Zt||(document.addEventListener(Bt,Gt,!0),document.addEventListener(zt,Kt,!0),document.addEventListener(qt,Xt,!0),document.addEventListener(Ht,Xt,!0),Zt=!0)}function Qt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],Vt)e.touches.push(Vt[n]);e.changedTouches=[e],t(e)}}function te(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Ge(e),Qt(t,e)}function ee(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return t=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}var ne=200;function ie(t,e){t.addEventListener("dblclick",e);var n,i=0;function r(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var r=Xe(t);if(!r.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||r.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var o=Date.now();o-i<=ne?2==++n&&e(ee(t)):n=1,i=o}}}else n=t.detail}return t.addEventListener("click",r),{dblclick:e,simDblclick:r}}function re(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var oe,ae,se,le,ue,ce=Oe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),he=Oe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===he||"OTransition"===he?he+"End":"transitionend";function fe(t){return"string"==typeof t?document.getElementById(t):t}function pe(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function me(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function ge(t){var e=t.parentNode;e&&e.removeChild(t)}function ve(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ye(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function be(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function _e(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=Se(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function we(t,e){if(void 0!==t.classList)for(var n=d(e),i=0,r=n.length;i0?2*window.devicePixelRatio:1;function tn(t){return Ft.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Qe:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function en(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var nn={__proto__:null,on:Be,off:qe,stopPropagation:Ze,disableScrollPropagation:Ye,disableClickPropagation:$e,preventDefault:Ge,stop:Ke,getPropagationPath:Xe,getMousePosition:Je,getWheelDelta:tn,isExternalTarget:en,addListener:Be,removeListener:qe},rn=P.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=Le(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=C(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;ethis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,B(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=j((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=j(e.paddingBottomRight||e.padding||[0,0]),r=this.project(this.getCenter()),o=this.project(t),a=this.getPixelBounds(),s=R([a.min.add(n),a.max.subtract(i)]),l=s.getSize();if(!s.contains(o)){this._enforcingBounds=!0;var u=o.subtract(s.getCenter()),c=s.extend(o).getSize().subtract(l);r.x+=u.x<0?-c.x:c.x,r.y+=u.y<0?-c.y:c.y,this.panTo(this.unproject(r),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),o=e.divideBy(2).round(),a=i.divideBy(2).round(),s=o.subtract(a);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=r(this._handleGeolocationResponse,this),i=r(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new z(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var r=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(r,i.maxZoom):r)}var o={latlng:e,bounds:n,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(o[a]=t.coords[a]);this.fire("locationfound",o)}},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ge(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(T(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ge(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=me("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new F(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=B(t),n=j(n||[0,0]);var i=this.getZoom()||0,r=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),l=this.getSize().subtract(n),u=R(this.project(s,i),this.project(a,i)).getSize(),c=Ft.any3d?this.options.zoomSnap:1,h=l.x/u.x,d=l.y/u.y,f=e?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(f,i),c&&(i=Math.round(i/(c/100))*(c/100),i=e?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(r,Math.min(o,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new N(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new I(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(q(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(j(t),e)},layerPointToLatLng:function(t){var e=j(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(q(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(q(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(B(t))},distance:function(t,e){return this.options.crs.distance(q(t),q(e))},containerPointToLayerPoint:function(t){return j(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return j(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(j(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(q(t)))},mouseEventToContainerPoint:function(t){return Je(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=fe(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Be(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ft.any3d,we(t,"leaflet-container"+(Ft.touch?" leaflet-touch":"")+(Ft.retina?" leaflet-retina":"")+(Ft.ielt9?" leaflet-oldie":"")+(Ft.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=pe(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Ae(this._mapPane,new N(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(we(t.markerPane,"leaflet-zoom-hide"),we(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,n){Ae(this._mapPane,new N(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var r=this._zoom!==e;this._moveStart(r,n)._move(t,e)._moveEnd(r),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n,i){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return T(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Ae(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[a(this._container)]=this;var e=t?qe:Be;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Ft.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){T(this._resizeRequest),this._resizeRequest=C((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],r="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,s=!1;o;){if((n=this._targets[a(o)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(r&&!en(o,t))break;if(i.push(n),r)break}if(o===this._container)break;o=o.parentNode}return i.length||s||r||!this.listens(e,!0)||(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var n=t.type;"mousedown"===n&&De(e),this._fireDOMEvent(t,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var r=n({},t);r.type="preclick",this._fireDOMEvent(r,r.type,i)}var o=this._findEventTargets(t,e);if(i){for(var a=[],s=0;s0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=Ft.any3d?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){xe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=me("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=ce,n=this._proxy.style[e];Ee(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ge(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Ee(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),r=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(r)||(C((function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,we(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&xe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function an(t,e){return new on(t,e)}var sn=E.extend({options:{position:"topright"},initialize:function(t){f(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return we(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ge(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),ln=function(t){return new sn(t)};on.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=me("div",e+"control-container",this._container);function i(i,r){var o=e+i+" "+e+r;t[i+r]=me("div",o,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ge(this._controlCorners[t]);ge(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var un=sn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(a(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+a(this),i),this._layerControlInputs.push(e),e.layerId=a(t.layer),Be(e,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+t.name;var o=document.createElement("span");return n.appendChild(o),o.appendChild(e),o.appendChild(r),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t,e,n=this._layerControlInputs,i=[],r=[];this._handlingClick=!0;for(var o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||r.push(e);for(o=0;o=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&ie.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,Be(t,"click",Ge),this.expand();var e=this;setTimeout((function(){qe(t,"click",Ge),e._preventClick=!1}))}}),cn=function(t,e,n){return new un(t,e,n)},hn=sn.extend({options:{position:"topleft",zoomInText:'+',zoomInTitle:"Zoom in",zoomOutText:'−',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=me("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,r){var o=me("a",n,i);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),$e(o),Be(o,"click",Ke),Be(o,"click",r,this),Be(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";xe(this._zoomInButton,e),xe(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(we(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(we(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});on.mergeOptions({zoomControl:!0}),on.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new hn,this.addControl(this.zoomControl))}));var dn=function(t){return new hn(t)},fn=sn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=me("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=me("div",e,n)),t.imperial&&(this._iScale=me("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,r=3.2808399*t;r>5280?(e=r/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(r),this._updateScale(this._iScale,i+" ft",i/r))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),pn=function(t){return new fn(t)},mn='',gn=sn.extend({options:{position:"bottomright",prefix:''+(Ft.inlineSvg?mn+" ":"")+"Leaflet"},initialize:function(t){f(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=me("div","leaflet-control-attribution"),$e(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' | ')}}});on.mergeOptions({attributionControl:!0}),on.addInitHook((function(){this.options.attributionControl&&(new gn).addTo(this)}));var vn=function(t){return new gn(t)};sn.Layers=un,sn.Zoom=hn,sn.Scale=fn,sn.Attribution=gn,ln.layers=cn,ln.zoom=dn,ln.scale=pn,ln.attribution=vn;var yn=E.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});yn.addTo=function(t,e){return t.addHandler(e,this),this};var bn={Events:M},_n=Ft.touch?"touchstart mousedown":"mousedown",wn=P.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){f(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Be(this._dragStartTarget,_n,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(wn._dragging===this&&this.finishDrag(!0),qe(this._dragStartTarget,_n,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!_e(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)wn._dragging===this&&this.finishDrag();else if(!(wn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(wn._dragging=this,this._preventOutline&&De(this._element),Pe(),oe(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Ie(this._element);this._startPoint=new N(e.clientX,e.clientY),this._startPos=Le(this._element),this._parentScale=Re(n);var i="mousedown"===t.type;Be(document,i?"mousemove":"touchmove",this._onMove,this),Be(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new N(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)l&&(o=a,l=s);l>n&&(e[o]=1,Mn(t,e,n,i,o),Mn(t,e,n,o,r))}function Pn(t,e){for(var n=[t[0]],i=1,r=0,o=t.length;ie&&(n.push(t[i]),r=i);return re.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function In(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function Rn(t,e,n,i){var r,o=e.x,a=e.y,s=n.x-o,l=n.y-a,u=s*s+l*l;return u>0&&((r=((t.x-o)*s+(t.y-a)*l)/u)>1?(o=n.x,a=n.y):r>0&&(o+=s*r,a+=l*r)),s=t.x-o,l=t.y-a,i?s*s+l*l:new N(o,a)}function Fn(t){return!v(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Bn(t){return Fn(t)}function zn(t,e){var n,i,r,o,a,s,l,u;if(!t||0===t.length)throw new Error("latlngs not passed");Fn(t)||(t=t[0]);var c=q([0,0]),h=B(t);h.getNorthWest().distanceTo(h.getSouthWest())*h.getNorthEast().distanceTo(h.getNorthWest())<1700&&(c=Sn(t));var d=t.length,f=[];for(n=0;ni){l=(o-i)/r,u=[s.x-l*(s.x-a.x),s.y-l*(s.y-a.y)];break}var m=e.unproject(j(u));return q([m.lat+c.lat,m.lng+c.lng])}var qn={__proto__:null,simplify:On,pointToSegmentDistance:En,closestPointOnSegment:An,clipSegment:Nn,_getEdgeIntersection:Dn,_getBitCode:jn,_sqClosestPointOnSegment:Rn,isFlat:Fn,_flat:Bn,polylineCenter:zn},Hn={project:function(t){return new N(t.lng,t.lat)},unproject:function(t){return new z(t.y,t.x)},bounds:new I([-180,-90],[180,90])},Wn={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,r=this.R_MINOR/n,o=Math.sqrt(1-r*r),a=o*Math.sin(i),s=Math.tan(Math.PI/4-i/2)/Math.pow((1-a)/(1+a),o/2);return i=-n*Math.log(Math.max(s,1e-10)),new N(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,r=this.R_MINOR/i,o=Math.sqrt(1-r*r),a=Math.exp(-t.y/i),s=Math.PI/2-2*Math.atan(a),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)e=o*Math.sin(s),e=Math.pow((1-e)/(1+e),o/2),s+=u=Math.PI/2-2*Math.atan(a*e)-s;return new z(s*n,t.x*n/i)}},Un={__proto__:null,LonLat:Hn,Mercator:Wn,SphericalMercator:Z},Vn=n({},U,{code:"EPSG:3395",projection:Wn,transformation:function(){var t=.5/(Math.PI*Wn.R);return $(t,.5,-t,.5)}()}),Zn=n({},U,{code:"EPSG:4326",projection:Hn,transformation:$(1/180,1,-1/180,.5)}),Yn=n({},W,{projection:Hn,transformation:$(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});W.Earth=U,W.EPSG3395=Vn,W.EPSG3857=G,W.EPSG900913=K,W.EPSG4326=Zn,W.Simple=Yn;var $n=P.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[a(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[a(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});on.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=a(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return a(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?v(t)?t:[t]:[]).length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()=2&&e[0]instanceof z&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){ci.prototype._setLatLngs.call(this,t),Fn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Fn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new N(e,e);if(t=new I(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,r=0,o=this._rings.length;rt.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||ci.prototype._containsPoint.call(this,t,!0)}});function fi(t,e){return new di(t,e)}var pi=Xn.extend({initialize:function(t,e){f(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,r=v(t)?t:t.features;if(r){for(e=0,n=r.length;e0&&r.push(r[0].slice()),r}function wi(t,e){return t.feature?n({},t.feature,{geometry:e}):xi(e)}function xi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var ki={toGeoJSON:function(t){return wi(this,{type:"Point",coordinates:bi(this.getLatLng(),t)})}};function Si(t,e){return new pi(t,e)}ii.include(ki),li.include(ki),ai.include(ki),ci.include({toGeoJSON:function(t){var e=!Fn(this._latlngs);return wi(this,{type:(e?"Multi":"")+"LineString",coordinates:_i(this._latlngs,e?1:0,!1,t)})}}),di.include({toGeoJSON:function(t){var e=!Fn(this._latlngs),n=e&&!Fn(this._latlngs[0]),i=_i(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),wi(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Gn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),wi(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var r=e.toGeoJSON(t);if(n)i.push(r.geometry);else{var o=xi(r);"FeatureCollection"===o.type?i.push.apply(i,o.features):i.push(o)}}})),n?wi(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var Ci=Si,Ti=$n.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=B(e),f(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(we(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ge(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ye(this._image),this},bringToBack:function(){return this._map&&be(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=B(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:me("img");we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onload=r(this.fire,this,"load"),e.onerror=r(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Ee(this._image,n,e)},_reset:function(){var t=this._image,e=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();Ae(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){Ce(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Oi=function(t,e,n){return new Ti(t,e,n)},Ei=Ti.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:me("video");if(we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onloadeddata=r(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],o=0;o0?i:[e.src]}else{v(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var a=0;a×',Be(i,"click",(function(t){Ge(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,r=this.options.maxHeight,o="leaflet-popup-scrolled";r&&i>r?(e.height=r+"px",we(t,o)):xe(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Ae(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(pe(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,r=new N(this._containerLeft,-n-this._containerBottom);r._add(Le(this._container));var o=t.layerPointToContainerPoint(r),a=j(this.options.autoPanPadding),s=j(this.options.autoPanPaddingTopLeft||a),l=j(this.options.autoPanPaddingBottomRight||a),u=t.getSize(),c=0,h=0;o.x+i+l.x>u.x&&(c=o.x+i-u.x+l.x),o.x-c-s.x<0&&(c=o.x-s.x),o.y+n+l.y>u.y&&(h=o.y+n-u.y+l.y),o.y-h-s.y<0&&(h=o.y-s.y),(c||h)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,h]))}},_getAnchor:function(){return j(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Di=function(t,e){return new Ni(t,e)};on.mergeOptions({closePopupOnClick:!0}),on.include({openPopup:function(t,e,n){return this._initOverlay(Ni,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),$n.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Ni,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Xn||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Ke(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof oi?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var ji=Pi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Pi.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Pi.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Pi.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=me("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+a(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,r=this._container,o=i.latLngToContainerPoint(i.getCenter()),a=i.layerPointToContainerPoint(t),s=this.options.direction,l=r.offsetWidth,u=r.offsetHeight,c=j(this.options.offset),h=this._getAnchor();"top"===s?(e=l/2,n=u):"bottom"===s?(e=l/2,n=0):"center"===s?(e=l/2,n=u/2):"right"===s?(e=0,n=u/2):"left"===s?(e=l,n=u/2):a.xthis.options.maxZoom||ni&&this._retainParent(r,o,a,i))},_retainChildren:function(t,e,n,i){for(var r=2*t;r<2*t+2;r++)for(var o=2*e;o<2*e+2;o++){var a=new N(r,o);a.z=n+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1this.options.maxZoom||void 0!==this.options.minZoom&&r1)this._setView(t,n);else{for(var h=r.min.y;h<=r.max.y;h++)for(var d=r.min.x;d<=r.max.x;d++){var f=new N(d,h);if(f.z=this._tileZoom,this._isValidTile(f)){var p=this._tiles[this._tileCoordsToKey(f)];p?p.current=!0:a.push(f)}}if(a.sort((function(t,e){return t.distanceTo(o)-e.distanceTo(o)})),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;dn.max.x)||!e.wrapLat&&(t.yn.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return B(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),r=i.add(n);return[e.unproject(i,t.z),e.unproject(r,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new F(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new N(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ge(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){we(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,Ft.ielt9&&this.options.opacity<1&&Ce(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),r(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&C(r(this._tileReady,this,t,null,o)),Ae(o,n),this._tiles[i]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(Ce(n.el,0),T(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(we(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ft.ielt9||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new N(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new I(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function zi(t){return new Bi(t)}var qi=Bi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=f(this,e)).detectRetina&&Ft.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Be(n,"load",r(this._tileOnLoad,this,e,n)),Be(n,"error",r(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Ft.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return g(this._url,n(e,this.options))},_tileOnLoad:function(t,e){Ft.ielt9?setTimeout(r(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=u,e.onerror=u,!e.complete)){e.src=b;var n=this._tiles[t].coords;ge(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",b),Bi.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==b))return Bi.prototype._tileReady.call(this,t,e,n)}});function Hi(t,e){return new qi(t,e)}var Wi=qi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var r in e)r in this.options||(i[r]=e[r]);var o=(e=f(this,e)).detectRetina&&Ft.retina?2:1,a=this.getTileSize();i.width=a.x*o,i.height=a.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,qi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=R(n.project(e[0]),n.project(e[1])),r=i.min,o=i.max,a=(this._wmsVersion>=1.3&&this._crs===Zn?[r.y,r.x,o.y,o.x]:[r.x,r.y,o.x,o.y]).join(","),s=qi.prototype.getTileUrl.call(this,t);return s+p(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function Ui(t,e){return new Wi(t,e)}qi.WMS=Wi,Hi.wms=Ui;var Vi=$n.extend({options:{padding:.1},initialize:function(t){f(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),we(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),o=i.multiplyBy(-n).add(r).subtract(this._map._getNewPixelOrigin(t,e));Ft.any3d?Ee(this._container,o,n):Ae(this._container,o)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new I(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Zi=Vi.extend({options:{tolerance:0},getEvents:function(){var t=Vi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Vi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Be(t,"mousemove",this._onMouseMove,this),Be(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Be(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){T(this._redrawRequest),delete this._ctx,ge(this._container),qe(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Vi.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Ft.retina?2:1;Ae(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Ft.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Vi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[a(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[a(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),r=[];for(n=0;n')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Gi={_initContainer:function(){this._container=me("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Vi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=$i("shape");we(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=$i("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ge(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,r=t._container;r.stroked=!!i.stroke,r.filled=!!i.fill,i.stroke?(e||(e=t._stroke=$i("stroke")),r.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=v(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(r.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=$i("fill")),r.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(r.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ye(t._container)},_bringToBack:function(t){be(t._container)}},Ki=Ft.vml?$i:X,Xi=Vi.extend({_initContainer:function(){this._container=Ki("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ki("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ge(this._container),qe(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Vi.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),Ae(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Ki("path");t.options.className&&we(e,t.options.className),t.options.interactive&&we(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ge(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,J(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",r=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,r)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ye(t._path)},_bringToBack:function(t){be(t._path)}});function Ji(t){return Ft.svg||Ft.vml?new Xi(t):null}Ft.vml&&Xi.include(Gi),on.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Yi(t)||Ji(t)}});var Qi=di.extend({initialize:function(t,e){di.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=B(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function tr(t,e){return new Qi(t,e)}Xi.create=Ki,Xi.pointsToPath=J,pi.geometryToLayer=mi,pi.coordsToLatLng=vi,pi.coordsToLatLngs=yi,pi.latLngToCoords=bi,pi.latLngsToCoords=_i,pi.getFeature=wi,pi.asFeature=xi,on.mergeOptions({boxZoom:!0});var er=yn.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Be(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){qe(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ge(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),oe(),Pe(),this._startPoint=this._map.mouseEventToContainerPoint(t),Be(document,{contextmenu:Ke,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=me("div","leaflet-zoom-box",this._container),we(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new I(this._point,this._startPoint),n=e.getSize();Ae(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ge(this._box),xe(this._container,"leaflet-crosshair")),ae(),Ne(),qe(document,{contextmenu:Ke,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0);var e=new F(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});on.addInitHook("addHandler","boxZoom",er),on.mergeOptions({doubleClickZoom:!0});var nr=yn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,r=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(r):e.setZoomAround(t.containerPoint,r)}});on.addInitHook("addHandler","doubleClickZoom",nr),on.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ir=yn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new wn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}we(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){xe(this._map._container,"leaflet-grab"),xe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=B(this._map.options.maxBounds);this._offsetLimit=R(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,r=(i-e+n)%t+e-n,o=(i+e+n)%t-e-n,a=Math.abs(r+n)0?o:-o))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});on.addInitHook("addHandler","scrollWheelZoom",or);var ar=600;on.mergeOptions({tapHold:Ft.touchNative&&Ft.safari&&Ft.mobile,tapTolerance:15});var sr=yn.extend({addHooks:function(){Be(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){qe(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new N(e.clientX,e.clientY),this._holdTimeout=setTimeout(r((function(){this._cancel(),this._isTapValid()&&(Be(document,"touchend",Ge),Be(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),ar),Be(document,"touchend touchcancel contextmenu",this._cancel,this),Be(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){qe(document,"touchend",Ge),qe(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),qe(document,"touchend touchcancel contextmenu",this._cancel,this),qe(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new N(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}});on.addInitHook("addHandler","tapHold",sr),on.mergeOptions({touchZoom:Ft.touch,bounceAtZoomLimits:!0});var lr=yn.extend({addHooks:function(){we(this._map._container,"leaflet-touch-zoom"),Be(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){xe(this._map._container,"leaflet-touch-zoom"),qe(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Be(document,"touchmove",this._onTouchMove,this),Be(document,"touchend touchcancel",this._onTouchEnd,this),Ge(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var a=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),T(this._animRequest);var s=r(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=C(s,this,!0),Ge(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,T(this._animRequest),qe(document,"touchmove",this._onTouchMove,this),qe(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});on.addInitHook("addHandler","touchZoom",lr),on.BoxZoom=er,on.DoubleClickZoom=nr,on.Drag=ir,on.Keyboard=rr,on.ScrollWheelZoom=or,on.TapHold=sr,on.TouchZoom=lr,t.Bounds=I,t.Browser=Ft,t.CRS=W,t.Canvas=Zi,t.Circle=li,t.CircleMarker=ai,t.Class=E,t.Control=sn,t.DivIcon=Ri,t.DivOverlay=Pi,t.DomEvent=nn,t.DomUtil=Fe,t.Draggable=wn,t.Evented=P,t.FeatureGroup=Xn,t.GeoJSON=pi,t.GridLayer=Bi,t.Handler=yn,t.Icon=Qn,t.ImageOverlay=Ti,t.LatLng=z,t.LatLngBounds=F,t.Layer=$n,t.LayerGroup=Gn,t.LineUtil=qn,t.Map=on,t.Marker=ii,t.Mixin=bn,t.Path=oi,t.Point=N,t.PolyUtil=Tn,t.Polygon=di,t.Polyline=ci,t.Popup=Ni,t.PosAnimation=rn,t.Projection=Un,t.Rectangle=Qi,t.Renderer=Vi,t.SVG=Xi,t.SVGOverlay=Li,t.TileLayer=qi,t.Tooltip=ji,t.Transformation=Y,t.Util=O,t.VideoOverlay=Ei,t.bind=r,t.bounds=R,t.canvas=Yi,t.circle=ui,t.circleMarker=si,t.control=ln,t.divIcon=Fi,t.extend=n,t.featureGroup=Jn,t.geoJSON=Si,t.geoJson=Ci,t.gridLayer=zi,t.icon=ti,t.imageOverlay=Oi,t.latLng=q,t.latLngBounds=B,t.layerGroup=Kn,t.map=an,t.marker=ri,t.point=j,t.polygon=fi,t.polyline=hi,t.popup=Di,t.rectangle=tr,t.setOptions=f,t.stamp=a,t.svg=Ji,t.svgOverlay=Mi,t.tileLayer=Hi,t.tooltip=Ii,t.transformation=$,t.version=e,t.videoOverlay=Ai;var ur=window.L;t.noConflict=function(){return window.L=ur,this},window.L=t}(e)},1574:function(t,e,n){var i,r=n(8287).hp;"undefined"!=typeof self&&self,i=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),r=n(18),o=n(19),a=n(45),s=n(46),l=n(47),u=n(48),c=n(49),h=n(12),d=n(32),f=n(33),p=n(31),m=n(1),g={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:i.default,Format:r.default,Leaf:o.default,Embed:u.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:c.default,Attributor:{Attribute:h.default,Class:d.default,Style:f.default,Store:p.default}};e.default=g},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return r(e,t),e}(Error);e.ParchmentError=o;var a,s={},l={},u={},c={};function h(t,e){var n;if(void 0===e&&(e=a.ANY),"string"==typeof t)n=c[t]||s[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof t)t&a.LEVEL&a.BLOCK?n=c.block:t&a.LEVEL&a.INLINE&&(n=c.inline);else if(t instanceof HTMLElement){var i=(t.getAttribute("class")||"").split(/\s+/);for(var r in i)if(n=l[i[r]])break;n=n||u[t.tagName]}return null==n?null:e&a.LEVEL&n.scope&&e&a.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(a=e.Scope||(e.Scope={})),e.create=function(t,e){var n=h(t);if(null==n)throw new o("Unable to create "+t+" blot");var i=n,r=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(e);return new i(r,e)},e.find=function t(n,i){return void 0===i&&(i=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:i?t(n.parentNode,i):null},e.query=h,e.register=function t(){for(var e=[],n=0;n1)return e.map((function(e){return t(e)}));var i=e[0];if("string"!=typeof i.blotName&&"string"!=typeof i.attrName)throw new o("Invalid definition");if("abstract"===i.blotName)throw new o("Cannot register abstract class");return c[i.blotName||i.attrName]=i,"string"==typeof i.keyName?s[i.keyName]=i:(null!=i.className&&(l[i.className]=i),null!=i.tagName&&(Array.isArray(i.tagName)?i.tagName=i.tagName.map((function(t){return t.toUpperCase()})):i.tagName=i.tagName.toUpperCase(),(Array.isArray(i.tagName)?i.tagName:[i.tagName]).forEach((function(t){null!=u[t]&&null!=i.className||(u[t]=i)})))),i}},function(t,e,n){var i=n(51),r=n(11),o=n(3),a=n(20),s=String.fromCharCode(0),l=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};l.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},l.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},l.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},l.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=o(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(r(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},l.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},l.prototype.filter=function(t){return this.ops.filter(t)},l.prototype.forEach=function(t){this.ops.forEach(t)},l.prototype.map=function(t){return this.ops.map(t)},l.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(i){(t(i)?e:n).push(i)})),[e,n]},l.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},l.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+a.length(e):e.delete?t-e.delete:t}),0)},l.prototype.length=function(){return this.reduce((function(t,e){return t+a.length(e)}),0)},l.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],i=a.iterator(this.ops),r=0;r0&&n.next(o.retain-s)}for(var u=new l(i);e.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===e.peekType())u.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),h=e.next(c),d=n.next(c);if("number"==typeof d.retain){var f={};"number"==typeof h.retain?f.retain=c:f.insert=h.insert;var p=a.attributes.compose(h.attributes,d.attributes,"number"==typeof h.retain);if(p&&(f.attributes=p),u.push(f),!n.hasNext()&&r(u.ops[u.ops.length-1],f)){var m=new l(e.rest());return u.concat(m).chop()}}else"number"==typeof d.delete&&"number"==typeof h.retain&&u.push(d)}return u.chop()},l.prototype.concat=function(t){var e=new l(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},l.prototype.diff=function(t,e){if(this.ops===t.ops)return new l;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),o=new l,u=i(n[0],n[1],e),c=a.iterator(this.ops),h=a.iterator(t.ops);return u.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case i.INSERT:n=Math.min(h.peekLength(),e),o.push(h.next(n));break;case i.DELETE:n=Math.min(e,c.peekLength()),c.next(n),o.delete(n);break;case i.EQUAL:n=Math.min(c.peekLength(),h.peekLength(),e);var s=c.next(n),l=h.next(n);r(s.insert,l.insert)?o.retain(n,a.attributes.diff(s.attributes,l.attributes)):o.push(l).delete(n)}e-=n}})),o.chop()},l.prototype.eachLine=function(t,e){e=e||"\n";for(var n=a.iterator(this.ops),i=new l,r=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),u="string"==typeof o.insert?o.insert.indexOf(e,s)-s:-1;if(u<0)i.push(n.next());else if(u>0)i.push(n.next(u));else{if(!1===t(i,n.next(1).attributes||{},r))return;r+=1,i=new l}}i.length()>0&&t(i,{},r)},l.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=a.iterator(this.ops),i=a.iterator(t.ops),r=new l;n.hasNext()||i.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===i.peekType())if("insert"===i.peekType())r.push(i.next());else{var o=Math.min(n.peekLength(),i.peekLength()),s=n.next(o),u=i.next(o);if(s.delete)continue;u.delete?r.push(u):r.retain(o,a.attributes.transform(s.attributes,u.attributes,e))}else r.retain(a.length(n.next()));return r.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=a.iterator(this.ops),i=0;n.hasNext()&&i<=t;){var r=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(i0&&(t1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var i=this.clone();return 0===t?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}var o=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}(s.default.Block);function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,o.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:v(t.parent,e))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[u.default,s.default.Embed,c.default],e.bubbleFormats=v,e.BlockEmbed=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=_(e,i),this.container=this.options.container,null==this.container)return y.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new d.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t){t===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(l.default.events.SCROLL_UPDATE,(function(t,e){var i=n.selection.lastRange,r=i&&0===i.length?i.index:void 0;w.call(n,(function(){return n.editor.update(null,e,r)}),t)}));var o=this.clipboard.convert("");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),p.default.level(t)}},{key:"find",value:function(t){return t.__quill||c.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&y.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var r=t.attrName||t.blotName;"string"==typeof r?this.register("formats/"+r,t,e):Object.keys(t).forEach((function(i){n.register(i,t[i],e)}))}else null==this.imports[t]||i||y.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?c.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),o(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var i=this,o=x(t,e,n),a=r(o,4);return t=a[0],e=a[1],n=a[3],w.call(this,(function(){return i.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return w.call(this,(function(){var i=n.getSelection(!0),r=new a.default;if(null==i)return r;if(c.default.query(t,c.default.Scope.BLOCK))r=n.editor.formatLine(i.index,i.length,v({},t,e));else{if(0===i.length)return n.selection.format(t,e),r;r=n.editor.formatText(i.index,i.length,v({},t,e))}return n.setSelection(i,l.default.sources.SILENT),r}),i)}},{key:"formatLine",value:function(t,e,n,i,o){var a,s=this,l=x(t,e,n,i,o),u=r(l,4);return t=u[0],e=u[1],a=u[2],o=u[3],w.call(this,(function(){return s.editor.formatLine(t,e,a)}),o,t,0)}},{key:"formatText",value:function(t,e,n,i,o){var a,s=this,l=x(t,e,n,i,o),u=r(l,4);return t=u[0],e=u[1],a=u[2],o=u[3],w.call(this,(function(){return s.editor.formatText(t,e,a)}),o,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var i=this.container.getBoundingClientRect();return{bottom:n.bottom-i.top,height:n.height,left:n.left-i.left,right:n.right-i.left,top:n.top-i.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=x(t,e),i=r(n,2);return t=i[0],e=i[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=x(t,e),i=r(n,2);return t=i[0],e=i[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return w.call(this,(function(){return r.editor.insertEmbed(e,n,i)}),o,e)}},{key:"insertText",value:function(t,e,n,i,o){var a,s=this,l=x(t,0,n,i,o),u=r(l,4);return t=u[0],a=u[2],o=u[3],w.call(this,(function(){return s.editor.insertText(t,e,a)}),o,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var i=this,o=x(t,e,n),a=r(o,4);return t=a[0],e=a[1],n=a[3],w.call(this,(function(){return i.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return w.call(this,(function(){t=new a.default(t);var n=e.getLength(),i=e.editor.deleteText(0,n),r=e.editor.applyDelta(t),o=r.ops[r.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),r.delete(1)),i.compose(r)}),n)}},{key:"setSelection",value:function(e,n,i){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=x(e,n,i),a=r(o,4);e=a[0],n=a[1],i=a[3],this.selection.setRange(new h.Range(e,n),i),i!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new a.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return w.call(this,(function(){return t=new a.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();function _(t,e){if((e=(0,f.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==b.DEFAULTS.theme){if(e.theme=b.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=m.default;var n=(0,f.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var i=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=b.import("modules/"+e);return null==n?y.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,f.default)(!0,{},b.DEFAULTS,{modules:i},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function w(t,e,n,i){if(this.options.strict&&!this.isEnabled()&&e===l.default.sources.USER)return new a.default;var r=null==n?null:this.getSelection(),o=this.editor.delta,s=t();if(null!=r&&(!0===n&&(n=r.index),null==i?r=k(r,s,e):0!==i&&(r=k(r,n,i,e)),this.setSelection(r,l.default.sources.SILENT)),s.length()>0){var u,c,h=[l.default.events.TEXT_CHANGE,s,o,e];(u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(h)),e!==l.default.sources.SILENT&&(c=this.emitter).emit.apply(c,h)}return s}function x(t,e,n,r,o){var a={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=r,r=n,n=e,e=0),"object"===(void 0===n?"undefined":i(n))?(a=n,o=r):"string"==typeof n&&(null!=r?a[n]=r:o=n),[t,e,a,o=o||l.default.sources.API]}function k(t,e,n,i){if(null==t)return null;var o=void 0,s=void 0;if(e instanceof a.default){var u=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,i!==l.default.sources.USER)})),c=r(u,2);o=c[0],s=c[1]}else{var d=[t.index,t.index+t.length].map((function(t){return t=0?t+n:Math.max(e,t+n)})),f=r(d,2);o=f[0],s=f[1]}return new h.Range(o,s-o)}b.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},b.events=l.default.events,b.sources=l.default.sources,b.version="1.3.7",b.imports={delta:a.default,parchment:c.default,"core/module":u.default,"core/theme":m.default},e.expandConfig=_,e.overload=x,e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var i=e.order.indexOf(t),r=e.order.indexOf(n);return i>=0||r>=0?i-r:t===n?0:t1?e-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n};i.DEFAULTS={},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=["error","warn","log","info"],r="warn";function o(t){if(i.indexOf(t)<=i.indexOf(r)){for(var e,n=arguments.length,o=Array(n>1?n-1:0),a=1;a=0;u--)if(h[u]!=d[u])return!1;for(u=h.length-1;u>=0;u--)if(c=h[u],!a(t[c],e[c],n))return!1;return typeof t==typeof e}(t,e,n))};function s(t){return null==t}function l(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var r=i.Scope.TYPE&i.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&i.Scope.LEVEL|r:this.scope=i.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=i.query(t,i.Scope.BLOT&(this.scope|i.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n=t+n)){var a=this.newlineIndex(t,!0)+1,l=o-a+1,u=this.isolate(a,l),c=u.next;u.format(i,r),c instanceof e&&c.formatAt(0,t-a+n-l,i,r)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=this.descendant(c.default,t),o=i(r,2),a=o[0],s=o[1];a.insertAt(s,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=s.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof s.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(l.default);g.blotName="code-block",g.tagName="PRE",g.TAB=" ",e.Code=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n=o&&!f.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,f);var p=e.scroll.line(t),m=r(p,2),v=m[0],y=m[1],b=(0,g.default)({},(0,h.bubbleFormats)(v));if(v instanceof d.default){var _=v.descendant(l.default.Leaf,y),w=r(_,1)[0];b=(0,g.default)(b,(0,h.bubbleFormats)(w))}c=s.default.attributes.diff(b,c)||{}}else if("object"===i(a.insert)){var x=Object.keys(a.insert)[0];if(null==x)return t;e.scroll.insertAt(t,x,a.insert[x])}o+=u}return Object.keys(c).forEach((function(n){e.scroll.formatAt(t,u,n,c[n])})),t+u}),0),t.reduce((function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new a.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(i).forEach((function(r){if(null==n.scroll.whitelist||n.scroll.whitelist[r]){var o=n.scroll.lines(t,Math.max(e,1)),a=e;o.forEach((function(e){var o=e.length();if(e instanceof u.default){var s=t-e.offset(n.scroll),l=e.newlineIndex(s+a)-s+1;e.formatAt(s,l,r,i[r])}else e.format(r,i[r]);a-=o}))}})),this.scroll.optimize(),this.update((new a.default).retain(t).retain(e,(0,p.default)(i)))}},{key:"formatText",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(i).forEach((function(r){n.scroll.formatAt(t,e,r,i[r])})),this.update((new a.default).retain(t).retain(e,(0,p.default)(i)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new a.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],i=[];0===e?this.scroll.path(t).forEach((function(t){var e=r(t,1)[0];e instanceof d.default?n.push(e):e instanceof l.default.Leaf&&i.push(e)})):(n=this.scroll.lines(t,e),i=this.scroll.descendants(l.default.Leaf,t,e));var o=[n,i].map((function(t){if(0===t.length)return{};for(var e=(0,h.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=_((0,h.bubbleFormats)(n),e)}return e}));return g.default.apply(g.default,o)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new a.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(i).forEach((function(r){n.scroll.formatAt(t,e.length,r,i[r])})),this.update((new a.default).retain(t).insert(e,(0,p.default)(i)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===d.default.blotName&&!(t.children.length>1)&&t.children.head instanceof f.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),i=this.scroll.line(t+e),o=r(i,2),s=o[0],l=o[1],c=0,h=new a.default;null!=s&&(c=s instanceof u.default?s.newlineIndex(l)-l+1:s.length()-l,h=s.delta().slice(l,l+c-1).insert("\n"));var d=this.getContents(t,e+c).diff((new a.default).insert(n).concat(h)),f=(new a.default).retain(t).concat(d);return this.applyDelta(f)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(y)&&l.default.find(e[0].target)){var r=l.default.find(e[0].target),o=(0,h.bubbleFormats)(r),s=r.offset(this.scroll),u=e[0].oldValue.replace(c.default.CONTENTS,""),d=(new a.default).insert(u),f=(new a.default).insert(r.value());t=(new a.default).retain(s).concat(d.diff(f,n)).reduce((function(t,e){return e.insert?t.insert(e.insert,o):t.push(e)}),new a.default),this.delta=i.compose(t)}else this.delta=this.getDelta(),t&&(0,m.default)(i.compose(t),this.delta)||(t=i.diff(this.delta,n));return t}}]),t}();function _(t,e){return Object.keys(e).reduce((function(n,i){return null==t[i]||(e[i]===t[i]?n[i]=e[i]:Array.isArray(e[i])?e[i].indexOf(t[i])<0&&(n[i]=e[i].concat([t[i]])):n[i]=[e[i],t[i]]),n}),{})}e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;h(this,t),this.index=e,this.length=n},p=function(){function t(e,n){var i=this;h(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new f(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){i.mouseDown||setTimeout(i.update.bind(i,l.default.sources.USER),1)})),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t,e){t===l.default.events.TEXT_CHANGE&&e.length()>0&&i.update(l.default.sources.SILENT)})),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,(function(){if(i.hasFocus()){var t=i.getNativeRange();null!=t&&t.start.node!==i.cursor.textNode&&i.emitter.once(l.default.events.SCROLL_UPDATE,(function(){try{i.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}}))}})),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,r=n.startNode,o=n.startOffset,a=n.endNode,s=n.endOffset;i.setNativeRange(r,o,a,s)}})),this.update(l.default.sources.SILENT)}return r(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(l.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(t,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var i=o.default.find(n.start.node,!1);if(null==i)return;if(i instanceof o.default.Leaf){var r=i.split(n.start.offset);i.parent.insertBefore(this.cursor,r)}else i.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var r=void 0,o=this.scroll.leaf(t),a=i(o,2),s=a[0],l=a[1];if(null==s)return null;var u=s.position(l,!0),c=i(u,2);r=c[0],l=c[1];var h=document.createRange();if(e>0){h.setStart(r,l);var d=this.scroll.leaf(t+e),f=i(d,2);if(s=f[0],l=f[1],null==s)return null;var p=s.position(l,!0),m=i(p,2);return r=m[0],l=m[1],h.setEnd(r,l),h.getBoundingClientRect()}var g="left",v=void 0;return r instanceof Text?(l0&&(g="right")),{bottom:v.top+v.height,height:v.height,left:v[g],right:v[g],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return d.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var r=n.map((function(t){var n=i(t,2),r=n[0],a=n[1],s=o.default.find(r,!0),l=s.offset(e.scroll);return 0===a?l:s instanceof o.default.Container?l+s.length():l+s.index(r,a)})),a=Math.min(Math.max.apply(Math,c(r)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(c(r)));return new f(s,a-s)}},{key:"normalizeNative",value:function(t){if(!m(this.root,t.startContainer)||!t.collapsed&&!m(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],r=[],o=this.scroll.length();return n.forEach((function(t,n){t=Math.min(o-1,t);var a,s=e.scroll.leaf(t),l=i(s,2),u=l[0],c=l[1],h=u.position(c,0!==n),d=i(h,2);a=d[0],c=d[1],r.push(a,c)})),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var r=this.scroll.length()-1,o=this.scroll.line(Math.min(e.index,r)),a=i(o,1)[0],s=a;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,r));s=i(l,1)[0]}if(null!=a&&null!=s){var u=t.getBoundingClientRect();n.topu.bottom&&(t.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(d.info("setNativeRange",t,e,n,i),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||r||t!==a.startContainer||e!==a.startOffset||n!==a.endContainer||i!==a.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(i=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(t,e),s.setEnd(n,i),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof e&&(n=e,e=!1),d.info("setRange",t),null!=t){var i=this.rangeToNative(t);this.setNativeRange.apply(this,c(i).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.lastRange,n=this.getRange(),r=i(n,2),o=r[0],u=r[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(e,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var h,d=[l.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(e),t];(c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(d)),t!==l.default.sources.SILENT&&(h=this.emitter).emit.apply(h,d)}}}]),t}();function m(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=f,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){var i=n(11),r=n(3),o={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var i=r(!0,{},e);for(var o in n||(i=Object.keys(i).reduce((function(t,e){return null!=i[e]&&(t[e]=i[e]),t}),{})),t)void 0!==t[o]&&void 0===e[o]&&(i[o]=t[o]);return Object.keys(i).length>0?i:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,r){return i(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var i=Object.keys(e).reduce((function(n,i){return void 0===t[i]&&(n[i]=e[i]),n}),{});return Object.keys(i).length>0?i:void 0}}},iterator:function(t){return new a(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function a(t){this.ops=t,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,i=o.length(e);if(t>=i-n?(t=i-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var r={};return e.attributes&&(r.attributes=e.attributes),"number"==typeof e.retain?r.retain=t:"string"==typeof e.insert?r.insert=e.insert.substr(n,t):r.insert=e.insert,r}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),i=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(i)}return[]},t.exports=o},function(t,e){var n=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,i;try{e=Map}catch(t){e=function(){}}try{n=Set}catch(t){n=function(){}}try{i=Promise}catch(t){i=function(){}}function o(a,l,u,c,h){"object"==typeof l&&(u=l.depth,c=l.prototype,h=l.includeNonEnumerable,l=l.circular);var d=[],f=[],p=void 0!==r;return void 0===l&&(l=!0),void 0===u&&(u=1/0),function a(u,m){if(null===u)return null;if(0===m)return u;var g,v;if("object"!=typeof u)return u;if(t(u,e))g=new e;else if(t(u,n))g=new n;else if(t(u,i))g=new i((function(t,e){u.then((function(e){t(a(e,m-1))}),(function(t){e(a(t,m-1))}))}));else if(o.__isArray(u))g=[];else if(o.__isRegExp(u))g=new RegExp(u.source,s(u)),u.lastIndex&&(g.lastIndex=u.lastIndex);else if(o.__isDate(u))g=new Date(u.getTime());else{if(p&&r.isBuffer(u))return g=r.allocUnsafe?r.allocUnsafe(u.length):new r(u.length),u.copy(g),g;t(u,Error)?g=Object.create(u):void 0===c?(v=Object.getPrototypeOf(u),g=Object.create(v)):(g=Object.create(c),v=c)}if(l){var y=d.indexOf(u);if(-1!=y)return f[y];d.push(u),f.push(g)}for(var b in t(u,e)&&u.forEach((function(t,e){var n=a(e,m-1),i=a(t,m-1);g.set(n,i)})),t(u,n)&&u.forEach((function(t){var e=a(t,m-1);g.add(e)})),u){var _;v&&(_=Object.getOwnPropertyDescriptor(v,b)),_&&null==_.set||(g[b]=a(u[b],m-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(u);for(b=0;b0){if(s instanceof l.BlockEmbed||f instanceof l.BlockEmbed)return void this.optimize();if(s instanceof h.default){var p=s.newlineIndex(s.length(),!0);if(p>-1&&(s=s.split(p+1))===f)return void this.optimize()}else if(f instanceof h.default){var m=f.newlineIndex(0);m>-1&&f.split(m+1)}var g=f.children.head instanceof c.default?null:f.children.head;s.moveChildren(f,g),s.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,i,r){(null==this.whitelist||this.whitelist[i])&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,i,r),this.optimize())}},{key:"insertAt",value:function(t,n,i){if(null==i||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==i||null==a.default.query(n,a.default.Scope.BLOCK)){var r=a.default.create(this.statics.defaultChild);this.appendChild(r),null==i&&n.endsWith("\n")&&(n=n.slice(0,-1)),r.insertAt(0,n,i)}else{var s=a.default.create(n,i);this.appendChild(s)}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===a.default.Scope.INLINE_BLOT){var i=a.default.create(this.statics.defaultChild);i.appendChild(t),t=i}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(p,t)}},{key:"lines",value:function(){return function t(e,n,i){var r=[],o=i;return e.children.forEachAt(n,i,(function(e,n,i){p(e)?r.push(e):e instanceof a.default.Container&&(r=r.concat(t(e,n,o))),o-=i})),r}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=s.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,t),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,t)}}}]),e}(a.default.Scroll);m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[u.default,l.BlockEmbed,d.default],e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=O(t);if(null==i||null==i.key)return v.warn("Attempted to add invalid keyboard binding",i);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),i=(0,l.default)(i,e,n),this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(t.bindings[o]||[]).filter((function(t){return e.match(n,t)}));if(0!==a.length){var l=t.quill.getSelection();if(null!=l&&t.quill.hasFocus()){var u=t.quill.getLine(l.index),c=r(u,2),d=c[0],f=c[1],p=t.quill.getLeaf(l.index),m=r(p,2),g=m[0],v=m[1],y=0===l.length?[g,v]:t.quill.getLeaf(l.index+l.length),b=r(y,2),_=b[0],w=b[1],x=g instanceof h.default.Text?g.value().slice(0,v):"",k=_ instanceof h.default.Text?_.value().slice(w):"",S={collapsed:0===l.length,empty:0===l.length&&d.length()<=1,format:t.quill.getFormat(l),offset:f,prefix:x,suffix:k};a.some((function(e){if(null!=e.collapsed&&e.collapsed!==S.collapsed)return!1;if(null!=e.empty&&e.empty!==S.empty)return!1;if(null!=e.offset&&e.offset!==S.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==S.format[t]})))return!1}else if("object"===i(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=S.format[t]:!1===e.format[t]?null==S.format[t]:(0,s.default)(e.format[t],S.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(S.prefix)||null!=e.suffix&&!e.suffix.test(S.suffix)||!0===e.handler.call(t,l,S))}))&&n.preventDefault()}}}}))}}]),e}(p.default);function _(t,e){var n,i=t===b.keys.LEFT?"prefix":"suffix";return g(n={key:t,shiftKey:e,altKey:null},i,/^$/),g(n,"handler",(function(n){var i=n.index;t===b.keys.RIGHT&&(i+=n.length+1);var o=this.quill.getLeaf(i);return!(r(o,1)[0]instanceof h.default.Embed&&(t===b.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index-1,d.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index+n.length+1,d.default.sources.USER),1))})),n}function w(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),i=r(n,1)[0],o={};if(0===e.offset){var a=this.quill.getLine(t.index-1),s=r(a,1)[0];if(null!=s&&s.length()>1){var l=i.formats(),u=this.quill.getFormat(t.index-1,1);o=c.default.attributes.diff(l,u)||{}}}var h=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-h,h,d.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index-h,h,o,d.default.sources.USER),this.quill.focus()}}function x(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var i={},o=0,a=this.quill.getLine(t.index),s=r(a,1)[0];if(e.offset>=s.length()-1){var l=this.quill.getLine(t.index+1),u=r(l,1)[0];if(u){var h=s.formats(),f=this.quill.getFormat(t.index,1);i=c.default.attributes.diff(h,f)||{},o=u.length()}}this.quill.deleteText(t.index,n,d.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index+o-1,n,i,d.default.sources.USER)}}function k(t){var e=this.quill.getLines(t),n={};if(e.length>1){var i=e[0].formats(),r=e[e.length-1].formats();n=c.default.attributes.diff(r,i)||{}}this.quill.deleteText(t,d.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,d.default.sources.USER),this.quill.setSelection(t.index,d.default.sources.SILENT),this.quill.focus()}function S(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var i=Object.keys(e.format).reduce((function(t,n){return h.default.query(n,h.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",i,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==i[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],d.default.sources.USER))}))}function C(t){return{key:b.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=h.default.query("code-block"),i=e.index,o=e.length,a=this.quill.scroll.descendant(n,i),s=r(a,2),l=s[0],u=s[1];if(null!=l){var c=this.quill.getIndex(l),f=l.newlineIndex(u,!0)+1,p=l.newlineIndex(c+u+o),m=l.domNode.textContent.slice(f,p).split("\n");u=0,m.forEach((function(e,r){t?(l.insertAt(f+u,n.TAB),u+=n.TAB.length,0===r?i+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(l.deleteAt(f+u,n.TAB.length),u-=n.TAB.length,0===r?i-=n.TAB.length:o-=n.TAB.length),u+=e.length+1})),this.quill.update(d.default.sources.USER),this.quill.setSelection(i,o,d.default.sources.SILENT)}}}}function T(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],d.default.sources.USER)}}}function O(t){if("string"==typeof t||"number"==typeof t)return O({key:t});if("object"===(void 0===t?"undefined":i(t))&&(t=(0,a.default)(t,!1)),"string"==typeof t.key)if(null!=b.keys[t.key.toUpperCase()])t.key=b.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[y]=t.shortKey,delete t.shortKey),t}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:T("bold"),italic:T("italic"),underline:T("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",d.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",d.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",d.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,d.default.sources.USER)}},"indent code-block":C(!0),"outdent code-block":C(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,d.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new u.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,d.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,d.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,d.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=r(e,2),i=n[0],o=n[1],a=(0,l.default)({},i.formats(),{list:"checked"}),s=(new u.default).retain(t.index).insert("\n",a).retain(i.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),i=r(n,2),o=i[0],a=i[1],s=(new u.default).retain(t.index).insert("\n",e.format).retain(o.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,i=this.quill.getLine(t.index),o=r(i,2),a=o[0],s=o[1];if(s>n)return!0;var l=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(t.index," ",d.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(t.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:l});this.quill.updateContents(c,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,d.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=r(e,2),i=n[0],o=n[1],a=(new u.default).retain(t.index+i.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,d.default.sources.USER)}},"embed left":_(b.keys.LEFT,!1),"embed left shift":_(b.keys.LEFT,!0),"embed right":_(b.keys.RIGHT,!1),"embed right shift":_(b.keys.RIGHT,!0)}},e.default=b,e.SHORTKEY=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=function(){function t(t,e){for(var n=0;n-1}s.blotName="link",s.tagName="A",s.SANITIZED_URL="about:blank",s.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=s,e.sanitize=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":i(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=v(n(0)),r=v(n(5)),o=n(4),a=v(o),s=v(n(16)),l=v(n(25)),u=v(n(24)),c=v(n(35)),h=v(n(6)),d=v(n(22)),f=v(n(7)),p=v(n(55)),m=v(n(42)),g=v(n(23));function v(t){return t&&t.__esModule?t:{default:t}}r.default.register({"blots/block":a.default,"blots/block/embed":o.BlockEmbed,"blots/break":s.default,"blots/container":l.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":h.default,"blots/scroll":d.default,"blots/text":f.default,"modules/clipboard":p.default,"modules/history":m.default,"modules/keyboard":g.default}),i.default.register(a.default,s.default,u.default,h.default,d.default,f.default),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(){function t(t){this.domNode=t,this.domNode[i.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new i.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return i.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[i.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,r){var o=this.isolate(t,e);if(null!=i.query(n,i.Scope.BLOT)&&r)o.wrap(n,r);else if(null!=i.query(n,i.Scope.ATTRIBUTE)){var a=i.create(this.statics.scope);o.wrap(a),a.format(n,r)}},t.prototype.insertAt=function(t,e,n){var r=null==n?i.create("text",e):i.create(e,n),o=this.split(t);this.parent.insertBefore(r,o)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[i.DATA_KEY]&&delete this.domNode[i.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?i.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?i.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(12),r=n(32),o=n(33),a=n(1),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=i.default.keys(this.domNode),n=r.default.keys(this.domNode),s=o.default.keys(this.domNode);e.concat(n).concat(s).forEach((function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof i.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var i=e.attributes[n].value(e.domNode);t.format(n,i)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){o(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(o(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[o(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[o(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[o(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;ni&&this.stack.undo.length>0){var r=this.stack.undo.pop();n=n.compose(r.undo),t=r.redo.compose(t)}else this.lastRecorded=i;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(a(n(9)).default);function l(t){var e=t.reduce((function(t,e){return t+=e.delete||0}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=r.default.query(t,r.default.Scope.BLOCK)})))}(t)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=s,e.getLastChangeIndex=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t,e,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var i=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,s.default.sources.USER)),this.quill.root.scrollTop=i;break;case"video":n=(e=(t=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/))?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t;case"formula":if(!n)break;var r=this.quill.getSelection(!0);if(null!=r){var o=r.index+r.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),n,s.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",s.default.sources.USER),this.quill.setSelection(o+2,s.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(f.default);function C(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var i=document.createElement("option");e===n?i.setAttribute("selected","selected"):i.setAttribute("value",e),t.appendChild(i)}))}e.BaseTooltip=S,e.default=k},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,i=this.iterator();n=i();){var r=n.length();if(ta?n(i,t-a,Math.min(e,a+l-t)):n(i,0,Math.min(l,t+e-a)),a+=l}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,i=this.iterator();n=i();)e=t(e,n);return e},t}();e.default=i},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),a=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,s),n.attach(),n}return r(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,i,r){this.update(),t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.insertAt=function(e,n,i){this.update(),t.prototype.insertAt.call(this,e,n,i)},e.prototype.optimize=function(e,n){var i=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var r=[].slice.call(this.observer.takeRecords());r.length>0;)e.push(r.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==i&&null!=t.domNode.parentNode&&(null==t.domNode[a.DATA_KEY].mutations&&(t.domNode[a.DATA_KEY].mutations=[]),e&&s(t.parent))},l=function(t){null!=t.domNode[a.DATA_KEY]&&null!=t.domNode[a.DATA_KEY].mutations&&(t instanceof o.default&&t.children.forEach(l),t.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(t){var e=a.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(a.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=a.find(t,!1);s(e,!1),e instanceof o.default&&e.children.forEach((function(t){s(t,!1)}))}))):"attributes"===t.type&&s(e.prev)),s(e))})),this.children.forEach(l),r=(u=[].slice.call(this.observer.takeRecords())).slice();r.length>0;)e.push(r.pop())}},e.prototype.update=function(e,n){var i=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=a.find(t.target,!0);return null==e?null:null==e.domNode[a.DATA_KEY].mutations?(e.domNode[a.DATA_KEY].mutations=[t],e):(e.domNode[a.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==i&&null!=t.domNode[a.DATA_KEY]&&t.update(t.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="DIV",e}(o.default);e.default=l},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,i){var r=this;n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):(this.children.forEach((function(t){t instanceof o.default||(t=t.wrap(e.blotName,!0)),r.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,i,r){null!=this.formats()[i]||a.query(i,a.Scope.ATTRIBUTE)?this.isolate(e,n).format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var i=this.formats();if(0===Object.keys(i).length)return this.unwrap();var r=this.next;r instanceof e&&r.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(i,r.formats())&&(r.moveChildren(this),r.remove())},e.blotName="inline",e.scope=a.Scope.INLINE_BLOT,e.tagName="SPAN",e}(o.default);e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){var i=a.query(e.blotName).tagName;if(n.tagName!==i)return t.formats.call(this,n)},e.prototype.format=function(n,i){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,i,r){null!=a.query(i,a.Scope.BLOCK)?this.format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.insertAt=function(e,n,i){if(null==i||null!=a.query(n,a.Scope.INLINE))t.prototype.insertAt.call(this,e,n,i);else{var r=this.split(e),o=a.create(n,i);r.parent.insertBefore(o,r)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="P",e}(o.default);e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,i,r){0===e&&n===this.length()?this.format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=o},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(19),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return r(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,i){null==i?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,i)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=a.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){"use strict";var i=document.createElement("div");if(i.classList.toggle("test-class",!1),i.classList.contains("test-class")){var r=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:r.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),i=n.length>>>0,r=arguments[1],o=0;oe.length?t:e,h=t.length>e.length?e:t,d=c.indexOf(h);if(-1!=d)return u=[[i,c.substring(0,d)],[r,h],[i,c.substring(d+h.length)]],t.length>e.length&&(u[0][0]=u[2][0]=n),u;if(1==h.length)return[[n,t],[i,e]];var f=function(t,e){var n=t.length>e.length?t:e,i=t.length>e.length?e:t;if(n.length<4||2*i.length=t.length?[i,r,o,a,h]:null}var o,a,u,c,h,d=r(n,i,Math.ceil(n.length/4)),f=r(n,i,Math.ceil(n.length/2));if(!d&&!f)return null;o=f?d&&d[4].length>f[4].length?d:f:d,t.length>e.length?(a=o[0],u=o[1],c=o[2],h=o[3]):(c=o[0],h=o[1],a=o[2],u=o[3]);var p=o[4];return[a,u,c,h,p]}(t,e);if(f){var p=f[0],m=f[1],g=f[2],v=f[3],y=f[4],b=o(p,g),_=o(m,v);return b.concat([[r,y]],_)}return function(t,e){for(var r=t.length,o=e.length,s=Math.ceil((r+o)/2),l=s,u=2*s,c=new Array(u),h=new Array(u),d=0;dr)g+=2;else if(x>o)m+=2;else if(p&&(C=l+f-_)>=0&&C=(S=r-h[C]))return a(t,e,O,x)}for(var k=-b+v;k<=b-y;k+=2){for(var S,C=l+k,T=(S=k==-b||k!=b&&h[C-1]r)y+=2;else if(T>o)v+=2;else if(!p){var O;if((w=l+f-k)>=0&&w=(S=r-S))return a(t,e,O,x)}}}return[[n,t],[i,e]]}(t,e)}(t=t.substring(0,t.length-d),e=e.substring(0,e.length-d));return f&&m.unshift([r,f]),p&&m.push([r,p]),u(m),null!=c&&(m=function(t,e){var i=function(t,e){if(0===e)return[r,t];for(var i=0,o=0;o0&&o.splice(a+2,0,[l[0],u]),h(o,a,3)}return t}(m,c)),m=function(t){for(var e=!1,o=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},a=function(t){return t.charCodeAt(t.length-1)>=55296&&t.charCodeAt(t.length-1)<=56319},s=2;s0&&l.push(t[s]);return l}(m)}function a(t,e,n,i){var r=t.substring(0,n),a=e.substring(0,i),s=t.substring(n),l=e.substring(i),u=o(r,a),c=o(s,l);return u.concat(c)}function s(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,i=Math.min(t.length,e.length),r=i,o=0;n1?(0!==a&&0!==c&&(0!==(e=s(d,h))&&(o-a-c>0&&t[o-a-c-1][0]==r?t[o-a-c-1][1]+=d.substring(0,e):(t.splice(0,0,[r,d.substring(0,e)]),o++),d=d.substring(e),h=h.substring(e)),0!==(e=l(d,h))&&(t[o][1]=d.substring(d.length-e)+t[o][1],d=d.substring(0,d.length-e),h=h.substring(0,h.length-e))),0===a?t.splice(o-c,a+c,[i,d]):0===c?t.splice(o-a,a+c,[n,h]):t.splice(o-a-c,a+c,[n,h],[i,d]),o=o-a-c+(a?1:0)+(c?1:0)+1):0!==o&&t[o-1][0]==r?(t[o-1][1]+=t[o][1],t.splice(o,1)):o++,c=0,a=0,h="",d=""}""===t[t.length-1][1]&&t.pop();var f=!1;for(o=1;o=0&&i>=e-1;i--)if(i+1=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=O(e,n)),parseFloat(i.textIndent||0)>0&&(e=(new s.default).insert("\t").concat(e)),e}],["li",function(t,e){var n=l.default.query(t);if(null==n||"list-item"!==n.blotName||!A(e,"\n"))return e;for(var i=-1,r=t.parentNode;!r.classList.contains("ql-clipboard");)"list"===(l.default.query(r)||{}).blotName&&(i+=1),r=r.parentNode;return i<=0?e:e.compose((new s.default).retain(e.length()-1).retain(1,{indent:i}))}],["b",P.bind(P,"bold")],["i",P.bind(P,"italic")],["style",function(){return new s.default}]],S=[d.AlignAttribute,g.DirectionAttribute].reduce((function(t,e){return t[e.keyName]=e,t}),{}),C=[d.AlignStyle,f.BackgroundStyle,m.ColorStyle,g.DirectionStyle,v.FontStyle,y.SizeStyle].reduce((function(t,e){return t[e.keyName]=e,t}),{}),T=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.root.addEventListener("paste",i.onPaste.bind(i)),i.container=i.quill.addContainer("ql-clipboard"),i.container.setAttribute("contenteditable",!0),i.container.setAttribute("tabindex",-1),i.matchers=[],k.concat(i.options.matchers).forEach((function(t){var e=r(t,2),o=e[0],a=e[1];(n.matchVisual||a!==I)&&i.addMatcher(o,a)})),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\<"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[p.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,_({},p.default.blotName,e[p.default.blotName]))}var i=this.prepareMatching(),o=r(i,2),a=o[0],l=o[1],u=M(this.container,a,l);return A(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new s.default).retain(u.length()-1).delete(1))),w.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,u.default.sources.SILENT);else{var i=this.convert(e);this.quill.updateContents((new s.default).retain(t).concat(i),n),this.quill.setSelection(t+i.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),i=(new s.default).retain(n.index),r=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout((function(){i=i.concat(e.convert()).delete(n.length),e.quill.updateContents(i,u.default.sources.USER),e.quill.setSelection(i.length()-n.length,u.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=r,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(i){var o=r(i,2),a=o[0],s=o[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(a),(function(t){t[x]=t[x]||[],t[x].push(s)}))}})),[e,n]}}]),e}(h.default);function O(t,e,n){return"object"===(void 0===e?"undefined":i(e))?Object.keys(e).reduce((function(t,n){return O(t,n,e[n])}),t):t.reduce((function(t,i){return i.attributes&&i.attributes[e]?t.push(i):t.insert(i.insert,(0,a.default)({},_({},e,n),i.attributes))}),new s.default)}function E(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};var e="__ql-computed-style";return t[e]||(t[e]=window.getComputedStyle(t))}function A(t,e){for(var n="",i=t.ops.length-1;i>=0&&n.length-1}function M(t,e,n){return t.nodeType===t.TEXT_NODE?n.reduce((function(e,n){return n(t,e)}),new s.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],(function(i,r){var o=M(r,e,n);return r.nodeType===t.ELEMENT_NODE&&(o=e.reduce((function(t,e){return e(r,t)}),o),o=(r[x]||[]).reduce((function(t,e){return e(r,t)}),o)),i.concat(o)}),new s.default):new s.default}function P(t,e,n){return O(n,t,!0)}function N(t,e){var n=l.default.Attributor.Attribute.keys(t),i=l.default.Attributor.Class.keys(t),r=l.default.Attributor.Style.keys(t),o={};return n.concat(i).concat(r).forEach((function(e){var n=l.default.query(e,l.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(t),o[n.attrName])||(null==(n=S[e])||n.attrName!==e&&n.keyName!==e||(o[n.attrName]=n.value(t)||void 0),null==(n=C[e])||n.attrName!==e&&n.keyName!==e||(n=C[e],o[n.attrName]=n.value(t)||void 0))})),Object.keys(o).length>0&&(e=O(e,o)),e}function D(t,e){var n=l.default.query(t);if(null==n)return e;if(n.prototype instanceof l.default.Embed){var i={},r=n.value(t);null!=r&&(i[n.blotName]=r,e=(new s.default).insert(i,n.formats(t)))}else"function"==typeof n.formats&&(e=O(e,n.blotName,n.formats(t)));return e}function j(t,e){return A(e,"\n")||(L(t)||e.length()>0&&t.nextSibling&&L(t.nextSibling))&&e.insert("\n"),e}function I(t,e){if(L(t)&&null!=t.nextElementSibling&&!A(e,"\n\n")){var n=t.offsetHeight+parseFloat(E(t).marginTop)+parseFloat(E(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function R(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!E(t.parentNode).whiteSpace.startsWith("pre")){var i=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,i.bind(i,!0)),(null==t.previousSibling&&L(t.parentNode)||null!=t.previousSibling&&L(t.previousSibling))&&(n=n.replace(/^\s+/,i.bind(i,!1))),(null==t.nextSibling&&L(t.parentNode)||null!=t.nextSibling&&L(t.nextSibling))&&(n=n.replace(/\s+$/,i.bind(i,!1)))}return e.insert(n)}T.DEFAULTS={matchers:[],matchVisual:!0},e.default=T,e.matchAttributor=N,e.matchBlot=D,e.matchNewline=j,e.matchSpacing=I,e.matchText=R},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;ni.right&&(o=i.right-r.right,this.root.style.left=e+o+"px"),r.lefti.bottom){var a=r.bottom-r.top,s=t.bottom-t.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=function(){function t(t,e){for(var n=0;n','','',''].join(""),e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=j(n(29)),r=n(36),o=n(38),a=n(64),s=j(n(65)),l=j(n(66)),u=n(67),c=j(u),h=n(37),d=n(26),f=n(39),p=n(40),m=j(n(56)),g=j(n(68)),v=j(n(27)),y=j(n(69)),b=j(n(70)),_=j(n(71)),w=j(n(72)),x=j(n(73)),k=n(13),S=j(k),C=j(n(74)),T=j(n(75)),O=j(n(57)),E=j(n(41)),A=j(n(28)),L=j(n(59)),M=j(n(60)),P=j(n(61)),N=j(n(108)),D=j(n(62));function j(t){return t&&t.__esModule?t:{default:t}}i.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":r.AlignClass,"attributors/class/background":h.BackgroundClass,"attributors/class/color":d.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":f.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":r.AlignStyle,"attributors/style/background":h.BackgroundStyle,"attributors/style/color":d.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":f.FontStyle,"attributors/style/size":p.SizeStyle},!0),i.default.register({"formats/align":r.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":a.IndentClass,"formats/background":h.BackgroundStyle,"formats/color":d.ColorStyle,"formats/font":f.FontClass,"formats/size":p.SizeClass,"formats/blockquote":s.default,"formats/code-block":S.default,"formats/header":l.default,"formats/list":c.default,"formats/bold":m.default,"formats/code":k.Code,"formats/italic":g.default,"formats/link":v.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":_.default,"formats/image":w.default,"formats/video":x.default,"formats/list/item":u.ListItem,"modules/formula":C.default,"modules/syntax":T.default,"modules/toolbar":O.default,"themes/bubble":N.default,"themes/snow":D.default,"ui/icons":E.default,"ui/picker":A.default,"ui/icon-picker":M.default,"ui/color-picker":L.default,"ui/tooltip":P.default},!0),e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var i,r=function(){function t(t,e){for(var n=0;n0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof d)r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var i=null==n?this.length():n.offset(this),o=this.split(i);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(s.default);f.blotName="list",f.scope=o.default.Scope.BLOCK_BLOT,f.tagName=["OL","UL"],f.defaultChild="list-item",f.allowedChildren=[d],e.ListItem=d,e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(56),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((i=r)&&i.__esModule?i:{default:i}).default);o.blotName="italic",o.tagName=["EM","I"],e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return u.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,l.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(s.default.Embed);c.blotName="image",c.tagName="IMG",e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return u.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return l.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(a.BlockEmbed);c.blotName="video",c.className="ql-video",c.tagName="IFRAME",e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var i=function(){function t(t,e){for(var n=0;n0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(l(n(13)).default);d.className="ql-syntax";var f=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),p=function(t){function e(t,n){u(this,e);var i=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof i.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var r=null;return i.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(r),r=setTimeout((function(){i.highlight(),r=null}),i.options.interval)})),i.highlight(),i}return h(e,t),i(e,null,[{key:"register",value:function(){a.default.register(f,!0),a.default.register(d,!0)}}]),i(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(d).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(a.default.sources.SILENT),null!=e&&this.quill.setSelection(e,a.default.sources.SILENT)}}}]),e}(s.default);p.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=d,e.CodeToken=f,e.default=p},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var i=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},r=function(){function t(t,e){for(var n=0;n0&&r===a.default.sources.USER){i.show(),i.root.style.left="0px",i.root.style.width="",i.root.style.width=i.root.offsetWidth+"px";var o=i.quill.getLines(e.index,e.length);if(1===o.length)i.position(i.quill.getBounds(e));else{var s=o[o.length-1],l=i.quill.getIndex(s),c=Math.min(s.length()-1,e.index+e.length-l),h=i.quill.getBounds(new u.Range(l,c));i.position(h)}}else document.activeElement!==i.textbox&&i.quill.hasFocus()&&i.hide()})),i}return p(e,t),r(e,[{key:"listen",value:function(){var t=this;i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),e}(s.BaseTooltip);v.TEMPLATE=['','"].join(""),e.BubbleTooltip=v,e.default=g},function(t,e,n){t.exports=n(63)}]).default},t.exports=i()},4302:(t,e,n)=>{var i;t.exports=function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};e[a][0].call(u.exports,(function(t){var n=e[a][1][t];return r(n||t)}),u,u.exports,t,e,n,i)}return n[a].exports}for(var o=void 0,a=0;ae;++e)l[e]=t[e],u[t.charCodeAt(e)]=e;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63}function r(t){var e,n,i,r,o,a,s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[s-2]?2:"="===t[s-1]?1:0,a=new c(3*s/4-o),i=o>0?s-4:s;var l=0;for(e=0,n=0;i>e;e+=4,n+=3)r=u[t.charCodeAt(e)]<<18|u[t.charCodeAt(e+1)]<<12|u[t.charCodeAt(e+2)]<<6|u[t.charCodeAt(e+3)],a[l++]=r>>16&255,a[l++]=r>>8&255,a[l++]=255&r;return 2===o?(r=u[t.charCodeAt(e)]<<2|u[t.charCodeAt(e+1)]>>4,a[l++]=255&r):1===o&&(r=u[t.charCodeAt(e)]<<10|u[t.charCodeAt(e+1)]<<4|u[t.charCodeAt(e+2)]>>2,a[l++]=r>>8&255,a[l++]=255&r),a}function o(t){return l[t>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}function a(t,e,n){for(var i,r=[],a=e;n>a;a+=3)i=(t[a]<<16)+(t[a+1]<<8)+t[a+2],r.push(o(i));return r.join("")}function s(t){for(var e,n=t.length,i=n%3,r="",o=[],s=16383,u=0,c=n-i;c>u;u+=s)o.push(a(t,u,u+s>c?c:u+s));return 1===i?(e=t[n-1],r+=l[e>>2],r+=l[e<<4&63],r+="=="):2===i&&(e=(t[n-2]<<8)+t[n-1],r+=l[e>>10],r+=l[e>>4&63],r+=l[e<<2&63],r+="="),o.push(r),o.join("")}n.toByteArray=r,n.fromByteArray=s;var l=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array;i()},{}],2:[function(t,e,n){},{}],3:[function(t,e,i){(function(e){"use strict";function n(){try{var t=new Uint8Array(1);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function r(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(r()=e?o(t,e):void 0!==n?"string"==typeof i?o(t,e).fill(n,i):o(t,e).fill(n):o(t,e)}function c(t,e){if(l(e),t=o(t,0>e?0:0|m(e)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;e>n;n++)t[n]=0;return t}function h(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');return(t=o(t,0|v(e,n))).write(e,n),t}function d(t,e){var n=0|m(e.length);t=o(t,n);for(var i=0;n>i;i+=1)t[i]=255&e[i];return t}function f(t,e,n,i){if(e.byteLength,0>n||e.byteLength=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function g(t){return+t!=t&&(t=0),a.alloc(+t)}function v(t,e){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(i)return U(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,n){var i=!1;if((void 0===e||0>e)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),0>=n)return"";if((e>>>=0)>=(n>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return L(this,e,n);case"binary":return M(this,e,n);case"base64":return O(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function b(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function _(t,e,n,i){function r(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,a=t.length,s=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;o=2,a/=2,s/=2,n/=2}for(var l=-1,u=0;a>n+u;u++)if(r(t,n+u)===r(e,-1===l?0:u-l)){if(-1===l&&(l=u),u-l+1===s)return(n+l)*o}else-1!==l&&(u-=u-l),l=-1;return-1}function w(t,e,n,i){n=Number(n)||0;var r=t.length-n;i?(i=Number(i))>r&&(i=r):i=r;var o=e.length;if(o%2!=0)throw new Error("Invalid hex string");i>o/2&&(i=o/2);for(var a=0;i>a;a++){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function x(t,e,n,i){return $(U(e,t.length-n),t,n,i)}function k(t,e,n,i){return $(V(e),t,n,i)}function S(t,e,n,i){return k(t,e,n,i)}function C(t,e,n,i){return $(Y(e),t,n,i)}function T(t,e,n,i){return $(Z(e,t.length-n),t,n,i)}function O(t,e,n){return 0===e&&n===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var i=[],r=e;n>r;){var o,a,s,l,u=t[r],c=null,h=u>239?4:u>223?3:u>191?2:1;if(n>=r+h)switch(h){case 1:128>u&&(c=u);break;case 2:128==(192&(o=t[r+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=t[r+1],a=t[r+2],128==(192&o)&&128==(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(55296>l||l>57343)&&(c=l);break;case 4:o=t[r+1],a=t[r+2],s=t[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&1114112>l&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|1023&c),i.push(c),r+=h}return A(i)}function A(t){var e=t.length;if(Q>=e)return String.fromCharCode.apply(String,t);for(var n="",i=0;e>i;)n+=String.fromCharCode.apply(String,t.slice(i,i+=Q));return n}function L(t,e,n){var i="";n=Math.min(t.length,n);for(var r=e;n>r;r++)i+=String.fromCharCode(127&t[r]);return i}function M(t,e,n){var i="";n=Math.min(t.length,n);for(var r=e;n>r;r++)i+=String.fromCharCode(t[r]);return i}function P(t,e,n){var i=t.length;(!e||0>e)&&(e=0),(!n||0>n||n>i)&&(n=i);for(var r="",o=e;n>o;o++)r+=W(t[o]);return r}function N(t,e,n){for(var i=t.slice(e,n),r="",o=0;ot)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,n,i,r,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||o>e)throw new RangeError('"value" argument is out of bounds');if(n+i>t.length)throw new RangeError("Index out of range")}function I(t,e,n,i){0>e&&(e=65535+e+1);for(var r=0,o=Math.min(t.length-n,2);o>r;r++)t[n+r]=(e&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function R(t,e,n,i){0>e&&(e=4294967295+e+1);for(var r=0,o=Math.min(t.length-n,4);o>r;r++)t[n+r]=e>>>8*(i?r:3-r)&255}function F(t,e,n,i,r,o){if(n+i>t.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}function B(t,e,n,i,r){return r||F(t,e,n,4,34028234663852886e22,-34028234663852886e22),X.write(t,e,n,i,23,4),n+4}function z(t,e,n,i,r){return r||F(t,e,n,8,17976931348623157e292,-17976931348623157e292),X.write(t,e,n,i,52,8),n+8}function q(t){if((t=H(t).replace(tt,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function H(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function W(t){return 16>t?"0"+t.toString(16):t.toString(16)}function U(t,e){e=e||1/0;for(var n,i=t.length,r=null,o=[],a=0;i>a;a++){if((n=t.charCodeAt(a))>55295&&57344>n){if(!r){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(56320>n){(e-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&o.push(239,191,189);if(r=null,128>n){if((e-=1)<0)break;o.push(n)}else if(2048>n){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function V(t){for(var e=[],n=0;n>8,r=n%256,o.push(r),o.push(i);return o}function Y(t){return K.toByteArray(q(t))}function $(t,e,n,i){for(var r=0;i>r&&!(r+n>=e.length||r>=t.length);r++)e[r+n]=t[r];return r}function G(t){return t!=t}var K=t("base64-js"),X=t("ieee754"),J=t("isarray");i.Buffer=a,i.SlowBuffer=g,i.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:n(),i.kMaxLength=r(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,e,n){return s(null,t,e,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,e,n){return u(null,t,e,n)},a.allocUnsafe=function(t){return c(null,t)},a.allocUnsafeSlow=function(t){return c(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,e){if(!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,r=0,o=Math.min(n,i);o>r;++r)if(t[r]!==e[r]){n=t[r],i=e[r];break}return i>n?-1:n>i?1:0},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){if(!J(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var n;if(void 0===e)for(e=0,n=0;ne;e+=2)b(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;t>e;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},a.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?E(this,0,t):y.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",e=i.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},a.prototype.compare=function(t,e,n,i,r){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),0>e||n>t.length||0>i||r>this.length)throw new RangeError("out of range index");if(i>=r&&e>=n)return 0;if(i>=r)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(r>>>=0)-(i>>>=0),s=(n>>>=0)-(e>>>=0),l=Math.min(o,s),u=this.slice(i,r),c=t.slice(e,n),h=0;l>h;++h)if(u[h]!==c[h]){o=u[h],s=c[h];break}return s>o?-1:o>s?1:0},a.prototype.indexOf=function(t,e,n){if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),"string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:_(this,t,e,n);if("number"==typeof t)return a.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):_(this,[t],e,n);throw new TypeError("val must be string, number or Buffer")},a.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},a.prototype.write=function(t,e,n,i){if(void 0===e)i="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)i=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-e;if((void 0===n||n>r)&&(n=r),t.length>0&&(0>n||0>e)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return x(this,t,e,n);case"ascii":return k(this,t,e,n);case"binary":return S(this,t,e,n);case"base64":return C(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;a.prototype.slice=function(t,e){var n,i=this.length;if(0>(t=~~t)?0>(t+=i)&&(t=0):t>i&&(t=i),0>(e=void 0===e?i:~~e)?0>(e+=i)&&(e=0):e>i&&(e=i),t>e&&(e=t),a.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=a.prototype;else{var r=e-t;n=new a(r,void 0);for(var o=0;r>o;o++)n[o]=this[o+t]}return n},a.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var i=this[t],r=1,o=0;++o0&&(r*=256);)i+=this[t+--e]*r;return i},a.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var i=this[t],r=1,o=0;++o=(r*=128)&&(i-=Math.pow(2,8*e)),i},a.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var i=e,r=1,o=this[t+--i];i>0&&(r*=256);)o+=this[t+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),X.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),X.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),X.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),X.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,n,i){t=+t,e|=0,n|=0,i||j(this,t,e,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+r]=t/o&255;return e+n},a.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},a.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},a.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},a.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},a.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);j(this,t,e,n,r-1,-r)}var o=0,a=1,s=0;for(this[e]=255&t;++ot&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a|0)-s&255;return e+n},a.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);j(this,t,e,n,r-1,-r)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)0>t&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a|0)-s&255;return e+n},a.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},a.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},a.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},a.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},a.prototype.writeFloatLE=function(t,e,n){return B(this,t,e,!0,n)},a.prototype.writeFloatBE=function(t,e,n){return B(this,t,e,!1,n)},a.prototype.writeDoubleLE=function(t,e,n){return z(this,t,e,!0,n)},a.prototype.writeDoubleBE=function(t,e,n){return z(this,t,e,!1,n)},a.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&n>i&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-en&&i>e)for(r=o-1;r>=0;r--)t[r+e]=this[r+n];else if(1e3>o||!a.TYPED_ARRAY_SUPPORT)for(r=0;o>r;r++)t[r+e]=this[r+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},a.prototype.fill=function(t,e,n,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===t.length){var r=t.charCodeAt(0);256>r&&(t=r)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof t&&(t&=255);if(0>e||this.length=n)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;n>o;o++)this[o]=t;else{var s=a.isBuffer(t)?t:U(new a(t,i).toString()),l=s.length;for(o=0;n-e>o;o++)this[o+e]=s[o%l]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":1,ieee754:15,isarray:16}],4:[function(t,e,n){"use strict";function i(t){return"function"!=typeof(t=t||{}).codeMirrorInstance||"function"!=typeof t.codeMirrorInstance.defineMode?void 0:(String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),void t.codeMirrorInstance.defineMode("spell-checker",(function(e){if(!i.aff_loading){i.aff_loading=!0;var n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),n.onload=function(){4===n.readyState&&200===n.status&&(i.aff_data=n.responseText,i.num_loaded++,2==i.num_loaded&&(i.typo=new r("en_US",i.aff_data,i.dic_data,{platform:"any"})))},n.send(null)}if(!i.dic_loading){i.dic_loading=!0;var o=new XMLHttpRequest;o.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),o.onload=function(){4===o.readyState&&200===o.status&&(i.dic_data=o.responseText,i.num_loaded++,2==i.num_loaded&&(i.typo=new r("en_US",i.aff_data,i.dic_data,{platform:"any"})))},o.send(null)}var a='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',s={token:function(t){var e=t.peek(),n="";if(a.includes(e))return t.next(),null;for(;null!=(e=t.peek())&&!a.includes(e);)n+=e,t.next();return i.typo&&!i.typo.check(n)?"spell-error":null}},l=t.codeMirrorInstance.getMode(e,e.backdrop||"text/plain");return t.codeMirrorInstance.overlayMode(l,s,!0)})))}var r=t("typo-js");i.num_loaded=0,i.aff_loading=!1,i.dic_loading=!1,i.aff_data="",i.dic_data="",i.typo,e.exports=i},{"typo-js":18}],5:[function(t,e,n){var r;r=function(t){"use strict";function e(t){var e=t.getWrapperElement();t.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:e.style.width,height:e.style.height},e.style.width="",e.style.height="auto",e.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",t.refresh()}function n(t){var e=t.getWrapperElement();e.className=e.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=t.state.fullScreenRestore;e.style.width=n.width,e.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),t.refresh()}t.defineOption("fullScreen",!1,(function(i,r,o){o==t.Init&&(o=!1),!o!=!r&&(r?e(i):n(i))}))},"object"==typeof n&&"object"==typeof e?r(t("../../lib/codemirror")):"function"==typeof i&&i.amd?i(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],6:[function(t,e,n){var r;r=function(t){function e(t){t.state.placeholder&&(t.state.placeholder.parentNode.removeChild(t.state.placeholder),t.state.placeholder=null)}function n(t){e(t);var n=t.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.className="CodeMirror-placeholder";var i=t.getOption("placeholder");"string"==typeof i&&(i=document.createTextNode(i)),n.appendChild(i),t.display.lineSpace.insertBefore(n,t.display.lineSpace.firstChild)}function i(t){o(t)&&n(t)}function r(t){var i=t.getWrapperElement(),r=o(t);i.className=i.className.replace(" CodeMirror-empty","")+(r?" CodeMirror-empty":""),r?n(t):e(t)}function o(t){return 1===t.lineCount()&&""===t.getLine(0)}t.defineOption("placeholder","",(function(n,o,a){var s=a&&a!=t.Init;if(o&&!s)n.on("blur",i),n.on("change",r),n.on("swapDoc",r),r(n);else if(!o&&s){n.off("blur",i),n.off("change",r),n.off("swapDoc",r),e(n);var l=n.getWrapperElement();l.className=l.className.replace(" CodeMirror-empty","")}o&&!n.hasFocus()&&i(n)}))},"object"==typeof n&&"object"==typeof e?r(t("../../lib/codemirror")):"function"==typeof i&&i.amd?i(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],7:[function(t,e,n){var r;r=function(t){"use strict";var e=/^(\s*)(>[> ]*|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;t.commands.newlineAndIndentContinueMarkdownList=function(r){if(r.getOption("disableInput"))return t.Pass;for(var o=r.listSelections(),a=[],s=0;s")>=0?f[2]:parseInt(f[3],10)+1+f[4];a[s]="\n"+p+g+m}}r.replaceSelections(a)}},"object"==typeof n&&"object"==typeof e?r(t("../../lib/codemirror")):"function"==typeof i&&i.amd?i(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],8:[function(t,e,n){var r;r=function(t){"use strict";t.overlayMode=function(e,n,i){return{startState:function(){return{base:t.startState(e),overlay:t.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(i){return{base:t.copyState(e,i.base),overlay:t.copyState(n,i.overlay),basePos:i.basePos,baseCur:null,overlayPos:i.overlayPos,overlayCur:null}},token:function(t,r){return(t!=r.streamSeen||Math.min(r.basePos,r.overlayPos)=n.line,f=d?n:l(h,0),p=t.markText(c,f,{className:o});if(null==i?r.push(p):r.splice(i++,0,p),d)break;a=h}}function r(t){for(var e=t.state.markedSelection,n=0;n1)return o(t);var e=t.getCursor("start"),n=t.getCursor("end"),a=t.state.markedSelection;if(!a.length)return i(t,e,n);var l=a[0].find(),c=a[a.length-1].find();if(!l||!c||n.line-e.line=0||u(n,l.from)<=0)return o(t);for(;u(e,l.from)>0;)a.shift().clear(),l=a[0].find();for(u(e,l.from)<0&&(l.to.line-e.line0&&(n.line-c.from.line_o&&setTimeout((function(){l.display.input.reset(!0)}),20),He(this),Gr(),_e(this),this.curOp.forceUpdate=!0,Ki(this,r),i.autofocus&&!Ao||l.hasFocus()?setTimeout(Fr(vn,this),20):yn(this),ea)ea.hasOwnProperty(c)&&ea[c](this,i[c],na);x(this),i.finishInit&&i.finishInit(this);for(var h=0;h_o&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),wo||go&&Ao||(i.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(i.wrapper):t(i.wrapper)),i.viewFrom=i.viewTo=e.first,i.reportedViewFrom=i.reportedViewTo=e.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}function n(e){e.doc.mode=t.getMode(e.options,e.doc.modeOption),i(e)}function i(t){t.doc.iter((function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)})),t.doc.frontier=t.doc.first,Bt(t,100),t.state.modeGen++,t.curOp&&je(t)}function r(t){t.options.lineWrapping?(Ja(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Xa(t.display.wrapper,"CodeMirror-wrap"),d(t)),a(t),je(t),se(t),setTimeout((function(){y(t)}),100)}function o(t){var e=ye(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/be(t.display)-3);return function(r){if(xi(t.doc,r))return 0;var o=0;if(r.widgets)for(var a=0;ae.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}function f(t){var e=Nr(t.gutters,"CodeMirror-linenumbers");-1==e&&t.lineNumbers?t.gutters=t.gutters.concat(["CodeMirror-linenumbers"]):e>-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function p(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Ut(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Zt(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function m(t,e,n){this.cm=n;var i=this.vert=Hr("div",[Hr("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=Hr("div",[Hr("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(i),t(r),La(i,"scroll",(function(){i.clientHeight&&e(i.scrollTop,"vertical")})),La(r,"scroll",(function(){r.clientWidth&&e(r.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,bo&&8>_o&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function g(){}function v(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Xa(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new t.scrollbarModel[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),La(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?on(e,t):rn(e,t)}),e),e.display.scrollbars.addClass&&Ja(e.display.wrapper,e.display.scrollbars.addClass)}function y(t,e){e||(e=p(t));var n=t.display.barWidth,i=t.display.barHeight;b(t,e);for(var r=0;4>r&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&M(t),b(t,p(t)),n=t.display.barWidth,i=t.display.barHeight}function b(t,e){var n=t.display,i=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}function _(t,e,n){var i=n&&null!=n.top?Math.max(0,n.top):t.scroller.scrollTop;i=Math.floor(i-Wt(t));var r=n&&null!=n.bottom?n.bottom:i+t.wrapper.clientHeight,o=nr(e,i),a=nr(e,r);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;o>s?(o=s,a=nr(e,ir(Xi(e,s))+t.wrapper.clientHeight)):Math.min(l,e.lastLine())>=a&&(o=nr(e,ir(Xi(e,l))-t.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function w(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=S(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",a=0;a=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==qe(t))return!1;x(t)&&(Re(t),e.dims=N(t));var r=i.first+i.size,o=Math.max(e.visible.from-t.options.viewportMargin,i.first),a=Math.min(r,e.visible.to+t.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(r,n.viewTo)),Ro&&(o=_i(t.doc,o),a=wi(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;ze(t,o,a),n.viewOffset=ir(Xi(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var l=qe(t);if(!s&&0==l&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Vr();return l>4&&(n.lineDiv.style.display="none"),D(t,n.updateLineNumbers,e.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,u&&Vr()!=u&&u.offsetHeight&&u.focus(),Wr(n.cursorDiv),Wr(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,Bt(t,400)),n.updateLineNumbers=null,!0}function E(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=Yt(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Ut(t.display)-$t(t),n.top)}),e.visible=_(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&O(t,e);i=!1){M(t);var r=p(t);Dt(t),y(t,r),L(t,r)}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function A(t,e){var n=new C(t,e);if(O(t,n)){M(t),E(t,n);var i=p(t);Dt(t),y(t,i),L(t,i),n.finish()}}function L(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Zt(t)+"px"}function M(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i_o){var a=o.node.offsetTop+o.node.offsetHeight;r=a-n,n=a}else{var s=o.node.getBoundingClientRect();r=s.bottom-s.top}var l=o.line.height-r;if(2>r&&(r=ye(e)),(l>.001||-.001>l)&&(tr(o.line,r),P(o.line),o.rest))for(var u=0;u=e&&h.lineNumber;h.changes&&(Nr(h.changes,"gutter")>-1&&(d=!1),j(t,h,u,n)),d&&(Wr(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(k(t.options,u)))),s=h.node.nextSibling}else{var f=W(t,h,u,n);a.insertBefore(f,s)}u+=h.size}for(;s;)s=i(s)}function j(t,e,n,i){for(var r=0;r_o&&(t.node.style.zIndex=2)),t.node}function R(t){var e=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(e&&(e+=" CodeMirror-linebackground"),t.background)e?t.background.className=e:(t.background.parentNode.removeChild(t.background),t.background=null);else if(e){var n=I(t);t.background=n.insertBefore(Hr("div",null,e),n.firstChild)}}function F(t,e){var n=t.display.externalMeasured;return n&&n.line==e.line?(t.display.externalMeasured=null,e.measure=n.measure,n.built):Fi(t,e)}function B(t,e){var n=e.text.className,i=F(t,e);e.text==e.node&&(e.node=i.pre),e.text.parentNode.replaceChild(i.pre,e.text),e.text=i.pre,i.bgClass!=e.bgClass||i.textClass!=e.textClass?(e.bgClass=i.bgClass,e.textClass=i.textClass,z(e)):n&&(e.text.className=n)}function z(t){R(t),t.line.wrapClass?I(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var e=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=e||""}function q(t,e,n,i){if(e.gutter&&(e.node.removeChild(e.gutter),e.gutter=null),e.gutterBackground&&(e.node.removeChild(e.gutterBackground),e.gutterBackground=null),e.line.gutterClass){var r=I(e);e.gutterBackground=Hr("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),r.insertBefore(e.gutterBackground,e.text)}var o=e.line.gutterMarkers;if(t.options.lineNumbers||o){r=I(e);var a=e.gutter=Hr("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(t.display.input.setUneditable(a),r.insertBefore(a,e.text),e.line.gutterClass&&(a.className+=" "+e.line.gutterClass),!t.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(e.lineNumber=a.appendChild(Hr("div",k(t.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),o)for(var s=0;s1)if(zo&&zo.text.join("\n")==e){if(i.ranges.length%zo.text.length==0){l=[];for(var u=0;u=0;u--){var c=i.ranges[u],h=c.from(),d=c.to();c.empty()&&(n&&n>0?h=Fo(h.line,h.ch-n):t.state.overwrite&&!a?d=Fo(d.line,Math.min(Xi(o,d.line).text.length,d.ch+Pr(s).length)):zo&&zo.lineWise&&zo.text.join("\n")==e&&(h=d=Fo(h.line,0)));var f=t.curOp.updateInput,p={from:h,to:d,text:l?l[u%l.length]:s,origin:r||(a?"paste":t.state.cutIncoming?"cut":"+input")};Tn(t.doc,p),Sr(t,"inputRead",t,p)}e&&!a&&Q(t,e),Fn(t),t.curOp.updateInput=f,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function J(t,e){var n=t.clipboardData&&t.clipboardData.getData("text/plain");return n?(t.preventDefault(),e.isReadOnly()||e.options.disableInput||Ae(e,(function(){X(e,n,0,null,"paste")})),!0):void 0}function Q(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=t.getModeAt(r.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=zn(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Xi(t.doc,r.head.line).text.slice(0,r.head.ch))&&(a=zn(t,r.head.line,"smart"));a&&Sr(t,"electricInput",t,r.head.line)}}}function tt(t){for(var e=[],n=[],i=0;ir?u.map:c[r],a=0;ar?t.line:t.rest[r]),h=o[a]+i;return(0>i||s!=e)&&(h=o[a+(i?1:0)]),Fo(l,h)}}}var r=t.text.firstChild,o=!1;if(!e||!$a(r,e))return at(Fo(er(t.line),0),!0);if(e==r&&(o=!0,e=r.childNodes[n],n=0,!e)){var a=t.rest?Pr(t.rest):t.line;return at(Fo(er(a),a.text.length),o)}var s=3==e.nodeType?e:null,l=e;for(s||1!=e.childNodes.length||3!=e.firstChild.nodeType||(s=e.firstChild,n&&(n=s.nodeValue.length));l.parentNode!=r;)l=l.parentNode;var u=t.measure,c=u.maps,h=i(s,l,n);if(h)return at(h,o);for(var d=l.nextSibling,f=s?s.nodeValue.length-n:0;d;d=d.nextSibling){if(h=i(d,d.firstChild,0))return at(Fo(h.line,h.ch-f),o);f+=d.textContent.length}var p=l.previousSibling;for(f=n;p;p=p.previousSibling){if(h=i(p,p.firstChild,-1))return at(Fo(h.line,h.ch+f),o);f+=d.textContent.length}}function ut(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function a(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return""==n&&(n=e.textContent.replace(/\u200b/g,"")),void(s+=n);var c,h=e.getAttribute("cm-marker");if(h){var d=t.findMarks(Fo(i,0),Fo(r+1,0),o(+h));return void(d.length&&(c=d[0].find())&&(s+=Ji(t.doc,c.from,c.to).join(u)))}if("false"==e.getAttribute("contenteditable"))return;for(var f=0;f=0){var a=G(o.from(),r.from()),s=$(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;e>=i&&--e,t.splice(--i,2,new ht(l?s:a,l?a:s))}}return new ct(t,e)}function ft(t,e){return new ct([new ht(t,e||t)],0)}function pt(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function mt(t,e){if(e.linen?Fo(n,Xi(t,n).text.length):gt(e,Xi(t,e.line).text.length)}function gt(t,e){var n=t.ch;return null==n||n>e?Fo(t.line,e):0>n?Fo(t.line,0):t}function vt(t,e){return e>=t.first&&e=e.ch:s.to>e.ch))){if(r&&(Na(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var u,c=l.find(0>i?1:-1);if((0>i?l.inclusiveRight:l.inclusiveLeft)&&(c=Nt(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=Bo(c,n))&&(0>i?0>u:u>0))return Mt(t,c,e,i,r)}var h=l.find(0>i?-1:1);return(0>i?l.inclusiveLeft:l.inclusiveRight)&&(h=Nt(t,h,i,h.line==e.line?o:null)),h?Mt(t,h,e,i,r):null}}return e}function Pt(t,e,n,i,r){var o=i||1,a=Mt(t,e,n,o,r)||!r&&Mt(t,e,n,o,!0)||Mt(t,e,n,-o,r)||!r&&Mt(t,e,n,-o,!0);return a||(t.cantEdit=!0,Fo(t.first,0))}function Nt(t,e,n,i){return 0>n&&0==e.ch?e.line>t.first?mt(t,Fo(e.line-1)):null:n>0&&e.ch==(i||Xi(t,e.line)).text.length?e.line=t.display.viewTo||s.to().linee&&(e=0),e=Math.round(e),i=Math.round(i),s.appendChild(Hr("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px; top: "+e+"px; width: "+(null==n?c-t:n)+"px; height: "+(i-e)+"px"))}function r(e,n,r){function o(n,i){return de(t,Fo(e,n),"div",h,i)}var s,l,h=Xi(a,e),d=h.text.length;return to(rr(h),n||0,null==r?d:r,(function(t,e,a){var h,f,p,m=o(t,"left");if(t==e)h=m,f=p=m.left;else{if(h=o(e-1,"right"),"rtl"==a){var g=m;m=h,h=g}f=m.left,p=h.right}null==n&&0==t&&(f=u),h.top-m.top>3&&(i(f,m.top,null,m.bottom),f=u,m.bottoml.bottom||h.bottom==l.bottom&&h.right>l.right)&&(l=h),u+1>f&&(f=u),i(f,h.top,p-f,h.bottom)})),{start:s,end:l}}var o=t.display,a=t.doc,s=document.createDocumentFragment(),l=Vt(t.display),u=l.left,c=Math.max(o.sizerWidth,Yt(t)-o.sizer.offsetLeft)-l.right,h=e.from(),d=e.to();if(h.line==d.line)r(h.line,h.ch,d.ch);else{var f=Xi(a,h.line),p=Xi(a,d.line),m=yi(f)==yi(p),g=r(h.line,h.ch,m?f.text.length+1:null).end,v=r(d.line,m?0:null,d.ch).start;m&&(g.top0?e.blinker=setInterval((function(){e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Bt(t,e){t.doc.mode.startState&&t.doc.frontier=t.display.viewTo)){var n=+new Date+t.options.workTime,i=la(e.mode,Ht(t,e.frontier)),r=[];e.iter(e.frontier,Math.min(e.first+e.size,t.display.viewTo+500),(function(o){if(e.frontier>=t.display.viewFrom){var a=o.styles,s=o.text.length>t.options.maxHighlightLength,l=Di(t,o,s?la(e.mode,i):i,!0);o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),d=0;!h&&dn?(Bt(t,t.options.workDelay),!0):void 0})),r.length&&Ae(t,(function(){for(var e=0;ea;--s){if(s<=o.first)return o.first;var l=Xi(o,s-1);if(l.stateAfter&&(!n||s<=o.frontier))return s;var u=za(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=s-1,i=u)}return r}function Ht(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return!0;var o=qt(t,e,n),a=o>i.first&&Xi(i,o-1).stateAfter;return a=a?la(i.mode,a):ua(i.mode),i.iter(o,e,(function(n){Ii(t,n.text,a);var s=o==e-1||o%5==0||o>=r.viewFrom&&o2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Kt(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function Xt(t,e){var n=er(e=yi(e)),i=t.display.externalMeasured=new Ne(t.doc,e,n);i.lineN=n;var r=i.built=Fi(t,i);return i.text=r.pre,Ur(t.display.lineMeasure,r.pre),i}function Jt(t,e,n,i){return ee(t,te(t,e),n,i)}function Qt(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee?(r=0,o=1,a="left"):u>e?o=1+(r=e-l):(s==t.length-3||e==u&&t[s+3]>e)&&(r=(o=u-l)-1,e>=u&&(a="right")),null!=r){if(i=t[s+2],l==u&&n==(i.insertLeft?"left":"right")&&(a=n),"left"==n&&0==r)for(;s&&t[s-2]==t[s-3]&&t[s-1].insertLeft;)i=t[2+(s-=3)],a="left";if("right"==n&&r==u-l)for(;sc;c++){for(;s&&qr(e.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+l_o&&0==s&&l==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():bo&&t.options.lineWrapping?(h=Ua(a,s,l).getClientRects()).length?h["right"==i?h.length-1:0]:Uo:Ua(a,s,l).getBoundingClientRect()||Uo).left||r.right||0==s)break;l=s,s-=1,u="right"}bo&&11>_o&&(r=re(t.display.measure,r))}else{var h;s>0&&(u=i="right"),r=t.options.lineWrapping&&(h=a.getClientRects()).length>1?h["right"==i?h.length-1:0]:a.getBoundingClientRect()}if(bo&&9>_o&&!s&&(!r||!r.left&&!r.right)){var d=a.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+be(t.display),top:d.top,bottom:d.bottom}:Uo}var f=r.top-e.rect.top,p=r.bottom-e.rect.top,m=(f+p)/2,g=e.view.measure.heights;for(c=0;cn.from?a(t-1):a(t,i)}i=i||Xi(t.doc,e.line),r||(r=te(t,i));var l=rr(i),u=e.ch;if(!l)return a(u);var c=s(u,uo(l,u));return null!=as&&(c.other=s(u,as)),c}function pe(t,e){var n=0;e=mt(t.doc,e),t.options.lineWrapping||(n=be(t.display)*e.ch);var i=Xi(t.doc,e.line),r=ir(i)+Wt(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function me(t,e,n,i){var r=Fo(t,e);return r.xRel=i,n&&(r.outside=!0),r}function ge(t,e,n){var i=t.doc;if(0>(n+=t.display.viewOffset))return me(i.first,0,!0,-1);var r=nr(i,n),o=i.first+i.size-1;if(r>o)return me(i.first+i.size-1,Xi(i,o).text.length,!0,1);0>e&&(e=0);for(var a=Xi(i,r);;){var s=ve(t,a,r,e,n),l=gi(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;r=er(a=u.to.line)}}function ve(t,e,n,i,r){function o(i){var r=fe(t,Fo(n,i),"line",e,u);return s=!0,a>r.bottom?r.left-l:ag)return me(n,f,v,1);for(;;){if(c?f==d||f==ho(e,d,1):1>=f-d){for(var y=p>i||g-i>=i-p?d:f,b=i-(y==d?p:g);qr(e.text.charAt(y));)++y;return me(n,y,y==d?m:v,-1>b?-1:b>1?1:0)}var _=Math.ceil(h/2),w=d+_;if(c){w=d;for(var x=0;_>x;++x)w=ho(e,w,1)}var k=o(w);k>i?(f=w,g=k,(v=s)&&(g+=1e3),h=_):(d=w,p=k,m=s,h-=_)}}function ye(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==qo){qo=Hr("pre");for(var e=0;49>e;++e)qo.appendChild(document.createTextNode("x")),qo.appendChild(Hr("br"));qo.appendChild(document.createTextNode("x"))}Ur(t.measure,qo);var n=qo.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),Wr(t.measure),n||1}function be(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=Hr("span","xxxxxxxxxx"),n=Hr("pre",[e]);Ur(t.measure,n);var i=e.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function _e(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Zo},Vo?Vo.ops.push(t.curOp):t.curOp.ownsGroup=Vo={ops:[t.curOp],delayedCallbacks:[]}}function we(t){var e=t.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new C(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Ce(t){t.updatedDisplay=t.mustUpdate&&O(t.cm,t.update)}function Te(t){var e=t.cm,n=e.display;t.updatedDisplay&&M(e),t.barMeasure=p(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Jt(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Zt(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Yt(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function Oe(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefto;o=i){var a=new Ne(t.doc,Xi(t.doc,o),o);i=o+a.size,r.push(a)}return r}function je(t,e,n,i){null==e&&(e=t.doc.first),null==n&&(n=t.doc.first+t.doc.size),i||(i=0);var r=t.display;if(i&&ne)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ro&&_i(t.doc,e)r.viewFrom?Re(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)Re(t);else if(e<=r.viewFrom)(o=Be(t,n,n+i,1))?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):Re(t);else if(n>=r.viewTo){var o;(o=Be(t,e,e,-1))?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):Re(t)}else{var a=Be(t,e,e,-1),s=Be(t,n,n+i,1);a&&s?(r.view=r.view.slice(0,a.index).concat(De(t,a.lineN,s.lineN)).concat(r.view.slice(s.index)),r.viewTo+=i):Re(t)}var l=r.externalMeasured;l&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Fe(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==Nr(a,n)&&a.push(n)}}}function Re(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Fe(t,e){if(e>=t.display.viewTo)return null;if(0>(e-=t.display.viewFrom))return null;for(var n=t.display.view,i=0;i(e-=n[i].size))return i}function Be(t,e,n,i){var r,o=Fe(t,e),a=t.display.view;if(!Ro||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var s=0,l=t.display.viewFrom;o>s;s++)l+=a[s].size;if(l!=e){if(i>0){if(o==a.length-1)return null;r=l+a[o].size-e,o++}else r=l-e;e+=r,n+=r}for(;_i(t.doc,n)!=n;){if(o==(0>i?0:a.length-1))return null;n+=i*a[o-(0>i?1:0)].size,o+=i}return{index:o,lineN:n}}function ze(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=De(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=De(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Fe(t,n)))),i.viewTo=n}function qe(t){for(var e=t.display.view,n=0,i=0;i400}var r=t.display;La(r.scroller,"mousedown",Le(t,Ye)),La(r.scroller,"dblclick",bo&&11>_o?Le(t,(function(e){if(!Tr(t,e)){var n=Ze(t,e);if(n&&!Je(t,e)&&!Ve(t.display,e)){Oa(e);var i=t.findWordAt(n);_t(t.doc,i.anchor,i.head)}}})):function(e){Tr(t,e)||Oa(e)}),jo||La(r.scroller,"contextmenu",(function(e){bn(t,e)}));var o,a={end:0};La(r.scroller,"touchstart",(function(e){if(!Tr(t,e)&&!n(e)){clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-a.end<=300?a:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}})),La(r.scroller,"touchmove",(function(){r.activeTouch&&(r.activeTouch.moved=!0)})),La(r.scroller,"touchend",(function(n){var o=r.activeTouch;if(o&&!Ve(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=t.coordsChar(r.activeTouch,"page");a=!o.prev||i(o,o.prev)?new ht(s,s):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(s):new ht(Fo(s.line,0),mt(t.doc,Fo(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),Oa(n)}e()})),La(r.scroller,"touchcancel",e),La(r.scroller,"scroll",(function(){r.scroller.clientHeight&&(rn(t,r.scroller.scrollTop),on(t,r.scroller.scrollLeft,!0),Na(t,"scroll",t))})),La(r.scroller,"mousewheel",(function(e){an(t,e)})),La(r.scroller,"DOMMouseScroll",(function(e){an(t,e)})),La(r.wrapper,"scroll",(function(){r.wrapper.scrollTop=r.wrapper.scrollLeft=0})),r.dragFunctions={enter:function(e){Tr(t,e)||Aa(e)},over:function(e){Tr(t,e)||(en(t,e),Aa(e))},start:function(e){tn(t,e)},drop:Le(t,Qe),leave:function(e){Tr(t,e)||nn(t)}};var s=r.input.getField();La(s,"keyup",(function(e){pn.call(t,e)})),La(s,"keydown",Le(t,dn)),La(s,"keypress",Le(t,mn)),La(s,"focus",Fr(vn,t)),La(s,"blur",Fr(yn,t))}function We(e,n,i){if(!n!=!(i&&i!=t.Init)){var r=e.display.dragFunctions,o=n?La:Pa;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function Ue(t){var e=t.display;e.lastWrapHeight==e.wrapper.clientHeight&&e.lastWrapWidth==e.wrapper.clientWidth||(e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize())}function Ve(t,e){for(var n=wr(e);n!=t.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==t.sizer&&n!=t.mover)return!0}function Ze(t,e,n,i){var r=t.display;if(!n&&"true"==wr(e).getAttribute("cm-not-content"))return null;var o,a,s=r.lineSpace.getBoundingClientRect();try{o=e.clientX-s.left,a=e.clientY-s.top}catch(e){return null}var l,u=ge(t,o,a);if(i&&1==u.xRel&&(l=Xi(t.doc,u.line).text).length==u.ch){var c=za(l,l.length,t.options.tabSize)-l.length;u=Fo(u.line,Math.max(0,Math.round((o-Vt(t.display).left)/be(t.display))-c))}return u}function Ye(t){var e=this,n=e.display;if(!(Tr(e,t)||n.activeTouch&&n.input.supportsTouch())){if(n.shift=t.shiftKey,Ve(n,t))return void(wo||(n.scroller.draggable=!1,setTimeout((function(){n.scroller.draggable=!0}),100)));if(!Je(e,t)){var i=Ze(e,t);switch(window.focus(),xr(t)){case 1:e.state.selectingText?e.state.selectingText(t):i?$e(e,t,i):wr(t)==n.scroller&&Oa(t);break;case 2:wo&&(e.state.lastMiddleDown=+new Date),i&&_t(e.doc,i),setTimeout((function(){n.input.focus()}),20),Oa(t);break;case 3:jo?bn(e,t):gn(e)}}}}function $e(t,e,n){bo?setTimeout(Fr(K,t),0):t.curOp.focus=Vr();var i,r=+new Date;Wo&&Wo.time>r-400&&0==Bo(Wo.pos,n)?i="triple":Ho&&Ho.time>r-400&&0==Bo(Ho.pos,n)?(i="double",Wo={time:r,pos:n}):(i="single",Ho={time:r,pos:n});var o,a=t.doc.sel,s=Lo?e.metaKey:e.ctrlKey;t.options.dragDrop&&ts&&!t.isReadOnly()&&"single"==i&&(o=a.contains(n))>-1&&(Bo((o=a.ranges[o]).from(),n)<0||n.xRel>0)&&(Bo(o.to(),n)>0||n.xRel<0)?Ge(t,e,n,s):Ke(t,e,n,i,s)}function Ge(t,e,n,i){var r=t.display,o=+new Date,a=Le(t,(function(s){wo&&(r.scroller.draggable=!1),t.state.draggingText=!1,Pa(document,"mouseup",a),Pa(r.scroller,"drop",a),Math.abs(e.clientX-s.clientX)+Math.abs(e.clientY-s.clientY)<10&&(Oa(s),!i&&+new Date-200=p;p++){var v=Xi(u,p).text,y=qa(v,l,o);l==f?r.push(new ht(Fo(p,y),Fo(p,y))):v.length>y&&r.push(new ht(Fo(p,y),Fo(p,qa(v,f,o))))}r.length||r.push(new ht(n,n)),Tt(u,dt(d.ranges.slice(0,h).concat(r),h),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b=c,_=b.anchor,w=e;if("single"!=i){if("double"==i)var x=t.findWordAt(e);else x=new ht(Fo(e.line,0),mt(u,Fo(e.line+1,0)));Bo(x.anchor,_)>0?(w=x.head,_=G(b.from(),x.anchor)):(w=x.anchor,_=$(b.to(),x.head))}(r=d.ranges.slice(0))[h]=new ht(mt(u,_),w),Tt(u,dt(r,h),Fa)}}function a(e){var n=++y,r=Ze(t,e,!0,"rect"==i);if(r)if(0!=Bo(r,g)){t.curOp.focus=Vr(),o(r);var s=_(l,u);(r.line>=s.to||r.linev.bottom?20:0;c&&setTimeout(Le(t,(function(){y==n&&(l.scroller.scrollTop+=c,a(e))})),50)}}function s(e){t.state.selectingText=!1,y=1/0,Oa(e),l.input.focus(),Pa(document,"mousemove",b),Pa(document,"mouseup",w),u.history.lastSelOrigin=null}var l=t.display,u=t.doc;Oa(e);var c,h,d=u.sel,f=d.ranges;if(r&&!e.shiftKey?(h=u.sel.contains(n),c=h>-1?f[h]:new ht(n,n)):(c=u.sel.primary(),h=u.sel.primIndex),Mo?e.shiftKey&&e.metaKey:e.altKey)i="rect",r||(c=new ht(n,n)),n=Ze(t,e,!0,!0),h=-1;else if("double"==i){var p=t.findWordAt(n);c=t.display.shift||u.extend?bt(u,c,p.anchor,p.head):p}else if("triple"==i){var m=new ht(Fo(n.line,0),mt(u,Fo(n.line+1,0)));c=t.display.shift||u.extend?bt(u,c,m.anchor,m.head):m}else c=bt(u,c,n);r?-1==h?(h=f.length,Tt(u,dt(f.concat([c]),h),{scroll:!1,origin:"*mouse"})):f.length>1&&f[h].empty()&&"single"==i&&!e.shiftKey?(Tt(u,dt(f.slice(0,h).concat(f.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),d=u.sel):xt(u,h,c,Fa):(h=0,Tt(u,new ct([c],0),Fa),d=u.sel);var g=n,v=l.wrapper.getBoundingClientRect(),y=0,b=Le(t,(function(t){xr(t)?a(t):s(t)})),w=Le(t,s);t.state.selectingText=w,La(document,"mousemove",b),La(document,"mouseup",w)}function Xe(t,e,n,i){try{var r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&Oa(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!Er(t,n))return _r(e);o-=s.top-a.viewOffset;for(var l=0;l=r){var c=nr(t.doc,o),h=t.options.gutters[l];return Na(t,n,t,c,h,e),_r(e)}}}function Je(t,e){return Xe(t,e,"gutterClick",!0)}function Qe(t){var e=this;if(nn(e),!Tr(e,t)&&!Ve(e.display,t)){Oa(t),bo&&(Yo=+new Date);var n=Ze(e,t,!0),i=t.dataTransfer.files;if(n&&!e.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var r=i.length,o=Array(r),a=0,s=function(t,i){if(!e.options.allowDropFileTypes||-1!=Nr(e.options.allowDropFileTypes,t.type)){var s=new FileReader;s.onload=Le(e,(function(){var t=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(t)&&(t=""),o[i]=t,++a==r){var l={from:n=mt(e.doc,n),to:n,text:e.doc.splitLines(o.join(e.doc.lineSeparator())),origin:"paste"};Tn(e.doc,l),Ct(e.doc,ft(n,Qo(l)))}})),s.readAsText(t)}},l=0;r>l;++l)s(i[l],l);else{if(e.state.draggingText&&e.doc.sel.contains(n)>-1)return e.state.draggingText(t),void setTimeout((function(){e.display.input.focus()}),20);try{if(o=t.dataTransfer.getData("Text")){if(e.state.draggingText&&!(Lo?t.altKey:t.ctrlKey))var u=e.listSelections();if(Ot(e.doc,ft(n,n)),u)for(l=0;la.clientWidth,l=a.scrollHeight>a.clientHeight;if(i&&s||r&&l){if(r&&Lo&&wo)t:for(var u=e.target,c=o.view;u!=a;u=u.parentNode)for(var h=0;hd?f=Math.max(0,f+d-50):p=Math.min(t.doc.height,p+d+50),A(t,{top:f,bottom:p})}20>$o&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=i,o.wheelDY=r,setTimeout((function(){if(null!=o.wheelStartX){var t=a.scrollLeft-o.wheelStartX,e=a.scrollTop-o.wheelStartY,n=e&&o.wheelDY&&e/o.wheelDY||t&&o.wheelDX&&t/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Go=(Go*$o+n)/($o+1),++$o)}}),200)):(o.wheelDX+=i,o.wheelDY+=r))}}function sn(t,e,n){if("string"==typeof e&&!(e=ca[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=Ia}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function ln(t,e,n){for(var i=0;i_o&&27==t.keyCode&&(t.returnValue=!1);var n=t.keyCode;e.display.shift=16==n||t.shiftKey;var i=cn(e,t);So&&(Jo=i?n:null,!i&&88==n&&!is&&(Lo?t.metaKey:t.ctrlKey)&&e.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||fn(e)}}function fn(t){function e(t){18!=t.keyCode&&t.altKey||(Xa(n,"CodeMirror-crosshair"),Pa(document,"keyup",e),Pa(document,"mouseover",e))}var n=t.display.lineDiv;Ja(n,"CodeMirror-crosshair"),La(document,"keyup",e),La(document,"mouseover",e)}function pn(t){16==t.keyCode&&(this.doc.sel.shift=!1),Tr(this,t)}function mn(t){var e=this;if(!(Ve(e.display,t)||Tr(e,t)||t.ctrlKey&&!t.altKey||Lo&&t.metaKey)){var n=t.keyCode,i=t.charCode;if(So&&n==Jo)return Jo=null,void Oa(t);So&&(!t.which||t.which<10)&&cn(e,t)||hn(e,t,String.fromCharCode(null==i?n:i))||e.display.input.onKeyPress(t)}}function gn(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,yn(t))}),100)}function vn(t){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Na(t,"focus",t),t.state.focused=!0,Ja(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),wo&&setTimeout((function(){t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Ft(t))}function yn(t){t.state.delayingBlurEvent||(t.state.focused&&(Na(t,"blur",t),t.state.focused=!1,Xa(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function bn(t,e){Ve(t.display,e)||_n(t,e)||Tr(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function _n(t,e){return!!Er(t,"gutterContextMenu")&&Xe(t,e,"gutterContextMenu",!1)}function wn(t,e){if(Bo(t,e.from)<0)return t;if(Bo(t,e.to)<=0)return Qo(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=Qo(e).ch-e.to.ch),Fo(n,i)}function xn(t,e){for(var n=[],i=0;i=0;--r)On(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text});else On(t,e)}}function On(t,e){if(1!=e.text.length||""!=e.text[0]||0!=Bo(e.from,e.to)){var n=xn(t,e);ur(t,e,n,t.cm?t.cm.curOp.id:NaN),Ln(t,e,n,oi(t,e));var i=[];Gi(t,(function(t,n){n||-1!=Nr(i,t.history)||(br(t.history,e),i.push(t.history)),Ln(t,e,null,oi(t,e))}))}}function En(t,e,n){if(!t.cm||!t.cm.state.suppressEdits){for(var i,r=t.history,o=t.sel,a="undo"==e?r.done:r.undone,s="undo"==e?r.undone:r.done,l=0;l=0;--l){var h=i.changes[l];if(h.origin=e,c&&!Cn(t,h,!1))return void(a.length=0);u.push(ar(t,h));var d=l?xn(t,h):Pr(a);Ln(t,h,d,si(t,h)),!l&&t.cm&&t.cm.scrollIntoView({from:h.from,to:Qo(h)});var f=[];Gi(t,(function(t,e){e||-1!=Nr(f,t.history)||(br(t.history,h),f.push(t.history)),Ln(t,h,null,si(t,h))}))}}}}function An(t,e){if(0!=e&&(t.first+=e,t.sel=new ct(Dr(t.sel.ranges,(function(t){return new ht(Fo(t.anchor.line+e,t.anchor.ch),Fo(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){je(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,i=n.viewFrom;it.lastLine())){if(e.from.lineo&&(e={from:e.from,to:Fo(o,Xi(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Ji(t,e.from,e.to),n||(n=xn(t,e)),t.cm?Mn(t.cm,e,i):Zi(t,e,i),Ot(t,n,Ra)}}function Mn(t,e,n){var i=t.doc,r=t.display,a=e.from,s=e.to,l=!1,u=a.line;t.options.lineWrapping||(u=er(yi(Xi(i,a.line))),i.iter(u,s.line+1,(function(t){return t==r.maxLine?(l=!0,!0):void 0}))),i.sel.contains(e.from,e.to)>-1&&Or(t),Zi(i,e,n,o(t)),t.options.lineWrapping||(i.iter(u,a.line+e.text.length,(function(t){var e=h(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,l=!1)})),l&&(t.curOp.updateMaxLine=!0)),i.frontier=Math.min(i.frontier,a.line),Bt(t,400);var c=e.text.length-(s.line-a.line)-1;e.full?je(t):a.line!=s.line||1!=e.text.length||Vi(t.doc,e)?je(t,a.line,s.line+1,c):Ie(t,a.line,"text");var d=Er(t,"changes"),f=Er(t,"change");if(f||d){var p={from:a,to:s,text:e.text,removed:e.removed,origin:e.origin};f&&Sr(t,"change",t,p),d&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(p)}t.display.selForContextMenu=null}function Pn(t,e,n,i,r){if(i||(i=n),Bo(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Tn(t,{from:n,to:i,text:e,origin:r})}function Nn(t,e){if(!Tr(t,"scrollCursorIntoView")){var n=t.display,i=n.sizer.getBoundingClientRect(),r=null;if(e.top+i.top<0?r=!0:e.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!Oo){var o=Hr("div","",null,"position: absolute; top: "+(e.top-n.viewOffset-Wt(t.display))+"px; height: "+(e.bottom-e.top+Zt(t)+n.barHeight)+"px; left: "+e.left+"px; width: 2px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(r),t.display.lineSpace.removeChild(o)}}}function Dn(t,e,n,i){null==i&&(i=0);for(var r=0;5>r;r++){var o=!1,a=fe(t,e),s=n&&n!=e?fe(t,n):a,l=In(t,Math.min(a.left,s.left),Math.min(a.top,s.top)-i,Math.max(a.left,s.left),Math.max(a.bottom,s.bottom)+i),u=t.doc.scrollTop,c=t.doc.scrollLeft;if(null!=l.scrollTop&&(rn(t,l.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(on(t,l.scrollLeft),Math.abs(t.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return a}function jn(t,e,n,i,r){var o=In(t,e,n,i,r);null!=o.scrollTop&&rn(t,o.scrollTop),null!=o.scrollLeft&&on(t,o.scrollLeft)}function In(t,e,n,i,r){var o=t.display,a=ye(t.display);0>n&&(n=0);var s=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:o.scroller.scrollTop,l=$t(t),u={};r-n>l&&(r=n+l);var c=t.doc.height+Ut(o),h=a>n,d=r>c-a;if(s>n)u.scrollTop=h?0:n;else if(r>s+l){var f=Math.min(n,(d?c:r)-l);f!=s&&(u.scrollTop=f)}var p=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:o.scroller.scrollLeft,m=Yt(t)-(t.options.fixedGutter?o.gutters.offsetWidth:0),g=i-e>m;return g&&(i=e+m),10>e?u.scrollLeft=0:p>e?u.scrollLeft=Math.max(0,e-(g?0:10)):i>m+p-3&&(u.scrollLeft=i+(g?0:10)-m),u}function Rn(t,e,n){null==e&&null==n||Bn(t),null!=e&&(t.curOp.scrollLeft=(null==t.curOp.scrollLeft?t.doc.scrollLeft:t.curOp.scrollLeft)+e),null!=n&&(t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+n)}function Fn(t){Bn(t);var e=t.getCursor(),n=e,i=e;t.options.lineWrapping||(n=e.ch?Fo(e.line,e.ch-1):e,i=Fo(e.line,e.ch+1)),t.curOp.scrollToPos={from:n,to:i,margin:t.options.cursorScrollMargin,isCursor:!0}}function Bn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var n=pe(t,e.from),i=pe(t,e.to),r=In(t,Math.min(n.left,i.left),Math.min(n.top,i.top)-e.margin,Math.max(n.right,i.right),Math.max(n.bottom,i.bottom)+e.margin);t.scrollTo(r.scrollLeft,r.scrollTop)}}function zn(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=Ht(t,e):n="prev");var a=t.options.tabSize,s=Xi(o,e),l=za(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(i||/\S/.test(s.text)){if("smart"==n&&((u=o.mode.indent(r,s.text.slice(c.length),s.text))==Ia||u>150)){if(!i)return;n="prev"}}else u=0,n="not";"prev"==n?u=e>o.first?za(Xi(o,e-1).text,null,a):0:"add"==n?u=l+t.options.indentUnit:"subtract"==n?u=l-t.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var h="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(u/a);f;--f)d+=a,h+="\t";if(u>d&&(h+=Mr(u-d)),h!=c)return Pn(o,h,Fo(e,0),Fo(e,c.length),"+input"),s.stateAfter=null,!0;for(f=0;f=0;e--)Pn(t.doc,"",i[e].from,i[e].to,"+delete");Fn(t)}))}function Wn(t,e,n,i,r){function o(){var e=s+n;return!(e=t.first+t.size)&&(s=e,c=Xi(t,e))}function a(t){var e=(r?ho:fo)(c,l,n,!0);if(null==e){if(t||!o())return!1;l=r?(0>n?ro:io)(c):0>n?c.text.length:0}else l=e;return!0}var s=e.line,l=e.ch,u=n,c=Xi(t,s);if("char"==i)a();else if("column"==i)a(!0);else if("word"==i||"group"==i)for(var h=null,d="group"==i,f=t.cm&&t.cm.getHelper(e,"wordChars"),p=!0;!(0>n)||a(!p);p=!1){var m=c.text.charAt(l)||"\n",g=Br(m,f)?"w":d&&"\n"==m?"n":!d||/\s/.test(m)?null:"p";if(!d||p||g||(g="s"),h&&h!=g){0>n&&(n=1,a());break}if(g&&(h=g),n>0&&!a(!p))break}var v=Pt(t,Fo(s,l),e,u,!0);return Bo(e,v)||(v.hitSide=!0),v}function Un(t,e,n,i){var r,o=t.doc,a=e.left;if("page"==i){var s=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);r=e.top+n*(s-(0>n?1.5:.5)*ye(t.display))}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(;;){var l=ge(t,a,r);if(!l.outside)break;if(0>n?0>=r:r>=o.height){l.hitSide=!0;break}r+=5*n}return l}function Vn(e,n,i,r){t.defaults[e]=n,i&&(ea[e]=r?function(t,e,n){n!=na&&i(t,e,n)}:i)}function Zn(t){for(var e,n,i,r,o=t.split(/-(?!$)/),a=(t=o[o.length-1],0);a0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Hr("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(vi(t,e.line,e,n,o)||e.line!=n.line&&vi(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ro=!0}o.addToHistory&&ur(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,l=e.line,u=t.cm;if(t.iter(l,n.line+1,(function(t){u&&o.collapsed&&!u.options.lineWrapping&&yi(t)==u.display.maxLine&&(s=!0),o.collapsed&&l!=e.line&&tr(t,0),ni(t,new Qn(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&t.iter(e.line,n.line+1,(function(e){xi(t,e)&&tr(e,0)})),o.clearOnEnter&&La(o,"beforeCursorEnter",(function(){o.clear()})),o.readOnly&&(Io=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++ga,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)je(u,e.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=e.line;c<=n.line;c++)Ie(u,c,"text");o.atomic&&At(u.doc),Sr(u,"markerAdded",u,o)}return o}function Gn(t,e,n,i,r){(i=Rr(i)).shared=!1;var o=[$n(t,e,n,i,r)],a=o[0],s=i.widgetNode;return Gi(t,(function(t){s&&(i.widgetNode=s.cloneNode(!0)),o.push($n(t,mt(t,e),mt(t,n),i,r));for(var l=0;l=e:o.to>e);(i||(i=[])).push(new Qn(a,o.from,s?null:o.to))}}return i}function ri(t,e,n){if(t)for(var i,r=0;r=e:o.to>e)||o.from==e&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from0&&s)for(h=0;hh;++h)p.push(m);p.push(l)}return p}function ai(t){for(var e=0;e0)){var c=[l,1],h=Bo(u.from,s.from),d=Bo(u.to,s.to);(0>h||!a.inclusiveLeft&&!h)&&c.push({from:u.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),r.splice.apply(r,c),l+=c.length-1}}return r}function ui(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&0>=h||0>=c&&h>=0)&&(0>=c&&(l.marker.inclusiveRight&&r.inclusiveLeft?Bo(u.to,n)>=0:Bo(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?Bo(u.from,i)<=0:Bo(u.from,i)<0)))return!0}}}function yi(t){for(var e;e=mi(t);)t=e.find(-1,!0).line;return t}function bi(t){for(var e,n;e=gi(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function _i(t,e){var n=Xi(t,e),i=yi(n);return n==i?e:er(i)}function wi(t,e){if(e>t.lastLine())return e;var n,i=Xi(t,e);if(!xi(t,i))return e;for(;n=gi(i);)i=n.find(1,!0).line;return er(i)+1}function xi(t,e){var n=Ro&&e.markedSpans;if(n)for(var i,r=0;ro;o++){r&&(r[0]=t.innerMode(e,i).mode);var a=e.token(n,i);if(n.pos>n.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}function Pi(t,e,n,i){function r(t){return{start:h.start,end:h.pos,string:h.current(),type:o||null,state:t?la(a.mode,c):c}}var o,a=t.doc,s=a.mode;e=mt(a,e);var l,u=Xi(a,e.line),c=Ht(t,e.line,n),h=new ma(u.text,t.options.tabSize);for(i&&(l=[]);(i||h.post.options.maxHighlightLength?(s=!1,a&&Ii(t,e,i,h.pos),h.pos=e.length,l=null):l=Ai(Mi(n,h,i,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||c!=l){for(;uu;){var i=r[l];i>t&&r.splice(l,1,t,r[l+1],i),l+=2,u=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,l-n,t,"cm-overlay "+e),l=n+2;else for(;l>n;n+=2){var o=r[n+1];r[n+1]=(o?o+" ":"")+"cm-overlay "+e}}),o)}return{styles:r,classes:o.bgClass||o.textClass?o:null}}function ji(t,e,n){if(!e.styles||e.styles[0]!=t.state.modeGen){var i=Ht(t,er(e)),r=Di(t,e,e.text.length>t.options.maxHighlightLength?la(t.doc.mode,i):i);e.stateAfter=i,e.styles=r.styles,r.classes?e.styleClasses=r.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.frontier&&t.doc.frontier++}return e.styles}function Ii(t,e,n,i){var r=t.doc.mode,o=new ma(e,t.options.tabSize);for(o.start=o.pos=i||0,""==e&&Li(r,n);!o.eol();)Mi(r,o,n),o.start=o.pos}function Ri(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?xa:wa;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Fi(t,e){var n=Hr("span",null,null,wo?"padding-right: .1px":null),i={pre:Hr("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,splitSpaces:(bo||wo)&&t.getOption("lineWrapping")};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var o,a=r?e.rest[r-1]:e.line;i.pos=0,i.addToken=zi,Jr(t.display.measure)&&(o=rr(a))&&(i.addToken=Hi(i.addToken,o)),i.map=[],Ui(a,i,ji(t,a,e!=t.display.externalMeasured&&er(a))),a.styleClasses&&(a.styleClasses.bgClass&&(i.bgClass=Yr(a.styleClasses.bgClass,i.bgClass||"")),a.styleClasses.textClass&&(i.textClass=Yr(a.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Xr(t.display.measure))),0==r?(e.measure.map=i.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(i.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(wo){var s=i.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return Na(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=Yr(i.pre.className,i.textClass||"")),i}function Bi(t){var e=Hr("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function zi(t,e,n,i,r,o,a){if(e){var s=t.splitSpaces?e.replace(/ {3,}/g,qi):e,l=t.cm.state.specialChars,u=!1;if(l.test(e))for(var c=document.createDocumentFragment(),h=0;;){l.lastIndex=h;var d=l.exec(e),f=d?d.index-h:e.length-h;if(f){var p=document.createTextNode(s.slice(h,h+f));bo&&9>_o?c.appendChild(Hr("span",[p])):c.appendChild(p),t.map.push(t.pos,t.pos+f,p),t.col+=f,t.pos+=f}if(!d)break;if(h+=f+1,"\t"==d[0]){var m=t.cm.options.tabSize,g=m-t.col%m;(p=c.appendChild(Hr("span",Mr(g),"cm-tab"))).setAttribute("role","presentation"),p.setAttribute("cm-text","\t"),t.col+=g}else"\r"==d[0]||"\n"==d[0]?((p=c.appendChild(Hr("span","\r"==d[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",d[0]),t.col+=1):((p=t.cm.options.specialCharPlaceholder(d[0])).setAttribute("cm-text",d[0]),bo&&9>_o?c.appendChild(Hr("span",[p])):c.appendChild(p),t.col+=1);t.map.push(t.pos,t.pos+1,p),t.pos++}else t.col+=e.length,c=document.createTextNode(s),t.map.push(t.pos,t.pos+e.length,c),bo&&9>_o&&(u=!0),t.pos+=e.length;if(n||i||r||u||a){var v=n||"";i&&(v+=i),r&&(v+=r);var y=Hr("span",[c],v,a);return o&&(y.title=o),t.content.appendChild(y)}t.content.appendChild(c)}}function qi(t){for(var e=" ",n=0;nu&&d.from<=u)break}if(d.to>=c)return t(n,i,r,o,a,s,l);t(n,i.slice(0,d.to-u),r,o,null,s,l),o=null,i=i.slice(d.to-u),u=d.to}}}function Wi(t,e,n,i){var r=!i&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!i&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e}function Ui(t,e,n){var i=t.markedSpans,r=t.text,o=0;if(i)for(var a,s,l,u,c,h,d,f=r.length,p=0,m=1,g="",v=0;;){if(v==p){l=u=c=h=s="",d=null,v=1/0;for(var y,b=[],_=0;_p||x.collapsed&&w.to==p&&w.from==p)?(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,u=""),x.className&&(l+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&w.from==p&&(c+=" "+x.startStyle),x.endStyle&&w.to==v&&(y||(y=[])).push(x.endStyle,w.to),x.title&&!h&&(h=x.title),x.collapsed&&(!d||fi(d.marker,x)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(y)for(_=0;_=f)break;for(var k=Math.min(f,v);;){if(g){var S=p+g.length;if(!d){var C=S>k?g.slice(0,k-p):g;e.addToken(e,C,a?a+l:l,c,p+C.length==v?u:"",h,s)}if(S>=k){g=g.slice(k-p),p=k;break}p=S,c=""}g=r.slice(o,o=n[m++]),a=Ri(n[m++],e.cm.options)}}else for(m=1;mn;++n)o.push(new _a(u[n],r(n),i));return o}var s=e.from,l=e.to,u=e.text,c=Xi(t,s.line),h=Xi(t,l.line),d=Pr(u),f=r(u.length-1),p=l.line-s.line;if(e.full)t.insert(0,a(0,u.length)),t.remove(u.length,t.size-u.length);else if(Vi(t,e)){var m=a(0,u.length-1);o(h,h.text,f),p&&t.remove(s.line,p),m.length&&t.insert(s.line,m)}else c==h?1==u.length?o(c,c.text.slice(0,s.ch)+d+c.text.slice(l.ch),f):((m=a(1,u.length-1)).push(new _a(d+c.text.slice(l.ch),f,i)),o(c,c.text.slice(0,s.ch)+u[0],r(0)),t.insert(s.line+1,m)):1==u.length?(o(c,c.text.slice(0,s.ch)+u[0]+h.text.slice(l.ch),r(0)),t.remove(s.line+1,p)):(o(c,c.text.slice(0,s.ch)+u[0],r(0)),o(h,d+h.text.slice(l.ch),f),m=a(1,u.length-1),p>1&&t.remove(s.line+1,p-1),t.insert(s.line+1,m));Sr(t,"change",t,e)}function Yi(t){this.lines=t,this.parent=null;for(var e=0,n=0;e(e-=t.first)||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(o>e){n=r;break}e-=o}return n.lines[e]}function Ji(t,e,n){var i=[],r=e.line;return t.iter(e.line,n.line+1,(function(t){var o=t.text;r==n.line&&(o=o.slice(0,n.ch)),r==e.line&&(o=o.slice(e.ch)),i.push(o),++r})),i}function Qi(t,e,n){var i=[];return t.iter(e,n,(function(t){i.push(t.text)})),i}function tr(t,e){var n=e-t.height;if(n)for(var i=t;i;i=i.parent)i.height+=n}function er(t){if(null==t.parent)return null;for(var e=t.parent,n=Nr(e.lines,t),i=e.parent;i;e=i,i=i.parent)for(var r=0;i.children[r]!=e;++r)n+=i.children[r].chunkSize();return n+e.first}function nr(t,e){var n=t.first;t:do{for(var i=0;ie){t=r;continue t}e-=o,n+=r.chunkSize()}return n}while(!t.lines);for(i=0;ie)break;e-=a}return n+i}function ir(t){for(var e=0,n=(t=yi(t)).parent,i=0;i1&&!t.done[t.done.length-2].ranges?(t.done.pop(),Pr(t.done)):void 0}function ur(t,e,n,i){var r=t.history;r.undone.length=0;var o,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=lr(r,r.lastOp==i))){var s=Pr(o.changes);0==Bo(e.from,e.to)&&0==Bo(e.from,s.to)?s.to=Qo(e):o.changes.push(ar(t,e))}else{var l=Pr(r.done);for(l&&l.ranges||dr(t.sel,r.done),o={changes:[ar(t,e)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=e.origin,s||Na(t,"historyAdded")}function cr(t,e,n,i){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function hr(t,e,n,i){var r=t.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||cr(t,o,Pr(r.done),e))?r.done[r.done.length-1]=e:dr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&sr(r.undone)}function dr(t,e){var n=Pr(e);n&&n.ranges&&n.equals(t)||e.push(t)}function fr(t,e,n,i){var r=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,i),(function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[o]=n.markedSpans),++o}))}function pr(t){if(!t)return null;for(var e,n=0;n-1&&(Pr(s)[h]=c[h],delete c[h])}}}return r}function vr(t,e,n,i){n0?i.slice():Ma:i||Ma}function Sr(t,e){function n(t){return function(){t.apply(null,o)}}var i=kr(t,e,!1);if(i.length){var r,o=Array.prototype.slice.call(arguments,2);Vo?r=Vo.delayedCallbacks:Da?r=Da:(r=Da=[],setTimeout(Cr,0));for(var a=0;a0}function Ar(t){t.prototype.on=function(t,e){La(this,t,e)},t.prototype.off=function(t,e){Pa(this,t,e)}}function Lr(){this.id=null}function Mr(t){for(;Ha.length<=t;)Ha.push(Pr(Ha)+" ");return Ha[t]}function Pr(t){return t[t.length-1]}function Nr(t,e){for(var n=0;n-1&&Za(t))||e.test(t):Za(t)}function zr(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function qr(t){return t.charCodeAt(0)>=768&&Ya.test(t)}function Hr(t,e,n,i){var r=document.createElement(t);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var o=0;o0;--e)t.removeChild(t.firstChild);return t}function Ur(t,e){return Wr(t).appendChild(e)}function Vr(){for(var t=document.activeElement;t&&t.root&&t.root.activeElement;)t=t.root.activeElement;return t}function Zr(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function Yr(t,e){for(var n=t.split(" "),i=0;i2&&!(bo&&8>_o))}var n=Ga?Hr("span",""):Hr("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Jr(t){if(null!=Ka)return Ka;var e=Ur(t,document.createTextNode("AخA")),n=Ua(e,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var i=Ua(e,1,2).getBoundingClientRect();return Ka=i.right-n.right<3}function Qr(t){if(null!=rs)return rs;var e=Ur(t,Hr("span","x")),n=e.getBoundingClientRect(),i=Ua(e,0,1).getBoundingClientRect();return rs=Math.abs(n.left-i.left)>1}function to(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;oe||e==n&&a.to==e)&&(i(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function eo(t){return t.level%2?t.to:t.from}function no(t){return t.level%2?t.from:t.to}function io(t){var e=rr(t);return e?eo(e[0]):0}function ro(t){var e=rr(t);return e?no(Pr(e)):t.text.length}function oo(t,e){var n=Xi(t.doc,e),i=yi(n);i!=n&&(e=er(i));var r=rr(i),o=r?r[0].level%2?ro(i):io(i):0;return Fo(e,o)}function ao(t,e){for(var n,i=Xi(t.doc,e);n=gi(i);)i=n.find(1,!0).line,e=null;var r=rr(i),o=r?r[0].level%2?io(i):ro(i):i.text.length;return Fo(null==e?er(i):e,o)}function so(t,e){var n=oo(t,e.line),i=Xi(t.doc,n.line),r=rr(i);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),a=e.line==n.line&&e.ch<=o&&e.ch;return Fo(n.line,a?0:o)}return n}function lo(t,e,n){var i=t[0].level;return e==i||n!=i&&n>e}function uo(t,e){as=null;for(var n,i=0;ie)return i;if(r.from==e||r.to==e){if(null!=n)return lo(t,r.level,t[n].level)?(r.from!=r.to&&(as=n),i):(r.from!=r.to&&(as=i),n);n=i}}return n}function co(t,e,n,i){if(!i)return e+n;do{e+=n}while(e>0&&qr(t.text.charAt(e)));return e}function ho(t,e,n,i){var r=rr(t);if(!r)return fo(t,e,n,i);for(var o=uo(r,e),a=r[o],s=co(t,e,a.level%2?-n:n,i);;){if(s>a.from&&s0==(a=r[o+=n]).level%2?a.to:a.from;if(!(a=r[o+=n]))return null;s=n>0==a.level%2?co(t,a.to,-1,i):co(t,a.from,1,i)}}function fo(t,e,n,i){var r=e+n;if(i)for(;r>0&&qr(t.text.charAt(r));)r+=n;return 0>r||r>t.text.length?null:r}var po=navigator.userAgent,mo=navigator.platform,go=/gecko\/\d/i.test(po),vo=/MSIE \d/.test(po),yo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(po),bo=vo||yo,_o=bo&&(vo?document.documentMode||6:yo[1]),wo=/WebKit\//.test(po),xo=wo&&/Qt\/\d+\.\d+/.test(po),ko=/Chrome\//.test(po),So=/Opera\//.test(po),Co=/Apple Computer/.test(navigator.vendor),To=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(po),Oo=/PhantomJS/.test(po),Eo=/AppleWebKit/.test(po)&&/Mobile\/\w+/.test(po),Ao=Eo||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(po),Lo=Eo||/Mac/.test(mo),Mo=/\bCrOS\b/.test(po),Po=/win/i.test(mo),No=So&&po.match(/Version\/(\d*\.\d*)/);No&&(No=Number(No[1])),No&&No>=15&&(So=!1,wo=!0);var Do=Lo&&(xo||So&&(null==No||12.11>No)),jo=go||bo&&_o>=9,Io=!1,Ro=!1;m.prototype=Rr({update:function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var r=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?i:0);this.horiz.firstChild.style.width=t.scrollWidth-t.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:e?i:0}},setScrollLeft:function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var t=Lo&&!To?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Lr,this.disableVert=new Lr},enableZeroWidthBar:function(t,e){function n(){var i=t.getBoundingClientRect();document.elementFromPoint(i.left+1,i.bottom-1)!=t?t.style.pointerEvents="none":e.set(1e3,n)}t.style.pointerEvents="auto",e.set(1e3,n)},clear:function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)}},m.prototype),g.prototype=Rr({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},g.prototype),t.scrollbarModel={native:m,null:g},C.prototype.signal=function(t,e){Er(t,e)&&this.events.push(arguments)},C.prototype.finish=function(){for(var t=0;t=9&&n.hasSelection&&(n.hasSelection=null),n.poll()})),La(o,"paste",(function(t){Tr(i,t)||J(t,i)||(i.state.pasteIncoming=!0,n.fastPoll())})),La(o,"cut",e),La(o,"copy",e),La(t.scroller,"paste",(function(e){Ve(t,e)||Tr(i,e)||(i.state.pasteIncoming=!0,n.focus())})),La(t.lineSpace,"selectstart",(function(e){Ve(t,e)||Oa(e)})),La(o,"compositionstart",(function(){var t=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:i.markText(t,i.getCursor("to"),{className:"CodeMirror-composing"})}})),La(o,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},prepareSelection:function(){var t=this.cm,e=t.display,n=t.doc,i=jt(t);if(t.options.moveInputWithCursor){var r=fe(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+a.top-o.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+a.left-o.left))}return i},showSelection:function(t){var e=this.cm.display;Ur(e.cursorDiv,t.cursors),Ur(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},reset:function(t){if(!this.contextMenuPending){var e,n,i=this.cm,r=i.doc;if(i.somethingSelected()){this.prevInput="";var o=r.sel.primary(),a=(e=is&&(o.to().line-o.from().line>100||(n=i.getSelection()).length>1e3))?"-":n||i.getSelection();this.textarea.value=a,i.state.focused&&Wa(this.textarea),bo&&_o>=9&&(this.hasSelection=a)}else t||(this.prevInput=this.textarea.value="",bo&&_o>=9&&(this.hasSelection=null));this.inaccurateSelection=e}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Ao||Vr()!=this.textarea))try{this.textarea.focus()}catch(t){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var t=this;t.pollingFast||t.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},fastPoll:function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},poll:function(){var t=this.cm,e=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||ns(e)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=e.value;if(i==n&&!t.somethingSelected())return!1;if(bo&&_o>=9&&this.hasSelection===i||Lo&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var r=i.charCodeAt(0);if(8203!=r||n||(n=""),8666==r)return this.reset(),this.cm.execCommand("undo")}for(var o=0,a=Math.min(n.length,i.length);a>o&&n.charCodeAt(o)==i.charCodeAt(o);)++o;var s=this;return Ae(t,(function(){X(t,i.slice(o),n.length-o,null,s.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?e.value=s.prevInput="":s.prevInput=i,s.composing&&(s.composing.range.clear(),s.composing.range=t.markText(s.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){bo&&_o>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(t){function e(){if(null!=a.selectionStart){var t=r.somethingSelected(),e=""+(t?a.value:"");a.value="⇚",a.value=e,i.prevInput=t?"":"",a.selectionStart=1,a.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=c,a.style.cssText=u,bo&&9>_o&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=a.selectionStart){(!bo||bo&&9>_o)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&""==i.prevInput?Le(r,ca.selectAll)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,a=i.textarea,s=Ze(r,t),l=o.scroller.scrollTop;if(s&&!So){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(s)&&Le(r,Tt)(r.doc,ft(s),Ra);var u=a.style.cssText,c=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();if(a.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px; z-index: 1000; background: "+(bo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",wo)var d=window.scrollY;if(o.input.focus(),wo&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(a.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),bo&&_o>=9&&e(),jo){Aa(t);var f=function(){Pa(window,"mouseup",f),setTimeout(n,20)};La(window,"mouseup",f)}else setTimeout(n,50)}},readOnlyChanged:function(t){t||this.reset()},setUneditable:jr,needsContentAttribute:!1},nt.prototype),rt.prototype=Rr({init:function(t){function e(t){if(!Tr(i,t)){if(i.somethingSelected())zo={lineWise:!1,text:i.getSelections()},"cut"==t.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var e=tt(i);zo={lineWise:!0,text:e.text},"cut"==t.type&&i.operation((function(){i.setSelections(e.ranges,0,Ra),i.replaceSelection("",null,"cut")}))}if(t.clipboardData&&!Eo)t.preventDefault(),t.clipboardData.clearData(),t.clipboardData.setData("text/plain",zo.text.join("\n"));else{var n=it(),r=n.firstChild;i.display.lineSpace.insertBefore(n,i.display.lineSpace.firstChild),r.value=zo.text.join("\n");var o=document.activeElement;Wa(r),setTimeout((function(){i.display.lineSpace.removeChild(n),o.focus()}),50)}}}var n=this,i=n.cm,r=n.div=t.lineDiv;et(r),La(r,"paste",(function(t){Tr(i,t)||J(t,i)})),La(r,"compositionstart",(function(t){var e=t.data;if(n.composing={sel:i.doc.sel,data:e,startData:e},e){var r=i.doc.sel.primary(),o=i.getLine(r.head.line).indexOf(e,Math.max(0,r.head.ch-e.length));o>-1&&o<=r.head.ch&&(n.composing.sel=ft(Fo(r.head.line,o),Fo(r.head.line,o+e.length)))}})),La(r,"compositionupdate",(function(t){n.composing.data=t.data})),La(r,"compositionend",(function(t){var e=n.composing;e&&(t.data==e.startData||/\u200b/.test(t.data)||(e.data=t.data),setTimeout((function(){e.handled||n.applyComposition(e),n.composing==e&&(n.composing=null)}),50))})),La(r,"touchstart",(function(){n.forceCompositionEnd()})),La(r,"input",(function(){n.composing||!i.isReadOnly()&&n.pollContent()||Ae(n.cm,(function(){je(i)}))})),La(r,"copy",e),La(r,"cut",e)},prepareSelection:function(){var t=jt(this.cm,!1);return t.focus=this.cm.state.focused,t},showSelection:function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},showPrimarySelection:function(){var t=window.getSelection(),e=this.cm.doc.sel.primary(),n=st(this.cm,t.anchorNode,t.anchorOffset),i=st(this.cm,t.focusNode,t.focusOffset);if(!n||n.bad||!i||i.bad||0!=Bo(G(n,i),e.from())||0!=Bo($(n,i),e.to())){var r=ot(this.cm,e.from()),o=ot(this.cm,e.to());if(r||o){var a=this.cm.display.view,s=t.rangeCount&&t.getRangeAt(0);if(r){if(!o){var l=a[a.length-1].measure,u=l.maps?l.maps[l.maps.length-1]:l.map;o={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else r={node:a[0].measure.map[2],offset:0};try{var c=Ua(r.node,r.offset,o.offset,o.node)}catch(t){}c&&(!go&&this.cm.state.focused?(t.collapse(r.node,r.offset),c.collapsed||t.addRange(c)):(t.removeAllRanges(),t.addRange(c)),s&&null==t.anchorNode?t.addRange(s):go&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation((function(){t.cm.curOp.selectionChanged=!0}))}),20)},showMultipleSelections:function(t){Ur(this.cm.display.cursorDiv,t.cursors),Ur(this.cm.display.selectionDiv,t.selection)},rememberSelection:function(){var t=window.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},selectionInEditor:function(){var t=window.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return $a(this.div,e)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}var e=this;this.selectionInEditor()?this.pollSelection():Ae(this.cm,(function(){e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,t)},selectionChanged:function(){var t=window.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var t=window.getSelection(),e=this.cm;this.rememberSelection();var n=st(e,t.anchorNode,t.anchorOffset),i=st(e,t.focusNode,t.focusOffset);n&&i&&Ae(e,(function(){Tt(e.doc,ft(n,i),Ra),(n.bad||i.bad)&&(e.curOp.selectionChanged=!0)}))}},pollContent:function(){var t,e=this.cm,n=e.display,i=e.doc.sel.primary(),r=i.from(),o=i.to();if(r.linen.viewTo-1)return!1;if(r.line==n.viewFrom||0==(t=Fe(e,r.line)))var a=er(n.view[0].line),s=n.view[0].node;else a=er(n.view[t].line),s=n.view[t-1].node.nextSibling;var l=Fe(e,o.line);if(l==n.view.length-1)var u=n.viewTo-1,c=n.lineDiv.lastChild;else u=er(n.view[l+1].line)-1,c=n.view[l+1].node.previousSibling;for(var h=e.doc.splitLines(ut(e,s,c,a,u)),d=Ji(e.doc,Fo(a,0),Fo(u,Xi(e.doc,u).text.length));h.length>1&&d.length>1;)if(Pr(h)==Pr(d))h.pop(),d.pop(),u--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),a++}for(var f=0,p=0,m=h[0],g=d[0],v=Math.min(m.length,g.length);v>f&&m.charCodeAt(f)==g.charCodeAt(f);)++f;for(var y=Pr(h),b=Pr(d),_=Math.min(y.length-(1==h.length?f:0),b.length-(1==d.length?f:0));_>p&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;h[h.length-1]=y.slice(0,y.length-p),h[0]=h[0].slice(f);var w=Fo(a,f),x=Fo(u,d.length?Pr(d).length-p:0);return h.length>1||h[0]||Bo(w,x)?(Pn(e.doc,h,w,x,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(t){this.cm.isReadOnly()?Le(this.cm,je)(this.cm):t.data&&t.data!=t.startData&&Le(this.cm,X)(this.cm,t.data,0,t.sel)},setUneditable:function(t){t.contentEditable="false"},onKeyPress:function(t){t.preventDefault(),this.cm.isReadOnly()||Le(this.cm,X)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0)},readOnlyChanged:function(t){this.div.contentEditable=String("nocursor"!=t)},onContextMenu:jr,resetPosition:jr,needsContentAttribute:!0},rt.prototype),t.inputStyles={textarea:nt,contenteditable:rt},ct.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var e=0;e=0&&Bo(t,i.to())<=0)return n}return-1}},ht.prototype={from:function(){return G(this.anchor,this.head)},to:function(){return $(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var qo,Ho,Wo,Uo={left:0,right:0,top:0,bottom:0},Vo=null,Zo=0,Yo=0,$o=0,Go=null;bo?Go=-.53:go?Go=15:ko?Go=-.7:Co&&(Go=-1/3);var Ko=function(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}};t.wheelEventPixels=function(t){var e=Ko(t);return e.x*=Go,e.y*=Go,e};var Xo=new Lr,Jo=null,Qo=t.changeEnd=function(t){return t.text?Fo(t.from.line+t.text.length-1,Pr(t.text).length+(1==t.text.length?t.from.ch:0)):t.to};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,e){var n=this.options,i=n[t];n[t]==e&&"mode"!=t||(n[t]=e,ea.hasOwnProperty(t)&&Le(this,ea[t])(this,e,i))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Yn(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;nn&&(zn(this,r.head.line,t,!0),n=r.head.line,i==this.doc.sel.primIndex&&Fn(this));else{var o=r.from(),a=r.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;n>l;++l)zn(this,l,t);var u=this.doc.sel.ranges;0==o.ch&&e.length==u.length&&u[i].from().ch>0&&xt(this.doc,i,new ht(o,u[i].to()),Ra)}}})),getTokenAt:function(t,e){return Pi(this,t,e)},getLineTokens:function(t,e){return Pi(this,Fo(t),e,!0)},getTokenTypeAt:function(t){t=mt(this.doc,t);var e,n=ji(this,Xi(this.doc,t.line)),i=0,r=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var a=i+r>>1;if((a?n[2*a-1]:0)>=o)r=a;else{if(!(n[2*a+1]s?e:0==s?null:e.slice(0,s-1)},getModeAt:function(e){var n=this.doc.mode;return n.innerMode?t.innerMode(n,this.getTokenAt(e).state).mode:n},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var n=[];if(!sa.hasOwnProperty(e))return n;var i=sa[e],r=this.getModeAt(t);if("string"==typeof r[e])i[r[e]]&&n.push(i[r[e]]);else if(r[e])for(var o=0;or&&(t=r,i=!0),n=Xi(this.doc,t)}else n=t;return ce(this,n,{top:0,left:0},e||"page").top+(i?this.doc.height-ir(n):0)},defaultTextHeight:function(){return ye(this.display)},defaultCharWidth:function(){return be(this.display)},setGutterMarker:Me((function(t,e,n){return qn(this.doc,t,"gutter",(function(t){var i=t.gutterMarkers||(t.gutterMarkers={});return i[e]=n,!n&&zr(i)&&(t.gutterMarkers=null),!0}))})),clearGutter:Me((function(t){var e=this,n=e.doc,i=n.first;n.iter((function(n){n.gutterMarkers&&n.gutterMarkers[t]&&(n.gutterMarkers[t]=null,Ie(e,i,"gutter"),zr(n.gutterMarkers)&&(n.gutterMarkers=null)),++i}))})),lineInfo:function(t){if("number"==typeof t){if(!vt(this.doc,t))return null;var e=t;if(!(t=Xi(this.doc,t)))return null}else if(null==(e=er(t)))return null;return{line:e,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display,a=(t=fe(this,mt(this.doc,t))).bottom,s=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),o.sizer.appendChild(e),"over"==i)a=t.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?a=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(a=t.bottom),s+e.offsetWidth>u&&(s=u-e.offsetWidth)}e.style.top=a+"px",e.style.left=e.style.right="","right"==r?(s=o.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?s=0:"middle"==r&&(s=(o.sizer.clientWidth-e.offsetWidth)/2),e.style.left=s+"px"),n&&jn(this,s,a,s+e.offsetWidth,a+e.offsetHeight)},triggerOnKeyDown:Me(dn),triggerOnKeyPress:Me(mn),triggerOnKeyUp:pn,execCommand:function(t){return ca.hasOwnProperty(t)?ca[t].call(null,this):void 0},triggerElectric:Me((function(t){Q(this,t)})),findPosH:function(t,e,n,i){var r=1;0>e&&(r=-1,e=-e);for(var o=0,a=mt(this.doc,t);e>o&&!(a=Wn(this.doc,a,r,n,i)).hitSide;++o);return a},moveH:Me((function(t,e){var n=this;n.extendSelectionsBy((function(i){return n.display.shift||n.doc.extend||i.empty()?Wn(n.doc,i.head,t,e,n.options.rtlMoveVisually):0>t?i.from():i.to()}),Ba)})),deleteH:Me((function(t,e){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):Hn(this,(function(n){var r=Wn(i,n.head,t,e,!1);return 0>t?{from:r,to:n.head}:{from:n.head,to:r}}))})),findPosV:function(t,e,n,i){var r=1,o=i;0>e&&(r=-1,e=-e);for(var a=0,s=mt(this.doc,t);e>a;++a){var l=fe(this,s,"div");if(null==o?o=l.left:l.left=o,(s=Un(this,l,r,n)).hitSide)break}return s},moveV:Me((function(t,e){var n=this,i=this.doc,r=[],o=!n.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy((function(a){if(o)return 0>t?a.from():a.to();var s=fe(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),r.push(s.left);var l=Un(n,s,t,e);return"page"==e&&a==i.sel.primary()&&Rn(n,null,de(n,l,"div").top-s.top),l}),Ba),r.length)for(var a=0;a0&&a(e.charAt(n-1));)--n;for(;i.5)&&a(this),Na(this,"refresh",this)})),swapDoc:Me((function(t){var e=this.doc;return e.cm=null,Ki(this,t),se(this),this.display.input.reset(),this.scrollTo(t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Sr(this,"swapDoc",this,e),e})),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ar(t);var ta=t.defaults={},ea=t.optionHandlers={},na=t.Init={toString:function(){return"CodeMirror.Init"}};Vn("value","",(function(t,e){t.setValue(e)}),!0),Vn("mode",null,(function(t,e){t.doc.modeOption=e,n(t)}),!0),Vn("indentUnit",2,n,!0),Vn("indentWithTabs",!1),Vn("smartIndent",!0),Vn("tabSize",4,(function(t){i(t),se(t),je(t)}),!0),Vn("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],i=t.doc.first;t.doc.iter((function(t){for(var r=0;;){var o=t.text.indexOf(e,r);if(-1==o)break;r=o+e.length,n.push(Fo(i,o))}i++}));for(var r=n.length-1;r>=0;r--)Pn(t.doc,e,n[r],Fo(n[r].line,n[r].ch+e.length))}})),Vn("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,(function(e,n,i){e.state.specialChars=new RegExp(n.source+(n.test("\t")?"":"|\t"),"g"),i!=t.Init&&e.refresh()})),Vn("specialCharPlaceholder",Bi,(function(t){t.refresh()}),!0),Vn("electricChars",!0),Vn("inputStyle",Ao?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),Vn("rtlMoveVisually",!Po),Vn("wholeLineUpdateBefore",!0),Vn("theme","default",(function(t){s(t),l(t)}),!0),Vn("keyMap","default",(function(e,n,i){var r=Yn(n),o=i!=t.Init&&Yn(i);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)})),Vn("extraKeys",null),Vn("lineWrapping",!1,r,!0),Vn("gutters",[],(function(t){f(t.options),l(t)}),!0),Vn("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?S(t.display)+"px":"0",t.refresh()}),!0),Vn("coverGutterNextToScrollbar",!1,(function(t){y(t)}),!0),Vn("scrollbarStyle","native",(function(t){v(t),y(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),Vn("lineNumbers",!1,(function(t){f(t.options),l(t)}),!0),Vn("firstLineNumber",1,l,!0),Vn("lineNumberFormatter",(function(t){return t}),l,!0),Vn("showCursorWhenSelecting",!1,Dt,!0),Vn("resetSelectionOnContextMenu",!0),Vn("lineWiseCopyCut",!0),Vn("readOnly",!1,(function(t,e){"nocursor"==e?(yn(t),t.display.input.blur(),t.display.disabled=!0):t.display.disabled=!1,t.display.input.readOnlyChanged(e)})),Vn("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),Vn("dragDrop",!0,We),Vn("allowDropFileTypes",null),Vn("cursorBlinkRate",530),Vn("cursorScrollMargin",0),Vn("cursorHeight",1,Dt,!0),Vn("singleCursorHeightPerLine",!0,Dt,!0),Vn("workTime",100),Vn("workDelay",100),Vn("flattenSpans",!0,i,!0),Vn("addModeClass",!1,i,!0),Vn("pollInterval",100),Vn("undoDepth",200,(function(t,e){t.doc.history.undoDepth=e})),Vn("historyEventDelay",1250),Vn("viewportMargin",10,(function(t){t.refresh()}),!0),Vn("maxHighlightLength",1e4,i,!0),Vn("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),Vn("tabindex",null,(function(t,e){t.display.input.getField().tabIndex=e||""})),Vn("autofocus",null);var ia=t.modes={},ra=t.mimeModes={};t.defineMode=function(e,n){t.defaults.mode||"null"==e||(t.defaults.mode=e),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),ia[e]=n},t.defineMIME=function(t,e){ra[t]=e},t.resolveMode=function(e){if("string"==typeof e&&ra.hasOwnProperty(e))e=ra[e];else if(e&&"string"==typeof e.name&&ra.hasOwnProperty(e.name)){var n=ra[e.name];"string"==typeof n&&(n={name:n}),(e=Ir(n,e)).name=n.name}else if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return t.resolveMode("application/xml");return"string"==typeof e?{name:e}:e||{name:"null"}},t.getMode=function(e,n){n=t.resolveMode(n);var i=ia[n.name];if(!i)return t.getMode(e,"text/plain");var r=i(e,n);if(oa.hasOwnProperty(n.name)){var o=oa[n.name];for(var a in o)o.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=o[a])}if(r.name=n.name,n.helperType&&(r.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)r[a]=n.modeProps[a];return r},t.defineMode("null",(function(){return{token:function(t){t.skipToEnd()}}})),t.defineMIME("text/plain","null");var oa=t.modeExtensions={};t.extendMode=function(t,e){Rr(e,oa.hasOwnProperty(t)?oa[t]:oa[t]={})},t.defineExtension=function(e,n){t.prototype[e]=n},t.defineDocExtension=function(t,e){Sa.prototype[t]=e},t.defineOption=Vn;var aa=[];t.defineInitHook=function(t){aa.push(t)};var sa=t.helpers={};t.registerHelper=function(e,n,i){sa.hasOwnProperty(e)||(sa[e]=t[e]={_global:[]}),sa[e][n]=i},t.registerGlobalHelper=function(e,n,i,r){t.registerHelper(e,n,r),sa[e]._global.push({pred:i,val:r})};var la=t.copyState=function(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var i in e){var r=e[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n},ua=t.startState=function(t,e,n){return!t.startState||t.startState(e,n)};t.innerMode=function(t,e){for(;t.innerMode;){var n=t.innerMode(e);if(!n||n.mode==t)break;e=n.state,t=n.mode}return n||{mode:t,state:e}};var ca=t.commands={selectAll:function(t){t.setSelection(Fo(t.firstLine(),0),Fo(t.lastLine()),Ra)},singleSelection:function(t){t.setSelection(t.getCursor("anchor"),t.getCursor("head"),Ra)},killLine:function(t){Hn(t,(function(e){if(e.empty()){var n=Xi(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)r=new Fo(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),Fo(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var a=Xi(t.doc,r.line-1).text;a&&t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),Fo(r.line-1,a.length-1),Fo(r.line,1),"+transpose")}n.push(new ht(r,r))}t.setSelections(n)}))},newlineAndIndent:function(t){Ae(t,(function(){for(var e=t.listSelections().length,n=0;e>n;n++){var i=t.listSelections()[n];t.replaceRange(t.doc.lineSeparator(),i.anchor,i.head,"+input"),t.indentLine(i.from().line+1,null,!0)}Fn(t)}))},openLine:function(t){t.replaceSelection("\n","start")},toggleOverwrite:function(t){t.toggleOverwrite()}},ha=t.keyMap={};ha.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ha.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ha.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},ha.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ha.default=Lo?ha.macDefault:ha.pcDefault,t.normalizeKeyMap=function(t){var e={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete t[n];continue}for(var r=Dr(n.split(" "),Zn),o=0;o=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pose},eatSpace:function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},skipToEnd:function(){this.pos=this.string.length},skipTo:function(t){var e=this.string.indexOf(t,this.pos);return e>-1?(this.pos=e,!0):void 0},backUp:function(t){this.pos-=t},column:function(){return this.lastColumnPos0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}var r=function(t){return n?t.toLowerCase():t};return r(this.string.substr(this.pos,t.length))==r(t)?(!1!==e&&(this.pos+=t.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}}};var ga=0,va=t.TextMarker=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++ga};Ar(va),va.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&_e(t),Er(this,"clear")){var n=this.find();n&&Sr(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;ot.display.maxLineLength&&(t.display.maxLine=l,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&je(t,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&At(t.doc)),t&&Sr(t,"markerCleared",t,this),e&&xe(t),this.parent&&this.parent.clear()}},va.prototype.find=function(t,e){null==t&&"bookmark"==this.type&&(t=1);for(var n,i,r=0;rn;++n){var r=this.lines[n];this.height-=r.height,Ei(r),Sr(r,"delete")}this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,n){this.height+=n,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var i=0;it;++t)if(n(this.lines[t]))return!0}},$i.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){this.size-=e;for(var n=0;nt){var o=Math.min(e,r-t),a=i.height;if(i.removeInner(t,o),this.height-=a-i.height,r==o&&(this.children.splice(n--,1),i.parent=null),0==(e-=o))break;t=0}else t-=r}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof Yi))){var s=[];this.collapse(s),this.children=[new Yi(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e=t){if(r.insertInner(t,e,n),r.lines&&r.lines.length>50){for(var a=r.lines.length%25+25,s=a;s10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=0;it){var a=Math.min(e,o-t);if(r.iterN(t,a,n))return!0;if(0==(e-=a))break;t=0}else t-=o}}};var ka=0,Sa=t.Doc=function(t,e,n,i){if(!(this instanceof Sa))return new Sa(t,e,n,i);null==n&&(n=0),$i.call(this,[new Yi([new _a("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var r=Fo(n,0);this.sel=ft(r),this.history=new or(null),this.id=++ka,this.modeOption=e,this.lineSep=i,this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),Zi(this,{from:r,to:r,text:t}),Tt(this,ft(r),Ra)};Sa.prototype=Ir($i.prototype,{constructor:Sa,iter:function(t,e,n){n?this.iterN(t-this.first,e-t,n):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var n=0,i=0;i=0;o--)Tn(this,i[o]);s?Ct(this,s):this.cm&&Fn(this.cm)})),undo:Pe((function(){En(this,"undo")})),redo:Pe((function(){En(this,"redo")})),undoSelection:Pe((function(){En(this,"undo",!0)})),redoSelection:Pe((function(){En(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,i=0;i=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,n){t=mt(this,t),e=mt(this,e);var i=[],r=t.line;return this.iter(t.line,e.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r})),i},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var i=0;it?(e=t,!0):(t-=o,void++n)})),mt(this,Fo(n,e))},indexFromPos:function(t){var e=(t=mt(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.tos||s>=e)return a+(e-o);a+=s-o,a+=n-a%n,o=s+1}},qa=t.findColumn=function(t,e,n){for(var i=0,r=0;;){var o=t.indexOf("\t",i);-1==o&&(o=t.length);var a=o-i;if(o==t.length||r+a>=e)return i+Math.min(a,e-r);if(r+=o-i,i=o+1,(r+=n-r%n)>=e)return i}},Ha=[""],Wa=function(t){t.select()};Eo?Wa=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:bo&&(Wa=function(t){try{t.select()}catch(t){}});var Ua,Va=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Za=t.isWordChar=function(t){return/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||Va.test(t))},Ya=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Ua=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var $a=t.contains=function(t,e){if(3==e.nodeType&&(e=e.parentNode),t.contains)return t.contains(e);do{if(11==e.nodeType&&(e=e.host),e==t)return!0}while(e=e.parentNode)};bo&&11>_o&&(Vr=function(){try{return document.activeElement}catch(t){return document.body}});var Ga,Ka,Xa=t.rmClass=function(t,e){var n=t.className,i=Zr(e).exec(n);if(i){var r=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(r?i[1]+r:"")}},Ja=t.addClass=function(t,e){var n=t.className;Zr(e).test(n)||(t.className+=(n?" ":"")+e)},Qa=!1,ts=function(){if(bo&&9>_o)return!1;var t=Hr("div");return"draggable"in t||"dragDrop"in t}(),es=t.splitLines=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],i=t.length;i>=e;){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var o=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),e+=a+1):(n.push(o),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},ns=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){try{var e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},is=function(){var t=Hr("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),rs=null,os=t.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var t=0;10>t;t++)os[t+48]=os[t+96]=String(t);for(t=65;90>=t;t++)os[t]=String.fromCharCode(t);for(t=1;12>=t;t++)os[t+111]=os[t+63235]="F"+t}();var as,ss=function(){function t(t){return 247>=t?n.charAt(t):t>=1424&&1524>=t?"R":t>=1536&&1773>=t?i.charAt(t-1536):t>=1774&&2220>=t?"r":t>=8192&&8203>=t?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/,u="L";return function(n){if(!r.test(n))return!1;for(var i=n.length,c=[],h=0;i>h;++h)c.push(v=t(n.charCodeAt(h)));h=0;for(var d=u;i>h;++h)"m"==(v=c[h])?c[h]=d:d=v;h=0;for(var f=u;i>h;++h)"1"==(v=c[h])&&"r"==f?c[h]="n":a.test(v)&&(f=v,"r"==v&&(c[h]="R"));for(h=1,d=c[0];i-1>h;++h)"+"==(v=c[h])&&"1"==d&&"1"==c[h+1]?c[h]="1":","!=v||d!=c[h+1]||"1"!=d&&"n"!=d||(c[h]=d),d=v;for(h=0;i>h;++h)if(","==(v=c[h]))c[h]="N";else if("%"==v){for(var p=h+1;i>p&&"%"==c[p];++p);for(var m=h&&"!"==c[h-1]||i>p&&"1"==c[p]?"1":"N",g=h;p>g;++g)c[g]=m;h=p-1}for(h=0,f=u;i>h;++h){var v=c[h];"L"==f&&"1"==v?c[h]="L":a.test(v)&&(f=v)}for(h=0;i>h;++h)if(o.test(c[h])){for(p=h+1;i>p&&o.test(c[p]);++p);var y="L"==(h?c[h-1]:u),b="L"==(i>p?c[p]:u);for(m=y||b?"L":"R",g=h;p>g;++g)c[g]=m;h=p-1}var _,w=[];for(h=0;i>h;)if(s.test(c[h])){var x=h;for(++h;i>h&&s.test(c[h]);++h);w.push(new e(0,x,h))}else{var k=h,S=w.length;for(++h;i>h&&"L"!=c[h];++h);for(g=k;h>g;)if(l.test(c[g])){g>k&&w.splice(S,0,new e(1,k,g));var C=g;for(++g;h>g&&l.test(c[g]);++g);w.splice(S,0,new e(2,C,g)),k=g}else++g;h>k&&w.splice(S,0,new e(1,k,h))}return 1==w[0].level&&(_=n.match(/^\s+/))&&(w[0].from=_[0].length,w.unshift(new e(0,0,_[0].length))),1==Pr(w).level&&(_=n.match(/\s+$/))&&(Pr(w).to-=_[0].length,w.push(new e(0,i-_[0].length,i))),2==w[0].level&&w.unshift(new e(1,w[0].to,w[0].to)),w[0].level!=Pr(w).level&&w.push(new e(w[0].level,i,i)),w}}();return t.version="5.15.2",t}))},{}],11:[function(t,e,n){var r;r=function(t){"use strict";var e=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;t.defineMode("gfm",(function(n,i){function r(t){return t.code=!1,null}var o=0,a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(t){return{code:t.code,codeBlock:t.codeBlock,ateSpace:t.ateSpace}},token:function(t,n){if(n.combineTokens=null,n.codeBlock)return t.match(/^```+/)?(n.codeBlock=!1,null):(t.skipToEnd(),null);if(t.sol()&&(n.code=!1),t.sol()&&t.match(/^```+/))return t.skipToEnd(),n.codeBlock=!0,null;if("`"===t.peek()){t.next();var r=t.pos;t.eatWhile("`");var a=1+t.pos-r;return n.code?a===o&&(n.code=!1):(o=a,n.code=!0),null}if(n.code)return t.next(),null;if(t.eatSpace())return n.ateSpace=!0,null;if((t.sol()||n.ateSpace)&&(n.ateSpace=!1,!1!==i.gitHubSpice)){if(t.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(t.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return t.match(e)&&"]("!=t.string.slice(t.start-2,t.start)&&(0==t.start||/\W/.test(t.string.charAt(t.start-1)))?(n.combineTokens=!0,"link"):(t.next(),null)},blankLine:r},s={underscoresBreakWords:!1,taskLists:!0,fencedCodeBlocks:"```",strikethrough:!0};for(var l in i)s[l]=i[l];return s.name="markdown",t.overlayMode(t.getMode(n,s),a)}),"markdown"),t.defineMIME("text/x-gfm","gfm")},"object"==typeof n&&"object"==typeof e?r(t("../../lib/codemirror"),t("../markdown/markdown"),t("../../addon/mode/overlay")):"function"==typeof i&&i.amd?i(["../../lib/codemirror","../markdown/markdown","../../addon/mode/overlay"],r):r(CodeMirror)},{"../../addon/mode/overlay":8,"../../lib/codemirror":10,"../markdown/markdown":12}],12:[function(t,e,n){var r;r=function(t){"use strict";t.defineMode("markdown",(function(e,n){function i(n){if(t.findModeByName){var i=t.findModeByName(n);i&&(n=i.mime||i.mimes[0])}var r=t.getMode(e,n);return"null"==r.name?null:r}function r(t,e,n){return e.f=e.inline=n,n(t,e)}function o(t,e,n){return e.f=e.block=n,n(t,e)}function a(t){return!t||!/\S/.test(t.string)}function s(t){return t.linkTitle=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,x&&t.f==u&&(t.f=p,t.block=l),t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine=null,null}function l(e,o){var s=e.sol(),l=!1!==o.list,u=o.indentedCode;o.indentedCode=!1,l&&(o.indentationDiff>=0?(o.indentationDiff<4&&(o.indentation-=o.indentationDiff),o.list=null):o.indentation>0?o.list=null:o.list=!1);var h=null;if(o.indentationDiff>=4)return e.skipToEnd(),u||a(o.prevLine)?(o.indentation-=4,o.indentedCode=!0,k.code):null;if(e.eatSpace())return null;if((h=e.match(A))&&h[1].length<=6)return o.header=h[1].length,n.highlightFormatting&&(o.formatting="header"),o.f=o.inline,d(o);if(!(a(o.prevLine)||o.quote||l||u)&&(h=e.match(L)))return o.header="="==h[0].charAt(0)?1:2,n.highlightFormatting&&(o.formatting="header"),o.f=o.inline,d(o);if(e.eat(">"))return o.quote=s?1:o.quote+1,n.highlightFormatting&&(o.formatting="quote"),e.eatSpace(),d(o);if("["===e.peek())return r(e,o,y);if(e.match(C,!0))return o.hr=!0,k.hr;if((a(o.prevLine)||l)&&(e.match(T,!1)||e.match(O,!1))){var f=null;for(e.match(T,!0)?f="ul":(e.match(O,!0),f="ol"),o.indentation=e.column()+e.current().length,o.list=!0;o.listStack&&e.column()")>-1)&&(n.f=p,n.block=l,n.htmlState=null)}return i}function c(t,e){return e.fencedChars&&t.match(e.fencedChars,!1)?(e.localMode=e.localState=null,e.f=e.block=h,null):e.localMode?e.localMode.token(t,e.localState):(t.skipToEnd(),k.code)}function h(t,e){t.match(e.fencedChars),e.block=l,e.f=p,e.fencedChars=null,n.highlightFormatting&&(e.formatting="code-block"),e.code=1;var i=d(e);return e.code=0,i}function d(t){var e=[];if(t.formatting){e.push(k.formatting),"string"==typeof t.formatting&&(t.formatting=[t.formatting]);for(var i=0;i=t.quote?e.push(k.formatting+"-"+t.formatting[i]+"-"+t.quote):e.push("error"))}if(t.taskOpen)return e.push("meta"),e.length?e.join(" "):null;if(t.taskClosed)return e.push("property"),e.length?e.join(" "):null;if(t.linkHref?e.push(k.linkHref,"url"):(t.strong&&e.push(k.strong),t.em&&e.push(k.em),t.strikethrough&&e.push(k.strikethrough),t.linkText&&e.push(k.linkText),t.code&&e.push(k.code)),t.header&&e.push(k.header,k.header+"-"+t.header),t.quote&&(e.push(k.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=t.quote?e.push(k.quote+"-"+t.quote):e.push(k.quote+"-"+n.maxBlockquoteDepth)),!1!==t.list){var r=(t.listStack.length-1)%3;r?1===r?e.push(k.list2):e.push(k.list3):e.push(k.list1)}return t.trailingSpaceNewLine?e.push("trailing-space-new-line"):t.trailingSpace&&e.push("trailing-space-"+(t.trailingSpace%2?"a":"b")),e.length?e.join(" "):null}function f(t,e){return t.match(M,!0)?d(e):void 0}function p(e,i){var r=i.text(e,i);if(void 0!==r)return r;if(i.list)return i.list=null,d(i);if(i.taskList)return"x"!==e.match(E,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,d(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&e.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),d(i);var a=e.sol(),s=e.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var c="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(e.match(new RegExp(c),!0))return k.linkHref}if("`"===s){var h=i.formatting;n.highlightFormatting&&(i.formatting="code"),e.eatWhile("`");var f=e.current().length;if(0==i.code)return i.code=f,d(i);if(f==i.code){var p=d(i);return i.code=0,p}return i.formatting=h,d(i)}if(i.code)return d(i);if("\\"===s&&(e.next(),n.highlightFormatting)){var v=d(i),y=k.formatting+"-escape";return v?v+" "+y:y}if("!"===s&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return e.match(/\[[^\]]*\]/),i.inline=i.f=g,k.image;if("["===s&&e.match(/[^\]]*\](\(.*\)| ?\[.*?\])/,!1))return i.linkText=!0,n.highlightFormatting&&(i.formatting="link"),d(i);if("]"===s&&i.linkText&&e.match(/\(.*?\)| ?\[.*?\]/,!1)){n.highlightFormatting&&(i.formatting="link");var v=d(i);return i.linkText=!1,i.inline=i.f=g,v}if("<"===s&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=m,n.highlightFormatting&&(i.formatting="link"),(v=d(i))?v+=" ":v="",v+k.linkInline;if("<"===s&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=m,n.highlightFormatting&&(i.formatting="link"),(v=d(i))?v+=" ":v="",v+k.linkEmail;if("<"===s&&e.match(/^(!--|\w)/,!1)){var b=e.string.indexOf(">",e.pos);if(-1!=b){var _=e.string.substring(e.start,b);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(_)&&(i.md_inside=!0)}return e.backUp(1),i.htmlState=t.startState(w),o(e,i,u)}if("<"===s&&e.match(/^\/\w*?>/))return i.md_inside=!1,"tag";var x=!1;if(!n.underscoresBreakWords&&"_"===s&&"_"!==e.peek()&&e.match(/(\w)/,!1)){var S=e.pos-2;if(S>=0){var C=e.string.charAt(S);"_"!==C&&C.match(/(\w)/,!1)&&(x=!0)}}if("*"===s||"_"===s&&!x)if(a&&" "===e.peek());else{if(i.strong===s&&e.eat(s))return n.highlightFormatting&&(i.formatting="strong"),p=d(i),i.strong=!1,p;if(!i.strong&&e.eat(s))return i.strong=s,n.highlightFormatting&&(i.formatting="strong"),d(i);if(i.em===s)return n.highlightFormatting&&(i.formatting="em"),p=d(i),i.em=!1,p;if(!i.em)return i.em=s,n.highlightFormatting&&(i.formatting="em"),d(i)}else if(" "===s&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return d(i);e.backUp(1)}if(n.strikethrough)if("~"===s&&e.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),p=d(i),i.strikethrough=!1,p;if(e.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),d(i)}else if(" "===s&&e.match(/^~~/,!0)){if(" "===e.peek())return d(i);e.backUp(2)}return" "===s&&(e.match(/ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),d(i)}function m(t,e){if(">"===t.next()){e.f=e.inline=p,n.highlightFormatting&&(e.formatting="link");var i=d(e);return i?i+=" ":i="",i+k.linkInline}return t.match(/^[^>]+/,!0),k.linkInline}function g(t,e){if(t.eatSpace())return null;var i=t.next();return"("===i||"["===i?(e.f=e.inline=v("("===i?")":"]",0),n.highlightFormatting&&(e.formatting="link-string"),e.linkHref=!0,d(e)):"error"}function v(t){return function(e,i){if(e.next()===t){i.f=i.inline=p,n.highlightFormatting&&(i.formatting="link-string");var r=d(i);return i.linkHref=!1,r}return e.match(N[t]),i.linkHref=!0,d(i)}}function y(t,e){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(e.f=b,t.next(),n.highlightFormatting&&(e.formatting="link"),e.linkText=!0,d(e)):r(t,e,p)}function b(t,e){if(t.match(/^\]:/,!0)){e.f=e.inline=_,n.highlightFormatting&&(e.formatting="link");var i=d(e);return e.linkText=!1,i}return t.match(/^([^\]\\]|\\.)+/,!0),k.linkText}function _(t,e){return t.eatSpace()?null:(t.match(/^[^\s]+/,!0),void 0===t.peek()?e.linkTitle=!0:t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),e.f=e.inline=p,k.linkHref+" url")}var w=t.getMode(e,"text/html"),x="null"==w.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.underscoresBreakWords&&(n.underscoresBreakWords=!0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var k={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"tag",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough"};for(var S in k)k.hasOwnProperty(S)&&n.tokenTypeOverrides[S]&&(k[S]=n.tokenTypeOverrides[S]);var C=/^([*\-_])(?:\s*\1){2,}\s*$/,T=/^[*\-+]\s+/,O=/^[0-9]+([.)])\s+/,E=/^\[(x| )\](?=\s)/,A=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,L=/^ *(?:\={1,}|-{1,})\s*$/,M=/^[^#!\[\]*_\\<>` "'(~]+/,P=new RegExp("^("+(!0===n.fencedCodeBlocks?"~~~+|```+":n.fencedCodeBlocks)+")[ \\t]*([\\w+#-]*)"),N={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\\]]|\\.)*\])*?(?=\])/},D={startState:function(){return{f:l,prevLine:null,thisLine:null,block:l,htmlState:null,indentation:0,inline:p,text:f,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,fencedChars:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&t.copyState(w,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?t.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkTitle:e.linkTitle,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,header:e.header,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedChars:e.fencedChars}},token:function(t,e){if(e.formatting=!1,t!=e.thisLine){var n=e.header||e.hr;if(e.header=0,e.hr=!1,t.match(/^\s*$/,!0)||n){if(s(e),!n)return null;e.prevLine=null}e.prevLine=e.thisLine,e.thisLine=t,e.taskList=!1,e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.f=e.block;var i=t.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(e.indentationDiff=Math.min(i-e.indentation,4),e.indentation=e.indentation+e.indentationDiff,i>0)return null}return e.f(t,e)},innerMode:function(t){return t.block==u?{state:t.htmlState,mode:w}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:D}},blankLine:s,getType:d,fold:"markdown"};return D}),"xml"),t.defineMIME("text/x-markdown","markdown")},"object"==typeof n&&"object"==typeof e?r(t("../../lib/codemirror"),t("../xml/xml"),t("../meta")):"function"==typeof i&&i.amd?i(["../../lib/codemirror","../xml/xml","../meta"],r):r(CodeMirror)},{"../../lib/codemirror":10,"../meta":13,"../xml/xml":14}],13:[function(t,e,n){var r;r=function(t){"use strict";t.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["pgp"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"CoffeeScript",mime:"text/x-coffeescript",mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"]},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Jade",mime:"text/x-jade",mode:"jade",ext:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"null",mode:"jinja2"},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mime:"text/n-triples",mode:"ntriples",ext:["nt"]},{name:"Objective C",mime:"text/x-objectivec",mode:"clike",ext:["m","mm"],alias:["objective-c","objc"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mime:"application/x-httpd-php",mode:"php",ext:["php","php3","php4","php5","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mime:"text/x-sh",mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mime:"text/x-yaml",mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var e=0;e-1&&e.substring(r+1,e.length);return o?t.findModeByExtension(o):void 0},t.findModeByName=function(e){e=e.toLowerCase();for(var n=0;n")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(u(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(x=t.eat("/")?"closeTag":"openTag",e.tokenize=a,"tag bracket"):"&"==i?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function a(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,x=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return x="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=s(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function s(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=a;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function u(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=u(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=u(t-1),n.tokenize(e,n)}}return"meta"}}function c(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(C.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!C.contextGrabbers.hasOwnProperty(n)||!C.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?m:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),k="tag",y):(k="error",p)}function m(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&C.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===C.matchClosing?(k="tag",g):(k="tag error",v)}return k="error",v}function g(t,e,n){return"endTag"!=t?(k="error",g):(h(n),f)}function v(t,e,n){return k="error",g(t,e,n)}function y(t,e,n){if("word"==t)return k="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||C.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new c(n,i,r==n.indented)),f}return k="error",y}function b(t,e,n){return"equals"==t?_:(C.allowMissing||(k="error"),y(t,e,n))}function _(t,e,n){return"string"==t?w:"word"==t&&C.allowUnquoted?(k="string",y):(k="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var x,k,S=i.indentUnit,C={},T=r.htmlMode?e:n;for(var O in T)C[O]=T[O];for(var O in r)C[O]=r[O];return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;x=null;var n=e.tokenize(t,e);return(n||x)&&"comment"!=n&&(k=null,e.state=e.state(x||n,t,e),k&&(n="error"==k?n+" error":k)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+S;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=a&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==C.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+S*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(t){t.state==_&&(t.state=y)}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})},"object"==typeof n&&"object"==typeof e?r(t("../../lib/codemirror")):"function"==typeof i&&i.amd?i(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],15:[function(t,e,n){n.read=function(t,e,n,i,r){var o,a,s=8*r-i-1,l=(1<>1,c=-7,h=n?r-1:0,d=n?-1:1,f=t[e+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=i;c>0;a=256*a+t[e+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),o-=u}return(f?-1:1)*a*Math.pow(2,o-i)},n.write=function(t,e,n,i,r,o){var a,s,l,u=8*o-r-1,c=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,p=i?1:-1,m=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*l-1)*Math.pow(2,r),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;t[n+f]=255&s,f+=p,s/=256,r-=8);for(a=a<0;t[n+f]=255&a,f+=p,a/=256,u-=8);t[n+f-p]|=128*m}},{}],16:[function(t,e,n){var i={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},{}],17:[function(t,e,r){(function(t){(function(){function t(t){this.tokens=[],this.tokens.links={},this.options=t||d.defaults,this.rules=f.normal,this.options.gfm&&(this.options.tables?this.rules=f.tables:this.rules=f.gfm)}function n(t,e){if(this.options=e||d.defaults,this.links=t,this.rules=p.normal,this.renderer=this.options.renderer||new o,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=p.breaks:this.rules=p.gfm:this.options.pedantic&&(this.rules=p.pedantic)}function o(t){this.options=t||{}}function a(t){this.tokens=[],this.token=null,this.options=t||d.defaults,this.options.renderer=this.options.renderer||new o,this.renderer=this.options.renderer,this.renderer.options=this.options}function s(t,e){return t.replace(e?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function l(t){return t.replace(/&([#\w]+);/g,(function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))}function u(t,e){return t=t.source,e=e||"",function n(i,r){return i?(r=(r=r.source||r).replace(/(^|[^\[])\^/g,"$1"),t=t.replace(i,r),n):new RegExp(t,e)}}function c(){}function h(t){for(var e,n,i=1;iAn error occured:
"+s(t.message+"",!0)+"
";throw t}}var f={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:c,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:c,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:c,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/,bullet:/(?:[*+-]|\d+\.)/,item:/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/};f.item=u(f.item,"gm")(/bull/g,f.bullet)(),f.list=u(f.list)(/bull/g,f.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+f.def.source+")")(),f.blockquote=u(f.blockquote)("def",f.def)(),f._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",f.html=u(f.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,f._tag)(),f.paragraph=u(f.paragraph)("hr",f.hr)("heading",f.heading)("lheading",f.lheading)("blockquote",f.blockquote)("tag","<"+f._tag)("def",f.def)(),f.normal=h({},f),f.gfm=h({},f.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),f.gfm.paragraph=u(f.paragraph)("(?!","(?!"+f.gfm.fences.source.replace("\\1","\\2")+"|"+f.list.source.replace("\\1","\\3")+"|")(),f.tables=h({},f.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=f,t.lex=function(e,n){return new t(n).lex(e)},t.prototype.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(t,!0)},t.prototype.token=function(t,e,n){var i,r,o,a,s,l,u,c,h;for(t=t.replace(/^ +$/gm,"");t;)if((o=this.rules.newline.exec(t))&&(t=t.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(t))t=t.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(t))t=t.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(t))t=t.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(e&&(o=this.rules.nptable.exec(t))){for(t=t.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},c=0;c ?/gm,""),this.token(o,e,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(t)){for(t=t.substring(o[0].length),a=o[2],this.tokens.push({type:"list_start",ordered:a.length>1}),i=!1,h=(o=o[0].match(this.rules.item)).length,c=0;h>c;c++)u=(l=o[c]).length,~(l=l.replace(/^ *([*+-]|\d+\.) +/,"")).indexOf("\n ")&&(u-=l.length,l=this.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+u+"}","gm"),"")),this.options.smartLists&&c!==h-1&&(a===(s=f.bullet.exec(o[c+1])[0])||a.length>1&&s.length>1||(t=o.slice(c+1).join("\n")+t,c=h-1)),r=i||/\n\n(?!\s*$)/.test(l),c!==h-1&&(i="\n"===l.charAt(l.length-1),r||(r=i)),this.tokens.push({type:r?"loose_item_start":"list_item_start"}),this.token(l,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(t))t=t.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&e&&(o=this.rules.def.exec(t)))t=t.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(e&&(o=this.rules.table.exec(t))){for(t=t.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:c,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:c,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/};p.link=u(p.link)("inside",p._inside)("href",p._href)(),p.reflink=u(p.reflink)("inside",p._inside)(),p.normal=h({},p),p.pedantic=h({},p.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),p.gfm=h({},p.normal,{escape:u(p.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:u(p.text)("]|","~]|")("|","|https?://|")()}),p.breaks=h({},p.gfm,{br:u(p.br)("{2,}","*")(),text:u(p.gfm.text)("{2,}","*")()}),n.rules=p,n.output=function(t,e,i){return new n(e,i).output(t)},n.prototype.output=function(t){for(var e,n,i,r,o="";t;)if(r=this.rules.escape.exec(t))t=t.substring(r[0].length),o+=r[1];else if(r=this.rules.autolink.exec(t))t=t.substring(r[0].length),"@"===r[2]?(n=":"===r[1].charAt(6)?this.mangle(r[1].substring(7)):this.mangle(r[1]),i=this.mangle("mailto:")+n):i=n=s(r[1]),o+=this.renderer.link(i,null,n);else if(this.inLink||!(r=this.rules.url.exec(t))){if(r=this.rules.tag.exec(t))!this.inLink&&/^/i.test(r[0])&&(this.inLink=!1),t=t.substring(r[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):s(r[0]):r[0];else if(r=this.rules.link.exec(t))t=t.substring(r[0].length),this.inLink=!0,o+=this.outputLink(r,{href:r[2],title:r[3]}),this.inLink=!1;else if((r=this.rules.reflink.exec(t))||(r=this.rules.nolink.exec(t))){if(t=t.substring(r[0].length),e=(r[2]||r[1]).replace(/\s+/g," "),!(e=this.links[e.toLowerCase()])||!e.href){o+=r[0].charAt(0),t=r[0].substring(1)+t;continue}this.inLink=!0,o+=this.outputLink(r,e),this.inLink=!1}else if(r=this.rules.strong.exec(t))t=t.substring(r[0].length),o+=this.renderer.strong(this.output(r[2]||r[1]));else if(r=this.rules.em.exec(t))t=t.substring(r[0].length),o+=this.renderer.em(this.output(r[2]||r[1]));else if(r=this.rules.code.exec(t))t=t.substring(r[0].length),o+=this.renderer.codespan(s(r[2],!0));else if(r=this.rules.br.exec(t))t=t.substring(r[0].length),o+=this.renderer.br();else if(r=this.rules.del.exec(t))t=t.substring(r[0].length),o+=this.renderer.del(this.output(r[1]));else if(r=this.rules.text.exec(t))t=t.substring(r[0].length),o+=this.renderer.text(s(this.smartypants(r[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else t=t.substring(r[0].length),i=n=s(r[1]),o+=this.renderer.link(i,null,n);return o},n.prototype.outputLink=function(t,e){var n=s(e.href),i=e.title?s(e.title):null;return"!"!==t[0].charAt(0)?this.renderer.link(n,i,this.output(t[1])):this.renderer.image(n,i,s(t[1]))},n.prototype.smartypants=function(t){return this.options.smartypants?t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):t},n.prototype.mangle=function(t){if(!this.options.mangle)return t;for(var e,n="",i=t.length,r=0;i>r;r++)e=t.charCodeAt(r),Math.random()>.5&&(e="x"+e.toString(16)),n+=""+e+";";return n},o.prototype.code=function(t,e,n){if(this.options.highlight){var i=this.options.highlight(t,e);null!=i&&i!==t&&(n=!0,t=i)}return e?''+(n?t:s(t,!0))+"\n
\n":""+(n?t:s(t,!0))+"\n
"},o.prototype.blockquote=function(t){return"\n"+t+"
\n"},o.prototype.html=function(t){return t},o.prototype.heading=function(t,e,n){return"\n"},o.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},o.prototype.list=function(t,e){var n=e?"ol":"ul";return"<"+n+">\n"+t+""+n+">\n"},o.prototype.listitem=function(t){return""+t+"\n"},o.prototype.paragraph=function(t){return""+t+"
\n"},o.prototype.table=function(t,e){return"\n"},o.prototype.tablerow=function(t){return"\n"+t+"
\n"},o.prototype.tablecell=function(t,e){var n=e.header?"th":"td";return(e.align?"<"+n+' style="text-align:'+e.align+'">':"<"+n+">")+t+""+n+">\n"},o.prototype.strong=function(t){return""+t+""},o.prototype.em=function(t){return""+t+""},o.prototype.codespan=function(t){return""+t+"
"},o.prototype.br=function(){return this.options.xhtml?"
":"
"},o.prototype.del=function(t){return""+t+""},o.prototype.link=function(t,e,n){if(this.options.sanitize){try{var i=decodeURIComponent(l(t)).replace(/[^\w:]/g,"").toLowerCase()}catch(t){return""}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:"))return""}var r='"+n+""},o.prototype.image=function(t,e,n){var i='":">")},o.prototype.text=function(t){return t},a.parse=function(t,e,n){return new a(e,n).parse(t)},a.prototype.parse=function(t){this.inline=new n(t.links,this.options,this.renderer),this.tokens=t.reverse();for(var e="";this.next();)e+=this.tok();return e},a.prototype.next=function(){return this.token=this.tokens.pop()},a.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},a.prototype.parseText=function(){for(var t=this.token.text;"text"===this.peek().type;)t+="\n"+this.next().text;return this.inline.output(t)},a.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var t,e,n,i,r="",o="";for(n="",t=0;ta;a++)for(var l=this.compoundRules[a],u=0,c=l.length;c>u;u++)this.compoundRuleCodes[l[u]]=[];for(var a in"ONLYINCOMPOUND"in this.flags&&(this.compoundRuleCodes[this.flags.ONLYINCOMPOUND]=[]),this.dictionaryTable=this._parseDIC(n),this.compoundRuleCodes)0==this.compoundRuleCodes[a].length&&delete this.compoundRuleCodes[a];for(a=0,s=this.compoundRules.length;s>a;a++){var h=this.compoundRules[a],d="";for(u=0,c=h.length;c>u;u++){var f=h[u];d+=f in this.compoundRuleCodes?"("+this.compoundRuleCodes[f].join("|")+")":f}this.compoundRules[a]=new RegExp(d,"i")}}return this};r.prototype={load:function(t){for(var e in t)this[e]=t[e];return this},_readFile:function(e,i){if(i||(i="utf8"),"undefined"!=typeof XMLHttpRequest){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.overrideMimeType&&r.overrideMimeType("text/plain; charset="+i),r.send(null),r.responseText}if(void 0!==t){var o=t("fs");try{if(o.existsSync(e)){var a=o.statSync(e),s=o.openSync(e,"r"),l=new n(a.size);return o.readSync(s,l,0,l.length,null),l.toString(i,0,l.length)}}catch(t){return""}}},_parseAFF:function(t){for(var e={},n=(t=this._removeAffixComments(t)).split("\n"),i=0,r=n.length;r>i;i++){var o=(b=n[i]).split(/\s+/),a=o[0];if("PFX"==a||"SFX"==a){for(var s=o[1],l=o[2],u=[],c=i+1,h=i+1+(y=parseInt(o[3],10));h>c;c++){var d=(_=(b=n[c]).split(/\s+/))[2],f=_[3].split("/"),p=f[0];"0"===p&&(p="");var m=this.parseRuleCodes(f[1]),g=_[4],v={};v.add=p,m.length>0&&(v.continuationClasses=m),"."!==g&&(v.match="SFX"===a?new RegExp(g+"$"):new RegExp("^"+g)),"0"!=d&&(v.remove="SFX"===a?new RegExp(d+"$"):d),u.push(v)}e[s]={type:a,combineable:"Y"==l,entries:u},i+=y}else if("COMPOUNDRULE"===a){var y;for(c=i+1,h=i+1+(y=parseInt(o[1],10));h>c;c++){var b,_=(b=n[c]).split(/\s+/);this.compoundRules.push(_[1])}i+=y}else"REP"===a?3===(_=b.split(/\s+/)).length&&this.replacementTable.push([_[1],_[2]]):this.flags[a]=o[1]}return e},_removeAffixComments:function(t){return(t=(t=(t=t.replace(/#.*$/gm,"")).replace(/^\s\s*/m,"").replace(/\s\s*$/m,"")).replace(/\n{2,}/g,"\n")).replace(/^\s\s*/,"").replace(/\s\s*$/,"")},_parseDIC:function(t){function e(t,e){t in i&&"object"==typeof i[t]||(i[t]=[]),i[t].push(e)}for(var n=(t=this._removeDicComments(t)).split("\n"),i={},r=1,o=n.length;o>r;r++){var a=n[r].split("/",2),s=a[0];if(a.length>1){var l=this.parseRuleCodes(a[1]);"NEEDAFFIX"in this.flags&&-1!=l.indexOf(this.flags.NEEDAFFIX)||e(s,l);for(var u=0,c=l.length;c>u;u++){var h=l[u],d=this.rules[h];if(d)for(var f=this._applyRule(s,d),p=0,m=f.length;m>p;p++){var g=f[p];if(e(g,[]),d.combineable)for(var v=u+1;c>v;v++){var y=l[v],b=this.rules[y];if(b&&b.combineable&&d.type!=b.type)for(var _=this._applyRule(g,b),w=0,x=_.length;x>w;w++)e(_[w],[])}}h in this.compoundRuleCodes&&this.compoundRuleCodes[h].push(s)}}else e(s.trim(),[])}return i},_removeDicComments:function(t){return t.replace(/^\t.*$/gm,"")},parseRuleCodes:function(t){if(!t)return[];if(!("FLAG"in this.flags))return t.split("");if("long"===this.flags.FLAG){for(var e=[],n=0,i=t.length;i>n;n+=2)e.push(t.substr(n,2));return e}return"num"===this.flags.FLAG?textCode.split(","):void 0},_applyRule:function(t,e){for(var n=e.entries,i=[],r=0,o=n.length;o>r;r++){var a=n[r];if(!a.match||t.match(a.match)){var s=t;if(a.remove&&(s=s.replace(a.remove,"")),"SFX"===e.type?s+=a.add:s=a.add+s,i.push(s),"continuationClasses"in a)for(var l=0,u=a.continuationClasses.length;u>l;l++){var c=this.rules[a.continuationClasses[l]];c&&(i=i.concat(this._applyRule(s,c)))}}}return i},check:function(t){var e=t.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(e))return!0;if(e.toUpperCase()===e){var n=e[0]+e.substring(1).toLowerCase();if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0}var i=e.toLowerCase();if(i!==e){if(this.hasFlag(i,"KEEPCASE"))return!1;if(this.checkExact(i))return!0}return!1},checkExact:function(t){var e=this.dictionaryTable[t];if(void 0===e){if("COMPOUNDMIN"in this.flags&&t.length>=this.flags.COMPOUNDMIN)for(var n=0,i=this.compoundRules.length;i>n;n++)if(t.match(this.compoundRules[n]))return!0;return!1}if("object"==typeof e){for(n=0,i=e.length;i>n;n++)if(!this.hasFlag(t,"ONLYINCOMPOUND",e[n]))return!0;return!1}},hasFlag:function(t,e,n){return!(!(e in this.flags)||(void 0===n&&(n=Array.prototype.concat.apply([],this.dictionaryTable[t])),!n||-1===n.indexOf(this.flags[e])))},alphabet:"",suggest:function(t,e){function n(t){for(var e=[],n=0,i=t.length;i>n;n++){for(var r=t[n],o=[],a=0,s=r.length+1;s>a;a++)o.push([r.substring(0,a),r.substring(a,r.length)]);var l=[];for(a=0,s=o.length;s>a;a++)(m=o[a])[1]&&l.push(m[0]+m[1].substring(1));var c=[];for(a=0,s=o.length;s>a;a++)(m=o[a])[1].length>1&&c.push(m[0]+m[1][1]+m[1][0]+m[1].substring(2));var h=[];for(a=0,s=o.length;s>a;a++)if((m=o[a])[1])for(var d=0,f=u.alphabet.length;f>d;d++)h.push(m[0]+u.alphabet[d]+m[1].substring(1));var p=[];for(a=0,s=o.length;s>a;a++){var m;if((m=o[a])[1])for(d=0,f=u.alphabet.length;f>d;d++)h.push(m[0]+u.alphabet[d]+m[1])}e=(e=(e=(e=e.concat(l)).concat(c)).concat(h)).concat(p)}return e}function i(t){for(var e=[],n=0;nc;c++)s[c]in l?l[s[c]]+=1:l[s[c]]=1;var d=[];for(var c in l)d.push([c,l[c]]);d.sort(r).reverse();var f=[];for(c=0,h=Math.min(e,d.length);h>c;c++)u.hasFlag(d[c][0],"NOSUGGEST")||f.push(d[c][0]);return f}if(e||(e=5),this.check(t))return[];for(var o=0,a=this.replacementTable.length;a>o;o++){var s=this.replacementTable[o];if(-1!==t.indexOf(s[0])){var l=t.replace(s[0],s[1]);if(this.check(l))return[l]}}var u=this;return u.alphabet="abcdefghijklmnopqrstuvwxyz",r(t)}},void 0!==e&&(e.exports=r)}).call(this,t("buffer").Buffer,"/node_modules/typo-js")},{buffer:3,fs:2}],19:[function(t,e,n){var i=t("codemirror");i.commands.tabAndIndentMarkdownList=function(t){var e=t.listSelections()[0].head;if(!1!==t.getStateAfter(e.line).list)t.execCommand("indentMore");else if(t.options.indentWithTabs)t.execCommand("insertTab");else{var n=Array(t.options.tabSize+1).join(" ");t.replaceSelection(n)}},i.commands.shiftTabAndUnindentMarkdownList=function(t){var e=t.listSelections()[0].head;if(!1!==t.getStateAfter(e.line).list)t.execCommand("indentLess");else if(t.options.indentWithTabs)t.execCommand("insertTab");else{var n=Array(t.options.tabSize+1).join(" ");t.replaceSelection(n)}}},{codemirror:10}],20:[function(t,e,n){"use strict";function i(t){return W?t.replace("Ctrl","Cmd"):t.replace("Cmd","Ctrl")}function r(t,e,n){t=t||{};var i=document.createElement("a");return e=null==e||e,t.title&&e&&(i.title=a(t.title,t.action,n),W&&(i.title=i.title.replace("Ctrl","⌘"),i.title=i.title.replace("Alt","⌥"))),i.tabIndex=-1,i.className=t.className,i}function o(){var t=document.createElement("i");return t.className="separator",t.innerHTML="|",t}function a(t,e,n){var r,o=t;return e&&n[r=Z(e)]&&(o+=" ("+i(n[r])+")"),o}function s(t,e){e=e||t.getCursor("start");var n=t.getTokenAt(e);if(!n.type)return{};for(var i,r,o=n.type.split(" "),a={},s=0;s=0&&!e(f=u.getLineHandle(o));o--);var v,y,b,_,w=n(u.getTokenAt({line:o,ch:1})).fencedChars;e(u.getLineHandle(c.line))?(v="",y=c.line):e(u.getLineHandle(c.line-1))?(v="",y=c.line-1):(v=w+"\n",y=c.line),e(u.getLineHandle(h.line))?(b="",_=h.line,0===h.ch&&(_+=1)):0!==h.ch&&e(u.getLineHandle(h.line+1))?(b="",_=h.line+1):(b=w+"\n",_=h.line+1),0===h.ch&&(_-=1),u.operation((function(){u.replaceRange(b,{line:_,ch:0},{line:_+(b?0:1),ch:0}),u.replaceRange(v,{line:y,ch:0},{line:y+(v?0:1),ch:0})})),u.setSelection({line:y+(v?1:0),ch:0},{line:_+(v?1:-1),ch:0}),u.focus()}else{var x=c.line;if(e(u.getLineHandle(c.line))&&("fenced"===i(u,c.line+1)?(o=c.line,x=c.line+1):(a=c.line,x=c.line-1)),void 0===o)for(o=x;o>=0&&!e(f=u.getLineHandle(o));o--);if(void 0===a)for(s=u.lineCount(),a=x;s>a&&!e(f=u.getLineHandle(a));a++);u.operation((function(){u.replaceRange("",{line:o,ch:0},{line:o+1,ch:0}),u.replaceRange("",{line:a-1,ch:0},{line:a,ch:0})})),u.focus()}else if("indented"===p){if(c.line!==h.line||c.ch!==h.ch)o=c.line,a=h.line,0===h.ch&&a--;else{for(o=c.line;o>=0;o--)if(!(f=u.getLineHandle(o)).text.match(/^\s*$/)&&"indented"!==i(u,o,f)){o+=1;break}for(s=u.lineCount(),a=c.line;s>a;a++)if(!(f=u.getLineHandle(a)).text.match(/^\s*$/)&&"indented"!==i(u,a,f)){a-=1;break}}var k=u.getLineHandle(a+1),S=k&&u.getTokenAt({line:a+1,ch:k.text.length-1});S&&n(S).indentedCode&&u.replaceRange("\n",{line:a+1,ch:0});for(var C=o;a>=C;C++)u.indentLine(C,"subtract");u.focus()}else{var T=c.line===h.line&&c.ch===h.ch&&0===c.ch,O=c.line!==h.line;T||O?r(u,c,h,l):L(u,!1,["`","`"])}}function f(t){P(t.codemirror,"quote")}function p(t){M(t.codemirror,"smaller")}function m(t){M(t.codemirror,"bigger")}function g(t){M(t.codemirror,void 0,1)}function v(t){M(t.codemirror,void 0,2)}function y(t){M(t.codemirror,void 0,3)}function b(t){P(t.codemirror,"unordered-list")}function _(t){P(t.codemirror,"ordered-list")}function w(t){D(t.codemirror)}function x(t){var e=t.codemirror,n=s(e),i=t.options,r="http://";return!(i.promptURLs&&(r=prompt(i.promptTexts.link),!r))&&void L(e,n.link,i.insertTexts.link,r)}function k(t){var e=t.codemirror,n=s(e),i=t.options,r="http://";return!(i.promptURLs&&(r=prompt(i.promptTexts.image),!r))&&void L(e,n.image,i.insertTexts.image,r)}function S(t){var e=t.codemirror,n=s(e),i=t.options;L(e,n.table,i.insertTexts.table)}function C(t){var e=t.codemirror,n=s(e),i=t.options;L(e,n.image,i.insertTexts.horizontalRule)}function T(t){var e=t.codemirror;e.undo(),e.focus()}function O(t){var e=t.codemirror;e.redo(),e.focus()}function E(t){var e=t.codemirror,n=e.getWrapperElement(),i=n.nextSibling,r=t.toolbarElements["side-by-side"],o=!1;/editor-preview-active-side/.test(i.className)?(i.className=i.className.replace(/\s*editor-preview-active-side\s*/g,""),r.className=r.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout((function(){e.getOption("fullScreen")||l(t),i.className+=" editor-preview-active-side"}),1),r.className+=" active",n.className+=" CodeMirror-sided",o=!0);var a=n.lastChild;if(/editor-preview-active/.test(a.className)){a.className=a.className.replace(/\s*editor-preview-active\s*/g,"");var s=t.toolbarElements.preview,u=n.previousSibling;s.className=s.className.replace(/\s*active\s*/g,""),u.className=u.className.replace(/\s*disabled-for-preview*/g,"")}var c=function(){i.innerHTML=t.options.previewRender(t.value(),i)};e.sideBySideRenderingFunction||(e.sideBySideRenderingFunction=c),o?(i.innerHTML=t.options.previewRender(t.value(),i),e.on("update",e.sideBySideRenderingFunction)):e.off("update",e.sideBySideRenderingFunction),e.refresh()}function A(t){var e=t.codemirror,n=e.getWrapperElement(),i=n.previousSibling,r=!!t.options.toolbar&&t.toolbarElements.preview,o=n.lastChild;o&&/editor-preview/.test(o.className)||((o=document.createElement("div")).className="editor-preview",n.appendChild(o)),/editor-preview-active/.test(o.className)?(o.className=o.className.replace(/\s*editor-preview-active\s*/g,""),r&&(r.className=r.className.replace(/\s*active\s*/g,""),i.className=i.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout((function(){o.className+=" editor-preview-active"}),1),r&&(r.className+=" active",i.className+=" disabled-for-preview")),o.innerHTML=t.options.previewRender(t.value(),o);var a=e.getWrapperElement().nextSibling;/editor-preview-active-side/.test(a.className)&&E(t)}function L(t,e,n,i){if(!/editor-preview-active/.test(t.getWrapperElement().lastChild.className)){var r,o=n[0],a=n[1],s=t.getCursor("start"),l=t.getCursor("end");i&&(a=a.replace("#url#",i)),e?(o=(r=t.getLine(s.line)).slice(0,s.ch),a=r.slice(s.ch),t.replaceRange(o+a,{line:s.line,ch:0})):(r=t.getSelection(),t.replaceSelection(o+r+a),s.ch+=o.length,s!==l&&(l.ch+=o.length)),t.setSelection(s,l),t.focus()}}function M(t,e,n){if(!/editor-preview-active/.test(t.getWrapperElement().lastChild.className)){for(var i=t.getCursor("start"),r=t.getCursor("end"),o=i.line;o<=r.line;o++)!function(i){var r=t.getLine(i),o=r.search(/[^#]/);r=void 0!==e?0>=o?"bigger"==e?"###### "+r:"# "+r:6==o&&"smaller"==e?r.substr(7):1==o&&"bigger"==e?r.substr(2):"bigger"==e?r.substr(1):"#"+r:1==n?0>=o?"# "+r:o==n?r.substr(o+1):"# "+r.substr(o+1):2==n?0>=o?"## "+r:o==n?r.substr(o+1):"## "+r.substr(o+1):0>=o?"### "+r:o==n?r.substr(o+1):"### "+r.substr(o+1),t.replaceRange(r,{line:i,ch:0},{line:i,ch:99999999999999})}(o);t.focus()}}function P(t,e){if(!/editor-preview-active/.test(t.getWrapperElement().lastChild.className)){for(var n=s(t),i=t.getCursor("start"),r=t.getCursor("end"),o={quote:/^(\s*)\>\s+/,"unordered-list":/^(\s*)(\*|\-|\+)\s+/,"ordered-list":/^(\s*)\d+\.\s+/},a={quote:"> ","unordered-list":"* ","ordered-list":"1. "},l=i.line;l<=r.line;l++)!function(i){var r=t.getLine(i);r=n[e]?r.replace(o[e],"$1"):a[e]+r,t.replaceRange(r,{line:i,ch:0},{line:i,ch:99999999999999})}(l);t.focus()}}function N(t,e,n,i){if(!/editor-preview-active/.test(t.codemirror.getWrapperElement().lastChild.className)){i=void 0===i?n:i;var r,o=t.codemirror,a=s(o),l=n,u=i,c=o.getCursor("start"),h=o.getCursor("end");a[e]?(l=(r=o.getLine(c.line)).slice(0,c.ch),u=r.slice(c.ch),"bold"==e?(l=l.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),u=u.replace(/(\*\*|__)/,"")):"italic"==e?(l=l.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),u=u.replace(/(\*|_)/,"")):"strikethrough"==e&&(l=l.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),u=u.replace(/(\*\*|~~)/,"")),o.replaceRange(l+u,{line:c.line,ch:0},{line:c.line,ch:99999999999999}),"bold"==e||"strikethrough"==e?(c.ch-=2,c!==h&&(h.ch-=2)):"italic"==e&&(c.ch-=1,c!==h&&(h.ch-=1))):(r=o.getSelection(),"bold"==e?r=(r=r.split("**").join("")).split("__").join(""):"italic"==e?r=(r=r.split("*").join("")).split("_").join(""):"strikethrough"==e&&(r=r.split("~~").join("")),o.replaceSelection(l+r+u),c.ch+=n.length,h.ch=c.ch+r.length),o.setSelection(c,h),o.focus()}}function D(t){if(!/editor-preview-active/.test(t.getWrapperElement().lastChild.className))for(var e,n=t.getCursor("start"),i=t.getCursor("end"),r=n.line;r<=i.line;r++)e=(e=t.getLine(r)).replace(/^[ ]*([# ]+|\*|\-|[> ]+|[0-9]+(.|\)))[ ]*/,""),t.replaceRange(e,{line:r,ch:0},{line:r,ch:99999999999999})}function j(t,e){for(var n in e)e.hasOwnProperty(n)&&(e[n]instanceof Array?t[n]=e[n].concat(t[n]instanceof Array?t[n]:[]):null!==e[n]&&"object"==typeof e[n]&&e[n].constructor===Object?t[n]=j(t[n]||{},e[n]):t[n]=e[n]);return t}function I(t){for(var e=1;e=19968?n[r].length:1;return i}function F(t){(t=t||{}).parent=this;var e=!0;if(!1===t.autoDownloadFontAwesome&&(e=!1),!0!==t.autoDownloadFontAwesome)for(var n=document.styleSheets,i=0;i-1&&(e=!1);if(e){var r=document.createElement("link");r.rel="stylesheet",r.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(r)}if(t.element)this.element=t.element;else if(null===t.element)return;if(void 0===t.toolbar)for(var o in t.toolbar=[],G)G.hasOwnProperty(o)&&(-1!=o.indexOf("separator-")&&t.toolbar.push("|"),(!0===G[o].default||t.showIcons&&t.showIcons.constructor===Array&&-1!=t.showIcons.indexOf(o))&&t.toolbar.push(o));t.hasOwnProperty("status")||(t.status=["autosave","lines","words","cursor"]),t.previewRender||(t.previewRender=function(t){return this.parent.markdown(t)}),t.parsingConfig=I({highlightFormatting:!0},t.parsingConfig||{}),t.insertTexts=I({},K,t.insertTexts||{}),t.promptTexts=X,t.blockStyles=I({},J,t.blockStyles||{}),t.shortcuts=I({},V,t.shortcuts||{}),null!=t.autosave&&null!=t.autosave.unique_id&&""!=t.autosave.unique_id&&(t.autosave.uniqueId=t.autosave.unique_id),this.options=t,this.render(),!t.initialValue||this.options.autosave&&!0===this.options.autosave.foundSavedValue||this.value(t.initialValue)}function B(){if("object"!=typeof localStorage)return!1;try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(t){return!1}return!0}var z=t("codemirror");t("codemirror/addon/edit/continuelist.js"),t("./codemirror/tablist"),t("codemirror/addon/display/fullscreen.js"),t("codemirror/mode/markdown/markdown.js"),t("codemirror/addon/mode/overlay.js"),t("codemirror/addon/display/placeholder.js"),t("codemirror/addon/selection/mark-selection.js"),t("codemirror/mode/gfm/gfm.js"),t("codemirror/mode/xml/xml.js");var q=t("codemirror-spell-checker"),H=t("marked"),W=/Mac/.test(navigator.platform),U={toggleBold:u,toggleItalic:c,drawLink:x,toggleHeadingSmaller:p,toggleHeadingBigger:m,drawImage:k,toggleBlockquote:f,toggleOrderedList:_,toggleUnorderedList:b,toggleCodeBlock:d,togglePreview:A,toggleStrikethrough:h,toggleHeading1:g,toggleHeading2:v,toggleHeading3:y,cleanBlock:w,drawTable:S,drawHorizontalRule:C,undo:T,redo:O,toggleSideBySide:E,toggleFullScreen:l},V={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},Z=function(t){for(var e in U)if(U[e]===t)return e;return null},Y=function(){var t=!1;return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0)}(navigator.userAgent||navigator.vendor||window.opera),t},$="",G={bold:{name:"bold",action:u,className:"fa fa-bold",title:"Bold",default:!0},italic:{name:"italic",action:c,className:"fa fa-italic",title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:h,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:p,className:"fa fa-header",title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:p,className:"fa fa-header fa-header-x fa-header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:m,className:"fa fa-header fa-header-x fa-header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:g,className:"fa fa-header fa-header-x fa-header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:v,className:"fa fa-header fa-header-x fa-header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:y,className:"fa fa-header fa-header-x fa-header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:d,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:f,className:"fa fa-quote-left",title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:b,className:"fa fa-list-ul",title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:_,className:"fa fa-list-ol",title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:w,className:"fa fa-eraser fa-clean-block",title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:x,className:"fa fa-link",title:"Create Link",default:!0},image:{name:"image",action:k,className:"fa fa-picture-o",title:"Insert Image",default:!0},table:{name:"table",action:S,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:C,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:A,className:"fa fa-eye no-disable",title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:E,className:"fa fa-columns no-disable no-mobile",title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:l,className:"fa fa-arrows-alt no-disable no-mobile",title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://simplemde.com/markdown-guide",className:"fa fa-question-circle",title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:T,className:"fa fa-undo no-disable",title:"Undo"},redo:{name:"redo",action:O,className:"fa fa-repeat no-disable",title:"Redo"}},K={link:["[","](#url#)"],image:["![](","#url#)"],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],horizontalRule:["","\n\n-----\n\n"]},X={link:"URL for the link:",image:"URL of the image:"},J={bold:"**",code:"```",italic:"*"};F.prototype.markdown=function(t){if(H){var e={};return this.options&&this.options.renderingConfig&&!1===this.options.renderingConfig.singleLineBreaks?e.breaks=!1:e.breaks=!0,this.options&&this.options.renderingConfig&&!0===this.options.renderingConfig.codeSyntaxHighlighting&&window.hljs&&(e.highlight=function(t){return window.hljs.highlightAuto(t).value}),H.setOptions(e),H(t)}},F.prototype.render=function(t){if(t||(t=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==t){this.element=t;var e,n,r=this.options,o=this,a={};for(var s in r.shortcuts)null!==r.shortcuts[s]&&null!==U[s]&&function(t){a[i(r.shortcuts[t])]=function(){U[t](o)}}(s);if(a.Enter="newlineAndIndentContinueMarkdownList",a.Tab="tabAndIndentMarkdownList",a["Shift-Tab"]="shiftTabAndUnindentMarkdownList",a.Esc=function(t){t.getOption("fullScreen")&&l(o)},document.addEventListener("keydown",(function(t){27==(t=t||window.event).keyCode&&o.codemirror.getOption("fullScreen")&&l(o)}),!1),!1!==r.spellChecker?(e="spell-checker",(n=r.parsingConfig).name="gfm",n.gitHubSpice=!1,q({codeMirrorInstance:z})):((e=r.parsingConfig).name="gfm",e.gitHubSpice=!1),this.codemirror=z.fromTextArea(t,{mode:e,backdrop:n,theme:"paper",tabSize:null!=r.tabSize?r.tabSize:2,indentUnit:null!=r.tabSize?r.tabSize:2,indentWithTabs:!1!==r.indentWithTabs,lineNumbers:!1,autofocus:!0===r.autofocus,extraKeys:a,lineWrapping:!1!==r.lineWrapping,allowDropFileTypes:["text/plain"],placeholder:r.placeholder||t.getAttribute("placeholder")||"",styleSelectedText:null==r.styleSelectedText||r.styleSelectedText}),!0===r.forceSync){var u=this.codemirror;u.on("change",(function(){u.save()}))}this.gui={},!1!==r.toolbar&&(this.gui.toolbar=this.createToolbar()),!1!==r.status&&(this.gui.statusbar=this.createStatusbar()),null!=r.autosave&&!0===r.autosave.enabled&&this.autosave(),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var c=this.codemirror;setTimeout(function(){c.refresh()}.bind(c),0)}},F.prototype.autosave=function(){if(B()){var t=this;if(null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return;null!=t.element.form&&null!=t.element.form&&t.element.form.addEventListener("submit",(function(){localStorage.removeItem("smde_"+t.options.autosave.uniqueId)})),!0!==this.options.autosave.loaded&&("string"==typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&""!=localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0),localStorage.setItem("smde_"+this.options.autosave.uniqueId,t.value());var e=document.getElementById("autosaved");if(null!=e&&null!=e&&""!=e){var n=new Date,i=n.getHours(),r=n.getMinutes(),o="am",a=i;a>=12&&(a=i-12,o="pm"),0==a&&(a=12),r=10>r?"0"+r:r,e.innerHTML="Autosaved: "+a+":"+r+" "+o}this.autosaveTimeoutId=setTimeout((function(){t.autosave()}),this.options.autosave.delay||1e4)}},F.prototype.clearAutosavedValue=function(){if(B()){if(null==this.options.autosave||null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return;localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}},F.prototype.createSideBySide=function(){var t=this.codemirror,e=t.getWrapperElement(),n=e.nextSibling;n&&/editor-preview-side/.test(n.className)||((n=document.createElement("div")).className="editor-preview-side",e.parentNode.insertBefore(n,e.nextSibling));var i=!1,r=!1;return t.on("scroll",(function(t){if(i)i=!1;else{r=!0;var e=t.getScrollInfo().height-t.getScrollInfo().clientHeight,o=parseFloat(t.getScrollInfo().top)/e,a=(n.scrollHeight-n.clientHeight)*o;n.scrollTop=a}})),n.onscroll=function(){if(r)r=!1;else{i=!0;var e=n.scrollHeight-n.clientHeight,o=parseFloat(n.scrollTop)/e,a=(t.getScrollInfo().height-t.getScrollInfo().clientHeight)*o;t.scrollTo(0,a)}},n},F.prototype.createToolbar=function(t){if((t=t||this.options.toolbar)&&0!==t.length){var e;for(e=0;e{"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}n.d(e,{Ay:()=>se});function u(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var c=u(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),h=u(/Edge/i),d=u(/firefox/i),f=u(/safari/i)&&!u(/chrome/i)&&!u(/android/i),p=u(/iP(ad|od|hone)/i),m=u(/chrome/i)&&u(/android/i),g={capture:!1,passive:!1};function v(t,e,n){t.addEventListener(e,n,!c&&g)}function y(t,e,n){t.removeEventListener(e,n,!c&&g)}function b(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function _(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function w(t,e,n,i){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&b(t,e):b(t,e))||i&&t===n)return t;if(t===n)break}while(t=_(t))}return null}var x,k=/\s+/g;function S(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var i=(" "+t.className+" ").replace(k," ").replace(" "+e+" "," ");t.className=(i+(n?" "+e:"")).replace(k," ")}}function C(t,e,n){var i=t&&t.style;if(i){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in i||-1!==e.indexOf("webkit")||(e="-webkit-"+e),i[e]=n+("string"==typeof n?"":"px")}}function T(t,e){var n="";if("string"==typeof t)n=t;else do{var i=C(t,"transform");i&&"none"!==i&&(n=i+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function O(t,e,n){if(t){var i=t.getElementsByTagName(e),r=0,o=i.length;if(n)for(;r=o:r<=o))return i;if(i===E())break;i=j(i,!1)}return!1}function M(t,e,n,i){for(var r=0,o=0,a=t.children;o2&&void 0!==arguments[2]?arguments[2]:{},i=n.evt,o=l(n,Y);V.pluginEvent.bind(zt)(t,e,r({dragEl:K,parentEl:X,ghostEl:J,rootEl:Q,nextEl:tt,lastDownEl:et,cloneEl:nt,cloneHidden:it,dragStarted:gt,putSortable:ut,activeSortable:zt.active,originalEvent:i,oldIndex:rt,oldDraggableIndex:at,newIndex:ot,newDraggableIndex:st,hideGhostForTarget:It,unhideGhostForTarget:Rt,cloneNowHidden:function(){it=!0},cloneNowShown:function(){it=!1},dispatchSortableEvent:function(t){G({sortable:e,name:t,originalEvent:i})}},o))};function G(t){Z(r({putSortable:ut,cloneEl:nt,targetEl:K,rootEl:Q,oldIndex:rt,oldDraggableIndex:at,newIndex:ot,newDraggableIndex:st},t))}var K,X,J,Q,tt,et,nt,it,rt,ot,at,st,lt,ut,ct,ht,dt,ft,pt,mt,gt,vt,yt,bt,_t,wt=!1,xt=!1,kt=[],St=!1,Ct=!1,Tt=[],Ot=!1,Et=[],At="undefined"!=typeof document,Lt=p,Mt=h||c?"cssFloat":"float",Pt=At&&!m&&!p&&"draggable"in document.createElement("div"),Nt=function(){if(At){if(c)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Dt=function(t,e){var n=C(t),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=M(t,0,e),o=M(t,1,e),a=r&&C(r),s=o&&C(o),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+A(r).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+A(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&"none"!==a.float){var c="left"===a.float?"left":"right";return!o||"both"!==s.clear&&s.clear!==c?"horizontal":"vertical"}return r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=i&&"none"===n[Mt]||o&&"none"===n[Mt]&&l+u>i)?"vertical":"horizontal"},jt=function(t){function e(t,n){return function(i,r,o,a){var s=i.options.group.name&&r.options.group.name&&i.options.group.name===r.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(i,r,o,a),n)(i,r,o,a);var l=(n?i:r).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},i=t.group;i&&"object"==o(i)||(i={name:i}),n.name=i.name,n.checkPull=e(i.pull,!0),n.checkPut=e(i.put),n.revertClone=i.revertClone,t.group=n},It=function(){!Nt&&J&&C(J,"display","none")},Rt=function(){!Nt&&J&&C(J,"display","")};At&&!m&&document.addEventListener("click",(function(t){if(xt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),xt=!1,!1}),!0);var Ft=function(t){if(K){t=t.touches?t.touches[0]:t;var e=(r=t.clientX,o=t.clientY,kt.some((function(t){var e=t[q].options.emptyInsertThreshold;if(e&&!P(t)){var n=A(t),i=r>=n.left-e&&r<=n.right+e,s=o>=n.top-e&&o<=n.bottom+e;return i&&s?a=t:void 0}})),a);if(e){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[q]._onDragOver(n)}}var r,o,a},Bt=function(t){K&&K.parentNode[q]._isOutsideThisEl(t.target)};function zt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=s({},e),t[q]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Dt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==zt.supportPointer&&"PointerEvent"in window&&!f,emptyInsertThreshold:5};for(var i in V.initializePlugins(this,t,n),n)!(i in e)&&(e[i]=n[i]);for(var r in jt(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&Pt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?v(t,"pointerdown",this._onTapStart):(v(t,"mousedown",this._onTapStart),v(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(t,"dragover",this),v(t,"dragenter",this)),kt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),s(this,H())}function qt(t,e,n,i,r,o,a,s){var l,u,d=t[q],f=d.options.onMove;return!window.CustomEvent||c||h?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=i,l.related=r||e,l.relatedRect=o||A(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),f&&(u=f.call(d,l,a)),u}function Ht(t){t.draggable=!1}function Wt(){Ot=!1}function Ut(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,i=0;n--;)i+=e.charCodeAt(n);return i.toString(36)}function Vt(t){return setTimeout(t,0)}function Zt(t){return clearTimeout(t)}zt.prototype={constructor:zt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(vt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,K):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,i=this.options,r=i.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,u=i.filter;if(function(t){Et.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var i=e[n];i.checked&&Et.push(i)}}(n),!K&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||i.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!f||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=w(s,i.draggable,n,!1))&&s.animated||et===s)){if(rt=N(s),at=N(s,i.draggable),"function"==typeof u){if(u.call(this,t,s,this))return G({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),$("filter",e,{evt:t}),void(r&&t.cancelable&&t.preventDefault())}else if(u&&(u=u.split(",").some((function(i){if(i=w(l,i.trim(),n,!1))return G({sortable:e,rootEl:i,name:"filter",targetEl:s,fromEl:n,toEl:n}),$("filter",e,{evt:t}),!0}))))return void(r&&t.cancelable&&t.preventDefault());i.handle&&!w(l,i.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var i,r=this,o=r.el,a=r.options,s=o.ownerDocument;if(n&&!K&&n.parentNode===o){var l=A(n);if(Q=o,X=(K=n).parentNode,tt=K.nextSibling,et=n,lt=a.group,zt.dragged=K,ct={target:K,clientX:(e||t).clientX,clientY:(e||t).clientY},pt=ct.clientX-l.left,mt=ct.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,K.style["will-change"]="all",i=function(){$("delayEnded",r,{evt:t}),zt.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!d&&r.nativeDraggable&&(K.draggable=!0),r._triggerDragStart(t,e),G({sortable:r,name:"choose",originalEvent:t}),S(K,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){O(K,t.trim(),Ht)})),v(s,"dragover",Ft),v(s,"mousemove",Ft),v(s,"touchmove",Ft),v(s,"mouseup",r._onDrop),v(s,"touchend",r._onDrop),v(s,"touchcancel",r._onDrop),d&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),$("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(h||c))i();else{if(zt.eventCanceled)return void this._onDrop();v(s,"mouseup",r._disableDelayedDrag),v(s,"touchend",r._disableDelayedDrag),v(s,"touchcancel",r._disableDelayedDrag),v(s,"mousemove",r._delayedDragTouchMoveHandler),v(s,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&v(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(i,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Ht(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._disableDelayedDrag),y(t,"touchend",this._disableDelayedDrag),y(t,"touchcancel",this._disableDelayedDrag),y(t,"mousemove",this._delayedDragTouchMoveHandler),y(t,"touchmove",this._delayedDragTouchMoveHandler),y(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,e?"touchmove":"mousemove",this._onTouchMove):(v(K,"dragend",this),v(Q,"dragstart",this._onDragStart));try{document.selection?Vt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(wt=!1,Q&&K){$("dragStarted",this,{evt:e}),this.nativeDraggable&&v(document,"dragover",Bt);var n=this.options;!t&&S(K,n.dragClass,!1),S(K,n.ghostClass,!0),zt.active=this,t&&this._appendGhost(),G({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ht){this._lastX=ht.clientX,this._lastY=ht.clientY,It();for(var t=document.elementFromPoint(ht.clientX,ht.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ht.clientX,ht.clientY))!==e;)e=t;if(K.parentNode[q]._isOutsideThisEl(t),e)do{if(e[q]){if(e[q]._onDragOver({clientX:ht.clientX,clientY:ht.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Rt()}},_onTouchMove:function(t){if(ct){var e=this.options,n=e.fallbackTolerance,i=e.fallbackOffset,r=t.touches?t.touches[0]:t,o=J&&T(J,!0),a=J&&o&&o.a,s=J&&o&&o.d,l=Lt&&_t&&D(_t),u=(r.clientX-ct.clientX+i.x)/(a||1)+(l?l[0]-Tt[0]:0)/(a||1),c=(r.clientY-ct.clientY+i.y)/(s||1)+(l?l[1]-Tt[1]:0)/(s||1);if(!zt.active&&!wt){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))r.right+o||t.clientY>i.bottom&&t.clientX>i.left:t.clientY>r.bottom+o||t.clientX>i.right&&t.clientY>i.top}(t,o,this)&&!g.animated){if(g===K)return W(!1);if(g&&a===t.target&&(s=g),s&&(n=A(s)),!1!==qt(Q,a,K,e,s,n,t,!!s))return H(),g&&g.nextSibling?a.insertBefore(K,g.nextSibling):a.appendChild(K),X=a,U(),W(!0)}else if(g&&function(t,e,n){var i=A(M(n.el,0,n.options,!0)),r=z(n.el,n.options,J),o=10;return e?t.clientXc+u*o/2:lh-bt)return-yt}else if(l>c+u*(1-r)/2&&lh-u*o/2))return l>c+u/2?1:-1;return 0}(t,s,n,o,k?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Ct,vt===s),0!==y){var D=N(K);do{D-=y,_=X.children[D]}while(_&&("none"===C(_,"display")||_===J))}if(0===y||_===s)return W(!1);vt=s,yt=y;var j=s.nextElementSibling,I=!1,R=qt(Q,a,K,e,s,n,t,I=1===y);if(!1!==R)return 1!==R&&-1!==R||(I=1===R),Ot=!0,setTimeout(Wt,30),H(),I&&!j?a.appendChild(K):s.parentNode.insertBefore(K,I?j:s),O&&F(O,0,E-O.scrollTop),X=K.parentNode,void 0===b||Ct||(bt=Math.abs(b-A(s)[T])),U(),W(!0)}if(a.contains(K))return W(!1)}return!1}function B(l,u){$(l,p,r({evt:t,isOwner:h,axis:o?"vertical":"horizontal",revert:i,dragRect:e,targetRect:n,canSort:d,fromSortable:f,target:s,completed:W,onMove:function(n,i){return qt(Q,a,K,e,n,A(n),t,i)},changed:U},u))}function H(){B("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function W(e){return B("dragOverCompleted",{insertion:e}),e&&(h?c._hideClone():c._showClone(p),p!==f&&(S(K,ut?ut.options.ghostClass:c.options.ghostClass,!1),S(K,l.ghostClass,!0)),ut!==p&&p!==zt.active?ut=p:p===zt.active&&ut&&(ut=null),f===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){B("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(s===K&&!K.animated||s===a&&!s.animated)&&(vt=null),l.dragoverBubble||t.rootEl||s===document||(K.parentNode[q]._isOutsideThisEl(t.target),!e&&Ft(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function U(){ot=N(K),st=N(K,l.draggable),G({sortable:p,name:"change",toEl:a,newIndex:ot,newDraggableIndex:st,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){y(document,"mousemove",this._onTouchMove),y(document,"touchmove",this._onTouchMove),y(document,"pointermove",this._onTouchMove),y(document,"dragover",Ft),y(document,"mousemove",Ft),y(document,"touchmove",Ft)},_offUpEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._onDrop),y(t,"touchend",this._onDrop),y(t,"pointerup",this._onDrop),y(t,"touchcancel",this._onDrop),y(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;ot=N(K),st=N(K,n.draggable),$("drop",this,{evt:t}),X=K&&K.parentNode,ot=N(K),st=N(K,n.draggable),zt.eventCanceled||(wt=!1,Ct=!1,St=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Zt(this.cloneId),Zt(this._dragStartId),this.nativeDraggable&&(y(document,"drop",this),y(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),f&&C(document.body,"user-select",""),C(K,"transform",""),t&&(gt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),J&&J.parentNode&&J.parentNode.removeChild(J),(Q===X||ut&&"clone"!==ut.lastPutMode)&&nt&&nt.parentNode&&nt.parentNode.removeChild(nt),K&&(this.nativeDraggable&&y(K,"dragend",this),Ht(K),K.style["will-change"]="",gt&&!wt&&S(K,ut?ut.options.ghostClass:this.options.ghostClass,!1),S(K,this.options.chosenClass,!1),G({sortable:this,name:"unchoose",toEl:X,newIndex:null,newDraggableIndex:null,originalEvent:t}),Q!==X?(ot>=0&&(G({rootEl:X,name:"add",toEl:X,fromEl:Q,originalEvent:t}),G({sortable:this,name:"remove",toEl:X,originalEvent:t}),G({rootEl:X,name:"sort",toEl:X,fromEl:Q,originalEvent:t}),G({sortable:this,name:"sort",toEl:X,originalEvent:t})),ut&&ut.save()):ot!==rt&&ot>=0&&(G({sortable:this,name:"update",toEl:X,originalEvent:t}),G({sortable:this,name:"sort",toEl:X,originalEvent:t})),zt.active&&(null!=ot&&-1!==ot||(ot=rt,st=at),G({sortable:this,name:"end",toEl:X,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){$("nulling",this),Q=K=X=J=tt=nt=et=it=ct=ht=gt=ot=st=rt=at=vt=yt=ut=lt=zt.dragged=zt.ghost=zt.clone=zt.active=null,Et.forEach((function(t){t.checked=!0})),Et.length=dt=ft=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":K&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,i=0,r=n.length,o=this.options;i{e(t)}))}class e{constructor(){this._events=void 0,this._events={}}on(e,n){t(e,(t=>{const e=this._events[t]||[];e.push(n),this._events[t]=e}))}off(e,n){var i=arguments.length;0!==i?t(e,(t=>{if(1===i)return void delete this._events[t];const e=this._events[t];void 0!==e&&(e.splice(e.indexOf(n),1),this._events[t]=e)})):this._events={}}trigger(e,...n){var i=this;t(e,(t=>{const e=i._events[t];void 0!==e&&e.forEach((t=>{t.apply(i,n)}))}))}}function n(t){return t.plugins={},class extends t{constructor(...t){super(...t),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(e,n){t.plugins[e]={name:e,fn:n}}initializePlugins(t){var e,n;const i=this,r=[];if(Array.isArray(t))t.forEach((t=>{"string"==typeof t?r.push(t):(i.plugins.settings[t.name]=t.options,r.push(t.name))}));else if(t)for(e in t)t.hasOwnProperty(e)&&(i.plugins.settings[e]=t[e],r.push(e));for(;n=r.shift();)i.require(n)}loadPlugin(e){var n=this,i=n.plugins,r=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');i.requested[e]=!0,i.loaded[e]=r.fn.apply(n,[n.plugins.settings[e]||{}]),i.names.push(e)}require(t){var e=this,n=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(n.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return n.loaded[t]}}}const i=t=>(t=t.filter(Boolean)).length<2?t[0]||"":1==l(t)?"["+t.join("")+"]":"(?:"+t.join("|")+")",r=t=>{if(!a(t))return t.join("");let e="",n=0;const i=()=>{n>1&&(e+="{"+n+"}")};return t.forEach(((r,o)=>{r!==t[o-1]?(i(),e+=r,n=1):n++})),i(),e},o=t=>{let e=c(t);return i(e)},a=t=>new Set(t).size!==t.length,s=t=>(t+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),l=t=>t.reduce(((t,e)=>Math.max(t,u(e))),0),u=t=>c(t).length,c=t=>Array.from(t),h=t=>{if(1===t.length)return[[t]];let e=[];const n=t.substring(1);return h(n).forEach((function(n){let i=n.slice(0);i[0]=t.charAt(0)+i[0],e.push(i),i=n.slice(0),i.unshift(t.charAt(0)),e.push(i)})),e},d=[[0,65535]],f="[̀-ͯ·ʾʼ]";let p,m;const g=3,v={},y={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let t in y){let e=y[t]||"";for(let n=0;n{void 0===p&&(p=T(t||d))},w=(t,e="NFKD")=>t.normalize(e),x=t=>c(t).reduce(((t,e)=>t+k(e)),""),k=t=>(t=w(t).toLowerCase().replace(b,(t=>v[t]||"")),w(t,"NFC"));function*S(t){for(const[e,n]of t)for(let t=e;t<=n;t++){let e=String.fromCharCode(t),n=x(e);n!=e.toLowerCase()&&(n.length>g||0!=n.length&&(yield{folded:n,composed:e,code_point:t}))}}const C=t=>{const e={},n=(t,n)=>{const i=e[t]||new Set,r=new RegExp("^"+o(i)+"$","iu");n.match(r)||(i.add(s(n)),e[t]=i)};for(let e of S(t))n(e.folded,e.folded),n(e.folded,e.composed);return e},T=t=>{const e=C(t),n={};let r=[];for(let t in e){let i=e[t];i&&(n[t]=o(i)),t.length>1&&r.push(s(t))}r.sort(((t,e)=>e.length-t.length));const a=i(r);return m=new RegExp("^"+a,"u"),n},O=(t,e=1)=>{let n=0;return t=t.map((t=>(p[t]&&(n+=t.length),p[t]||t))),n>=e?r(t):""},E=(t,e=1)=>(e=Math.max(e,t.length-1),i(h(t).map((t=>O(t,e))))),A=(t,e=!0)=>{let n=t.length>1?1:0;return i(t.map((t=>{let i=[];const o=e?t.length():t.length()-1;for(let e=0;e{for(const n of e){if(n.start!=t.start||n.end!=t.end)continue;if(n.substrs.join("")!==t.substrs.join(""))continue;let e=t.parts;const i=t=>{for(const n of e){if(n.start===t.start&&n.substr===t.substr)return!1;if(1!=t.length&&1!=n.length){if(t.startn.start)return!0;if(n.startt.start)return!0}}return!1};if(!(n.parts.filter(i).length>0))return!0}return!1};class M{constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(t){t&&(this.parts.push(t),this.substrs.push(t.substr),this.start=Math.min(t.start,this.start),this.end=Math.max(t.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let n=new M,i=JSON.parse(JSON.stringify(this.parts)),r=i.pop();for(const t of i)n.add(t);let o=e.substr.substring(0,t-r.start),a=o.length;return n.add({start:r.start,end:r.start+a,length:a,substr:o}),n}}const P=t=>{_(),t=x(t);let e="",n=[new M];for(let i=0;i0){s=s.sort(((t,e)=>t.length()-e.length()));for(let t of s)L(t,n)||n.push(t)}else if(i>0&&1==l.size&&!l.has("3")){e+=A(n,!1);let t=new M;const i=n[0];i&&t.add(i.last()),n=[t]}}return e+=A(n,!0),e},N=(t,e)=>{if(t)return t[e]},D=(t,e)=>{if(t){for(var n,i=e.split(".");(n=i.shift())&&(t=t[n]););return t}},j=(t,e,n)=>{var i,r;return t?(t+="",null==e.regex||-1===(r=t.search(e.regex))?0:(i=e.string.length/t.length,0===r&&(i+=.5),i*n)):0},I=(t,e)=>{var n=t[e];if("function"==typeof n)return n;n&&!Array.isArray(n)&&(t[e]=[n])},R=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},F=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t(e=x(e+"").toLowerCase())?1:e>t?-1:0;class B{constructor(t,e){this.items=void 0,this.settings=void 0,this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,n){if(!t||!t.length)return[];const i=[],r=t.split(/\s+/);var o;return n&&(o=new RegExp("^("+Object.keys(n).map(s).join("|")+"):(.*)$")),r.forEach((t=>{let n,r=null,a=null;o&&(n=t.match(o))&&(r=n[1],t=n[2]),t.length>0&&(a=this.settings.diacritics?P(t)||null:s(t),a&&e&&(a="\\b"+a)),i.push({string:t,regex:a?new RegExp(a,"iu"):null,field:r})})),i}getScoreFunction(t,e){var n=this.prepareSearch(t,e);return this._getScoreFunction(n)}_getScoreFunction(t){const e=t.tokens,n=e.length;if(!n)return function(){return 0};const i=t.options.fields,r=t.weights,o=i.length,a=t.getAttrFn;if(!o)return function(){return 1};const s=1===o?function(t,e){const n=i[0].field;return j(a(e,n),t,r[n]||1)}:function(t,e){var n=0;if(t.field){const i=a(e,t.field);!t.regex&&i?n+=1/o:n+=j(i,t,1)}else R(r,((i,r)=>{n+=j(a(e,r),t,i)}));return n/o};return 1===n?function(t){return s(e[0],t)}:"and"===t.options.conjunction?function(t){var i,r=0;for(let n of e){if((i=s(n,t))<=0)return 0;r+=i}return r/n}:function(t){var i=0;return R(e,(e=>{i+=s(e,t)})),i/n}}getSortFunction(t,e){var n=this.prepareSearch(t,e);return this._getSortFunction(n)}_getSortFunction(t){var e,n=[];const i=this,r=t.options,o=!t.query&&r.sort_empty?r.sort_empty:r.sort;if("function"==typeof o)return o.bind(this);const a=function(e,n){return"$score"===e?n.score:t.getAttrFn(i.items[n.id],e)};if(o)for(let e of o)(t.query||"$score"!==e.field)&&n.push(e);if(t.query){e=!0;for(let t of n)if("$score"===t.field){e=!1;break}e&&n.unshift({field:"$score",direction:"desc"})}else n=n.filter((t=>"$score"!==t.field));return n.length?function(t,e){var i,r;for(let o of n)if(r=o.field,i=("desc"===o.direction?-1:1)*F(a(r,t),a(r,e)))return i;return 0}:null}prepareSearch(t,e){const n={};var i=Object.assign({},e);if(I(i,"sort"),I(i,"sort_empty"),i.fields){I(i,"fields");const t=[];i.fields.forEach((e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),n[e.field]="weight"in e?e.weight:1})),i.fields=t}return{options:i,query:t.toLowerCase().trim(),tokens:this.tokenize(t,i.respect_word_boundaries,n),total:0,items:[],weights:n,getAttrFn:i.nesting?D:N}}search(t,e){var n,i,r=this;i=this.prepareSearch(t,e),e=i.options,t=i.query;const o=e.score||r._getScoreFunction(i);t.length?R(r.items,((t,r)=>{n=o(t),(!1===e.filter||n>0)&&i.items.push({score:n,id:r})})):R(r.items,((t,e)=>{i.items.push({score:1,id:e})}));const a=r._getSortFunction(i);return a&&i.items.sort(a),i.total=i.items.length,"number"==typeof e.limit&&(i.items=i.items.slice(0,e.limit)),i}}const z=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},q=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(H(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},H=t=>"string"==typeof t&&t.indexOf("<")>-1,W=t=>t.replace(/['"\\]/g,"\\$&"),U=(t,e)=>{var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!1),t.dispatchEvent(n)},V=(t,e)=>{Object.assign(t.style,e)},Z=(t,...e)=>{var n=$(e);(t=G(t)).map((t=>{n.map((e=>{t.classList.add(e)}))}))},Y=(t,...e)=>{var n=$(e);(t=G(t)).map((t=>{n.map((e=>{t.classList.remove(e)}))}))},$=t=>{var e=[];return z(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\11\12\14\15\40]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},G=t=>(Array.isArray(t)||(t=[t]),t),K=(t,e,n)=>{if(!n||n.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},X=(t,e=0)=>e>0?t[t.length-1]:t[0],J=t=>0===Object.keys(t).length,Q=(t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var n=0;t=t.previousElementSibling;)t.matches(e)&&n++;return n},tt=(t,e)=>{z(e,((e,n)=>{null==e?t.removeAttribute(n):t.setAttribute(n,""+e)}))},et=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},nt=(t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=new RegExp(e,"i")}const n=t=>{var n=t.data.match(e);if(n&&t.data.length>0){var i=document.createElement("span");i.className="highlight";var r=t.splitText(n.index);r.splitText(n[0].length);var o=r.cloneNode(!0);return i.appendChild(o),et(r,i),1}return 0},i=t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach((t=>{r(t)}))},r=t=>3===t.nodeType?n(t):(i(t),0);r(t)},it=t=>{var e=t.querySelectorAll("span.highlight");Array.prototype.forEach.call(e,(function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()}))},rt=65,ot=13,at=27,st=37,lt=38,ut=39,ct=40,ht=8,dt=46,ft=9,pt="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var mt={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,refreshThrottle:300,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};const gt=t=>null==t?null:vt(t),vt=t=>"boolean"==typeof t?t?"1":"0":t+"",yt=t=>(t+"").replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),bt=(t,e)=>e>0?setTimeout(t,e):(t.call(null),null),_t=(t,e)=>{var n;return function(i,r){var o=this;n&&(o.loading=Math.max(o.loading-1,0),clearTimeout(n)),n=setTimeout((function(){n=null,o.loadedSearches[i]=!0,t.call(o,i,r)}),e)}},wt=(t,e,n)=>{var i,r=t.trigger,o={};for(i of(t.trigger=function(){var n=arguments[0];if(-1===e.indexOf(n))return r.apply(t,arguments);o[n]=arguments},n.apply(t,[]),t.trigger=r,e))i in o&&r.apply(t,o[i])},xt=t=>({start:t.selectionStart||0,length:(t.selectionEnd||0)-(t.selectionStart||0)}),kt=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},St=(t,e,n,i)=>{t.addEventListener(e,n,i)},Ct=(t,e)=>!!e&&!!e[t]&&1==(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0),Tt=(t,e)=>{const n=t.getAttribute("id");return n||(t.setAttribute("id",e),e)},Ot=t=>t.replace(/[\\"']/g,"\\$&"),Et=(t,e)=>{e&&t.append(e)};function At(t,e){var n=Object.assign({},mt,e),i=n.dataAttr,r=n.labelField,o=n.valueField,a=n.disabledField,s=n.optgroupField,l=n.optgroupLabelField,u=n.optgroupValueField,c=t.tagName.toLowerCase(),h=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!h&&!n.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(h=e.textContent)}var d={placeholder:h,options:[],optgroups:[],items:[],maxItems:null},f=()=>{const e=t.getAttribute(i);if(e)d.options=JSON.parse(e),z(d.options,(t=>{d.items.push(t[o])}));else{var a=t.value.trim()||"";if(!n.allowEmptyOption&&!a.length)return;const e=a.split(n.delimiter);z(e,(t=>{const e={};e[r]=t,e[o]=t,d.options.push(e)})),d.items=e}};return"select"===c?(()=>{var e,c=d.options,h={},f=1;let p=0;var m=t=>{var e=Object.assign({},t.dataset),n=i&&e[i];return"string"==typeof n&&n.length&&(e=Object.assign(e,JSON.parse(n))),e},g=(t,e)=>{var i=gt(t.value);if(null!=i&&(i||n.allowEmptyOption)){if(h.hasOwnProperty(i)){if(e){var l=h[i][s];l?Array.isArray(l)?l.push(e):h[i][s]=[l,e]:h[i][s]=e}}else{var u=m(t);u[r]=u[r]||t.textContent,u[o]=u[o]||i,u[a]=u[a]||t.disabled,u[s]=u[s]||e,u.$option=t,u.$order=u.$order||++p,h[i]=u,c.push(u)}t.selected&&d.items.push(i)}},v=t=>{var e,n;(n=m(t))[l]=n[l]||t.getAttribute("label")||"",n[u]=n[u]||f++,n[a]=n[a]||t.disabled,n.$order=n.$order||++p,d.optgroups.push(n),e=n[u],z(t.children,(t=>{g(t,e)}))};d.maxItems=t.hasAttribute("multiple")?null:1,z(t.children,(t=>{"optgroup"===(e=t.tagName.toLowerCase())?v(t):"option"===e&&g(t)}))})():f(),Object.assign({},mt,d,e)}var Lt=0;class Mt extends(n(e)){constructor(t,e){var n;super(),this.control_input=void 0,this.wrapper=void 0,this.dropdown=void 0,this.control=void 0,this.dropdown_content=void 0,this.focus_node=void 0,this.order=0,this.settings=void 0,this.input=void 0,this.tabIndex=void 0,this.is_select_tag=void 0,this.rtl=void 0,this.inputId=void 0,this._destroy=void 0,this.sifter=void 0,this.isOpen=!1,this.isDisabled=!1,this.isReadOnly=!1,this.isRequired=void 0,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.currentResults=void 0,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.refreshTimeout=null,Lt++;var i=q(t);if(i.tomselect)throw new Error("Tom Select already initialized on this element");i.tomselect=this,n=(window.getComputedStyle&&window.getComputedStyle(i,null)).getPropertyValue("direction");const r=At(i,e);this.settings=r,this.input=i,this.tabIndex=i.tabIndex||0,this.is_select_tag="select"===i.tagName.toLowerCase(),this.rtl=/rtl/i.test(n),this.inputId=Tt(i,"tomselect-"+Lt),this.isRequired=i.required,this.sifter=new B(this.options,{diacritics:r.diacritics}),r.mode=r.mode||(1===r.maxItems?"single":"multi"),"boolean"!=typeof r.hideSelected&&(r.hideSelected="multi"===r.mode),"boolean"!=typeof r.hidePlaceholder&&(r.hidePlaceholder="multi"!==r.mode);var o=r.createFilter;"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?r.createFilter=t=>o.test(t):r.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(r.plugins),this.setupCallbacks(),this.setupTemplates();const a=q(""),s=q("
"),l=this._render("dropdown"),u=q('
'),c=this.input.getAttribute("class")||"",h=r.mode;var d;Z(a,r.wrapperClass,c,h),Z(s,r.controlClass),Et(a,s),Z(l,r.dropdownClass,h),r.copyClassesToDropdown&&Z(l,c),Z(u,r.dropdownContentClass),Et(l,u),q(r.dropdownParent||a).appendChild(l),H(r.controlInput)?(d=q(r.controlInput),R(["autocorrect","autocapitalize","autocomplete","spellcheck"],(t=>{i.getAttribute(t)&&tt(d,{[t]:i.getAttribute(t)})})),d.tabIndex=-1,s.appendChild(d),this.focus_node=d):r.controlInput?(d=q(r.controlInput),this.focus_node=d):(d=q("
"),this.focus_node=s),this.wrapper=a,this.dropdown=l,this.dropdown_content=u,this.control=s,this.control_input=d,this.setup()}setup(){const t=this,e=t.settings,n=t.control_input,i=t.dropdown,r=t.dropdown_content,o=t.wrapper,a=t.control,l=t.input,u=t.focus_node,c={passive:!0},h=t.inputId+"-ts-dropdown";tt(r,{id:h}),tt(u,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":h});const d=Tt(u,t.inputId+"-ts-control"),f="label[for='"+W(t.inputId)+"']",p=document.querySelector(f),m=t.focus.bind(t);if(p){St(p,"click",m),tt(p,{for:d});const e=Tt(p,t.inputId+"-ts-label");tt(u,{"aria-labelledby":e}),tt(r,{"aria-labelledby":e})}if(o.style.width=l.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");Z([o,i],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&tt(l,{multiple:"multiple"}),e.placeholder&&tt(n,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+s(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=_t(e.load,e.loadThrottle)),St(i,"mousemove",(()=>{t.ignoreHover=!1})),St(i,"mouseenter",(e=>{var n=K(e.target,"[data-selectable]",i);n&&t.onOptionHover(e,n)}),{capture:!0}),St(i,"click",(e=>{const n=K(e.target,"[data-selectable]");n&&(t.onOptionSelect(e,n),kt(e,!0))})),St(a,"click",(e=>{var i=K(e.target,"[data-ts-item]",a);i&&t.onItemSelect(e,i)?kt(e,!0):""==n.value&&(t.onClick(),kt(e,!0))})),St(u,"keydown",(e=>t.onKeyDown(e))),St(n,"keypress",(e=>t.onKeyPress(e))),St(n,"input",(e=>t.onInput(e))),St(u,"blur",(e=>t.onBlur(e))),St(u,"focus",(e=>t.onFocus(e))),St(n,"paste",(e=>t.onPaste(e)));const g=e=>{const r=e.composedPath()[0];if(!o.contains(r)&&!i.contains(r))return t.isFocused&&t.blur(),void t.inputState();r==n&&t.isOpen?e.stopPropagation():kt(e,!0)},v=()=>{t.isOpen&&t.positionDropdown()};St(document,"mousedown",g),St(window,"scroll",v,c),St(window,"resize",v,c),this._destroy=()=>{document.removeEventListener("mousedown",g),window.removeEventListener("scroll",v),window.removeEventListener("resize",v),p&&p.removeEventListener("click",m)},this.revertSettings={innerHTML:l.innerHTML,tabIndex:l.tabIndex},l.tabIndex=-1,l.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,St(l,"invalid",(()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())})),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,l.disabled?t.disable():l.readOnly?t.setReadOnly(!0):t.enable(),t.on("change",this.onChange),Z(l,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),R(e,(t=>{this.registerOptionGroup(t)}))}setupTemplates(){var t=this,e=t.settings.labelField,n=t.settings.optgroupLabelField,i={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'",option:(t,n)=>"
"+n(t[e])+"
",item:(t,n)=>"
"+n(t[e])+"
",option_create:(t,e)=>'
Add '+e(t.input)+"…
",no_results:()=>'
No results found
',loading:()=>'
',not_loading:()=>{},dropdown:()=>"
"};t.settings.render=Object.assign({},i,t.settings.render)}setupCallbacks(){var t,e,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in n)(e=this.settings[n[t]])&&this.on(t,e)}sync(t=!0){const e=this,n=t?At(e.input,{delimiter:e.settings.delimiter}):e.settings;e.setupOptions(n.options,n.optgroups),e.setValue(n.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){U(this.input,"input"),U(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?kt(t):e.settings.splitOn&&setTimeout((()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var n=t.trim().split(e.settings.splitOn);R(n,(t=>{gt(t)&&(this.options[t]?e.addItem(t):e.createItem(t))}))}}),0)}onKeyPress(t){var e=this;if(!e.isLocked){var n=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&n===e.settings.delimiter?(e.createItem(),void kt(t)):void 0}kt(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)t.keyCode!==ft&&kt(t);else{switch(t.keyCode){case rt:if(Ct(pt,t)&&""==e.control_input.value)return kt(t),void e.selectAll();break;case at:return e.isOpen&&(kt(t,!0),e.close()),void e.clearActiveItems();case ct:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void kt(t);case lt:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void kt(t);case ot:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),kt(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&kt(t));case st:return void e.advanceSelection(-1,t);case ut:return void e.advanceSelection(1,t);case ft:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),kt(t)),e.settings.create&&e.createItem()&&kt(t)));case ht:case dt:return void e.deleteSelection(t)}e.isInputHidden&&!Ct(pt,t)&&kt(t)}}onInput(t){if(this.isLocked)return;const e=this.inputValue();this.lastValue!==e&&(this.lastValue=e,""!=e?(this.refreshTimeout&&clearTimeout(this.refreshTimeout),this.refreshTimeout=bt((()=>{this.refreshTimeout=null,this._onInput()}),this.settings.refreshThrottle)):this._onInput())}_onInput(){const t=this.lastValue;this.settings.shouldLoad.call(this,t)&&this.load(t),this.refreshOptions(),this.trigger("type",t)}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,n=e.isFocused;if(e.isDisabled||e.isReadOnly)return e.blur(),void kt(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),n||e.trigger("focus"),e.activeItems.length||(e.inputState(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var n=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,n):n()}}}onOptionSelect(t,e){var n,i=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?i.createItem(null,(()=>{i.settings.closeAfterSelect&&i.close()})):void 0!==(n=e.dataset.value)&&(i.lastQuery=null,i.addItem(n),i.settings.closeAfterSelect&&i.close(),!i.settings.hideSelected&&t.type&&/click/.test(t.type)&&i.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var n=this;return!n.isLocked&&"multi"===n.settings.mode&&(kt(t),n.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;Z(e.wrapper,e.settings.loadingClass),e.loading++;const n=e.loadCallback.bind(e);e.settings.load.call(e,t,n)}loadCallback(t,e){const n=this;n.loading=Math.max(n.loading-1,0),n.lastQuery=null,n.clearActiveOption(),n.setupOptions(t,e),n.refreshOptions(n.isFocused&&!n.isInputHidden),n.loading||Y(n.wrapper,n.settings.loadingClass),n.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,U(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){wt(this,e?[]:["change"],(()=>{this.clear(e),this.addItems(t,e)}))}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var n,i,r,o,a,s,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.inputState());if("click"===(n=e&&e.type.toLowerCase())&&Ct("shiftKey",e)&&l.activeItems.length){for(s=l.getLastActive(),(r=Array.prototype.indexOf.call(l.control.children,s))>(o=Array.prototype.indexOf.call(l.control.children,t))&&(a=r,r=o,o=a),i=r;i<=o;i++)t=l.control.children[i],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);kt(e)}else"click"===n&&Ct(pt,e)||"keydown"===n&&Ct("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.inputState(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,n=e.control.querySelector(".last-active");n&&Y(n,"last-active"),Z(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),Y(t,"active")}clearActiveItems(){Y(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,tt(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),tt(t,{"aria-selected":"true"}),Z(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const n=this.dropdown_content,i=n.clientHeight,r=n.scrollTop||0,o=t.offsetHeight,a=t.getBoundingClientRect().top-n.getBoundingClientRect().top+r;a+o>i+r?this.scroll(a-i+o,e):a
{t.setActiveItemClass(e)})))}inputState(){var t=this;t.control.contains(t.control_input)&&(tt(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&tt(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||t.isReadOnly||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout((()=>{t.ignoreFocus=!1,t.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,n,i=this,r=this.getSearchOptions();if(i.settings.score&&"function"!=typeof(n=i.settings.score.call(i,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==i.lastQuery?(i.lastQuery=t,e=i.sifter.search(t,Object.assign(r,{score:n})),i.currentResults=e):e=Object.assign({},i.currentResults),i.settings.hideSelected&&(e.items=e.items.filter((t=>{let e=gt(t.id);return!(e&&-1!==i.items.indexOf(e))}))),e}refreshOptions(t=!0){var e,n,i,r,o,a,s,l,u,c;const h={},d=[];var f=this,p=f.inputValue();const m=p===f.lastQuery||""==p&&null==f.lastQuery;var g=f.search(p),v=null,y=f.settings.shouldOpen||!1,b=f.dropdown_content;m&&(v=f.activeOption)&&(u=v.closest("[data-group]")),r=g.items.length,"number"==typeof f.settings.maxOptions&&(r=Math.min(r,f.settings.maxOptions)),r>0&&(y=!0);const _=(t,e)=>{let n=h[t];if(void 0!==n){let t=d[n];if(void 0!==t)return[n,t.fragment]}let i=document.createDocumentFragment();return n=d.length,d.push({fragment:i,order:e,optgroup:t}),[n,i]};for(e=0;e0&&(c=c.cloneNode(!0),tt(c,{id:s.$id+"-clone-"+n,"aria-selected":null}),c.classList.add("ts-cloned"),Y(c,"active"),f.activeOption&&f.activeOption.dataset.value==r&&u&&u.dataset.group===o.toString()&&(v=c)),l.appendChild(c),""!=o&&(h[o]=i)}}f.settings.lockOptgroupOrder&&d.sort(((t,e)=>t.order-e.order)),s=document.createDocumentFragment(),R(d,(t=>{let e=t.fragment,n=t.optgroup;if(!e||!e.children.length)return;let i=f.optgroups[n];if(void 0!==i){let t=document.createDocumentFragment(),n=f.render("optgroup_header",i);Et(t,n),Et(t,e);let r=f.render("optgroup",{group:i,options:t});Et(s,r)}else Et(s,e)})),b.innerHTML="",Et(b,s),f.settings.highlight&&(it(b),g.query.length&&g.tokens.length&&R(g.tokens,(t=>{nt(b,t.regex)})));var w=t=>{let e=f.render(t,{input:p});return e&&(y=!0,b.insertBefore(e,b.firstChild)),e};if(f.loading?w("loading"):f.settings.shouldLoad.call(f,p)?0===g.items.length&&w("no_results"):w("not_loading"),(l=f.canCreate(p))&&(c=w("option_create")),f.hasOptions=g.items.length>0||l,y){if(g.items.length>0){if(v||"single"!==f.settings.mode||null==f.items[0]||(v=f.getOption(f.items[0])),!b.contains(v)){let t=0;c&&!f.settings.addPrecedence&&(t=1),v=f.selectable()[t]}}else c&&(v=c);t&&!f.isOpen&&(f.open(),f.scrollToOption(v,"auto")),f.setActiveOption(v)}else f.clearActiveOption(),t&&f.isOpen&&f.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const n=this;if(Array.isArray(t))return n.addOptions(t,e),!1;const i=gt(t[n.settings.valueField]);return null!==i&&!n.options.hasOwnProperty(i)&&(t.$order=t.$order||++n.order,t.$id=n.inputId+"-opt-"+t.$order,n.options[i]=t,n.lastQuery=null,e&&(n.userOptions[i]=e,n.trigger("option_add",i,t)),i)}addOptions(t,e=!1){R(t,(t=>{this.addOption(t,e)}))}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=gt(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var n;e[this.settings.optgroupValueField]=t,(n=this.registerOptionGroup(e))&&this.trigger("optgroup_add",n,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const n=this;var i,r;const o=gt(t),a=gt(e[n.settings.valueField]);if(null===o)return;const s=n.options[o];if(null==s)return;if("string"!=typeof a)throw new Error("Value must be set in option data");const l=n.getOption(o),u=n.getItem(o);if(e.$order=e.$order||s.$order,delete n.options[o],n.uncacheValue(a),n.options[a]=e,l){if(n.dropdown_content.contains(l)){const t=n._render("option",e);et(l,t),n.activeOption===l&&n.setActiveOption(t)}l.remove()}u&&(-1!==(r=n.items.indexOf(o))&&n.items.splice(r,1,a),i=n._render("item",e),u.classList.contains("active")&&Z(i,"active"),et(u,i)),n.lastQuery=null}removeOption(t,e){const n=this;t=vt(t),n.uncacheValue(t),delete n.userOptions[t],delete n.options[t],n.lastQuery=null,n.trigger("option_remove",t),n.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const n={};R(this.options,((t,i)=>{e(t,i)&&(n[i]=t)})),this.options=this.sifter.items=n,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const n=gt(t);if(null===n)return null;const i=this.options[n];if(null!=i){if(i.$div)return i.$div;if(e)return this._render("option",i)}return null}getAdjacent(t,e,n="option"){var i,r=this;if(!t)return null;i="item"==n?r.controlChildren():r.dropdown_content.querySelectorAll("[data-selectable]");for(let n=0;n0?i[n+1]:i[n-1];return null}getItem(t){if("object"==typeof t)return t;var e=gt(t);return null!==e?this.control.querySelector(`[data-value="${Ot(e)}"]`):null}addItems(t,e){var n=this,i=Array.isArray(t)?t:[t];const r=(i=i.filter((t=>-1===n.items.indexOf(t))))[i.length-1];i.forEach((t=>{n.isPending=t!==r,n.addItem(t,e)}))}addItem(t,e){wt(this,e?[]:["change","dropdown_close"],(()=>{var n,i;const r=this,o=r.settings.mode,a=gt(t);if((!a||-1===r.items.indexOf(a)||("single"===o&&r.close(),"single"!==o&&r.settings.duplicates))&&null!==a&&r.options.hasOwnProperty(a)&&("single"===o&&r.clear(e),"multi"!==o||!r.isFull())){if(n=r._render("item",r.options[a]),r.control.contains(n)&&(n=n.cloneNode(!0)),i=r.isFull(),r.items.splice(r.caretPos,0,a),r.insertAtCaret(n),r.isSetup){if(!r.isPending&&r.settings.hideSelected){let t=r.getOption(a),e=r.getAdjacent(t,1);e&&r.setActiveOption(e)}r.isPending||r.settings.closeAfterSelect||r.refreshOptions(r.isFocused&&"single"!==o),0!=r.settings.closeAfterSelect&&r.isFull()?r.close():r.isPending||r.positionDropdown(),r.trigger("item_add",a,n),r.isPending||r.updateOriginalInput({silent:e})}(!r.isPending||!i&&r.isFull())&&(r.inputState(),r.refreshState())}}))}removeItem(t=null,e){const n=this;if(!(t=n.getItem(t)))return;var i,r;const o=t.dataset.value;i=Q(t),t.remove(),t.classList.contains("active")&&(r=n.activeItems.indexOf(t),n.activeItems.splice(r,1),Y(t,"active")),n.items.splice(i,1),n.lastQuery=null,!n.settings.persist&&n.userOptions.hasOwnProperty(o)&&n.removeOption(o,e),i{})){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var n,i=this,r=i.caretPos;if(t=t||i.inputValue(),!i.canCreate(t))return e(),!1;i.lock();var o=!1,a=t=>{if(i.unlock(),!t||"object"!=typeof t)return e();var n=gt(t[i.settings.valueField]);if("string"!=typeof n)return e();i.setTextboxValue(),i.addOption(t,!0),i.setCaret(r),i.addItem(n),e(t),o=!0};return n="function"==typeof i.settings.create?i.settings.create.call(this,t,a):{[i.settings.labelField]:t,[i.settings.valueField]:t},o||a(n),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),n=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const i=t.wrapper.classList;i.toggle("focus",t.isFocused),i.toggle("disabled",t.isDisabled),i.toggle("readonly",t.isReadOnly),i.toggle("required",t.isRequired),i.toggle("invalid",!t.isValid),i.toggle("locked",n),i.toggle("full",e),i.toggle("input-active",t.isFocused&&!t.isInputHidden),i.toggle("dropdown-active",t.isOpen),i.toggle("has-options",J(t.options)),i.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var n,i;const r=e.input.querySelector('option[value=""]');if(e.is_select_tag){const o=[],a=e.input.querySelectorAll("option:checked").length;function s(t,n,i){return t||(t=q('")),t!=r&&e.input.append(t),o.push(t),(t!=r||a>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach((t=>{t.selected=!1})),0==e.items.length&&"single"==e.settings.mode?s(r,"",""):e.items.forEach((t=>{n=e.options[t],i=n[e.settings.labelField]||"",o.includes(n.$option)?s(e.input.querySelector(`option[value="${Ot(t)}"]:not(:checked)`),t,i):n.$option=s(n.$option,t,i)}))}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,tt(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),V(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),V(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,n=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.inputState()),e.isOpen=!1,tt(e.focus_node,{"aria-expanded":"false"}),V(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),n&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),n=t.offsetHeight+e.top+window.scrollY,i=e.left+window.scrollX;V(this.dropdown,{width:e.width+"px",top:n+"px",left:i+"px"})}}clear(t){var e=this;if(e.items.length){var n=e.controlChildren();R(n,(t=>{e.removeItem(t,!0)})),e.inputState(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,n=e.caretPos,i=e.control;i.insertBefore(t,i.children[n]||null),e.setCaret(n+1)}deleteSelection(t){var e,n,i,r,o=this;e=t&&t.keyCode===ht?-1:1,n=xt(o.control_input);const a=[];if(o.activeItems.length)r=X(o.activeItems,e),i=Q(r),e>0&&i++,R(o.activeItems,(t=>a.push(t)));else if((o.isFocused||"single"===o.settings.mode)&&o.items.length){const t=o.controlChildren();let i;e<0&&0===n.start&&0===n.length?i=t[o.caretPos-1]:e>0&&n.start===o.inputValue().length&&(i=t[o.caretPos]),void 0!==i&&a.push(i)}if(!o.shouldDelete(a,t))return!1;for(kt(t,!0),void 0!==i&&o.setCaret(i);a.length;)o.removeItem(a.pop());return o.inputState(),o.positionDropdown(),o.refreshOptions(!1),!0}shouldDelete(t,e){const n=t.map((t=>t.dataset.value));return!(!n.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(n,e))}advanceSelection(t,e){var n,i,r=this;r.rtl&&(t*=-1),r.inputValue().length||(Ct(pt,e)||Ct("shiftKey",e)?(i=(n=r.getLastActive(t))?n.classList.contains("active")?r.getAdjacent(n,t,"item"):n:t>0?r.control_input.nextElementSibling:r.control_input.previousElementSibling)&&(i.classList.contains("active")&&r.removeActiveItem(n),r.setActiveItemClass(i)):r.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var n=this.control.querySelectorAll(".active");return n?X(n,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(t=this.isReadOnly||this.isDisabled){this.isLocked=t,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(t){this.focus_node.tabIndex=t?-1:this.tabIndex,this.isDisabled=t,this.input.disabled=t,this.control_input.disabled=t,this.setLocked()}setReadOnly(t){this.isReadOnly=t,this.input.readOnly=t,this.control_input.readOnly=t,this.setLocked()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,Y(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var n,i;const r=this;if("function"!=typeof this.settings.render[t])return null;if(!(i=r.settings.render[t].call(this,e,yt)))return null;if(i=q(i),"option"===t||"option_create"===t?e[r.settings.disabledField]?tt(i,{"aria-disabled":"true"}):tt(i,{"data-selectable":""}):"optgroup"===t&&(n=e.group[r.settings.optgroupValueField],tt(i,{"data-group":n}),e.group[r.settings.disabledField]&&tt(i,{"data-disabled":""})),"option"===t||"item"===t){const n=vt(e[r.settings.valueField]);tt(i,{"data-value":n}),"item"===t?(Z(i,r.settings.itemClass),tt(i,{"data-ts-item":""})):(Z(i,r.settings.optionClass),tt(i,{role:"option",id:e.$id}),e.$div=i,r.options[n]=e)}return i}_render(t,e){const n=this.render(t,e);if(null==n)throw"HTMLElement expected";return n}clearCache(){R(this.options,(t=>{t.$div&&(t.$div.remove(),delete t.$div)}))}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,n){var i=this,r=i[e];i[e]=function(){var e,o;return"after"===t&&(e=r.apply(i,arguments)),o=n.apply(i,arguments),"instead"===t?o:("before"===t&&(e=r.apply(i,arguments)),e)}}}function Pt(){St(this.input,"change",(()=>{this.sync()}))}function Nt(t){var e=this,n=e.onOptionSelect;e.settings.hideSelected=!1;const i=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},t);var r=function(t,e){e?(t.checked=!0,i.uncheckedClassNames&&t.classList.remove(...i.uncheckedClassNames),i.checkedClassNames&&t.classList.add(...i.checkedClassNames)):(t.checked=!1,i.checkedClassNames&&t.classList.remove(...i.checkedClassNames),i.uncheckedClassNames&&t.classList.add(...i.uncheckedClassNames))},o=function(t){setTimeout((()=>{var e=t.querySelector("input."+i.className);e instanceof HTMLInputElement&&r(e,t.classList.contains("selected"))}),1)};e.hook("after","setupTemplates",(()=>{var t=e.settings.render.option;e.settings.render.option=(n,o)=>{var a=q(t.call(e,n,o)),s=document.createElement("input");i.className&&s.classList.add(i.className),s.addEventListener("click",(function(t){kt(t)})),s.type="checkbox";const l=gt(n[e.settings.valueField]);return r(s,!!(l&&e.items.indexOf(l)>-1)),a.prepend(s),a}})),e.on("item_remove",(t=>{var n=e.getOption(t);n&&(n.classList.remove("selected"),o(n))})),e.on("item_add",(t=>{var n=e.getOption(t);n&&o(n)})),e.hook("instead","onOptionSelect",((t,i)=>{if(i.classList.contains("selected"))return i.classList.remove("selected"),e.removeItem(i.dataset.value),e.refreshOptions(),void kt(t,!0);n.call(e,t,i),o(i)}))}function Dt(t){const e=this,n=Object.assign({className:"clear-button",title:"Clear All",html:t=>`⨯
`},t);e.on("initialize",(()=>{var t=q(n.html(n));t.addEventListener("click",(t=>{e.isLocked||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),t.preventDefault(),t.stopPropagation())})),e.control.appendChild(t)}))}const jt=(t,e)=>{var n;null==(n=t.parentNode)||n.insertBefore(e,t.nextSibling)},It=(t,e)=>{var n;null==(n=t.parentNode)||n.insertBefore(e,t)},Rt=(t,e)=>{do{var n;if(t==(e=null==(n=e)?void 0:n.previousElementSibling))return!0}while(e&&e.previousElementSibling);return!1};function Ft(){var t=this;if("multi"!==t.settings.mode)return;var e=t.lock,n=t.unlock;let i,r=!0;t.hook("after","setupTemplates",(()=>{var e=t.settings.render.item;t.settings.render.item=(n,o)=>{const a=q(e.call(t,n,o));tt(a,{draggable:"true"});const s=t=>{i=a,setTimeout((()=>{a.classList.add("ts-dragging")}),0)},l=t=>{t.preventDefault(),a.classList.add("ts-drag-over"),c(a,i)},u=()=>{a.classList.remove("ts-drag-over")},c=(t,e)=>{void 0!==e&&(Rt(e,a)?jt(t,e):It(t,e))},h=()=>{var e;document.querySelectorAll(".ts-drag-over").forEach((t=>t.classList.remove("ts-drag-over"))),null==(e=i)||e.classList.remove("ts-dragging"),i=void 0;var n=[];t.control.querySelectorAll("[data-value]").forEach((t=>{if(t.dataset.value){let e=t.dataset.value;e&&n.push(e)}})),t.setValue(n)};return St(a,"mousedown",(t=>{r||kt(t),t.stopPropagation()})),St(a,"dragstart",s),St(a,"dragenter",l),St(a,"dragover",l),St(a,"dragleave",u),St(a,"dragend",h),a}})),t.hook("instead","lock",(()=>(r=!1,e.call(t)))),t.hook("instead","unlock",(()=>(r=!0,n.call(t))))}function Bt(t){const e=this,n=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>''},t);e.on("initialize",(()=>{var t=q(n.html(n)),i=t.querySelector("."+n.closeClass);i&&i.addEventListener("click",(t=>{kt(t,!0),e.close()})),e.dropdown.insertBefore(t,e.dropdown.firstChild)}))}function zt(){var t=this;t.hook("instead","setCaret",(e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEach(((n,i)=>{i{if(!t.isFocused)return;const n=t.getLastActive(e);if(n){const i=Q(n);t.setCaret(e>0?i+1:i),t.setActiveItem(),Y(n,"last-active")}else t.setCaret(t.caretPos+e)}))}function qt(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",(()=>{t.focus_node=t.control,Z(t.control_input,"dropdown-input");const e=q('');e.append(t.control_input),t.dropdown.insertBefore(e,t.dropdown.firstChild);const n=q('
');n.placeholder=t.settings.placeholder||"",t.control.append(n)})),t.on("initialize",(()=>{t.control_input.addEventListener("keydown",(e=>{switch(e.keyCode){case at:return t.isOpen&&(kt(e,!0),t.close()),void t.clearActiveItems();case ft:t.focus_node.tabIndex=-1}return t.onKeyDown.call(t,e)})),t.on("blur",(()=>{t.focus_node.tabIndex=t.isDisabled?-1:t.tabIndex})),t.on("dropdown_open",(()=>{t.control_input.focus()}));const e=t.onBlur;t.hook("instead","onBlur",(n=>{if(!n||n.relatedTarget!=t.control_input)return e.call(t)})),St(t.control_input,"blur",(()=>t.onBlur())),t.hook("before","close",(()=>{t.isOpen&&t.focus_node.focus({preventScroll:!0})}))}))}function Ht(){var t=this;t.on("initialize",(()=>{var e=document.createElement("span"),n=t.control_input;e.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",t.wrapper.appendChild(e);var i=["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"];for(const t of i)e.style[t]=n.style[t];var r=()=>{e.textContent=n.value,n.style.width=e.clientWidth+"px"};r(),t.on("update item_add item_remove",r),St(n,"input",r),St(n,"keyup",r),St(n,"blur",r),St(n,"update",r)}))}function Wt(){var t=this,e=t.deleteSelection;this.hook("instead","deleteSelection",(n=>!!t.activeItems.length&&e.call(t,n)))}function Ut(){this.hook("instead","setActiveItem",(()=>{})),this.hook("instead","selectAll",(()=>{}))}function Vt(){var t=this,e=t.onKeyDown;t.hook("instead","onKeyDown",(n=>{var i,r,o,a;if(!t.isOpen||n.keyCode!==st&&n.keyCode!==ut)return e.call(t,n);t.ignoreHover=!0,a=K(t.activeOption,"[data-group]"),i=Q(t.activeOption,"[data-selectable]"),a&&(a=n.keyCode===st?a.previousSibling:a.nextSibling)&&(r=(o=a.querySelectorAll("[data-selectable]"))[Math.min(o.length-1,i)])&&t.setActiveOption(r)}))}function Zt(t){const e=Object.assign({label:"×",title:"Remove",className:"remove",append:!0},t);var n=this;if(e.append){var i='
'+e.label+"";n.hook("after","setupTemplates",(()=>{var t=n.settings.render.item;n.settings.render.item=(e,r)=>{var o=q(t.call(n,e,r)),a=q(i);return o.appendChild(a),St(a,"mousedown",(t=>{kt(t,!0)})),St(a,"click",(t=>{n.isLocked||(kt(t,!0),n.isLocked||n.shouldDelete([o],t)&&(n.removeItem(o),n.refreshOptions(!1),n.inputState()))})),o}}))}}function Yt(t){const e=this,n=Object.assign({text:t=>t[e.settings.labelField]},t);e.on("item_remove",(function(t){if(e.isFocused&&""===e.control_input.value.trim()){var i=e.options[t];i&&e.setTextboxValue(n.text.call(e,i))}}))}function $t(){const t=this,e=t.canLoad,n=t.clearActiveOption,i=t.loadCallback;var r,o,a={},s=!1,l=[];if(t.settings.shouldLoadMore||(t.settings.shouldLoadMore=()=>{if(r.clientHeight/(r.scrollHeight-r.scrollTop)>.9)return!0;if(t.activeOption){var e=t.selectable();if(Array.from(e).indexOf(t.activeOption)>=e.length-2)return!0}return!1}),!t.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";t.settings.sortField=[{field:"$order"},{field:"$score"}];const u=e=>!("number"==typeof t.settings.maxOptions&&r.children.length>=t.settings.maxOptions||!(e in a)||!a[e]),c=(e,n)=>t.items.indexOf(n)>=0||l.indexOf(n)>=0;t.setNextUrl=(t,e)=>{a[t]=e},t.getUrl=e=>{if(e in a){const t=a[e];return a[e]=!1,t}return t.clearPagination(),t.settings.firstUrl.call(t,e)},t.clearPagination=()=>{a={}},t.hook("instead","clearActiveOption",(()=>{if(!s)return n.call(t)})),t.hook("instead","canLoad",(n=>n in a?u(n):e.call(t,n))),t.hook("instead","loadCallback",((e,n)=>{if(s){if(o){const n=e[0];void 0!==n&&(o.dataset.value=n[t.settings.valueField])}}else t.clearOptions(c);i.call(t,e,n),s=!1})),t.hook("after","refreshOptions",(()=>{const e=t.lastValue;var n;u(e)?(n=t.render("loading_more",{query:e}))&&(n.setAttribute("data-selectable",""),o=n):e in a&&!r.querySelector(".no-results")&&(n=t.render("no_more_results",{query:e})),n&&(Z(n,t.settings.optionClass),r.append(n))})),t.on("initialize",(()=>{l=Object.keys(t.options),r=t.dropdown_content,t.settings.render=Object.assign({},{loading_more:()=>'
Loading more results ...
',no_more_results:()=>'
No more results
'},t.settings.render),r.addEventListener("scroll",(()=>{t.settings.shouldLoadMore.call(t)&&u(t.lastValue)&&(s||(s=!0,t.load.call(t,t.lastValue)))}))}))}return Mt.define("change_listener",Pt),Mt.define("checkbox_options",Nt),Mt.define("clear_button",Dt),Mt.define("drag_drop",Ft),Mt.define("dropdown_header",Bt),Mt.define("caret_position",zt),Mt.define("dropdown_input",qt),Mt.define("input_autogrow",Ht),Mt.define("no_backspace_delete",Wt),Mt.define("no_active_items",Ut),Mt.define("optgroup_columns",Vt),Mt.define("remove_button",Zt),Mt.define("restore_on_backspace",Yt),Mt.define("virtual_scroll",$t),Mt}()},1250:(t,e,n)=>{"use strict";n.d(e,{A:()=>$t});var i={};function r(t,e){return function(){return t.apply(e,arguments)}}n.r(i),n.d(i,{hasBrowserEnv:()=>rt,hasStandardBrowserEnv:()=>ot,hasStandardBrowserWebWorkerEnv:()=>st});const{toString:o}=Object.prototype,{getPrototypeOf:a}=Object,s=(l=Object.create(null),t=>{const e=o.call(t);return l[e]||(l[e]=e.slice(8,-1).toLowerCase())});var l;const u=t=>(t=t.toLowerCase(),e=>s(e)===t),c=t=>e=>typeof e===t,{isArray:h}=Array,d=c("undefined");const f=u("ArrayBuffer");const p=c("string"),m=c("function"),g=c("number"),v=t=>null!==t&&"object"==typeof t,y=t=>{if("object"!==s(t))return!1;const e=a(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},b=u("Date"),_=u("File"),w=u("Blob"),x=u("FileList"),k=u("URLSearchParams");function S(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let i,r;if("object"!=typeof t&&(t=[t]),h(t))for(i=0,r=t.length;i
0;)if(i=n[r],e===i.toLowerCase())return i;return null}const T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,O=t=>!d(t)&&t!==T;const E=(A="undefined"!=typeof Uint8Array&&a(Uint8Array),t=>A&&t instanceof A);var A;const L=u("HTMLFormElement"),M=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),P=u("RegExp"),N=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};S(n,((n,r)=>{let o;!1!==(o=e(n,r,t))&&(i[r]=o||n)})),Object.defineProperties(t,i)},D="abcdefghijklmnopqrstuvwxyz",j="0123456789",I={DIGIT:j,ALPHA:D,ALPHA_DIGIT:D+D.toUpperCase()+j};const R=u("AsyncFunction"),F={isArray:h,isArrayBuffer:f,isBuffer:function(t){return null!==t&&!d(t)&&null!==t.constructor&&!d(t.constructor)&&m(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||m(t.append)&&("formdata"===(e=s(t))||"object"===e&&m(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&f(t.buffer),e},isString:p,isNumber:g,isBoolean:t=>!0===t||!1===t,isObject:v,isPlainObject:y,isUndefined:d,isDate:b,isFile:_,isBlob:w,isRegExp:P,isFunction:m,isStream:t=>v(t)&&m(t.pipe),isURLSearchParams:k,isTypedArray:E,isFileList:x,forEach:S,merge:function t(){const{caseless:e}=O(this)&&this||{},n={},i=(i,r)=>{const o=e&&C(n,r)||r;y(n[o])&&y(i)?n[o]=t(n[o],i):y(i)?n[o]=t({},i):h(i)?n[o]=i.slice():n[o]=i};for(let t=0,e=arguments.length;t(S(e,((e,i)=>{n&&m(e)?t[i]=r(e,n):t[i]=e}),{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,i)=>{let r,o,s;const l={};if(e=e||{},null==t)return e;do{for(r=Object.getOwnPropertyNames(t),o=r.length;o-- >0;)s=r[o],i&&!i(s,t,e)||l[s]||(e[s]=t[s],l[s]=!0);t=!1!==n&&a(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:u,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return-1!==i&&i===n},toArray:t=>{if(!t)return null;if(h(t))return t;let e=t.length;if(!g(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=n.next())&&!i.done;){const n=i.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const i=[];for(;null!==(n=t.exec(e));)i.push(n);return i},isHTMLForm:L,hasOwnProperty:M,hasOwnProp:M,reduceDescriptors:N,freezeMethods:t=>{N(t,((e,n)=>{if(m(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=t[n];m(i)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},i=t=>{t.forEach((t=>{n[t]=!0}))};return h(t)?i(t):i(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:C,global:T,isContextDefined:O,ALPHABET:I,generateString:(t=16,e=I.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n},isSpecCompliantForm:function(t){return!!(t&&m(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,i)=>{if(v(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;const r=h(t)?[]:{};return S(t,((t,e)=>{const o=n(t,i+1);!d(o)&&(r[e]=o)})),e[i]=void 0,r}}return t};return n(t,0)},isAsyncFn:R,isThenable:t=>t&&(v(t)||m(t))&&m(t.then)&&m(t.catch)};function B(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}F.inherits(B,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const z=B.prototype,q={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{q[t]={value:t}})),Object.defineProperties(B,q),Object.defineProperty(z,"isAxiosError",{value:!0}),B.from=(t,e,n,i,r,o)=>{const a=Object.create(z);return F.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),B.call(a,t.message,e,n,i,r),a.cause=t,a.name=t.name,o&&Object.assign(a,o),a};const H=B;var W=n(8287).hp;function U(t){return F.isPlainObject(t)||F.isArray(t)}function V(t){return F.endsWith(t,"[]")?t.slice(0,-2):t}function Z(t,e,n){return t?t.concat(e).map((function(t,e){return t=V(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const Y=F.toFlatObject(F,{},null,(function(t){return/^is[A-Z]/.test(t)}));const $=function(t,e,n){if(!F.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const i=(n=F.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!F.isUndefined(e[t])}))).metaTokens,r=n.visitor||u,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&F.isSpecCompliantForm(e);if(!F.isFunction(r))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(F.isDate(t))return t.toISOString();if(!s&&F.isBlob(t))throw new H("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(t)||F.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):W.from(t):t}function u(t,n,r){let s=t;if(t&&!r&&"object"==typeof t)if(F.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else if(F.isArray(t)&&function(t){return F.isArray(t)&&!t.some(U)}(t)||(F.isFileList(t)||F.endsWith(n,"[]"))&&(s=F.toArray(t)))return n=V(n),s.forEach((function(t,i){!F.isUndefined(t)&&null!==t&&e.append(!0===a?Z([n],i,o):null===a?n:n+"[]",l(t))})),!1;return!!U(t)||(e.append(Z(r,n,o),l(t)),!1)}const c=[],h=Object.assign(Y,{defaultVisitor:u,convertValue:l,isVisitable:U});if(!F.isObject(t))throw new TypeError("data must be an object");return function t(n,i){if(!F.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+i.join("."));c.push(n),F.forEach(n,(function(n,o){!0===(!(F.isUndefined(n)||null===n)&&r.call(e,n,F.isString(o)?o.trim():o,i,h))&&t(n,i?i.concat(o):[o])})),c.pop()}}(t),e};function G(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function K(t,e){this._pairs=[],t&&$(t,this,e)}const X=K.prototype;X.append=function(t,e){this._pairs.push([t,e])},X.toString=function(t){const e=t?function(e){return t.call(this,e,G)}:G;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const J=K;function Q(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tt(t,e,n){if(!e)return t;const i=n&&n.encode||Q,r=n&&n.serialize;let o;if(o=r?r(e,n):F.isURLSearchParams(e)?e.toString():new J(e,n).toString(i),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}const et=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){F.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},it={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:J,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},rt="undefined"!=typeof window&&"undefined"!=typeof document,ot=(at="undefined"!=typeof navigator&&navigator.product,rt&&["ReactNative","NativeScript","NS"].indexOf(at)<0);var at;const st="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,lt={...i,...it};const ut=function(t){function e(t,n,i,r){let o=t[r++];if("__proto__"===o)return!0;const a=Number.isFinite(+o),s=r>=t.length;if(o=!o&&F.isArray(i)?i.length:o,s)return F.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a;i[o]&&F.isObject(i[o])||(i[o]=[]);return e(t,n,i[o],r)&&F.isArray(i[o])&&(i[o]=function(t){const e={},n=Object.keys(t);let i;const r=n.length;let o;for(i=0;i{e(function(t){return F.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),i,n,0)})),n}return null};const ct={transitional:nt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=F.isObject(t);r&&F.isHTMLForm(t)&&(t=new FormData(t));if(F.isFormData(t))return i?JSON.stringify(ut(t)):t;if(F.isArrayBuffer(t)||F.isBuffer(t)||F.isStream(t)||F.isFile(t)||F.isBlob(t))return t;if(F.isArrayBufferView(t))return t.buffer;if(F.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return $(t,new lt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return lt.isNode&&F.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=F.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return $(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),function(t,e,n){if(F.isString(t))try{return(e||JSON.parse)(t),F.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||ct.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(t&&F.isString(t)&&(n&&!this.responseType||i)){const n=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw H.from(t,H.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:lt.classes.FormData,Blob:lt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],(t=>{ct.headers[t]={}}));const ht=ct,dt=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ft=Symbol("internals");function pt(t){return t&&String(t).trim().toLowerCase()}function mt(t){return!1===t||null==t?t:F.isArray(t)?t.map(mt):String(t)}function gt(t,e,n,i,r){return F.isFunction(i)?i.call(this,e,n):(r&&(e=n),F.isString(e)?F.isString(i)?-1!==e.indexOf(i):F.isRegExp(i)?i.test(e):void 0:void 0)}class vt{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(t,e,n){const r=pt(e);if(!r)throw new Error("header name must be a non-empty string");const o=F.findKey(i,r);(!o||void 0===i[o]||!0===n||void 0===n&&!1!==i[o])&&(i[o||e]=mt(t))}const o=(t,e)=>F.forEach(t,((t,n)=>r(t,n,e)));return F.isPlainObject(t)||t instanceof this.constructor?o(t,e):F.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?o((t=>{const e={};let n,i,r;return t&&t.split("\n").forEach((function(t){r=t.indexOf(":"),n=t.substring(0,r).trim().toLowerCase(),i=t.substring(r+1).trim(),!n||e[n]&&dt[n]||("set-cookie"===n?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)})),e})(t),e):null!=t&&r(e,t,n),this}get(t,e){if(t=pt(t)){const n=F.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}(t);if(F.isFunction(e))return e.call(this,t,n);if(F.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=pt(t)){const n=F.findKey(this,t);return!(!n||void 0===this[n]||e&&!gt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let i=!1;function r(t){if(t=pt(t)){const r=F.findKey(n,t);!r||e&&!gt(0,n[r],r,e)||(delete n[r],i=!0)}}return F.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const r=e[n];t&&!gt(0,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return F.forEach(this,((i,r)=>{const o=F.findKey(n,r);if(o)return e[o]=mt(i),void delete e[r];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(r):String(r).trim();a!==r&&delete e[r],e[a]=mt(i),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return F.forEach(this,((n,i)=>{null!=n&&!1!==n&&(e[i]=t&&F.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[ft]=this[ft]={accessors:{}}).accessors,n=this.prototype;function i(t){const i=pt(t);e[i]||(!function(t,e){const n=F.toCamelCase(" "+e);["get","set","has"].forEach((i=>{Object.defineProperty(t,i+n,{value:function(t,n,r){return this[i].call(this,e,t,n,r)},configurable:!0})}))}(n,t),e[i]=!0)}return F.isArray(t)?t.forEach(i):i(t),this}}vt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.reduceDescriptors(vt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),F.freezeMethods(vt);const yt=vt;function bt(t,e){const n=this||ht,i=e||n,r=yt.from(i.headers);let o=i.data;return F.forEach(t,(function(t){o=t.call(n,o,r.normalize(),e?e.status:void 0)})),r.normalize(),o}function _t(t){return!(!t||!t.__CANCEL__)}function wt(t,e,n){H.call(this,null==t?"canceled":t,H.ERR_CANCELED,e,n),this.name="CanceledError"}F.inherits(wt,H,{__CANCEL__:!0});const xt=wt;const kt=lt.hasStandardBrowserEnv?{write(t,e,n,i,r,o){const a=[t+"="+encodeURIComponent(e)];F.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),F.isString(i)&&a.push("path="+i),F.isString(r)&&a.push("domain="+r),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function St(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Ct=lt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function i(n){let i=n;return t&&(e.setAttribute("href",i),i=e.href),e.setAttribute("href",i),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=i(window.location.href),function(t){const e=F.isString(t)?i(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};const Tt=function(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r,o=0,a=0;return e=void 0!==e?e:1e3,function(s){const l=Date.now(),u=i[a];r||(r=l),n[o]=s,i[o]=l;let c=a,h=0;for(;c!==o;)h+=n[c++],c%=t;if(o=(o+1)%t,o===a&&(a=(a+1)%t),l-r{const o=r.loaded,a=r.lengthComputable?r.total:void 0,s=o-n,l=i(s);n=o;const u={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&o<=a?(a-o)/l:void 0,event:r};u[e?"download":"upload"]=!0,t(u)}}const Et={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let i=t.data;const r=yt.from(t.headers).normalize();let o,a,{responseType:s,withXSRFToken:l}=t;function u(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}if(F.isFormData(i))if(lt.hasStandardBrowserEnv||lt.hasStandardBrowserWebWorkerEnv)r.setContentType(!1);else if(!1!==(a=r.getContentType())){const[t,...e]=a?a.split(";").map((t=>t.trim())).filter(Boolean):[];r.setContentType([t||"multipart/form-data",...e].join("; "))}let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";r.set("Authorization","Basic "+btoa(e+":"+n))}const h=St(t.baseURL,t.url);function d(){if(!c)return;const i=yt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new H("Request failed with status code "+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),u()}),(function(t){n(t),u()}),{data:s&&"text"!==s&&"json"!==s?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:i,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),tt(h,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(d)},c.onabort=function(){c&&(n(new H("Request aborted",H.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new H("Network Error",H.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const i=t.transitional||nt;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new H(e,i.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,t,c)),c=null},lt.hasStandardBrowserEnv&&(l&&F.isFunction(l)&&(l=l(t)),l||!1!==l&&Ct(h))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&kt.read(t.xsrfCookieName);e&&r.set(t.xsrfHeaderName,e)}void 0===i&&r.setContentType(null),"setRequestHeader"in c&&F.forEach(r.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),F.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),s&&"json"!==s&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",Ot(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Ot(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=e=>{c&&(n(!e||e.type?new xt(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(h);f&&-1===lt.protocols.indexOf(f)?n(new H("Unsupported protocol "+f+":",H.ERR_BAD_REQUEST,t)):c.send(i||null)}))}};F.forEach(Et,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const At=t=>`- ${t}`,Lt=t=>F.isFunction(t)||null===t||!1===t,Mt=t=>{t=F.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let o=0;o`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(At).join("\n"):" "+At(t[0]):"as no adapter specified";throw new H("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return i};function Pt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new xt(null,t)}function Nt(t){Pt(t),t.headers=yt.from(t.headers),t.data=bt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return Mt(t.adapter||ht.adapter)(t).then((function(e){return Pt(t),e.data=bt.call(t,t.transformResponse,e),e.headers=yt.from(e.headers),e}),(function(e){return _t(e)||(Pt(t),e&&e.response&&(e.response.data=bt.call(t,t.transformResponse,e.response),e.response.headers=yt.from(e.response.headers))),Promise.reject(e)}))}const Dt=t=>t instanceof yt?{...t}:t;function jt(t,e){e=e||{};const n={};function i(t,e,n){return F.isPlainObject(t)&&F.isPlainObject(e)?F.merge.call({caseless:n},t,e):F.isPlainObject(e)?F.merge({},e):F.isArray(e)?e.slice():e}function r(t,e,n){return F.isUndefined(e)?F.isUndefined(t)?void 0:i(void 0,t,n):i(t,e,n)}function o(t,e){if(!F.isUndefined(e))return i(void 0,e)}function a(t,e){return F.isUndefined(e)?F.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function s(n,r,o){return o in e?i(n,r):o in t?i(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>r(Dt(t),Dt(e),!0)};return F.forEach(Object.keys(Object.assign({},t,e)),(function(i){const o=l[i]||r,a=o(t[i],e[i],i);F.isUndefined(a)&&o!==s||(n[i]=a)})),n}const It="1.6.8",Rt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Rt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Ft={};Rt.transitional=function(t,e,n){return(i,r,o)=>{if(!1===t)throw new H(function(t,e){return"[Axios v1.6.8] Transitional option '"+t+"'"+e+(n?". "+n:"")}(r," has been removed"+(e?" in "+e:"")),H.ERR_DEPRECATED);return e&&!Ft[r]&&(Ft[r]=!0),!t||t(i,r,o)}};const Bt={assertOptions:function(t,e,n){if("object"!=typeof t)throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const o=i[r],a=e[o];if(a){const e=t[o],n=void 0===e||a(e,o,t);if(!0!==n)throw new H("option "+o+" must be "+n,H.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new H("Unknown option "+o,H.ERR_BAD_OPTION)}},validators:Rt},zt=Bt.validators;class qt{constructor(t){this.defaults=t,this.interceptors={request:new et,response:new et}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=jt(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;void 0!==n&&Bt.assertOptions(n,{silentJSONParsing:zt.transitional(zt.boolean),forcedJSONParsing:zt.transitional(zt.boolean),clarifyTimeoutError:zt.transitional(zt.boolean)},!1),null!=i&&(F.isFunction(i)?e.paramsSerializer={serialize:i}:Bt.assertOptions(i,{encode:zt.function,serialize:zt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&F.merge(r.common,r[e.method]);r&&F.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=yt.concat(o,r);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const l=[];let u;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let c,h=0;if(!s){const t=[Nt.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,l),c=t.length,u=Promise.resolve(e);h{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const i=new Promise((t=>{n.subscribe(t),e=t})).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t((function(t,i,r){n.reason||(n.reason=new xt(t,i,r),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Wt((function(e){t=e})),cancel:t}}}const Ut=Wt;const Vt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vt).forEach((([t,e])=>{Vt[e]=t}));const Zt=Vt;const Yt=function t(e){const n=new Ht(e),i=r(Ht.prototype.request,n);return F.extend(i,Ht.prototype,n,{allOwnKeys:!0}),F.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return t(jt(e,n))},i}(ht);Yt.Axios=Ht,Yt.CanceledError=xt,Yt.CancelToken=Ut,Yt.isCancel=_t,Yt.VERSION=It,Yt.toFormData=$,Yt.AxiosError=H,Yt.Cancel=Yt.CanceledError,Yt.all=function(t){return Promise.all(t)},Yt.spread=function(t){return function(e){return t.apply(null,e)}},Yt.isAxiosError=function(t){return F.isObject(t)&&!0===t.isAxiosError},Yt.mergeConfig=jt,Yt.AxiosHeaders=yt,Yt.formToJSON=t=>ut(F.isHTMLForm(t)?new FormData(t):t),Yt.getAdapter=Mt,Yt.HttpStatusCode=Zt,Yt.default=Yt;const $t=Yt}}]);
\ No newline at end of file
+(self.webpackChunk=self.webpackChunk||[]).push([[660],{8747:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Alert:()=>J,Button:()=>tt,Carousel:()=>Dt,Collapse:()=>$t,Dropdown:()=>be,Modal:()=>tn,Offcanvas:()=>bn,Popover:()=>Un,ScrollSpy:()=>ei,Tab:()=>Si,Toast:()=>Bi,Tooltip:()=>Bn});var i=n(6769),r=n(1576);const o=new Map,a={set(t,e,n){o.has(t)||o.set(t,new Map);const i=o.get(t);(i.has(e)||0===i.size)&&i.set(e,n)},get:(t,e)=>o.has(t)&&o.get(t).get(e)||null,remove(t,e){if(!o.has(t))return;const n=o.get(t);n.delete(e),0===n.size&&o.delete(t)}},s="transitionend",l=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),u=t=>{t.dispatchEvent(new Event(s))},c=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),h=t=>c(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(l(t)):null,d=t=>{if(!c(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),n=t.closest("details:not([open])");if(!n)return e;if(n!==t){const e=t.closest("summary");if(e&&e.parentNode!==n)return!1;if(null===e)return!1}return e},f=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),p=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?p(t.parentNode):null},m=()=>{},g=t=>{t.offsetHeight},v=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,y=[],b=()=>"rtl"===document.documentElement.dir,_=t=>{var e;e=()=>{const e=v();if(e){const n=t.NAME,i=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=i,t.jQueryInterface)}},"loading"===document.readyState?(y.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of y)t()})),y.push(e)):e()},w=(t,e=[],n=t)=>"function"==typeof t?t(...e):n,x=(t,e,n=!0)=>{if(!n)return void w(t);const i=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const i=Number.parseFloat(e),r=Number.parseFloat(n);return i||r?(e=e.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(n))):0})(e)+5;let r=!1;const o=({target:n})=>{n===e&&(r=!0,e.removeEventListener(s,o),w(t))};e.addEventListener(s,o),setTimeout((()=>{r||u(e)}),i)},k=(t,e,n,i)=>{const r=t.length;let o=t.indexOf(e);return-1===o?!n&&i?t[r-1]:t[0]:(o+=n?1:-1,i&&(o=(o+r)%r),t[Math.max(0,Math.min(o,r-1))])},S=/[^.]*(?=\..*)\.|.*/,C=/\..*/,T=/::\d+$/,O={};let E=1;const A={mouseenter:"mouseover",mouseleave:"mouseout"},L=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function M(t,e){return e&&`${e}::${E++}`||t.uidEvent||E++}function P(t){const e=M(t);return t.uidEvent=e,O[e]=O[e]||{},O[e]}function N(t,e,n=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===n))}function D(t,e,n){const i="string"==typeof e,r=i?n:e||n;let o=F(t);return L.has(o)||(o=t),[i,r,o]}function j(t,e,n,i,r){if("string"!=typeof e||!t)return;let[o,a,s]=D(e,n,i);if(e in A){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};a=t(a)}const l=P(t),u=l[s]||(l[s]={}),c=N(u,a,o?n:null);if(c)return void(c.oneOff=c.oneOff&&r);const h=M(a,e.replace(S,"")),d=o?function(t,e,n){return function i(r){const o=t.querySelectorAll(e);for(let{target:a}=r;a&&a!==this;a=a.parentNode)for(const s of o)if(s===a)return z(r,{delegateTarget:a}),i.oneOff&&B.off(t,r.type,e,n),n.apply(a,[r])}}(t,n,a):function(t,e){return function n(i){return z(i,{delegateTarget:t}),n.oneOff&&B.off(t,i.type,e),e.apply(t,[i])}}(t,a);d.delegationSelector=o?n:null,d.callable=a,d.oneOff=r,d.uidEvent=h,u[h]=d,t.addEventListener(s,d,o)}function I(t,e,n,i,r){const o=N(e[n],i,r);o&&(t.removeEventListener(n,o,Boolean(r)),delete e[n][o.uidEvent])}function R(t,e,n,i){const r=e[n]||{};for(const[o,a]of Object.entries(r))o.includes(i)&&I(t,e,n,a.callable,a.delegationSelector)}function F(t){return t=t.replace(C,""),A[t]||t}const B={on(t,e,n,i){j(t,e,n,i,!1)},one(t,e,n,i){j(t,e,n,i,!0)},off(t,e,n,i){if("string"!=typeof e||!t)return;const[r,o,a]=D(e,n,i),s=a!==e,l=P(t),u=l[a]||{},c=e.startsWith(".");if(void 0===o){if(c)for(const n of Object.keys(l))R(t,l,n,e.slice(1));for(const[n,i]of Object.entries(u)){const r=n.replace(T,"");s&&!e.includes(r)||I(t,l,a,i.callable,i.delegationSelector)}}else{if(!Object.keys(u).length)return;I(t,l,a,o,r?n:null)}},trigger(t,e,n){if("string"!=typeof e||!t)return null;const i=v();let r=null,o=!0,a=!0,s=!1;e!==F(e)&&i&&(r=i.Event(e,n),i(t).trigger(r),o=!r.isPropagationStopped(),a=!r.isImmediatePropagationStopped(),s=r.isDefaultPrevented());const l=z(new Event(e,{bubbles:o,cancelable:!0}),n);return s&&l.preventDefault(),a&&t.dispatchEvent(l),l.defaultPrevented&&r&&r.preventDefault(),l}};function z(t,e={}){for(const[n,i]of Object.entries(e))try{t[n]=i}catch(e){Object.defineProperty(t,n,{configurable:!0,get:()=>i})}return t}function q(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function H(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const W={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${H(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${H(e)}`)},getDataAttributes(t){if(!t)return{};const e={},n=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),e[n]=q(t.dataset[i])}return e},getDataAttribute:(t,e)=>q(t.getAttribute(`data-bs-${H(e)}`))};class U{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const n=c(e)?W.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...c(e)?W.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[i,r]of Object.entries(e)){const e=t[i],o=c(e)?"element":null==(n=e)?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(r).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${o}" but expected type "${r}".`)}var n}}class V extends U{constructor(t,e){super(),(t=h(t))&&(this._element=t,this._config=this._getConfig(e),a.set(this._element,this.constructor.DATA_KEY,this))}dispose(){a.remove(this._element,this.constructor.DATA_KEY),B.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,n=!0){x(t,e,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return a.get(h(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const Z=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&"#"!==n?n.trim():null}return e?e.split(",").map((t=>l(t))).join(","):null},Y={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const n=[];let i=t.parentNode.closest(e);for(;i;)n.push(i),i=i.parentNode.closest(e);return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!f(t)&&d(t)))},getSelectorFromElement(t){const e=Z(t);return e&&Y.findOne(e)?e:null},getElementFromSelector(t){const e=Z(t);return e?Y.findOne(e):null},getMultipleElementsFromSelector(t){const e=Z(t);return e?Y.find(e):[]}},$=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,i=t.NAME;B.on(document,n,`[data-bs-dismiss="${i}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),f(this))return;const r=Y.getElementFromSelector(this)||this.closest(`.${i}`);t.getOrCreateInstance(r)[e]()}))},G=".bs.alert",K=`close${G}`,X=`closed${G}`;class J extends V{static get NAME(){return"alert"}close(){if(B.trigger(this._element,K).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),B.trigger(this._element,X),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=J.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}$(J,"close"),_(J);const Q='[data-bs-toggle="button"]';class tt extends V{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=tt.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}B.on(document,"click.bs.button.data-api",Q,(t=>{t.preventDefault();const e=t.target.closest(Q);tt.getOrCreateInstance(e).toggle()})),_(tt);const et=".bs.swipe",nt=`touchstart${et}`,it=`touchmove${et}`,rt=`touchend${et}`,ot=`pointerdown${et}`,at=`pointerup${et}`,st={endCallback:null,leftCallback:null,rightCallback:null},lt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ut extends U{constructor(t,e){super(),this._element=t,t&&ut.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return st}static get DefaultType(){return lt}static get NAME(){return"swipe"}dispose(){B.off(this._element,et)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),w(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&w(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(B.on(this._element,ot,(t=>this._start(t))),B.on(this._element,at,(t=>this._end(t))),this._element.classList.add("pointer-event")):(B.on(this._element,nt,(t=>this._start(t))),B.on(this._element,it,(t=>this._move(t))),B.on(this._element,rt,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ct=".bs.carousel",ht=".data-api",dt="ArrowLeft",ft="ArrowRight",pt="next",mt="prev",gt="left",vt="right",yt=`slide${ct}`,bt=`slid${ct}`,_t=`keydown${ct}`,wt=`mouseenter${ct}`,xt=`mouseleave${ct}`,kt=`dragstart${ct}`,St=`load${ct}${ht}`,Ct=`click${ct}${ht}`,Tt="carousel",Ot="active",Et=".active",At=".carousel-item",Lt=Et+At,Mt={[dt]:vt,[ft]:gt},Pt={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Nt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Dt extends V{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Y.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Tt&&this.cycle()}static get Default(){return Pt}static get DefaultType(){return Nt}static get NAME(){return"carousel"}next(){this._slide(pt)}nextWhenVisible(){!document.hidden&&d(this._element)&&this.next()}prev(){this._slide(mt)}pause(){this._isSliding&&u(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?B.one(this._element,bt,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void B.one(this._element,bt,(()=>this.to(t)));const n=this._getItemIndex(this._getActive());if(n===t)return;const i=t>n?pt:mt;this._slide(i,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&B.on(this._element,_t,(t=>this._keydown(t))),"hover"===this._config.pause&&(B.on(this._element,wt,(()=>this.pause())),B.on(this._element,xt,(()=>this._maybeEnableCycle()))),this._config.touch&&ut.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of Y.find(".carousel-item img",this._element))B.on(t,kt,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(gt)),rightCallback:()=>this._slide(this._directionToOrder(vt)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new ut(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Mt[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=Y.findOne(Et,this._indicatorsElement);e.classList.remove(Ot),e.removeAttribute("aria-current");const n=Y.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);n&&(n.classList.add(Ot),n.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const n=this._getActive(),i=t===pt,r=e||k(this._getItems(),n,i,this._config.wrap);if(r===n)return;const o=this._getItemIndex(r),a=e=>B.trigger(this._element,e,{relatedTarget:r,direction:this._orderToDirection(t),from:this._getItemIndex(n),to:o});if(a(yt).defaultPrevented)return;if(!n||!r)return;const s=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=r;const l=i?"carousel-item-start":"carousel-item-end",u=i?"carousel-item-next":"carousel-item-prev";r.classList.add(u),g(r),n.classList.add(l),r.classList.add(l);this._queueCallback((()=>{r.classList.remove(l,u),r.classList.add(Ot),n.classList.remove(Ot,u,l),this._isSliding=!1,a(bt)}),n,this._isAnimated()),s&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Y.findOne(Lt,this._element)}_getItems(){return Y.find(At,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return b()?t===gt?mt:pt:t===gt?pt:mt}_orderToDirection(t){return b()?t===mt?gt:vt:t===mt?vt:gt}static jQueryInterface(t){return this.each((function(){const e=Dt.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}B.on(document,Ct,"[data-bs-slide], [data-bs-slide-to]",(function(t){const e=Y.getElementFromSelector(this);if(!e||!e.classList.contains(Tt))return;t.preventDefault();const n=Dt.getOrCreateInstance(e),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===W.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),B.on(window,St,(()=>{const t=Y.find('[data-bs-ride="carousel"]');for(const e of t)Dt.getOrCreateInstance(e)})),_(Dt);const jt=".bs.collapse",It=`show${jt}`,Rt=`shown${jt}`,Ft=`hide${jt}`,Bt=`hidden${jt}`,zt=`click${jt}.data-api`,qt="show",Ht="collapse",Wt="collapsing",Ut=`:scope .${Ht} .${Ht}`,Vt='[data-bs-toggle="collapse"]',Zt={parent:null,toggle:!0},Yt={parent:"(null|element)",toggle:"boolean"};class $t extends V{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const n=Y.find(Vt);for(const t of n){const e=Y.getSelectorFromElement(t),n=Y.find(e).filter((t=>t===this._element));null!==e&&n.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Zt}static get DefaultType(){return Yt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>$t.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(B.trigger(this._element,It).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(Ht),this._element.classList.add(Wt),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Wt),this._element.classList.add(Ht,qt),this._element.style[e]="",B.trigger(this._element,Rt)}),this._element,!0),this._element.style[e]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(B.trigger(this._element,Ft).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,g(this._element),this._element.classList.add(Wt),this._element.classList.remove(Ht,qt);for(const t of this._triggerArray){const e=Y.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Wt),this._element.classList.add(Ht),B.trigger(this._element,Bt)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(qt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=h(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Vt);for(const e of t){const t=Y.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=Y.find(Ut,this._config.parent);return Y.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const n of t)n.classList.toggle("collapsed",!e),n.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const n=$t.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}}))}}B.on(document,zt,Vt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of Y.getMultipleElementsFromSelector(this))$t.getOrCreateInstance(t,{toggle:!1}).toggle()})),_($t);const Gt="dropdown",Kt=".bs.dropdown",Xt=".data-api",Jt="ArrowUp",Qt="ArrowDown",te=`hide${Kt}`,ee=`hidden${Kt}`,ne=`show${Kt}`,ie=`shown${Kt}`,re=`click${Kt}${Xt}`,oe=`keydown${Kt}${Xt}`,ae=`keyup${Kt}${Xt}`,se="show",le='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',ue=`${le}.${se}`,ce=".dropdown-menu",he=b()?"top-end":"top-start",de=b()?"top-start":"top-end",fe=b()?"bottom-end":"bottom-start",pe=b()?"bottom-start":"bottom-end",me=b()?"left-start":"right-start",ge=b()?"right-start":"left-start",ve={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},ye={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class be extends V{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=Y.next(this._element,ce)[0]||Y.prev(this._element,ce)[0]||Y.findOne(ce,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return ve}static get DefaultType(){return ye}static get NAME(){return Gt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(f(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!B.trigger(this._element,ne,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))B.on(t,"mouseover",m);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(se),this._element.classList.add(se),B.trigger(this._element,ie,t)}}hide(){if(f(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!B.trigger(this._element,te,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))B.off(t,"mouseover",m);this._popper&&this._popper.destroy(),this._menu.classList.remove(se),this._element.classList.remove(se),this._element.setAttribute("aria-expanded","false"),W.removeDataAttribute(this._menu,"popper"),B.trigger(this._element,ee,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!c(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Gt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:c(this._config.reference)?t=h(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=r.n4(t,this._menu,e)}_isShown(){return this._menu.classList.contains(se)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return me;if(t.classList.contains("dropstart"))return ge;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?de:he:e?pe:fe}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(W.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...w(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const n=Y.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>d(t)));n.length&&k(n,e,t===Qt,!n.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=be.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=Y.find(ue);for(const n of e){const e=be.getInstance(n);if(!e||!1===e._config.autoClose)continue;const i=t.composedPath(),r=i.includes(e._menu);if(i.includes(e._element)||"inside"===e._config.autoClose&&!r||"outside"===e._config.autoClose&&r)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),n="Escape"===t.key,i=[Jt,Qt].includes(t.key);if(!i&&!n)return;if(e&&!n)return;t.preventDefault();const r=this.matches(le)?this:Y.prev(this,le)[0]||Y.next(this,le)[0]||Y.findOne(le,t.delegateTarget.parentNode),o=be.getOrCreateInstance(r);if(i)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),r.focus())}}B.on(document,oe,le,be.dataApiKeydownHandler),B.on(document,oe,ce,be.dataApiKeydownHandler),B.on(document,re,be.clearMenus),B.on(document,ae,be.clearMenus),B.on(document,re,le,(function(t){t.preventDefault(),be.getOrCreateInstance(this).toggle()})),_(be);const _e="backdrop",we="show",xe=`mousedown.bs.${_e}`,ke={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Se={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Ce extends U{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return ke}static get DefaultType(){return Se}static get NAME(){return _e}show(t){if(!this._config.isVisible)return void w(t);this._append();const e=this._getElement();this._config.isAnimated&&g(e),e.classList.add(we),this._emulateAnimation((()=>{w(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(we),this._emulateAnimation((()=>{this.dispose(),w(t)}))):w(t)}dispose(){this._isAppended&&(B.off(this._element,xe),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=h(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),B.on(t,xe,(()=>{w(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){x(t,this._getElement(),this._config.isAnimated)}}const Te=".bs.focustrap",Oe=`focusin${Te}`,Ee=`keydown.tab${Te}`,Ae="backward",Le={autofocus:!0,trapElement:null},Me={autofocus:"boolean",trapElement:"element"};class Pe extends U{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Le}static get DefaultType(){return Me}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),B.off(document,Te),B.on(document,Oe,(t=>this._handleFocusin(t))),B.on(document,Ee,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,B.off(document,Te))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const n=Y.focusableChildren(e);0===n.length?e.focus():this._lastTabNavDirection===Ae?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Ae:"forward")}}const Ne=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",De=".sticky-top",je="padding-right",Ie="margin-right";class Re{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,je,(e=>e+t)),this._setElementAttributes(Ne,je,(e=>e+t)),this._setElementAttributes(De,Ie,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,je),this._resetElementAttributes(Ne,je),this._resetElementAttributes(De,Ie)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,n){const i=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+i)return;this._saveInitialAttribute(t,e);const r=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${n(Number.parseFloat(r))}px`)}))}_saveInitialAttribute(t,e){const n=t.style.getPropertyValue(e);n&&W.setDataAttribute(t,e,n)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const n=W.getDataAttribute(t,e);null!==n?(W.removeDataAttribute(t,e),t.style.setProperty(e,n)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(c(t))e(t);else for(const n of Y.find(t,this._element))e(n)}}const Fe=".bs.modal",Be=`hide${Fe}`,ze=`hidePrevented${Fe}`,qe=`hidden${Fe}`,He=`show${Fe}`,We=`shown${Fe}`,Ue=`resize${Fe}`,Ve=`click.dismiss${Fe}`,Ze=`mousedown.dismiss${Fe}`,Ye=`keydown.dismiss${Fe}`,$e=`click${Fe}.data-api`,Ge="modal-open",Ke="show",Xe="modal-static",Je={backdrop:!0,focus:!0,keyboard:!0},Qe={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class tn extends V{constructor(t,e){super(t,e),this._dialog=Y.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Re,this._addEventListeners()}static get Default(){return Je}static get DefaultType(){return Qe}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;B.trigger(this._element,He,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Ge),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){if(!this._isShown||this._isTransitioning)return;B.trigger(this._element,Be).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ke),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated()))}dispose(){B.off(window,Fe),B.off(this._dialog,Fe),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ce({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Pe({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=Y.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),g(this._element),this._element.classList.add(Ke);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,B.trigger(this._element,We,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){B.on(this._element,Ye,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),B.on(window,Ue,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),B.on(this._element,Ze,(t=>{B.one(this._element,Ve,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Ge),this._resetAdjustments(),this._scrollBar.reset(),B.trigger(this._element,qe)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(B.trigger(this._element,ze).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Xe)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Xe),this._queueCallback((()=>{this._element.classList.remove(Xe),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),n=e>0;if(n&&!t){const t=b()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!n&&t){const t=b()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const n=tn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](e)}}))}}B.on(document,$e,'[data-bs-toggle="modal"]',(function(t){const e=Y.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),B.one(e,He,(t=>{t.defaultPrevented||B.one(e,qe,(()=>{d(this)&&this.focus()}))}));const n=Y.findOne(".modal.show");n&&tn.getInstance(n).hide();tn.getOrCreateInstance(e).toggle(this)})),$(tn),_(tn);const en=".bs.offcanvas",nn=".data-api",rn=`load${en}${nn}`,on="show",an="showing",sn="hiding",ln=".offcanvas.show",un=`show${en}`,cn=`shown${en}`,hn=`hide${en}`,dn=`hidePrevented${en}`,fn=`hidden${en}`,pn=`resize${en}`,mn=`click${en}${nn}`,gn=`keydown.dismiss${en}`,vn={backdrop:!0,keyboard:!0,scroll:!1},yn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class bn extends V{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return vn}static get DefaultType(){return yn}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(B.trigger(this._element,un,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Re).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(an);this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(on),this._element.classList.remove(an),B.trigger(this._element,cn,{relatedTarget:t})}),this._element,!0)}hide(){if(!this._isShown)return;if(B.trigger(this._element,hn).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(sn),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove(on,sn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Re).reset(),B.trigger(this._element,fn)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Ce({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():B.trigger(this._element,dn)}:null})}_initializeFocusTrap(){return new Pe({trapElement:this._element})}_addEventListeners(){B.on(this._element,gn,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():B.trigger(this._element,dn))}))}static jQueryInterface(t){return this.each((function(){const e=bn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}B.on(document,mn,'[data-bs-toggle="offcanvas"]',(function(t){const e=Y.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),f(this))return;B.one(e,fn,(()=>{d(this)&&this.focus()}));const n=Y.findOne(ln);n&&n!==e&&bn.getInstance(n).hide();bn.getOrCreateInstance(e).toggle(this)})),B.on(window,rn,(()=>{for(const t of Y.find(ln))bn.getOrCreateInstance(t).show()})),B.on(window,pn,(()=>{for(const t of Y.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&bn.getOrCreateInstance(t).hide()})),$(bn),_(bn);const _n={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},wn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),xn=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,kn=(t,e)=>{const n=t.nodeName.toLowerCase();return e.includes(n)?!wn.has(n)||Boolean(xn.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(n)))};const Sn={allowList:_n,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:""},Cn={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Tn={entry:"(string|element|function|null)",selector:"(string|element)"};class On extends U{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Sn}static get DefaultType(){return Cn}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,n]of Object.entries(this._config.content))this._setContent(t,n,e);const e=t.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&e.classList.add(...n.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,n]of Object.entries(t))super._typeCheckConfig({selector:e,entry:n},Tn)}_setContent(t,e,n){const i=Y.findOne(n,t);i&&((e=this._resolvePossibleFunction(e))?c(e)?this._putElementInTemplate(h(e),i):this._config.html?i.innerHTML=this._maybeSanitize(e):i.textContent=e:i.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,n){if(!t.length)return t;if(n&&"function"==typeof n)return n(t);const i=(new window.DOMParser).parseFromString(t,"text/html"),r=[].concat(...i.body.querySelectorAll("*"));for(const t of r){const n=t.nodeName.toLowerCase();if(!Object.keys(e).includes(n)){t.remove();continue}const i=[].concat(...t.attributes),r=[].concat(e["*"]||[],e[n]||[]);for(const e of i)kn(e,r)||t.removeAttribute(e.nodeName)}return i.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return w(t,[this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const En=new Set(["sanitize","allowList","sanitizeFn"]),An="fade",Ln="show",Mn=".tooltip-inner",Pn=".modal",Nn="hide.bs.modal",Dn="hover",jn="focus",In={AUTO:"auto",TOP:"top",RIGHT:b()?"left":"right",BOTTOM:"bottom",LEFT:b()?"right":"left"},Rn={allowList:_n,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Fn={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Bn extends V{constructor(t,e){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Rn}static get DefaultType(){return Fn}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),B.off(this._element.closest(Pn),Nn,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=B.trigger(this._element,this.constructor.eventName("show")),e=(p(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(n),B.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(Ln),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))B.on(t,"mouseover",m);this._queueCallback((()=>{B.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(B.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove(Ln),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))B.off(t,"mouseover",m);this._activeTrigger.click=!1,this._activeTrigger[jn]=!1,this._activeTrigger[Dn]=!1,this._isHovered=null;this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),B.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(An,Ln),e.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",n),this._isAnimated()&&e.classList.add(An),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new On({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Mn]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(An)}_isShown(){return this.tip&&this.tip.classList.contains(Ln)}_createPopper(t){const e=w(this._config.placement,[this,t,this._element]),n=In[e.toUpperCase()];return r.n4(this._element,t,this._getPopperConfig(n))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return w(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...w(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)B.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===Dn?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=e===Dn?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");B.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?jn:Dn]=!0,e._enter()})),B.on(this._element,n,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?jn:Dn]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},B.on(this._element.closest(Pn),Nn,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=W.getDataAttributes(this._element);for(const t of Object.keys(e))En.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:h(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,n]of Object.entries(this._config))this.constructor.Default[e]!==n&&(t[e]=n);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=Bn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}_(Bn);const zn=".popover-header",qn=".popover-body",Hn={...Bn.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},Wn={...Bn.DefaultType,content:"(null|string|element|function)"};class Un extends Bn{static get Default(){return Hn}static get DefaultType(){return Wn}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[zn]:this._getTitle(),[qn]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=Un.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}_(Un);const Vn=".bs.scrollspy",Zn=`activate${Vn}`,Yn=`click${Vn}`,$n=`load${Vn}.data-api`,Gn="active",Kn="[href]",Xn=".nav-link",Jn=`${Xn}, .nav-item > ${Xn}, .list-group-item`,Qn={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},ti={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class ei extends V{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Qn}static get DefaultType(){return ti}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=h(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(B.off(this._config.target,Yn),B.on(this._config.target,Yn,Kn,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const n=this._rootElement||window,i=e.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:i,behavior:"smooth"});n.scrollTop=i}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),n=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},i=(this._rootElement||document.documentElement).scrollTop,r=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(r&&t){if(n(o),!i)return}else r||t||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=Y.find(Kn,this._config.target);for(const e of t){if(!e.hash||f(e))continue;const t=Y.findOne(decodeURI(e.hash),this._element);d(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Gn),this._activateParents(t),B.trigger(this._element,Zn,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))Y.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Gn);else for(const e of Y.parents(t,".nav, .list-group"))for(const t of Y.prev(e,Jn))t.classList.add(Gn)}_clearActiveClass(t){t.classList.remove(Gn);const e=Y.find(`${Kn}.${Gn}`,t);for(const t of e)t.classList.remove(Gn)}static jQueryInterface(t){return this.each((function(){const e=ei.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}B.on(window,$n,(()=>{for(const t of Y.find('[data-bs-spy="scroll"]'))ei.getOrCreateInstance(t)})),_(ei);const ni=".bs.tab",ii=`hide${ni}`,ri=`hidden${ni}`,oi=`show${ni}`,ai=`shown${ni}`,si=`click${ni}`,li=`keydown${ni}`,ui=`load${ni}`,ci="ArrowLeft",hi="ArrowRight",di="ArrowUp",fi="ArrowDown",pi="Home",mi="End",gi="active",vi="fade",yi="show",bi=".dropdown-toggle",_i=`:not(${bi})`,wi='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',xi=`${`.nav-link${_i}, .list-group-item${_i}, [role="tab"]${_i}`}, ${wi}`,ki=`.${gi}[data-bs-toggle="tab"], .${gi}[data-bs-toggle="pill"], .${gi}[data-bs-toggle="list"]`;class Si extends V{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),B.on(this._element,li,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),n=e?B.trigger(e,ii,{relatedTarget:t}):null;B.trigger(t,oi,{relatedTarget:e}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(gi),this._activate(Y.getElementFromSelector(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),B.trigger(t,ai,{relatedTarget:e})):t.classList.add(yi)}),t,t.classList.contains(vi))}_deactivate(t,e){if(!t)return;t.classList.remove(gi),t.blur(),this._deactivate(Y.getElementFromSelector(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),B.trigger(t,ri,{relatedTarget:e})):t.classList.remove(yi)}),t,t.classList.contains(vi))}_keydown(t){if(![ci,hi,di,fi,pi,mi].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter((t=>!f(t)));let n;if([pi,mi].includes(t.key))n=e[t.key===pi?0:e.length-1];else{const i=[hi,fi].includes(t.key);n=k(e,t.target,i,!0)}n&&(n.focus({preventScroll:!0}),Si.getOrCreateInstance(n).show())}_getChildren(){return Y.find(xi,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),n=this._getOuterElement(t);t.setAttribute("aria-selected",e),n!==t&&this._setAttributeIfNotExists(n,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=Y.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const n=this._getOuterElement(t);if(!n.classList.contains("dropdown"))return;const i=(t,i)=>{const r=Y.findOne(t,n);r&&r.classList.toggle(i,e)};i(bi,gi),i(".dropdown-menu",yi),n.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,n){t.hasAttribute(e)||t.setAttribute(e,n)}_elemIsActive(t){return t.classList.contains(gi)}_getInnerElement(t){return t.matches(xi)?t:Y.findOne(xi,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=Si.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}B.on(document,si,wi,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),f(this)||Si.getOrCreateInstance(this).show()})),B.on(window,ui,(()=>{for(const t of Y.find(ki))Si.getOrCreateInstance(t)})),_(Si);const Ci=".bs.toast",Ti=`mouseover${Ci}`,Oi=`mouseout${Ci}`,Ei=`focusin${Ci}`,Ai=`focusout${Ci}`,Li=`hide${Ci}`,Mi=`hidden${Ci}`,Pi=`show${Ci}`,Ni=`shown${Ci}`,Di="hide",ji="show",Ii="showing",Ri={animation:"boolean",autohide:"boolean",delay:"number"},Fi={animation:!0,autohide:!0,delay:5e3};class Bi extends V{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Fi}static get DefaultType(){return Ri}static get NAME(){return"toast"}show(){if(B.trigger(this._element,Pi).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(Di),g(this._element),this._element.classList.add(ji,Ii),this._queueCallback((()=>{this._element.classList.remove(Ii),B.trigger(this._element,Ni),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this.isShown())return;if(B.trigger(this._element,Li).defaultPrevented)return;this._element.classList.add(Ii),this._queueCallback((()=>{this._element.classList.add(Di),this._element.classList.remove(Ii,ji),B.trigger(this._element,Mi)}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ji),super.dispose()}isShown(){return this._element.classList.contains(ji)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const n=t.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){B.on(this._element,Ti,(t=>this._onInteraction(t,!0))),B.on(this._element,Oi,(t=>this._onInteraction(t,!1))),B.on(this._element,Ei,(t=>this._onInteraction(t,!0))),B.on(this._element,Ai,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Bi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}$(Bi),_(Bi)},4052:(t,e,n)=>{"use strict";n.d(e,{A:()=>g});var i="#fff",r="20px";var o,a,s='"SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace',l="40px",u="\n .codeflask {\n position: absolute;\n width: 100%;\n height: 100%;\n overflow: hidden;\n }\n\n .codeflask, .codeflask * {\n box-sizing: border-box;\n }\n\n .codeflask__pre {\n pointer-events: none;\n z-index: 3;\n overflow: hidden;\n }\n\n .codeflask__textarea {\n background: none;\n border: none;\n color: "+(o="caret-color",a="#000",("undefined"!=typeof CSS?CSS.supports(o,a):"undefined"!=typeof document&&function(t){return(t=t.split("-").filter((function(t){return!!t})).map((function(t){return t[0].toUpperCase()+t.substr(1)})).join(""))[0].toLowerCase()+t.substr(1)}(o)in document.body.style)?i:"#ccc")+";\n z-index: 1;\n resize: none;\n font-family: "+s+";\n -webkit-appearance: pre;\n caret-color: #111;\n z-index: 2;\n width: 100%;\n height: 100%;\n }\n\n .codeflask--has-line-numbers .codeflask__textarea {\n width: calc(100% - "+l+");\n }\n\n .codeflask__code {\n display: block;\n font-family: "+s+";\n overflow: hidden;\n }\n\n .codeflask__flatten {\n padding: 10px;\n font-size: 13px;\n line-height: "+r+";\n white-space: pre;\n position: absolute;\n top: 0;\n left: 0;\n overflow: auto;\n margin: 0 !important;\n outline: none;\n text-align: left;\n }\n\n .codeflask--has-line-numbers .codeflask__flatten {\n width: calc(100% - "+l+");\n left: "+l+";\n }\n\n .codeflask__line-highlight {\n position: absolute;\n top: 10px;\n left: 0;\n width: 100%;\n height: "+r+";\n background: rgba(0,0,0,0.1);\n z-index: 1;\n }\n\n .codeflask__lines {\n padding: 10px 4px;\n font-size: 12px;\n line-height: "+r+";\n font-family: 'Cousine', monospace;\n position: absolute;\n left: 0;\n top: 0;\n width: "+l+";\n height: 100%;\n text-align: right;\n color: #999;\n z-index: 2;\n }\n\n .codeflask__lines__line {\n display: block;\n }\n\n .codeflask.codeflask--has-line-numbers {\n padding-left: "+l+";\n }\n\n .codeflask.codeflask--has-line-numbers:before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: "+l+";\n height: 100%;\n background: #eee;\n z-index: 1;\n }\n";function c(t,e,n){var i=e||"codeflask-style",r=n||document.head;if(!t)return!1;if(document.getElementById(i))return!0;var o=document.createElement("style");return o.innerHTML=t,o.id=i,r.appendChild(o),!0}var h={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function d(t){return String(t).replace(/[&<>"'`=/]/g,(function(t){return h[t]}))}var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};var p=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var e=function(t){var e=/\blang(?:uage)?-([\w-]+)\b/i,n=0,i={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function(t){return t instanceof r?new r(t.type,i.util.encode(t.content),t.alias):Array.isArray(t)?t.map(i.util.encode):t.replace(/&/g,"&").replace(/t.length)return;if(!(w instanceof r)){if(m&&b!=e.length-1){if(d.lastIndex=_,!(O=d.exec(t)))break;for(var x=O.index+(p?O[1].length:0),k=O.index+O[0].length,S=b,C=_,T=e.length;S=(C+=e[S].length)&&(++b,_=C);if(e[b]instanceof r)continue;E=S-b,w=t.slice(_,C),O.index-=_}else{d.lastIndex=0;var O=d.exec(w),E=1}if(O){p&&(g=O[1]?O[1].length:0),k=(x=O.index+g)+(O=O[0].slice(g)).length;var A=w.slice(0,x),L=w.slice(k),M=[b,E];A&&(++b,_+=A.length,M.push(A));var P=new r(u,f?i.tokenize(O,f):O,v,O,m);if(M.push(P),L&&M.push(L),Array.prototype.splice.apply(e,M),1!=E&&i.matchGrammar(t,e,n,b,_,!0,u),s)break}else if(s)break}}}}},tokenize:function(t,e){var n=[t],r=e.rest;if(r){for(var o in r)e[o]=r[o];delete e.rest}return i.matchGrammar(t,n,e,0,0,!1),n},hooks:{all:{},add:function(t,e){var n=i.hooks.all;n[t]=n[t]||[],n[t].push(e)},run:function(t,e){var n=i.hooks.all[t];if(n&&n.length)for(var r,o=0;r=n[o++];)r(e)}},Token:r};function r(t,e,n,i,r){this.type=t,this.content=e,this.alias=n,this.length=0|(i||"").length,this.greedy=!!r}if(t.Prism=i,r.stringify=function(t,e,n){if("string"==typeof t)return t;if(Array.isArray(t))return t.map((function(n){return r.stringify(n,e,t)})).join("");var o={type:t.type,content:r.stringify(t.content,e,n),tag:"span",classes:["token",t.type],attributes:{},language:e,parent:n};if(t.alias){var a=Array.isArray(t.alias)?t.alias:[t.alias];Array.prototype.push.apply(o.classes,a)}i.hooks.run("wrap",o);var s=Object.keys(o.attributes).map((function(t){return t+'="'+(o.attributes[t]||"").replace(/"/g,""")+'"'})).join(" ");return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+(s?" "+s:"")+">"+o.content+""+o.tag+">"},!t.document)return t.addEventListener?(i.disableWorkerMessageHandler||t.addEventListener("message",(function(e){var n=JSON.parse(e.data),r=n.language,o=n.code,a=n.immediateClose;t.postMessage(i.highlight(o,i.languages[r],r)),a&&t.close()}),!1),i):i;var o=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return o&&(i.filename=o.src,i.manual||o.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(i.highlightAll):window.setTimeout(i.highlightAll,16):document.addEventListener("DOMContentLoaded",i.highlightAll))),i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});t.exports&&(t.exports=e),void 0!==f&&(f.Prism=e),e.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/?[\da-z]{1,8};/i},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes.title=t.content.replace(/&/,"&"))})),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var i={};i["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[n]},i.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:i}};r["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var o={};o[t]={pattern:RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,t),"i"),lookbehind:!0,greedy:!0,inside:r},e.languages.insertBefore("markup","cdata",o)}}),e.languages.xml=e.languages.extend("markup",{}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,function(t){var e=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?[\s\S]*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:RegExp("url\\((?:"+e.source+"|.*?)\\)","i"),selector:RegExp("[^{}\\s](?:[^{};\"']|"+e.source+")*?(?=\\s*\\{)"),string:{pattern:e,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),t.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:t.languages.css}},alias:"language-css"}},n.tag))}(e),e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}}}),e.languages.markup&&e.languages.markup.tag.addInlined("script","javascript"),e.languages.js=e.languages.javascript,"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(t){t=t||document;var n={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(t.querySelectorAll("pre[data-src]")).forEach((function(t){if(!t.hasAttribute("data-src-loaded")){for(var i,r=t.getAttribute("data-src"),o=t,a=/\blang(?:uage)?-([\w-]+)\b/i;o&&!a.test(o.className);)o=o.parentNode;if(o&&(i=(t.className.match(a)||[,""])[1]),!i){var s=(r.match(/\.(\w+)$/)||[,""])[1];i=n[s]||s}var l=document.createElement("code");l.className="language-"+i,t.textContent="",l.textContent="Loading…",t.appendChild(l);var u=new XMLHttpRequest;u.open("GET",r,!0),u.onreadystatechange=function(){4==u.readyState&&(u.status<400&&u.responseText?(l.textContent=u.responseText,e.highlightElement(l),t.setAttribute("data-src-loaded","")):u.status>=400?l.textContent="✖ Error "+u.status+" while fetching file: "+u.statusText:l.textContent="✖ Error: File does not exist or is empty")},u.send(null)}})),e.plugins.toolbar&&e.plugins.toolbar.registerButton("download-file",(function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-src")&&e.hasAttribute("data-download-link")){var n=e.getAttribute("data-src"),i=document.createElement("a");return i.textContent=e.getAttribute("data-download-link-label")||"Download",i.setAttribute("download",""),i.href=n,i}}))},document.addEventListener("DOMContentLoaded",(function(){self.Prism.fileHighlight()})))})),m=function(t,e){if(!t)throw Error("CodeFlask expects a parameter which is Element or a String selector");if(!e)throw Error("CodeFlask expects an object containing options as second parameter");if(t.nodeType)this.editorRoot=t;else{var n=document.querySelector(t);n&&(this.editorRoot=n)}this.opts=e,this.startEditor()};m.prototype.startEditor=function(){if(!c(u,null,this.opts.styleParent))throw Error("Failed to inject CodeFlask CSS.");this.createWrapper(),this.createTextarea(),this.createPre(),this.createCode(),this.runOptions(),this.listenTextarea(),this.populateDefault(),this.updateCode(this.code)},m.prototype.createWrapper=function(){this.code=this.editorRoot.innerHTML,this.editorRoot.innerHTML="",this.elWrapper=this.createElement("div",this.editorRoot),this.elWrapper.classList.add("codeflask")},m.prototype.createTextarea=function(){this.elTextarea=this.createElement("textarea",this.elWrapper),this.elTextarea.classList.add("codeflask__textarea","codeflask__flatten")},m.prototype.createPre=function(){this.elPre=this.createElement("pre",this.elWrapper),this.elPre.classList.add("codeflask__pre","codeflask__flatten")},m.prototype.createCode=function(){this.elCode=this.createElement("code",this.elPre),this.elCode.classList.add("codeflask__code","language-"+(this.opts.language||"html"))},m.prototype.createLineNumbers=function(){this.elLineNumbers=this.createElement("div",this.elWrapper),this.elLineNumbers.classList.add("codeflask__lines"),this.setLineNumber()},m.prototype.createElement=function(t,e){var n=document.createElement(t);return e.appendChild(n),n},m.prototype.runOptions=function(){this.opts.rtl=this.opts.rtl||!1,this.opts.tabSize=this.opts.tabSize||2,this.opts.enableAutocorrect=this.opts.enableAutocorrect||!1,this.opts.lineNumbers=this.opts.lineNumbers||!1,this.opts.defaultTheme=!1!==this.opts.defaultTheme,this.opts.areaId=this.opts.areaId||null,this.opts.ariaLabelledby=this.opts.ariaLabelledby||null,this.opts.readonly=this.opts.readonly||null,"boolean"!=typeof this.opts.handleTabs&&(this.opts.handleTabs=!0),"boolean"!=typeof this.opts.handleSelfClosingCharacters&&(this.opts.handleSelfClosingCharacters=!0),"boolean"!=typeof this.opts.handleNewLineIndentation&&(this.opts.handleNewLineIndentation=!0),!0===this.opts.rtl&&(this.elTextarea.setAttribute("dir","rtl"),this.elPre.setAttribute("dir","rtl")),!1===this.opts.enableAutocorrect&&(this.elTextarea.setAttribute("spellcheck","false"),this.elTextarea.setAttribute("autocapitalize","off"),this.elTextarea.setAttribute("autocomplete","off"),this.elTextarea.setAttribute("autocorrect","off")),this.opts.lineNumbers&&(this.elWrapper.classList.add("codeflask--has-line-numbers"),this.createLineNumbers()),this.opts.defaultTheme&&c("\n.codeflask {\n background: #fff;\n color: #4f559c;\n}\n\n.codeflask .token.punctuation {\n color: #4a4a4a;\n}\n\n.codeflask .token.keyword {\n color: #8500ff;\n}\n\n.codeflask .token.operator {\n color: #ff5598;\n}\n\n.codeflask .token.string {\n color: #41ad8f;\n}\n\n.codeflask .token.comment {\n color: #9badb7;\n}\n\n.codeflask .token.function {\n color: #8500ff;\n}\n\n.codeflask .token.boolean {\n color: #8500ff;\n}\n\n.codeflask .token.number {\n color: #8500ff;\n}\n\n.codeflask .token.selector {\n color: #8500ff;\n}\n\n.codeflask .token.property {\n color: #8500ff;\n}\n\n.codeflask .token.tag {\n color: #8500ff;\n}\n\n.codeflask .token.attr-value {\n color: #8500ff;\n}\n","theme-default",this.opts.styleParent),this.opts.areaId&&this.elTextarea.setAttribute("id",this.opts.areaId),this.opts.ariaLabelledby&&this.elTextarea.setAttribute("aria-labelledby",this.opts.ariaLabelledby),this.opts.readonly&&this.enableReadonlyMode()},m.prototype.updateLineNumbersCount=function(){for(var t="",e=1;e<=this.lineNumber;e++)t=t+''+e+"";this.elLineNumbers.innerHTML=t},m.prototype.listenTextarea=function(){var t=this;this.elTextarea.addEventListener("input",(function(e){t.code=e.target.value,t.elCode.innerHTML=d(e.target.value),t.highlight(),setTimeout((function(){t.runUpdate(),t.setLineNumber()}),1)})),this.elTextarea.addEventListener("keydown",(function(e){t.handleTabs(e),t.handleSelfClosingCharacters(e),t.handleNewLineIndentation(e)})),this.elTextarea.addEventListener("scroll",(function(e){t.elPre.style.transform="translate3d(-"+e.target.scrollLeft+"px, -"+e.target.scrollTop+"px, 0)",t.elLineNumbers&&(t.elLineNumbers.style.transform="translate3d(0, -"+e.target.scrollTop+"px, 0)")}))},m.prototype.handleTabs=function(t){if(this.opts.handleTabs){if(9!==t.keyCode)return;t.preventDefault();var e=this.elTextarea,n=e.selectionDirection,i=e.selectionStart,r=e.selectionEnd,o=e.value,a=o.substr(0,i),s=o.substring(i,r),l=o.substring(r),u=" ".repeat(this.opts.tabSize);if(i!==r&&s.length>=u.length){var c=i-a.split("\n").pop().length,h=u.length,d=u.length;t.shiftKey?(o.substr(c,u.length)===u?(h=-h,c>i?(s=s.substring(0,c)+s.substring(c+u.length),d=0):c===i?(h=0,d=0,s=s.substring(u.length)):(d=-d,a=a.substring(0,c)+a.substring(c+u.length))):(h=0,d=0),s=s.replace(new RegExp("\n"+u.split("").join("\\"),"g"),"\n")):(a=a.substr(0,c)+u+a.substring(c,i),s=s.replace(/\n/g,"\n"+u)),e.value=a+s+l,e.selectionStart=i+h,e.selectionEnd=i+s.length+d,e.selectionDirection=n}else e.value=a+u+l,e.selectionStart=i+u.length,e.selectionEnd=i+u.length;var f=e.value;this.updateCode(f),this.elTextarea.selectionEnd=r+this.opts.tabSize}},m.prototype.handleSelfClosingCharacters=function(t){if(this.opts.handleSelfClosingCharacters){var e=t.key;if(["(","[","{","<","'",'"'].includes(e)||[")","]","}",">","'",'"'].includes(e))switch(e){case"(":case")":case"[":case"]":case"{":case"}":case"<":case">":case"'":case'"':this.closeCharacter(e)}}},m.prototype.setLineNumber=function(){this.lineNumber=this.code.split("\n").length,this.opts.lineNumbers&&this.updateLineNumbersCount()},m.prototype.handleNewLineIndentation=function(t){if(this.opts.handleNewLineIndentation&&13===t.keyCode){t.preventDefault();var e=this.elTextarea,n=e.selectionStart,i=e.selectionEnd,r=e.value,o=r.substr(0,n),a=r.substring(i),s=r.lastIndexOf("\n",n-1),l=s+r.slice(s+1).search(/[^ ]|$/),u=l>s?l-s:0,c=o+"\n"+" ".repeat(u)+a;e.value=c,e.selectionStart=n+u+1,e.selectionEnd=n+u+1,this.updateCode(e.value)}},m.prototype.closeCharacter=function(t){var e=this.elTextarea.selectionStart,n=this.elTextarea.selectionEnd;if(this.skipCloseChar(t)){var i=this.code.substr(n,1)===t,r=i?n+1:n,o=!i&&["'",'"'].includes(t)?t:"",a=""+this.code.substring(0,e)+o+this.code.substring(r);this.updateCode(a),this.elTextarea.selectionEnd=++this.elTextarea.selectionStart}else{var s=t;switch(t){case"(":s=String.fromCharCode(t.charCodeAt()+1);break;case"<":case"{":case"[":s=String.fromCharCode(t.charCodeAt()+2)}var l=this.code.substring(e,n),u=""+this.code.substring(0,e)+l+s+this.code.substring(n);this.updateCode(u)}this.elTextarea.selectionEnd=e},m.prototype.skipCloseChar=function(t){var e=this.elTextarea.selectionStart,n=this.elTextarea.selectionEnd,i=Math.abs(n-e)>0;return[")","}","]",">"].includes(t)||["'",'"'].includes(t)&&!i},m.prototype.updateCode=function(t){this.code=t,this.elTextarea.value=t,this.elCode.innerHTML=d(t),this.highlight(),this.setLineNumber(),setTimeout(this.runUpdate.bind(this),1)},m.prototype.updateLanguage=function(t){var e=this.opts.language;this.elCode.classList.remove("language-"+e),this.elCode.classList.add("language-"+t),this.opts.language=t,this.highlight()},m.prototype.addLanguage=function(t,e){p.languages[t]=e},m.prototype.populateDefault=function(){this.updateCode(this.code)},m.prototype.highlight=function(){p.highlightElement(this.elCode,!1)},m.prototype.onUpdate=function(t){if(t&&"[object Function]"!=={}.toString.call(t))throw Error("CodeFlask expects callback of type Function");this.updateCallBack=t},m.prototype.getCode=function(){return this.code},m.prototype.runUpdate=function(){this.updateCallBack&&this.updateCallBack(this.code)},m.prototype.enableReadonlyMode=function(){this.elTextarea.setAttribute("readonly",!0)},m.prototype.disableReadonlyMode=function(){this.elTextarea.removeAttribute("readonly")};const g=m},5643:function(t){t.exports=function(){"use strict";function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function e(e){for(var n=1;nt.length)&&(e=t.length);for(var n=0,i=new Array(e);n
',pt=Number.isNaN||g.isNaN;function mt(t){return"number"==typeof t&&!pt(t)}var gt=function(t){return t>0&&t<1/0};function vt(t){return void 0===t}function yt(t){return"object"===r(t)&&null!==t}var bt=Object.prototype.hasOwnProperty;function _t(t){if(!yt(t))return!1;try{var e=t.constructor,n=e.prototype;return e&&n&&bt.call(n,"isPrototypeOf")}catch(t){return!1}}function wt(t){return"function"==typeof t}var xt=Array.prototype.slice;function kt(t){return Array.from?Array.from(t):xt.call(t)}function St(t,e){return t&&wt(e)&&(Array.isArray(t)||mt(t.length)?kt(t).forEach((function(n,i){e.call(t,n,i,t)})):yt(t)&&Object.keys(t).forEach((function(n){e.call(t,t[n],n,t)}))),t}var Ct=Object.assign||function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i0&&n.forEach((function(e){yt(e)&&Object.keys(e).forEach((function(n){t[n]=e[n]}))})),t},Tt=/\.\d*(?:0|9){12}\d*$/;function Ot(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return Tt.test(t)?Math.round(t*e)/e:t}var Et=/^width|height|left|top|marginLeft|marginTop$/;function At(t,e){var n=t.style;St(e,(function(t,e){Et.test(e)&&mt(t)&&(t="".concat(t,"px")),n[e]=t}))}function Lt(t,e){return t.classList?t.classList.contains(e):t.className.indexOf(e)>-1}function Mt(t,e){if(e)if(mt(t.length))St(t,(function(t){Mt(t,e)}));else if(t.classList)t.classList.add(e);else{var n=t.className.trim();n?n.indexOf(e)<0&&(t.className="".concat(n," ").concat(e)):t.className=e}}function Pt(t,e){e&&(mt(t.length)?St(t,(function(t){Pt(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function Nt(t,e,n){e&&(mt(t.length)?St(t,(function(t){Nt(t,e,n)})):n?Mt(t,e):Pt(t,e))}var Dt=/([a-z\d])([A-Z])/g;function jt(t){return t.replace(Dt,"$1-$2").toLowerCase()}function It(t,e){return yt(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(jt(e)))}function Rt(t,e,n){yt(n)?t[e]=n:t.dataset?t.dataset[e]=n:t.setAttribute("data-".concat(jt(e)),n)}function Ft(t,e){if(yt(t[e]))try{delete t[e]}catch(n){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(n){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(jt(e)))}var Bt=/\s\s*/,zt=function(){var t=!1;if(m){var e=!1,n=function(){},i=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});g.addEventListener("test",n,i),g.removeEventListener("test",n,i)}return t}();function qt(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n;e.trim().split(Bt).forEach((function(e){if(!zt){var o=t.listeners;o&&o[e]&&o[e][n]&&(r=o[e][n],delete o[e][n],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,r,i)}))}function Ht(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n;e.trim().split(Bt).forEach((function(e){if(i.once&&!zt){var o=t.listeners,a=void 0===o?{}:o;r=function(){delete a[e][n],t.removeEventListener(e,r,i);for(var o=arguments.length,s=new Array(o),l=0;lMath.abs(i)&&(i=l)}))})),i}function Xt(t,n){var i=t.pageX,r=t.pageY,o={endX:i,endY:r};return n?o:e({startX:i,startY:r},o)}function Jt(t){var e=0,n=0,i=0;return St(t,(function(t){var r=t.startX,o=t.startY;e+=r,n+=o,i+=1})),{pageX:e/=i,pageY:n/=i}}function Qt(t){var e=t.aspectRatio,n=t.height,i=t.width,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=gt(i),a=gt(n);if(o&&a){var s=n*e;"contain"===r&&s>i||"cover"===r&&s90?{width:l,height:s}:{width:s,height:l}}function ee(t,e,n,i){var r=e.aspectRatio,o=e.naturalWidth,a=e.naturalHeight,s=e.rotate,l=void 0===s?0:s,c=e.scaleX,h=void 0===c?1:c,d=e.scaleY,f=void 0===d?1:d,p=n.aspectRatio,m=n.naturalWidth,g=n.naturalHeight,v=i.fillColor,y=void 0===v?"transparent":v,b=i.imageSmoothingEnabled,_=void 0===b||b,w=i.imageSmoothingQuality,x=void 0===w?"low":w,k=i.maxWidth,S=void 0===k?1/0:k,C=i.maxHeight,T=void 0===C?1/0:C,O=i.minWidth,E=void 0===O?0:O,A=i.minHeight,L=void 0===A?0:A,M=document.createElement("canvas"),P=M.getContext("2d"),N=Qt({aspectRatio:p,width:S,height:T}),D=Qt({aspectRatio:p,width:E,height:L},"cover"),j=Math.min(N.width,Math.max(D.width,m)),I=Math.min(N.height,Math.max(D.height,g)),R=Qt({aspectRatio:r,width:S,height:T}),F=Qt({aspectRatio:r,width:E,height:L},"cover"),B=Math.min(R.width,Math.max(F.width,o)),z=Math.min(R.height,Math.max(F.height,a)),q=[-B/2,-z/2,B,z];return M.width=Ot(j),M.height=Ot(I),P.fillStyle=y,P.fillRect(0,0,j,I),P.save(),P.translate(j/2,I/2),P.rotate(l*Math.PI/180),P.scale(h,f),P.imageSmoothingEnabled=_,P.imageSmoothingQuality=x,P.drawImage.apply(P,[t].concat(u(q.map((function(t){return Math.floor(Ot(t))}))))),P.restore(),M}var ne=String.fromCharCode;function ie(t,e,n){var i="";n+=e;for(var r=e;r0;)n.push(ne.apply(null,kt(r.subarray(0,i)))),r=r.subarray(i);return"data:".concat(e,";base64,").concat(btoa(n.join("")))}function se(t){var e,n=new DataView(t);try{var i,r,o;if(255===n.getUint8(0)&&216===n.getUint8(1))for(var a=n.byteLength,s=2;s+1=8&&(o=l+c)}}}if(o){var h,d,f=n.getUint16(o,i);for(d=0;d=0?r:ct),height:Math.max(n.offsetHeight,o>=0?o:ht)};this.containerData=a,At(i,{width:a.width,height:a.height}),Mt(t,D),Pt(i,D)},initCanvas:function(){var t=this.containerData,e=this.imageData,n=this.options.viewMode,i=Math.abs(e.rotate)%180==90,r=i?e.naturalHeight:e.naturalWidth,o=i?e.naturalWidth:e.naturalHeight,a=r/o,s=t.width,l=t.height;t.height*a>t.width?3===n?s=t.height*a:l=t.width/a:3===n?l=t.width/a:s=t.height*a;var u={aspectRatio:a,naturalWidth:r,naturalHeight:o,width:s,height:l};this.canvasData=u,this.limited=1===n||2===n,this.limitCanvas(!0,!0),u.width=Math.min(Math.max(u.width,u.minWidth),u.maxWidth),u.height=Math.min(Math.max(u.height,u.minHeight),u.maxHeight),u.left=(t.width-u.width)/2,u.top=(t.height-u.height)/2,u.oldLeft=u.left,u.oldTop=u.top,this.initialCanvasData=Ct({},u)},limitCanvas:function(t,e){var n=this.options,i=this.containerData,r=this.canvasData,o=this.cropBoxData,a=n.viewMode,s=r.aspectRatio,l=this.cropped&&o;if(t){var u=Number(n.minCanvasWidth)||0,c=Number(n.minCanvasHeight)||0;a>1?(u=Math.max(u,i.width),c=Math.max(c,i.height),3===a&&(c*s>u?u=c*s:c=u/s)):a>0&&(u?u=Math.max(u,l?o.width:0):c?c=Math.max(c,l?o.height:0):l&&(u=o.width,(c=o.height)*s>u?u=c*s:c=u/s));var h=Qt({aspectRatio:s,width:u,height:c});u=h.width,c=h.height,r.minWidth=u,r.minHeight=c,r.maxWidth=1/0,r.maxHeight=1/0}if(e)if(a>(l?0:1)){var d=i.width-r.width,f=i.height-r.height;r.minLeft=Math.min(0,d),r.minTop=Math.min(0,f),r.maxLeft=Math.max(0,d),r.maxTop=Math.max(0,f),l&&this.limited&&(r.minLeft=Math.min(o.left,o.left+(o.width-r.width)),r.minTop=Math.min(o.top,o.top+(o.height-r.height)),r.maxLeft=o.left,r.maxTop=o.top,2===a&&(r.width>=i.width&&(r.minLeft=Math.min(0,d),r.maxLeft=Math.max(0,d)),r.height>=i.height&&(r.minTop=Math.min(0,f),r.maxTop=Math.max(0,f))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=i.width,r.maxTop=i.height},renderCanvas:function(t,e){var n=this.canvasData,i=this.imageData;if(e){var r=te({width:i.naturalWidth*Math.abs(i.scaleX||1),height:i.naturalHeight*Math.abs(i.scaleY||1),degree:i.rotate||0}),o=r.width,a=r.height,s=n.width*(o/n.naturalWidth),l=n.height*(a/n.naturalHeight);n.left-=(s-n.width)/2,n.top-=(l-n.height)/2,n.width=s,n.height=l,n.aspectRatio=o/a,n.naturalWidth=o,n.naturalHeight=a,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.widthn.maxHeight||n.heighte.width?r.height=r.width/n:r.width=r.height*n),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*i),r.height=Math.max(r.minHeight,r.height*i),r.left=e.left+(e.width-r.width)/2,r.top=e.top+(e.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=Ct({},r)},limitCropBox:function(t,e){var n=this.options,i=this.containerData,r=this.canvasData,o=this.cropBoxData,a=this.limited,s=n.aspectRatio;if(t){var l=Number(n.minCropBoxWidth)||0,u=Number(n.minCropBoxHeight)||0,c=a?Math.min(i.width,r.width,r.width+r.left,i.width-r.left):i.width,h=a?Math.min(i.height,r.height,r.height+r.top,i.height-r.top):i.height;l=Math.min(l,i.width),u=Math.min(u,i.height),s&&(l&&u?u*s>l?u=l/s:l=u*s:l?u=l/s:u&&(l=u*s),h*s>c?h=c/s:c=h*s),o.minWidth=Math.min(l,c),o.minHeight=Math.min(u,h),o.maxWidth=c,o.maxHeight=h}e&&(a?(o.minLeft=Math.max(0,r.left),o.minTop=Math.max(0,r.top),o.maxLeft=Math.min(i.width,r.left+r.width)-o.width,o.maxTop=Math.min(i.height,r.top+r.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=i.width-o.width,o.maxTop=i.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.widthn.maxHeight||n.height=e.width&&n.height>=e.height?x:_),At(this.cropBox,Ct({width:n.width,height:n.height},Gt({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Wt(this.element,U,this.getData())}},ce={initPreview:function(){var t=this.element,e=this.crossOrigin,n=this.options.preview,i=e?this.crossOriginUrl:this.url,r=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=i,o.alt=r,this.viewBox.appendChild(o),this.viewBoxImage=o,n){var a=n;"string"==typeof n?a=t.ownerDocument.querySelectorAll(n):n.querySelector&&(a=[n]),this.previews=a,St(a,(function(t){var n=document.createElement("img");Rt(t,z,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(n.crossOrigin=e),n.src=i,n.alt=r,n.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(n)}))}},resetPreview:function(){St(this.previews,(function(t){var e=It(t,z);At(t,{width:e.width,height:e.height}),t.innerHTML=e.html,Ft(t,z)}))},preview:function(){var t=this.imageData,e=this.canvasData,n=this.cropBoxData,i=n.width,r=n.height,o=t.width,a=t.height,s=n.left-e.left-t.left,l=n.top-e.top-t.top;this.cropped&&!this.disabled&&(At(this.viewBoxImage,Ct({width:o,height:a},Gt(Ct({translateX:-s,translateY:-l},t)))),St(this.previews,(function(e){var n=It(e,z),u=n.width,c=n.height,h=u,d=c,f=1;i&&(d=r*(f=u/i)),r&&d>c&&(h=i*(f=c/r),d=c),At(e,{width:h,height:d}),At(e.getElementsByTagName("img")[0],Ct({width:o*f,height:a*f},Gt(Ct({translateX:-s*f,translateY:-l*f},t))))})))}},he={bind:function(){var t=this.element,e=this.options,n=this.cropper;wt(e.cropstart)&&Ht(t,Y,e.cropstart),wt(e.cropmove)&&Ht(t,Z,e.cropmove),wt(e.cropend)&&Ht(t,V,e.cropend),wt(e.crop)&&Ht(t,U,e.crop),wt(e.zoom)&&Ht(t,rt,e.zoom),Ht(n,J,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&Ht(n,it,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Ht(n,$,this.onDblclick=this.dblclick.bind(this)),Ht(t.ownerDocument,Q,this.onCropMove=this.cropMove.bind(this)),Ht(t.ownerDocument,tt,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&Ht(window,nt,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,n=this.cropper;wt(e.cropstart)&&qt(t,Y,e.cropstart),wt(e.cropmove)&&qt(t,Z,e.cropmove),wt(e.cropend)&&qt(t,V,e.cropend),wt(e.crop)&&qt(t,U,e.crop),wt(e.zoom)&&qt(t,rt,e.zoom),qt(n,J,this.onCropStart),e.zoomable&&e.zoomOnWheel&&qt(n,it,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&qt(n,$,this.onDblclick),qt(t.ownerDocument,Q,this.onCropMove),qt(t.ownerDocument,tt,this.onCropEnd),e.responsive&&qt(window,nt,this.onResize)}},de={resize:function(){if(!this.disabled){var t,e,n=this.options,i=this.container,r=this.containerData,o=i.offsetWidth/r.width,a=i.offsetHeight/r.height,s=Math.abs(o-1)>Math.abs(a-1)?o:a;1!==s&&(n.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),n.restore&&(this.setCanvasData(St(t,(function(e,n){t[n]=e*s}))),this.setCropBoxData(St(e,(function(t,n){e[n]=t*s})))))}},dblclick:function(){this.disabled||this.options.dragMode===W||this.setDragMode(Lt(this.dragBox,P)?H:q)},wheel:function(t){var e=this,n=Number(this.options.wheelZoomRatio)||.1,i=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?i=t.deltaY>0?1:-1:t.wheelDelta?i=-t.wheelDelta/120:t.detail&&(i=t.detail>0?1:-1),this.zoom(-i*n,t)))},cropStart:function(t){var e=t.buttons,n=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(mt(e)&&1!==e||mt(n)&&0!==n||t.ctrlKey))){var i,r=this.options,o=this.pointers;t.changedTouches?St(t.changedTouches,(function(t){o[t.identifier]=Xt(t)})):o[t.pointerId||0]=Xt(t),i=Object.keys(o).length>1&&r.zoomable&&r.zoomOnTouch?k:It(t.target,B),at.test(i)&&!1!==Wt(this.element,Y,{originalEvent:t,action:i})&&(t.preventDefault(),this.action=i,this.cropping=!1,i===w&&(this.cropping=!0,Mt(this.dragBox,R)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var n=this.pointers;t.preventDefault(),!1!==Wt(this.element,Z,{originalEvent:t,action:e})&&(t.changedTouches?St(t.changedTouches,(function(t){Ct(n[t.identifier]||{},Xt(t,!0))})):Ct(n[t.pointerId||0]||{},Xt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,n=this.pointers;t.changedTouches?St(t.changedTouches,(function(t){delete n[t.identifier]})):delete n[t.pointerId||0],e&&(t.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,Nt(this.dragBox,R,this.cropped&&this.options.modal)),Wt(this.element,V,{originalEvent:t,action:e}))}}},fe={change:function(t){var e,n=this.options,i=this.canvasData,r=this.containerData,o=this.cropBoxData,a=this.pointers,s=this.action,l=n.aspectRatio,u=o.left,c=o.top,h=o.width,d=o.height,f=u+h,p=c+d,m=0,g=0,v=r.width,y=r.height,b=!0;!l&&t.shiftKey&&(l=h&&d?h/d:1),this.limited&&(m=o.minLeft,g=o.minTop,v=m+Math.min(r.width,i.width,i.left+i.width),y=g+Math.min(r.height,i.height,i.top+i.height));var P=a[Object.keys(a)[0]],N={x:P.endX-P.startX,y:P.endY-P.startY},j=function(t){switch(t){case S:f+N.x>v&&(N.x=v-f);break;case C:u+N.xy&&(N.y=y-p)}};switch(s){case _:u+=N.x,c+=N.y;break;case S:if(N.x>=0&&(f>=v||l&&(c<=g||p>=y))){b=!1;break}j(S),(h+=N.x)<0&&(s=C,u-=h=-h),l&&(d=h/l,c+=(o.height-d)/2);break;case O:if(N.y<=0&&(c<=g||l&&(u<=m||f>=v))){b=!1;break}j(O),d-=N.y,c+=N.y,d<0&&(s=T,c-=d=-d),l&&(h=d*l,u+=(o.width-h)/2);break;case C:if(N.x<=0&&(u<=m||l&&(c<=g||p>=y))){b=!1;break}j(C),h-=N.x,u+=N.x,h<0&&(s=S,u-=h=-h),l&&(d=h/l,c+=(o.height-d)/2);break;case T:if(N.y>=0&&(p>=y||l&&(u<=m||f>=v))){b=!1;break}j(T),(d+=N.y)<0&&(s=O,c-=d=-d),l&&(h=d*l,u+=(o.width-h)/2);break;case E:if(l){if(N.y<=0&&(c<=g||f>=v)){b=!1;break}j(O),d-=N.y,c+=N.y,h=d*l}else j(O),j(S),N.x>=0?fg&&(d-=N.y,c+=N.y):(d-=N.y,c+=N.y);h<0&&d<0?(s=M,c-=d=-d,u-=h=-h):h<0?(s=A,u-=h=-h):d<0&&(s=L,c-=d=-d);break;case A:if(l){if(N.y<=0&&(c<=g||u<=m)){b=!1;break}j(O),d-=N.y,c+=N.y,h=d*l,u+=o.width-h}else j(O),j(C),N.x<=0?u>m?(h-=N.x,u+=N.x):N.y<=0&&c<=g&&(b=!1):(h-=N.x,u+=N.x),N.y<=0?c>g&&(d-=N.y,c+=N.y):(d-=N.y,c+=N.y);h<0&&d<0?(s=L,c-=d=-d,u-=h=-h):h<0?(s=E,u-=h=-h):d<0&&(s=M,c-=d=-d);break;case M:if(l){if(N.x<=0&&(u<=m||p>=y)){b=!1;break}j(C),h-=N.x,u+=N.x,d=h/l}else j(T),j(C),N.x<=0?u>m?(h-=N.x,u+=N.x):N.y>=0&&p>=y&&(b=!1):(h-=N.x,u+=N.x),N.y>=0?p=0&&(f>=v||p>=y)){b=!1;break}j(S),d=(h+=N.x)/l}else j(T),j(S),N.x>=0?f=0&&p>=y&&(b=!1):h+=N.x,N.y>=0?p0?s=N.y>0?L:E:N.x<0&&(u-=h,s=N.y>0?M:A),N.y<0&&(c-=d),this.cropped||(Pt(this.cropBox,D),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}b&&(o.width=h,o.height=d,o.left=u,o.top=c,this.action=s,this.renderCropBox()),St(a,(function(t){t.startX=t.endX,t.startY=t.endY}))}},pe={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Mt(this.dragBox,R),Pt(this.cropBox,D),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Ct({},this.initialImageData),this.canvasData=Ct({},this.initialCanvasData),this.cropBoxData=Ct({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Ct(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Pt(this.dragBox,R),Mt(this.cropBox,D)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,St(this.previews,(function(e){e.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Pt(this.cropper,N)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Mt(this.cropper,N)),this},destroy:function(){var t=this.element;return t[b]?(t[b]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this.canvasData,i=n.left,r=n.top;return this.moveTo(vt(t)?t:i+Number(t),vt(e)?e:r+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this.canvasData,i=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(mt(t)&&(n.left=t,i=!0),mt(e)&&(n.top=e,i=!0),i&&this.renderCanvas(!0)),this},zoom:function(t,e){var n=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(n.width*t/n.naturalWidth,null,e)},zoomTo:function(t,e,n){var i=this.options,r=this.canvasData,o=r.width,a=r.height,s=r.naturalWidth,l=r.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&i.zoomable){var u=s*t,c=l*t;if(!1===Wt(this.element,rt,{ratio:t,oldRatio:o/s,originalEvent:n}))return this;if(n){var h=this.pointers,d=Ut(this.cropper),f=h&&Object.keys(h).length?Jt(h):{pageX:n.pageX,pageY:n.pageY};r.left-=(u-o)*((f.pageX-d.left-r.left)/o),r.top-=(c-a)*((f.pageY-d.top-r.top)/a)}else _t(e)&&mt(e.x)&&mt(e.y)?(r.left-=(u-o)*((e.x-r.left)/o),r.top-=(c-a)*((e.y-r.top)/a)):(r.left-=(u-o)/2,r.top-=(c-a)/2);r.width=u,r.height=c,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return mt(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,mt(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(mt(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this.imageData,i=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(mt(t)&&(n.scaleX=t,i=!0),mt(e)&&(n.scaleY=e,i=!0),i&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.options,i=this.imageData,r=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-r.left,y:o.top-r.top,width:o.width,height:o.height};var a=i.width/i.naturalWidth;if(St(t,(function(e,n){t[n]=e/a})),e){var s=Math.round(t.y+t.height),l=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=l-t.x,t.height=s-t.y}}else t={x:0,y:0,width:0,height:0};return n.rotatable&&(t.rotate=i.rotate||0),n.scalable&&(t.scaleX=i.scaleX||1,t.scaleY=i.scaleY||1),t},setData:function(t){var e=this.options,n=this.imageData,i=this.canvasData,r={};if(this.ready&&!this.disabled&&_t(t)){var o=!1;e.rotatable&&mt(t.rotate)&&t.rotate!==n.rotate&&(n.rotate=t.rotate,o=!0),e.scalable&&(mt(t.scaleX)&&t.scaleX!==n.scaleX&&(n.scaleX=t.scaleX,o=!0),mt(t.scaleY)&&t.scaleY!==n.scaleY&&(n.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var a=n.width/n.naturalWidth;mt(t.x)&&(r.left=t.x*a+i.left),mt(t.y)&&(r.top=t.y*a+i.top),mt(t.width)&&(r.width=t.width*a),mt(t.height)&&(r.height=t.height*a),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?Ct({},this.containerData):{}},getImageData:function(){return this.sized?Ct({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&St(["left","top","width","height","naturalWidth","naturalHeight"],(function(n){e[n]=t[n]})),e},setCanvasData:function(t){var e=this.canvasData,n=e.aspectRatio;return this.ready&&!this.disabled&&_t(t)&&(mt(t.left)&&(e.left=t.left),mt(t.top)&&(e.top=t.top),mt(t.width)?(e.width=t.width,e.height=t.width/n):mt(t.height)&&(e.height=t.height,e.width=t.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,n,i=this.cropBoxData,r=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&_t(t)&&(mt(t.left)&&(i.left=t.left),mt(t.top)&&(i.top=t.top),mt(t.width)&&t.width!==i.width&&(e=!0,i.width=t.width),mt(t.height)&&t.height!==i.height&&(n=!0,i.height=t.height),r&&(e?i.height=i.width/r:n&&(i.width=i.height*r)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,n=ee(this.image,this.imageData,e,t);if(!this.cropped)return n;var i=this.getData(t.rounded),r=i.x,o=i.y,a=i.width,s=i.height,l=n.width/Math.floor(e.naturalWidth);1!==l&&(r*=l,o*=l,a*=l,s*=l);var c=a/s,h=Qt({aspectRatio:c,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),d=Qt({aspectRatio:c,width:t.minWidth||0,height:t.minHeight||0},"cover"),f=Qt({aspectRatio:c,width:t.width||(1!==l?n.width:a),height:t.height||(1!==l?n.height:s)}),p=f.width,m=f.height;p=Math.min(h.width,Math.max(d.width,p)),m=Math.min(h.height,Math.max(d.height,m));var g=document.createElement("canvas"),v=g.getContext("2d");g.width=Ot(p),g.height=Ot(m),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,p,m);var y=t.imageSmoothingEnabled,b=void 0===y||y,_=t.imageSmoothingQuality;v.imageSmoothingEnabled=b,_&&(v.imageSmoothingQuality=_);var w,x,k,S,C,T,O=n.width,E=n.height,A=r,L=o;A<=-a||A>O?(A=0,w=0,k=0,C=0):A<=0?(k=-A,A=0,C=w=Math.min(O,a+A)):A<=O&&(k=0,C=w=Math.min(a,O-A)),w<=0||L<=-s||L>E?(L=0,x=0,S=0,T=0):L<=0?(S=-L,L=0,T=x=Math.min(E,s+L)):L<=E&&(S=0,T=x=Math.min(s,E-L));var M=[A,L,w,x];if(C>0&&T>0){var P=p/a;M.push(k*P,S*P,C*P,T*P)}return v.drawImage.apply(v,[n].concat(u(M.map((function(t){return Math.floor(Ot(t))}))))),g},setAspectRatio:function(t){var e=this.options;return this.disabled||vt(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,n=this.dragBox,i=this.face;if(this.ready&&!this.disabled){var r=t===q,o=e.movable&&t===H;t=r||o?t:W,e.dragMode=t,Rt(n,B,t),Nt(n,P,r),Nt(n,F,o),e.cropBoxMovable||(Rt(i,B,t),Nt(i,P,r),Nt(i,F,o))}return this}},me=g.Cropper,ge=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o(this,t),!e||!ut.test(e.tagName))throw new Error("The first argument is required and must be an or '),this.element.appendChild(t));var r=t.getElementsByTagName("span")[0];return r&&(null!=r.textContent?r.textContent=this.options.dictFallbackMessage:null!=r.innerText&&(r.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t,e,n,i){var r={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},o=t.width/t.height;null==e&&null==n?(e=r.srcWidth,n=r.srcHeight):null==e?e=n*o:null==n&&(n=e/o);var a=(e=Math.min(e,r.srcWidth))/(n=Math.min(n,r.srcHeight));if(r.srcWidth>e||r.srcHeight>n)if("crop"===i)o>a?(r.srcHeight=t.height,r.srcWidth=r.srcHeight*a):(r.srcWidth=t.width,r.srcHeight=r.srcWidth/a);else{if("contain"!==i)throw new Error("Unknown resizeMethod '".concat(i,"'"));o>a?n=e/o:e=n*o}return r.srcX=(t.width-r.srcWidth)/2,r.srcY=(t.height-r.srcHeight)/2,r.trgWidth=e,r.trgHeight=n,r},transformFile:function(t,e){return(this.options.resizeWidth||this.options.resizeHeight)&&t.type.match(/image.*/)?this.resizeImage(t,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(t)},previewTemplate:'
',drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:function(t){},dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:function(t){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var e=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){t.previewElement=_.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement);var n,i=a(t.previewElement.querySelectorAll("[data-dz-name]"),!0);try{for(i.s();!(n=i.n()).done;){var r=n.value;r.textContent=t.name}}catch(t){i.e(t)}finally{i.f()}var o,s=a(t.previewElement.querySelectorAll("[data-dz-size]"),!0);try{for(s.s();!(o=s.n()).done;)(r=o.value).innerHTML=this.filesize(t.size)}catch(t){s.e(t)}finally{s.f()}this.options.addRemoveLinks&&(t._removeLink=_.createElement('
'.concat(this.options.dictRemoveFile,"")),t.previewElement.appendChild(t._removeLink));var l,u=function(n){return n.preventDefault(),n.stopPropagation(),t.status===_.UPLOADING?_.confirm(e.options.dictCancelUploadConfirmation,(function(){return e.removeFile(t)})):e.options.dictRemoveFileConfirmation?_.confirm(e.options.dictRemoveFileConfirmation,(function(){return e.removeFile(t)})):e.removeFile(t)},c=a(t.previewElement.querySelectorAll("[data-dz-remove]"),!0);try{for(c.s();!(l=c.n()).done;)l.value.addEventListener("click",u)}catch(t){c.e(t)}finally{c.f()}}},removedfile:function(t){return null!=t.previewElement&&null!=t.previewElement.parentNode&&t.previewElement.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(t,e){if(t.previewElement){t.previewElement.classList.remove("dz-file-preview");var n,i=a(t.previewElement.querySelectorAll("[data-dz-thumbnail]"),!0);try{for(i.s();!(n=i.n()).done;){var r=n.value;r.alt=t.name,r.src=e}}catch(t){i.e(t)}finally{i.f()}return setTimeout((function(){return t.previewElement.classList.add("dz-image-preview")}),1)}},error:function(t,e){if(t.previewElement){t.previewElement.classList.add("dz-error"),"string"!=typeof e&&e.error&&(e=e.error);var n,i=a(t.previewElement.querySelectorAll("[data-dz-errormessage]"),!0);try{for(i.s();!(n=i.n()).done;)n.value.textContent=e}catch(t){i.e(t)}finally{i.f()}}},errormultiple:function(){},processing:function(t){if(t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink))return t._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(t,e,n){if(t.previewElement){var i,r=a(t.previewElement.querySelectorAll("[data-dz-uploadprogress]"),!0);try{for(r.s();!(i=r.n()).done;){var o=i.value;"PROGRESS"===o.nodeName?o.value=e:o.style.width="".concat(e,"%")}}catch(t){r.e(t)}finally{r.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(t){if(t.previewElement)return t.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(t){return this.emit("error",t,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(t){if(t._removeLink&&(t._removeLink.innerHTML=this.options.dictRemoveFile),t.previewElement)return t.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}};function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n
"))),this.clickableElements.length&&function e(){t.hiddenFileInput&&t.hiddenFileInput.parentNode.removeChild(t.hiddenFileInput),t.hiddenFileInput=document.createElement("input"),t.hiddenFileInput.setAttribute("type","file"),(null===t.options.maxFiles||t.options.maxFiles>1)&&t.hiddenFileInput.setAttribute("multiple","multiple"),t.hiddenFileInput.className="dz-hidden-input",null!==t.options.acceptedFiles&&t.hiddenFileInput.setAttribute("accept",t.options.acceptedFiles),null!==t.options.capture&&t.hiddenFileInput.setAttribute("capture",t.options.capture),t.hiddenFileInput.setAttribute("tabindex","-1"),t.hiddenFileInput.style.visibility="hidden",t.hiddenFileInput.style.position="absolute",t.hiddenFileInput.style.top="0",t.hiddenFileInput.style.left="0",t.hiddenFileInput.style.height="0",t.hiddenFileInput.style.width="0",n.getElement(t.options.hiddenInputContainer,"hiddenInputContainer").appendChild(t.hiddenFileInput),t.hiddenFileInput.addEventListener("change",(function(){var n=t.hiddenFileInput.files;if(n.length){var i,r=c(n,!0);try{for(r.s();!(i=r.n()).done;){var o=i.value;t.addFile(o)}}catch(t){r.e(t)}finally{r.f()}}t.emit("addedfiles",n),e()}))}(),this.URL=null!==window.URL?window.URL:window.webkitURL;var e,i=c(this.events,!0);try{for(i.s();!(e=i.n()).done;){var r=e.value;this.on(r,this.options[r])}}catch(t){i.e(t)}finally{i.f()}this.on("uploadprogress",(function(){return t.updateTotalUploadProgress()})),this.on("removedfile",(function(){return t.updateTotalUploadProgress()})),this.on("canceled",(function(e){return t.emit("complete",e)})),this.on("complete",(function(e){if(0===t.getAddedFiles().length&&0===t.getUploadingFiles().length&&0===t.getQueuedFiles().length)return setTimeout((function(){return t.emit("queuecomplete")}),0)}));var o=function(t){if(function(t){if(t.dataTransfer.types)for(var e=0;e
".concat(this.options.dictFallbackText,"")),i+=' ');var r=n.createElement(i);return"FORM"!==this.element.tagName?(e=n.createElement(''))).appendChild(r):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=e?e:r}},{key:"getExistingFallback",value:function(){for(var t=function(t){var e,n=c(t,!0);try{for(n.s();!(e=n.n()).done;){var i=e.value;if(/(^| )fallback($| )/.test(i.className))return i}}catch(t){n.e(t)}finally{n.f()}},e=0,n=["div","form"];e0){for(var i=["tb","gb","mb","kb","b"],r=0;r=Math.pow(this.options.filesizeBase,4-r)/10){e=t/Math.pow(this.options.filesizeBase,4-r),n=o;break}}e=Math.round(10*e)/10}return"".concat(e," ").concat(this.options.dictFileSizeUnits[n])}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(t){if(t.dataTransfer){this.emit("drop",t);for(var e=[],n=0;n0){var r,o=c(i,!0);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.isFile?a.file((function(t){if(!n.options.ignoreHiddenFiles||"."!==t.name.substring(0,1))return t.fullPath="".concat(e,"/").concat(t.name),n.addFile(t)})):a.isDirectory&&n._addFilesFromDirectory(a,"".concat(e,"/").concat(a.name))}}catch(t){o.e(t)}finally{o.f()}t()}return null}),r)}()}},{key:"accept",value:function(t,e){this.options.maxFilesize&&t.size>1024*this.options.maxFilesize*1024?e(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):n.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(e(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,e):e(this.options.dictInvalidFileType)}},{key:"addFile",value:function(t){var e=this;t.upload={uuid:n.uuidv4(),progress:0,total:t.size,bytesSent:0,filename:this._renameFile(t)},this.files.push(t),t.status=n.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,(function(n){n?(t.accepted=!1,e._errorProcessing([t],n)):(t.accepted=!0,e.options.autoQueue&&e.enqueueFile(t)),e._updateMaxFilesReachedClass()}))}},{key:"enqueueFiles",value:function(t){var e,n=c(t,!0);try{for(n.s();!(e=n.n()).done;){var i=e.value;this.enqueueFile(i)}}catch(t){n.e(t)}finally{n.f()}return null}},{key:"enqueueFile",value:function(t){var e=this;if(t.status!==n.ADDED||!0!==t.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(t.status=n.QUEUED,this.options.autoProcessQueue)return setTimeout((function(){return e.processQueue()}),0)}},{key:"_enqueueThumbnail",value:function(t){var e=this;if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(t),setTimeout((function(){return e._processThumbnailQueue()}),0)}},{key:"_processThumbnailQueue",value:function(){var t=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var e=this._thumbnailQueue.shift();return this.createThumbnail(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,(function(n){return t.emit("thumbnail",e,n),t._processingThumbnail=!1,t._processThumbnailQueue()}))}}},{key:"removeFile",value:function(t){if(t.status===n.UPLOADING&&this.cancelUpload(t),this.files=w(this.files,t),this.emit("removedfile",t),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(t){null==t&&(t=!1);var e,i=c(this.files.slice(),!0);try{for(i.s();!(e=i.n()).done;){var r=e.value;(r.status!==n.UPLOADING||t)&&this.removeFile(r)}}catch(t){i.e(t)}finally{i.f()}return null}},{key:"resizeImage",value:function(t,e,i,r,o){var a=this;return this.createThumbnail(t,e,i,r,!0,(function(e,i){if(null==i)return o(t);var r=a.options.resizeMimeType;null==r&&(r=t.type);var s=i.toDataURL(r,a.options.resizeQuality);return"image/jpeg"!==r&&"image/jpg"!==r||(s=S.restore(t.dataURL,s)),o(n.dataURItoBlob(s))}))}},{key:"createThumbnail",value:function(t,e,n,i,r,o){var a=this,s=new FileReader;s.onload=function(){t.dataURL=s.result,"image/svg+xml"!==t.type?a.createThumbnailFromUrl(t,e,n,i,r,o):null!=o&&o(s.result)},s.readAsDataURL(t)}},{key:"displayExistingFile",value:function(t,e,n,i){var r=this,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];this.emit("addedfile",t),this.emit("complete",t),o?(t.dataURL=e,this.createThumbnailFromUrl(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,(function(e){r.emit("thumbnail",t,e),n&&n()}),i)):(this.emit("thumbnail",t,e),n&&n())}},{key:"createThumbnailFromUrl",value:function(t,e,n,i,r,o,a){var s=this,l=document.createElement("img");return a&&(l.crossOrigin=a),r="from-image"!=getComputedStyle(document.body).imageOrientation&&r,l.onload=function(){var a=function(t){return t(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&r&&(a=function(t){return EXIF.getData(l,(function(){return t(EXIF.getTag(this,"Orientation"))}))}),a((function(r){t.width=l.width,t.height=l.height;var a=s.options.resize.call(s,t,e,n,i),u=document.createElement("canvas"),c=u.getContext("2d");switch(u.width=a.trgWidth,u.height=a.trgHeight,r>4&&(u.width=a.trgHeight,u.height=a.trgWidth),r){case 2:c.translate(u.width,0),c.scale(-1,1);break;case 3:c.translate(u.width,u.height),c.rotate(Math.PI);break;case 4:c.translate(0,u.height),c.scale(1,-1);break;case 5:c.rotate(.5*Math.PI),c.scale(1,-1);break;case 6:c.rotate(.5*Math.PI),c.translate(0,-u.width);break;case 7:c.rotate(.5*Math.PI),c.translate(u.height,-u.width),c.scale(-1,1);break;case 8:c.rotate(-.5*Math.PI),c.translate(-u.height,0)}k(c,l,null!=a.srcX?a.srcX:0,null!=a.srcY?a.srcY:0,a.srcWidth,a.srcHeight,null!=a.trgX?a.trgX:0,null!=a.trgY?a.trgY:0,a.trgWidth,a.trgHeight);var h=u.toDataURL("image/png");if(null!=o)return o(h,u)}))},null!=o&&(l.onerror=o),l.src=t.dataURL}},{key:"processQueue",value:function(){var t=this.options.parallelUploads,e=this.getUploadingFiles().length,n=e;if(!(e>=t)){var i=this.getQueuedFiles();if(i.length>0){if(this.options.uploadMultiple)return this.processFiles(i.slice(0,t-e));for(;n1?e-1:0),i=1;ie.options.chunkSize),t[0].upload.totalChunkCount=Math.ceil(r.size/e.options.chunkSize)}if(t[0].upload.chunked){var o=t[0],a=i[0];o.upload.chunks=[];var s=function(){for(var i=0;void 0!==o.upload.chunks[i];)i++;if(!(i>=o.upload.totalChunkCount)){var r=i*e.options.chunkSize,s=Math.min(r+e.options.chunkSize,a.size),l={name:e._getParamName(0),data:a.webkitSlice?a.webkitSlice(r,s):a.slice(r,s),filename:o.upload.filename,chunkIndex:i};o.upload.chunks[i]={file:o,index:i,dataBlock:l,status:n.UPLOADING,progress:0,retries:0},e._uploadData(t,[l])}};if(o.upload.finishedChunkUpload=function(i,r){var a=!0;i.status=n.SUCCESS,i.dataBlock=null,i.xhr=null;for(var l=0;l1?e-1:0),i=1;i=a;s?o++:o--)r[o]=e.charCodeAt(o);return new Blob([i],{type:n})};var w=function(t,e){return t.filter((function(t){return t!==e})).map((function(t){return t}))},x=function(t){return t.replace(/[\-_](\w)/g,(function(t){return t.charAt(1).toUpperCase()}))};_.createElement=function(t){var e=document.createElement("div");return e.innerHTML=t,e.childNodes[0]},_.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},_.getElement=function(t,e){var n;if("string"==typeof t?n=document.querySelector(t):null!=t.nodeType&&(n=t),null==n)throw new Error("Invalid `".concat(e,"` option provided. Please provide a CSS selector or a plain HTML element."));return n},_.getElements=function(t,e){var n,i;if(t instanceof Array){i=[];try{var r,o=c(t,!0);try{for(o.s();!(r=o.n()).done;)n=r.value,i.push(this.getElement(n,e))}catch(t){o.e(t)}finally{o.f()}}catch(t){i=null}}else if("string"==typeof t){i=[];var a,s=c(document.querySelectorAll(t),!0);try{for(s.s();!(a=s.n()).done;)n=a.value,i.push(n)}catch(t){s.e(t)}finally{s.f()}}else null!=t.nodeType&&(i=[t]);if(null==i||!i.length)throw new Error("Invalid `".concat(e,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return i},_.confirm=function(t,e,n){return window.confirm(t)?e():null!=n?n():void 0},_.isValidFile=function(t,e){if(!e)return!0;e=e.split(",");var n,i=t.type,r=i.replace(/\/.*$/,""),o=c(e,!0);try{for(o.s();!(n=o.n()).done;){var a=n.value;if("."===(a=a.trim()).charAt(0)){if(-1!==t.name.toLowerCase().indexOf(a.toLowerCase(),t.name.length-a.length))return!0}else if(/\/\*$/.test(a)){if(r===a.replace(/\/.*$/,""))return!0}else if(i===a)return!0}}catch(t){o.e(t)}finally{o.f()}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(t){return this.each((function(){return new _(this,t)}))}),_.ADDED="added",_.QUEUED="queued",_.ACCEPTED=_.QUEUED,_.UPLOADING="uploading",_.PROCESSING=_.UPLOADING,_.CANCELED="canceled",_.ERROR="error",_.SUCCESS="success";var k=function(t,e,n,i,r,o,a,s,l,u){var c=function(t){t.naturalWidth;var e=t.naturalHeight,n=document.createElement("canvas");n.width=1,n.height=e;var i=n.getContext("2d");i.drawImage(t,0,0);for(var r=i.getImageData(1,0,1,e).data,o=0,a=e,s=e;s>o;)0===r[4*(s-1)+3]?a=s:o=s,s=a+o>>1;var l=s/e;return 0===l?1:l}(e);return t.drawImage(e,n,i,r,o,a,s,l,u/c)},S=function(){function t(){d(this,t)}return p(t,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(t){for(var e="",n=void 0,i=void 0,r="",o=void 0,a=void 0,s=void 0,l="",u=0;o=(n=t[u++])>>2,a=(3&n)<<4|(i=t[u++])>>4,s=(15&i)<<2|(r=t[u++])>>6,l=63&r,isNaN(i)?s=l=64:isNaN(r)&&(l=64),e=e+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(l),n=i=r="",o=a=s=l="",ut.length)break}return n}},{key:"decode64",value:function(t){var e=void 0,n=void 0,i="",r=void 0,o=void 0,a="",s=0,l=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(t),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");e=this.KEY_STR.indexOf(t.charAt(s++))<<2|(r=this.KEY_STR.indexOf(t.charAt(s++)))>>4,n=(15&r)<<4|(o=this.KEY_STR.indexOf(t.charAt(s++)))>>2,i=(3&o)<<6|(a=this.KEY_STR.indexOf(t.charAt(s++))),l.push(e),64!==o&&l.push(n),64!==a&&l.push(i),e=n=i="",r=o=a="",s{"use strict";n.d(e,{A:()=>I});var i=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],r={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(t){return"undefined"!=typeof console&&void 0},getWeek:function(t){var e=new Date(t.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var n=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},o={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var e=t%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1};const a=o;var s=function(t,e){return void 0===e&&(e=2),("000"+t).slice(-1*e)},l=function(t){return!0===t?1:0};function u(t,e){var n;return function(){var i=this,r=arguments;clearTimeout(n),n=setTimeout((function(){return t.apply(i,r)}),e)}}var c=function(t){return t instanceof Array?t:[t]};function h(t,e,n){if(!0===n)return t.classList.add(e);t.classList.remove(e)}function d(t,e,n){var i=window.document.createElement(t);return e=e||"",n=n||"",i.className=e,void 0!==n&&(i.textContent=n),i}function f(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function p(t,e){return e(t)?t:t.parentNode?p(t.parentNode,e):void 0}function m(t,e){var n=d("div","numInputWrapper"),i=d("input","numInput "+t),r=d("span","arrowUp"),o=d("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?i.type="number":(i.type="text",i.pattern="\\d*"),void 0!==e)for(var a in e)i.setAttribute(a,e[a]);return n.appendChild(i),n.appendChild(r),n.appendChild(o),n}function g(t){try{return"function"==typeof t.composedPath?t.composedPath()[0]:t.target}catch(e){return t.target}}var v=function(){},y=function(t,e,n){return n.months[e?"shorthand":"longhand"][t]},b={D:v,F:function(t,e,n){t.setMonth(n.months.longhand.indexOf(e))},G:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},H:function(t,e){t.setHours(parseFloat(e))},J:function(t,e){t.setDate(parseFloat(e))},K:function(t,e,n){t.setHours(t.getHours()%12+12*l(new RegExp(n.amPM[1],"i").test(e)))},M:function(t,e,n){t.setMonth(n.months.shorthand.indexOf(e))},S:function(t,e){t.setSeconds(parseFloat(e))},U:function(t,e){return new Date(1e3*parseFloat(e))},W:function(t,e,n){var i=parseInt(e),r=new Date(t.getFullYear(),0,2+7*(i-1),0,0,0,0);return r.setDate(r.getDate()-r.getDay()+n.firstDayOfWeek),r},Y:function(t,e){t.setFullYear(parseFloat(e))},Z:function(t,e){return new Date(e)},d:function(t,e){t.setDate(parseFloat(e))},h:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},i:function(t,e){t.setMinutes(parseFloat(e))},j:function(t,e){t.setDate(parseFloat(e))},l:v,m:function(t,e){t.setMonth(parseFloat(e)-1)},n:function(t,e){t.setMonth(parseFloat(e)-1)},s:function(t,e){t.setSeconds(parseFloat(e))},u:function(t,e){return new Date(parseFloat(e))},w:v,y:function(t,e){t.setFullYear(2e3+parseFloat(e))}},_={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},w={Z:function(t){return t.toISOString()},D:function(t,e,n){return e.weekdays.shorthand[w.w(t,e,n)]},F:function(t,e,n){return y(w.n(t,e,n)-1,!1,e)},G:function(t,e,n){return s(w.h(t,e,n))},H:function(t){return s(t.getHours())},J:function(t,e){return void 0!==e.ordinal?t.getDate()+e.ordinal(t.getDate()):t.getDate()},K:function(t,e){return e.amPM[l(t.getHours()>11)]},M:function(t,e){return y(t.getMonth(),!0,e)},S:function(t){return s(t.getSeconds())},U:function(t){return t.getTime()/1e3},W:function(t,e,n){return n.getWeek(t)},Y:function(t){return s(t.getFullYear(),4)},d:function(t){return s(t.getDate())},h:function(t){return t.getHours()%12?t.getHours()%12:12},i:function(t){return s(t.getMinutes())},j:function(t){return t.getDate()},l:function(t,e){return e.weekdays.longhand[t.getDay()]},m:function(t){return s(t.getMonth()+1)},n:function(t){return t.getMonth()+1},s:function(t){return t.getSeconds()},u:function(t){return t.getTime()},w:function(t){return t.getDay()},y:function(t){return String(t.getFullYear()).substring(2)}},x=function(t){var e=t.config,n=void 0===e?r:e,i=t.l10n,a=void 0===i?o:i,s=t.isMobile,l=void 0!==s&&s;return function(t,e,i){var r=i||a;return void 0===n.formatDate||l?e.split("").map((function(e,i,o){return w[e]&&"\\"!==o[i-1]?w[e](t,r,n):"\\"!==e?e:""})).join(""):n.formatDate(t,e,r)}},k=function(t){var e=t.config,n=void 0===e?r:e,i=t.l10n,a=void 0===i?o:i;return function(t,e,i,o){if(0===t||t){var s,l=o||a,u=t;if(t instanceof Date)s=new Date(t.getTime());else if("string"!=typeof t&&void 0!==t.toFixed)s=new Date(t);else if("string"==typeof t){var c=e||(n||r).dateFormat,h=String(t).trim();if("today"===h)s=new Date,i=!0;else if(n&&n.parseDate)s=n.parseDate(t,c);else if(/Z$/.test(h)||/GMT$/.test(h))s=new Date(t);else{for(var d=void 0,f=[],p=0,m=0,g="";pMath.min(e,n)&&t=0?new Date:new Date(n.config.minDate.getTime()),i=A(n.config);e.setHours(i.hours,i.minutes,i.seconds,e.getMilliseconds()),n.selectedDates=[e],n.latestSelectedDateObj=e}void 0!==t&&"blur"!==t.type&&function(t){t.preventDefault();var e="keydown"===t.type,i=g(t),r=i;void 0!==n.amPM&&i===n.amPM&&(n.amPM.textContent=n.l10n.amPM[l(n.amPM.textContent===n.l10n.amPM[0])]);var o=parseFloat(r.getAttribute("min")),a=parseFloat(r.getAttribute("max")),u=parseFloat(r.getAttribute("step")),c=parseInt(r.value,10),h=t.delta||(e?38===t.which?1:-1:0),d=c+u*h;if(void 0!==r.value&&2===r.value.length){var f=r===n.hourElement,p=r===n.minuteElement;da&&(d=r===n.hourElement?d-a-l(!n.amPM):o,p&&H(void 0,1,n.hourElement)),n.amPM&&f&&(1===u?d+c===23:Math.abs(d-c)>u)&&(n.amPM.textContent=n.l10n.amPM[l(n.amPM.textContent===n.l10n.amPM[0])]),r.value=s(d)}}(t);var r=n._input.value;N(),Tt(),n._input.value!==r&&n._debouncedChange()}function N(){if(void 0!==n.hourElement&&void 0!==n.minuteElement){var t,e,i=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,r=(parseInt(n.minuteElement.value,10)||0)%60,o=void 0!==n.secondElement?(parseInt(n.secondElement.value,10)||0)%60:0;void 0!==n.amPM&&(t=i,e=n.amPM.textContent,i=t%12+12*l(e===n.l10n.amPM[1]));var a=void 0!==n.config.minTime||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&0===S(n.latestSelectedDateObj,n.config.minDate,!0),s=void 0!==n.config.maxTime||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&0===S(n.latestSelectedDateObj,n.config.maxDate,!0);if(void 0!==n.config.maxTime&&void 0!==n.config.minTime&&n.config.minTime>n.config.maxTime){var u=T(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),c=T(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),h=T(i,r,o);if(h>c&&h=12)]),void 0!==n.secondElement&&(n.secondElement.value=s(i)))}function R(t){var e=g(t),n=parseInt(e.value)+(t.delta||0);(n/1e3>1||"Enter"===t.key&&!/[^\d]/.test(n.toString()))&&it(n)}function F(t,e,i,r){return e instanceof Array?e.forEach((function(e){return F(t,e,i,r)})):t instanceof Array?t.forEach((function(t){return F(t,e,i,r)})):(t.addEventListener(e,i,r),void n._handlers.push({remove:function(){return t.removeEventListener(e,i,r)}}))}function B(){wt("onChange")}function z(t,e){var i=void 0!==t?n.parseDate(t):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate=0&&S(t,n.selectedDates[1])<=0)}(e)&&!kt(e)&&a.classList.add("inRange"),n.weekNumbers&&1===n.config.showMonths&&"prevMonthDay"!==t&&r%7==6&&n.weekNumbers.insertAdjacentHTML("beforeend",""+n.config.getWeek(e)+""),wt("onDayCreate",a),a}function U(t){t.focus(),"range"===n.config.mode&<(t)}function V(t){for(var e=t>0?0:n.config.showMonths-1,i=t>0?n.config.showMonths:-1,r=e;r!=i;r+=t)for(var o=n.daysContainer.children[r],a=t>0?0:o.children.length-1,s=t>0?o.children.length:-1,l=a;l!=s;l+=t){var u=o.children[l];if(-1===u.className.indexOf("hidden")&&rt(u.dateObj))return u}}function Z(t,e){var i=o(),r=ot(i||document.body),a=void 0!==t?t:r?i:void 0!==n.selectedDateElem&&ot(n.selectedDateElem)?n.selectedDateElem:void 0!==n.todayDateElem&&ot(n.todayDateElem)?n.todayDateElem:V(e>0?1:-1);void 0===a?n._input.focus():r?function(t,e){for(var i=-1===t.className.indexOf("Month")?t.dateObj.getMonth():n.currentMonth,r=e>0?n.config.showMonths:-1,o=e>0?1:-1,a=i-n.currentMonth;a!=r;a+=o)for(var s=n.daysContainer.children[a],l=i-n.currentMonth===a?t.$i+e:e<0?s.children.length-1:0,u=s.children.length,c=l;c>=0&&c0?u:-1);c+=o){var h=s.children[c];if(-1===h.className.indexOf("hidden")&&rt(h.dateObj)&&Math.abs(t.$i-c)>=Math.abs(e))return U(h)}n.changeMonth(o),Z(V(o),0)}(a,e):U(a)}function Y(t,e){for(var i=(new Date(t,e,1).getDay()-n.l10n.firstDayOfWeek+7)%7,r=n.utils.getDaysInMonth((e-1+12)%12,t),o=n.utils.getDaysInMonth(e,t),a=window.document.createDocumentFragment(),s=n.config.showMonths>1,l=s?"prevMonthDay hidden":"prevMonthDay",u=s?"nextMonthDay hidden":"nextMonthDay",c=r+1-i,h=0;c<=r;c++,h++)a.appendChild(W("flatpickr-day "+l,new Date(t,e-1,c),0,h));for(c=1;c<=o;c++,h++)a.appendChild(W("flatpickr-day",new Date(t,e,c),0,h));for(var f=o+1;f<=42-i&&(1===n.config.showMonths||h%7!=0);f++,h++)a.appendChild(W("flatpickr-day "+u,new Date(t,e+1,f%o),0,h));var p=d("div","dayContainer");return p.appendChild(a),p}function $(){if(void 0!==n.daysContainer){f(n.daysContainer),n.weekNumbers&&f(n.weekNumbers);for(var t=document.createDocumentFragment(),e=0;e1||"dropdown"!==n.config.monthSelectorType)){var t=function(t){return!(void 0!==n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&tn.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var e=0;e<12;e++)if(t(e)){var i=d("option","flatpickr-monthDropdown-month");i.value=new Date(n.currentYear,e).getMonth().toString(),i.textContent=y(e,n.config.shorthandCurrentMonth,n.l10n),i.tabIndex=-1,n.currentMonth===e&&(i.selected=!0),n.monthsDropdownContainer.appendChild(i)}}}function K(){var t,e=d("div","flatpickr-month"),i=window.document.createDocumentFragment();n.config.showMonths>1||"static"===n.config.monthSelectorType?t=d("span","cur-month"):(n.monthsDropdownContainer=d("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),F(n.monthsDropdownContainer,"change",(function(t){var e=g(t),i=parseInt(e.value,10);n.changeMonth(i-n.currentMonth),wt("onMonthChange")})),G(),t=n.monthsDropdownContainer);var r=m("cur-year",{tabindex:"-1"}),o=r.getElementsByTagName("input")[0];o.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&o.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(o.setAttribute("max",n.config.maxDate.getFullYear().toString()),o.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var a=d("div","flatpickr-current-month");return a.appendChild(t),a.appendChild(r),i.appendChild(a),e.appendChild(i),{container:e,yearElement:o,monthElement:t}}function X(){f(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var t=n.config.showMonths;t--;){var e=K();n.yearElements.push(e.yearElement),n.monthElements.push(e.monthElement),n.monthNav.appendChild(e.container)}n.monthNav.appendChild(n.nextMonthNav)}function J(){n.weekdayContainer?f(n.weekdayContainer):n.weekdayContainer=d("div","flatpickr-weekdays");for(var t=n.config.showMonths;t--;){var e=d("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(e)}return Q(),n.weekdayContainer}function Q(){if(n.weekdayContainer){var t=n.l10n.firstDayOfWeek,e=M(n.l10n.weekdays.shorthand);t>0&&t\n "+e.join("")+"\n \n "}}function tt(t,e){void 0===e&&(e=!0);var i=e?t:t-n.currentMonth;i<0&&!0===n._hidePrevMonthArrow||i>0&&!0===n._hideNextMonthArrow||(n.currentMonth+=i,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,wt("onYearChange"),G()),$(),wt("onMonthChange"),St())}function et(t){return n.calendarContainer.contains(t)}function nt(t){if(n.isOpen&&!n.config.inline){var e=g(t),i=et(e),r=!(e===n.input||e===n.altInput||n.element.contains(e)||t.path&&t.path.indexOf&&(~t.path.indexOf(n.input)||~t.path.indexOf(n.altInput)))&&!i&&!et(t.relatedTarget),o=!n.config.ignoredFocusElements.some((function(t){return t.contains(e)}));r&&o&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement&&""!==n.input.value&&void 0!==n.input.value&&w(),n.close(),n.config&&"range"===n.config.mode&&1===n.selectedDates.length&&n.clear(!1))}}function it(t){if(!(!t||n.config.minDate&&tn.config.maxDate.getFullYear())){var e=t,i=n.currentYear!==e;n.currentYear=e||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),i&&(n.redraw(),wt("onYearChange"),G())}}function rt(t,e){var i;void 0===e&&(e=!0);var r=n.parseDate(t,void 0,e);if(n.config.minDate&&r&&S(r,n.config.minDate,void 0!==e?e:!n.minDateHasTime)<0||n.config.maxDate&&r&&S(r,n.config.maxDate,void 0!==e?e:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&0===n.config.disable.length)return!0;if(void 0===r)return!1;for(var o=!!n.config.enable,a=null!==(i=n.config.enable)&&void 0!==i?i:n.config.disable,s=0,l=void 0;s=l.from.getTime()&&r.getTime()<=l.to.getTime())return o}return!o}function ot(t){return void 0!==n.daysContainer&&(-1===t.className.indexOf("hidden")&&-1===t.className.indexOf("flatpickr-disabled")&&n.daysContainer.contains(t))}function at(t){var e=t.target===n._input,i=n._input.value.trimEnd()!==Ct();!e||!i||t.relatedTarget&&et(t.relatedTarget)||n.setDate(n._input.value,!0,t.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function st(e){var i=g(e),r=n.config.wrap?t.contains(i):i===n._input,a=n.config.allowInput,s=n.isOpen&&(!a||!r),l=n.config.inline&&r&&!a;if(13===e.keyCode&&r){if(a)return n.setDate(n._input.value,!0,i===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),i.blur();n.open()}else if(et(i)||s||l){var u=!!n.timeContainer&&n.timeContainer.contains(i);switch(e.keyCode){case 13:u?(e.preventDefault(),w(),mt()):gt(e);break;case 27:e.preventDefault(),mt();break;case 8:case 46:r&&!n.config.allowInput&&(e.preventDefault(),n.clear());break;case 37:case 39:if(u||r)n.hourElement&&n.hourElement.focus();else{e.preventDefault();var c=o();if(void 0!==n.daysContainer&&(!1===a||c&&ot(c))){var h=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),tt(h),Z(V(1),0)):Z(void 0,h)}}break;case 38:case 40:e.preventDefault();var d=40===e.keyCode?1:-1;n.daysContainer&&void 0!==i.$i||i===n.input||i===n.altInput?e.ctrlKey?(e.stopPropagation(),it(n.currentYear-d),Z(V(1),0)):u||Z(void 0,7*d):i===n.currentYearElement?it(n.currentYear-d):n.config.enableTime&&(!u&&n.hourElement&&n.hourElement.focus(),w(e),n._debouncedChange());break;case 9:if(u){var f=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter((function(t){return t})),p=f.indexOf(i);if(-1!==p){var m=f[p+(e.shiftKey?-1:1)];e.preventDefault(),(m||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(i)&&e.shiftKey&&(e.preventDefault(),n._input.focus())}}if(void 0!==n.amPM&&i===n.amPM)switch(e.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],N(),Tt();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],N(),Tt()}(r||et(i))&&wt("onKeyDown",e)}function lt(t,e){if(void 0===e&&(e="flatpickr-day"),1===n.selectedDates.length&&(!t||t.classList.contains(e)&&!t.classList.contains("flatpickr-disabled"))){for(var i=t?t.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),r=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),o=Math.min(i,n.selectedDates[0].getTime()),a=Math.max(i,n.selectedDates[0].getTime()),s=!1,l=0,u=0,c=o;co&&cl)?l=c:c>r&&(!u||c ."+e)).forEach((function(e){var o=e.dateObj.getTime(),a=l>0&&o0&&o>u;if(a)return e.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach((function(t){e.classList.remove(t)}));s&&!a||(["startRange","inRange","endRange","notAllowed"].forEach((function(t){e.classList.remove(t)})),void 0!==t&&(t.classList.add(i<=n.selectedDates[0].getTime()?"startRange":"endRange"),ri&&o===r&&e.classList.add("endRange"),o>=l&&(0===u||o<=u)&&C(o,r,i)&&e.classList.add("inRange")))}))}}function ut(){!n.isOpen||n.config.static||n.config.inline||ft()}function ct(t){return function(e){var i=n.config["_"+t+"Date"]=n.parseDate(e,n.config.dateFormat),r=n.config["_"+("min"===t?"max":"min")+"Date"];void 0!==i&&(n["min"===t?"minDateHasTime":"maxDateHasTime"]=i.getHours()>0||i.getMinutes()>0||i.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter((function(t){return rt(t)})),n.selectedDates.length||"min"!==t||D(i),Tt()),n.daysContainer&&(pt(),void 0!==i?n.currentYearElement[t]=i.getFullYear().toString():n.currentYearElement.removeAttribute(t),n.currentYearElement.disabled=!!r&&void 0!==i&&r.getFullYear()===i.getFullYear())}}function ht(){return n.config.wrap?t.querySelector("[data-input]"):t}function dt(){"object"!=typeof n.config.locale&&void 0===j.l10ns[n.config.locale]&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=L(L({},j.l10ns.default),"object"==typeof n.config.locale?n.config.locale:"default"!==n.config.locale?j.l10ns[n.config.locale]:void 0),_.D="("+n.l10n.weekdays.shorthand.join("|")+")",_.l="("+n.l10n.weekdays.longhand.join("|")+")",_.M="("+n.l10n.months.shorthand.join("|")+")",_.F="("+n.l10n.months.longhand.join("|")+")",_.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")",void 0===L(L({},e),JSON.parse(JSON.stringify(t.dataset||{}))).time_24hr&&void 0===j.defaultConfig.time_24hr&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=x(n),n.parseDate=k({config:n.config,l10n:n.l10n})}function ft(t){if("function"!=typeof n.config.position){if(void 0!==n.calendarContainer){wt("onPreCalendarPosition");var e=t||n._positionElement,i=Array.prototype.reduce.call(n.calendarContainer.children,(function(t,e){return t+e.offsetHeight}),0),r=n.calendarContainer.offsetWidth,o=n.config.position.split(" "),a=o[0],s=o.length>1?o[1]:null,l=e.getBoundingClientRect(),u=window.innerHeight-l.bottom,c="above"===a||"below"!==a&&ui,d=window.pageYOffset+l.top+(c?-i-2:e.offsetHeight+2);if(h(n.calendarContainer,"arrowTop",!c),h(n.calendarContainer,"arrowBottom",c),!n.config.inline){var f=window.pageXOffset+l.left,p=!1,m=!1;"center"===s?(f-=(r-l.width)/2,p=!0):"right"===s&&(f-=r-l.width,m=!0),h(n.calendarContainer,"arrowLeft",!p&&!m),h(n.calendarContainer,"arrowCenter",p),h(n.calendarContainer,"arrowRight",m);var g=window.document.body.offsetWidth-(window.pageXOffset+l.right),v=f+r>window.document.body.offsetWidth,y=g+r>window.document.body.offsetWidth;if(h(n.calendarContainer,"rightMost",v),!n.config.static)if(n.calendarContainer.style.top=d+"px",v)if(y){var b=function(){for(var t=null,e=0;en.currentMonth+n.config.showMonths-1)&&"range"!==n.config.mode;if(n.selectedDateElem=i,"single"===n.config.mode)n.selectedDates=[r];else if("multiple"===n.config.mode){var a=kt(r);a?n.selectedDates.splice(parseInt(a),1):n.selectedDates.push(r)}else"range"===n.config.mode&&(2===n.selectedDates.length&&n.clear(!1,!1),n.latestSelectedDateObj=r,n.selectedDates.push(r),0!==S(r,n.selectedDates[0],!0)&&n.selectedDates.sort((function(t,e){return t.getTime()-e.getTime()})));if(N(),o){var s=n.currentYear!==r.getFullYear();n.currentYear=r.getFullYear(),n.currentMonth=r.getMonth(),s&&(wt("onYearChange"),G()),wt("onMonthChange")}if(St(),$(),Tt(),o||"range"===n.config.mode||1!==n.config.showMonths?void 0!==n.selectedDateElem&&void 0===n.hourElement&&n.selectedDateElem&&n.selectedDateElem.focus():U(i),void 0!==n.hourElement&&void 0!==n.hourElement&&n.hourElement.focus(),n.config.closeOnSelect){var l="single"===n.config.mode&&!n.config.enableTime,u="range"===n.config.mode&&2===n.selectedDates.length&&!n.config.enableTime;(l||u)&&mt()}B()}}n.parseDate=k({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=F,n._setHoursFromDate=D,n._positionCalendar=ft,n.changeMonth=tt,n.changeYear=it,n.clear=function(t,e){void 0===t&&(t=!0);void 0===e&&(e=!0);n.input.value="",void 0!==n.altInput&&(n.altInput.value="");void 0!==n.mobileInput&&(n.mobileInput.value="");n.selectedDates=[],n.latestSelectedDateObj=void 0,!0===e&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth());if(!0===n.config.enableTime){var i=A(n.config);I(i.hours,i.minutes,i.seconds)}n.redraw(),t&&wt("onChange")},n.close=function(){n.isOpen=!1,n.isMobile||(void 0!==n.calendarContainer&&n.calendarContainer.classList.remove("open"),void 0!==n._input&&n._input.classList.remove("active"));wt("onClose")},n.onMouseOver=lt,n._createElement=d,n.createDay=W,n.destroy=function(){void 0!==n.config&&wt("onDestroy");for(var t=n._handlers.length;t--;)n._handlers[t].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var e=n.calendarContainer.parentNode;if(e.lastChild&&e.removeChild(e.lastChild),e.parentNode){for(;e.firstChild;)e.parentNode.insertBefore(e.firstChild,e);e.parentNode.removeChild(e)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput);n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly"));["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(t){try{delete n[t]}catch(t){}}))},n.isEnabled=rt,n.jumpToDate=z,n.updateValue=Tt,n.open=function(t,e){void 0===e&&(e=n._positionElement);if(!0===n.isMobile){if(t){t.preventDefault();var i=g(t);i&&i.blur()}return void 0!==n.mobileInput&&(n.mobileInput.focus(),n.mobileInput.click()),void wt("onOpen")}if(n._input.disabled||n.config.inline)return;var r=n.isOpen;n.isOpen=!0,r||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),wt("onOpen"),ft(e));!0===n.config.enableTime&&!0===n.config.noCalendar&&(!1!==n.config.allowInput||void 0!==t&&n.timeContainer.contains(t.relatedTarget)||setTimeout((function(){return n.hourElement.select()}),50))},n.redraw=pt,n.set=function(t,e){if(null!==t&&"object"==typeof t)for(var r in Object.assign(n.config,t),t)void 0!==vt[r]&&vt[r].forEach((function(t){return t()}));else n.config[t]=e,void 0!==vt[t]?vt[t].forEach((function(t){return t()})):i.indexOf(t)>-1&&(n.config[t]=c(e));n.redraw(),Tt(!0)},n.setDate=function(t,e,i){void 0===e&&(e=!1);void 0===i&&(i=n.config.dateFormat);if(0!==t&&!t||t instanceof Array&&0===t.length)return n.clear(e);yt(t,i),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),z(void 0,e),D(),0===n.selectedDates.length&&n.clear(!1);Tt(e),e&&wt("onChange")},n.toggle=function(t){if(!0===n.isOpen)return n.close();n.open(t)};var vt={locale:[dt,Q],showMonths:[X,b,J],minDate:[z],maxDate:[z],positionElement:[_t],clickOpens:[function(){!0===n.config.clickOpens?(F(n._input,"focus",n.open),F(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function yt(t,e){var i=[];if(t instanceof Array)i=t.map((function(t){return n.parseDate(t,e)}));else if(t instanceof Date||"number"==typeof t)i=[n.parseDate(t,e)];else if("string"==typeof t)switch(n.config.mode){case"single":case"time":i=[n.parseDate(t,e)];break;case"multiple":i=t.split(n.config.conjunction).map((function(t){return n.parseDate(t,e)}));break;case"range":i=t.split(n.l10n.rangeSeparator).map((function(t){return n.parseDate(t,e)}))}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(t)));n.selectedDates=n.config.allowInvalidPreload?i:i.filter((function(t){return t instanceof Date&&rt(t,!1)})),"range"===n.config.mode&&n.selectedDates.sort((function(t,e){return t.getTime()-e.getTime()}))}function bt(t){return t.slice().map((function(t){return"string"==typeof t||"number"==typeof t||t instanceof Date?n.parseDate(t,void 0,!0):t&&"object"==typeof t&&t.from&&t.to?{from:n.parseDate(t.from,void 0),to:n.parseDate(t.to,void 0)}:t})).filter((function(t){return t}))}function _t(){n._positionElement=n.config.positionElement||n._input}function wt(t,e){if(void 0!==n.config){var i=n.config[t];if(void 0!==i&&i.length>0)for(var r=0;i[r]&&r1||"static"===n.config.monthSelectorType?n.monthElements[e].textContent=y(i.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=i.getMonth().toString(),t.value=i.getFullYear().toString()})),n._hidePrevMonthArrow=void 0!==n.config.minDate&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYearn.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function Ct(t){var e=t||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map((function(t){return n.formatDate(t,e)})).filter((function(t,e,i){return"range"!==n.config.mode||n.config.enableTime||i.indexOf(t)===e})).join("range"!==n.config.mode?n.config.conjunction:n.l10n.rangeSeparator)}function Tt(t){void 0===t&&(t=!0),void 0!==n.mobileInput&&n.mobileFormatStr&&(n.mobileInput.value=void 0!==n.latestSelectedDateObj?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=Ct(n.config.dateFormat),void 0!==n.altInput&&(n.altInput.value=Ct(n.config.altFormat)),!1!==t&&wt("onValueUpdate")}function Ot(t){var e=g(t),i=n.prevMonthNav.contains(e),r=n.nextMonthNav.contains(e);i||r?tt(i?-1:1):n.yearElements.indexOf(e)>=0?e.select():e.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):e.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}return function(){n.element=n.input=t,n.isOpen=!1,function(){var o=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],a=L(L({},JSON.parse(JSON.stringify(t.dataset||{}))),e),s={};n.config.parseDate=a.parseDate,n.config.formatDate=a.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(t){n.config._enable=bt(t)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(t){n.config._disable=bt(t)}});var l="time"===a.mode;if(!a.dateFormat&&(a.enableTime||l)){var u=j.defaultConfig.dateFormat||r.dateFormat;s.dateFormat=a.noCalendar||l?"H:i"+(a.enableSeconds?":S":""):u+" H:i"+(a.enableSeconds?":S":"")}if(a.altInput&&(a.enableTime||l)&&!a.altFormat){var h=j.defaultConfig.altFormat||r.altFormat;s.altFormat=a.noCalendar||l?"h:i"+(a.enableSeconds?":S K":" K"):h+" h:i"+(a.enableSeconds?":S":"")+" K"}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:ct("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:ct("max")});var d=function(t){return function(e){n.config["min"===t?"_minTime":"_maxTime"]=n.parseDate(e,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:d("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:d("max")}),"time"===a.mode&&(n.config.noCalendar=!0,n.config.enableTime=!0);Object.assign(n.config,s,a);for(var f=0;f-1?n.config[m]=c(p[m]).map(v).concat(n.config[m]):void 0===a[m]&&(n.config[m]=p[m])}a.altInputClass||(n.config.altInputClass=ht().className+" "+n.config.altInputClass);wt("onParseConfig")}(),dt(),function(){if(n.input=ht(),!n.input)return void n.config.errorHandler(new Error("Invalid input element specified"));n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=d(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling));n.config.allowInput||n._input.setAttribute("readonly","readonly");_t()}(),function(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var t=n.config.defaultDate||("INPUT"!==n.input.nodeName&&"TEXTAREA"!==n.input.nodeName||!n.input.placeholder||n.input.value!==n.input.placeholder?n.input.value:null);t&&yt(t,n.config.dateFormat);n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()0&&(n.latestSelectedDateObj=n.selectedDates[0]);void 0!==n.config.minTime&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i"));void 0!==n.config.maxTime&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i"));n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}(),n.utils={getDaysInMonth:function(t,e){return void 0===t&&(t=n.currentMonth),void 0===e&&(e=n.currentYear),1===t&&(e%4==0&&e%100!=0||e%400==0)?29:n.l10n.daysInMonth[t]}},n.isMobile||function(){var t=window.document.createDocumentFragment();if(n.calendarContainer=d("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(t.appendChild((n.monthNav=d("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=d("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=d("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,X(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(t){n.__hidePrevMonthArrow!==t&&(h(n.prevMonthNav,"flatpickr-disabled",t),n.__hidePrevMonthArrow=t)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(t){n.__hideNextMonthArrow!==t&&(h(n.nextMonthNav,"flatpickr-disabled",t),n.__hideNextMonthArrow=t)}}),n.currentYearElement=n.yearElements[0],St(),n.monthNav)),n.innerContainer=d("div","flatpickr-innerContainer"),n.config.weekNumbers){var e=function(){n.calendarContainer.classList.add("hasWeeks");var t=d("div","flatpickr-weekwrapper");t.appendChild(d("span","flatpickr-weekday",n.l10n.weekAbbreviation));var e=d("div","flatpickr-weeks");return t.appendChild(e),{weekWrapper:t,weekNumbers:e}}(),i=e.weekWrapper,r=e.weekNumbers;n.innerContainer.appendChild(i),n.weekNumbers=r,n.weekWrapper=i}n.rContainer=d("div","flatpickr-rContainer"),n.rContainer.appendChild(J()),n.daysContainer||(n.daysContainer=d("div","flatpickr-days"),n.daysContainer.tabIndex=-1),$(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),t.appendChild(n.innerContainer)}n.config.enableTime&&t.appendChild(function(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var t=A(n.config);n.timeContainer=d("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var e=d("span","flatpickr-time-separator",":"),i=m("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=i.getElementsByTagName("input")[0];var r=m("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});n.minuteElement=r.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=s(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?t.hours:function(t){switch(t%24){case 0:case 12:return 12;default:return t%12}}(t.hours)),n.minuteElement.value=s(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():t.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(i),n.timeContainer.appendChild(e),n.timeContainer.appendChild(r),n.config.time_24hr&&n.timeContainer.classList.add("time24hr");if(n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var o=m("flatpickr-second");n.secondElement=o.getElementsByTagName("input")[0],n.secondElement.value=s(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():t.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(d("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(o)}n.config.time_24hr||(n.amPM=d("span","flatpickr-am-pm",n.l10n.amPM[l((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM));return n.timeContainer}());h(n.calendarContainer,"rangeMode","range"===n.config.mode),h(n.calendarContainer,"animate",!0===n.config.animate),h(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(t);var o=void 0!==n.config.appendTo&&void 0!==n.config.appendTo.nodeType;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!o&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):void 0!==n.config.appendTo&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var a=d("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(a,n.element),a.appendChild(n.element),n.altInput&&a.appendChild(n.altInput),a.appendChild(n.calendarContainer)}n.config.static||n.config.inline||(void 0!==n.config.appendTo?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}(),function(){n.config.wrap&&["open","close","toggle","clear"].forEach((function(t){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+t+"]"),(function(e){return F(e,"click",n[t])}))}));if(n.isMobile)return void function(){var t=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=d("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=t,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr="datetime-local"===t?"Y-m-d\\TH:i:S":"date"===t?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr));n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d"));n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d"));n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step")));n.input.type="hidden",void 0!==n.altInput&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(t){}F(n.mobileInput,"change",(function(t){n.setDate(g(t).value,!1,n.mobileFormatStr),wt("onChange"),wt("onClose")}))}();var t=u(ut,50);n._debouncedChange=u(B,P),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&F(n.daysContainer,"mouseover",(function(t){"range"===n.config.mode&<(g(t))}));F(n._input,"keydown",st),void 0!==n.calendarContainer&&F(n.calendarContainer,"keydown",st);n.config.inline||n.config.static||F(window,"resize",t);void 0!==window.ontouchstart?F(window.document,"touchstart",nt):F(window.document,"mousedown",nt);F(window.document,"focus",nt,{capture:!0}),!0===n.config.clickOpens&&(F(n._input,"focus",n.open),F(n._input,"click",n.open));void 0!==n.daysContainer&&(F(n.monthNav,"click",Ot),F(n.monthNav,["keyup","increment"],R),F(n.daysContainer,"click",gt));if(void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement){var e=function(t){return g(t).select()};F(n.timeContainer,["increment"],w),F(n.timeContainer,"blur",w,{capture:!0}),F(n.timeContainer,"click",q),F([n.hourElement,n.minuteElement],["focus","click"],e),void 0!==n.secondElement&&F(n.secondElement,"focus",(function(){return n.secondElement&&n.secondElement.select()})),void 0!==n.amPM&&F(n.amPM,"click",(function(t){w(t)}))}n.config.allowInput&&F(n._input,"blur",at)}(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&D(n.config.noCalendar?n.latestSelectedDateObj:void 0),Tt(!1)),b();var o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&o&&ft(),wt("onReady")}(),n}function D(t,e){for(var n=Array.prototype.slice.call(t).filter((function(t){return t instanceof HTMLElement})),i=[],r=0;r{"use strict";"function"!=typeof Object.assign&&(Object.assign=function(t){for(var e=[],n=1;n3&&e<21)return"è";switch(e%10){case 1:case 3:return"r";case 2:return"n";case 4:return"t";default:return"è"}},firstDayOfWeek:1,rangeSeparator:" a ",time_24hr:!0};g.l10ns.cat=g.l10ns.ca=v,g.l10ns;var y="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},b={weekdays:{shorthand:["یەکشەممە","دووشەممە","سێشەممە","چوارشەممە","پێنجشەممە","هەینی","شەممە"],longhand:["یەکشەممە","دووشەممە","سێشەممە","چوارشەممە","پێنجشەممە","هەینی","شەممە"]},months:{shorthand:["ڕێبەندان","ڕەشەمە","نەورۆز","گوڵان","جۆزەردان","پووشپەڕ","گەلاوێژ","خەرمانان","ڕەزبەر","گەڵاڕێزان","سەرماوەز","بەفرانبار"],longhand:["ڕێبەندان","ڕەشەمە","نەورۆز","گوڵان","جۆزەردان","پووشپەڕ","گەلاوێژ","خەرمانان","ڕەزبەر","گەڵاڕێزان","سەرماوەز","بەفرانبار"]},firstDayOfWeek:6,ordinal:function(){return""}};y.l10ns.ckb=b,y.l10ns;var _="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},w={weekdays:{shorthand:["Ne","Po","Út","St","Čt","Pá","So"],longhand:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota"]},months:{shorthand:["Led","Ún","Bře","Dub","Kvě","Čer","Čvc","Srp","Zář","Říj","Lis","Pro"],longhand:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"]},firstDayOfWeek:1,ordinal:function(){return"."},rangeSeparator:" do ",weekAbbreviation:"Týd.",scrollTitle:"Rolujte pro změnu",toggleTitle:"Přepnout dopoledne/odpoledne",amPM:["dop.","odp."],yearAriaLabel:"Rok",time_24hr:!0};_.l10ns.cs=w,_.l10ns;var x="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},k={weekdays:{shorthand:["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"],longhand:["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"]},months:{shorthand:["Ion","Chwef","Maw","Ebr","Mai","Meh","Gorff","Awst","Medi","Hyd","Tach","Rhag"],longhand:["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr"]},firstDayOfWeek:1,ordinal:function(t){return 1===t?"af":2===t?"ail":3===t||4===t?"ydd":5===t||6===t?"ed":t>=7&&t<=10||12==t||15==t||18==t||20==t?"fed":11==t||13==t||14==t||16==t||17==t||19==t?"eg":t>=21&&t<=39?"ain":""},time_24hr:!0};x.l10ns.cy=k,x.l10ns;var S="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},C={weekdays:{shorthand:["søn","man","tir","ons","tors","fre","lør"],longhand:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},months:{shorthand:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],longhand:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"]},ordinal:function(){return"."},firstDayOfWeek:1,rangeSeparator:" til ",weekAbbreviation:"uge",time_24hr:!0};S.l10ns.da=C,S.l10ns;var T="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},O={weekdays:{shorthand:["So","Mo","Di","Mi","Do","Fr","Sa"],longhand:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},months:{shorthand:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],longhand:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},firstDayOfWeek:1,weekAbbreviation:"KW",rangeSeparator:" bis ",scrollTitle:"Zum Ändern scrollen",toggleTitle:"Zum Umschalten klicken",time_24hr:!0};T.l10ns.de=O,T.l10ns;var E={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var e=t%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},A="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},L={firstDayOfWeek:1,rangeSeparator:" ĝis ",weekAbbreviation:"Sem",scrollTitle:"Rulumu por pligrandigi la valoron",toggleTitle:"Klaku por ŝalti",weekdays:{shorthand:["Dim","Lun","Mar","Mer","Ĵaŭ","Ven","Sab"],longhand:["dimanĉo","lundo","mardo","merkredo","ĵaŭdo","vendredo","sabato"]},months:{shorthand:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aŭg","Sep","Okt","Nov","Dec"],longhand:["januaro","februaro","marto","aprilo","majo","junio","julio","aŭgusto","septembro","oktobro","novembro","decembro"]},ordinal:function(){return"-a"},time_24hr:!0};A.l10ns.eo=L,A.l10ns;var M="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},P={weekdays:{shorthand:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],longhand:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"]},months:{shorthand:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],longhand:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]},ordinal:function(){return"º"},firstDayOfWeek:1,rangeSeparator:" a ",time_24hr:!0};M.l10ns.es=P,M.l10ns;var N="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},D={weekdays:{shorthand:["P","E","T","K","N","R","L"],longhand:["Pühapäev","Esmaspäev","Teisipäev","Kolmapäev","Neljapäev","Reede","Laupäev"]},months:{shorthand:["Jaan","Veebr","Märts","Apr","Mai","Juuni","Juuli","Aug","Sept","Okt","Nov","Dets"],longhand:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"]},firstDayOfWeek:1,ordinal:function(){return"."},weekAbbreviation:"Näd",rangeSeparator:" kuni ",scrollTitle:"Keri, et suurendada",toggleTitle:"Klõpsa, et vahetada",time_24hr:!0};N.l10ns.et=D,N.l10ns;var j="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},I={weekdays:{shorthand:["یک","دو","سه","چهار","پنج","جمعه","شنبه"],longhand:["یکشنبه","دوشنبه","سهشنبه","چهارشنبه","پنچشنبه","جمعه","شنبه"]},months:{shorthand:["ژانویه","فوریه","مارس","آوریل","مه","ژوئن","ژوئیه","اوت","سپتامبر","اکتبر","نوامبر","دسامبر"],longhand:["ژانویه","فوریه","مارس","آوریل","مه","ژوئن","ژوئیه","اوت","سپتامبر","اکتبر","نوامبر","دسامبر"]},firstDayOfWeek:6,ordinal:function(){return""}};j.l10ns.fa=I,j.l10ns;var R="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},F={firstDayOfWeek:1,weekdays:{shorthand:["su","ma","ti","ke","to","pe","la"],longhand:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"]},months:{shorthand:["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu"],longhand:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"]},ordinal:function(){return"."},time_24hr:!0};R.l10ns.fi=F,R.l10ns;var B="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},z={weekdays:{shorthand:["Sun","Mán","Týs","Mik","Hós","Frí","Ley"],longhand:["Sunnudagur","Mánadagur","Týsdagur","Mikudagur","Hósdagur","Fríggjadagur","Leygardagur"]},months:{shorthand:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],longhand:["Januar","Februar","Mars","Apríl","Mai","Juni","Juli","August","Septembur","Oktobur","Novembur","Desembur"]},ordinal:function(){return"."},firstDayOfWeek:1,rangeSeparator:" til ",weekAbbreviation:"vika",scrollTitle:"Rulla fyri at broyta",toggleTitle:"Trýst fyri at skifta",yearAriaLabel:"Ár",time_24hr:!0};B.l10ns.fo=z,B.l10ns;var q="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},H={firstDayOfWeek:1,weekdays:{shorthand:["dim","lun","mar","mer","jeu","ven","sam"],longhand:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},months:{shorthand:["janv","févr","mars","avr","mai","juin","juil","août","sept","oct","nov","déc"],longhand:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},ordinal:function(t){return t>1?"":"er"},rangeSeparator:" au ",weekAbbreviation:"Sem",scrollTitle:"Défiler pour augmenter la valeur",toggleTitle:"Cliquer pour basculer",time_24hr:!0};q.l10ns.fr=H,q.l10ns;var W="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},U={weekdays:{shorthand:["Κυ","Δε","Τρ","Τε","Πέ","Πα","Σά"],longhand:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},months:{shorthand:["Ιαν","Φεβ","Μάρ","Απρ","Μάι","Ιούν","Ιούλ","Αύγ","Σεπ","Οκτ","Νοέ","Δεκ"],longhand:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"]},firstDayOfWeek:1,ordinal:function(){return""},weekAbbreviation:"Εβδ",rangeSeparator:" έως ",scrollTitle:"Μετακυλήστε για προσαύξηση",toggleTitle:"Κάντε κλικ για αλλαγή",amPM:["ΠΜ","ΜΜ"],yearAriaLabel:"χρόνος",monthAriaLabel:"μήνας",hourAriaLabel:"ώρα",minuteAriaLabel:"λεπτό"};W.l10ns.gr=U,W.l10ns;var V="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Z={weekdays:{shorthand:["א","ב","ג","ד","ה","ו","ש"],longhand:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"]},months:{shorthand:["ינו׳","פבר׳","מרץ","אפר׳","מאי","יוני","יולי","אוג׳","ספט׳","אוק׳","נוב׳","דצמ׳"],longhand:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"]},rangeSeparator:" אל ",time_24hr:!0};V.l10ns.he=Z,V.l10ns;var Y="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},$={weekdays:{shorthand:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],longhand:["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"]},months:{shorthand:["जन","फर","मार्च","अप्रेल","मई","जून","जूलाई","अग","सित","अक्ट","नव","दि"],longhand:["जनवरी ","फरवरी","मार्च","अप्रेल","मई","जून","जूलाई","अगस्त ","सितम्बर","अक्टूबर","नवम्बर","दिसम्बर"]}};Y.l10ns.hi=$,Y.l10ns;var G="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},K={firstDayOfWeek:1,weekdays:{shorthand:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],longhand:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]},months:{shorthand:["Sij","Velj","Ožu","Tra","Svi","Lip","Srp","Kol","Ruj","Lis","Stu","Pro"],longhand:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"]},time_24hr:!0};G.l10ns.hr=K,G.l10ns;var X="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},J={firstDayOfWeek:1,weekdays:{shorthand:["V","H","K","Sz","Cs","P","Szo"],longhand:["Vasárnap","Hétfő","Kedd","Szerda","Csütörtök","Péntek","Szombat"]},months:{shorthand:["Jan","Feb","Már","Ápr","Máj","Jún","Júl","Aug","Szep","Okt","Nov","Dec"],longhand:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"]},ordinal:function(){return"."},weekAbbreviation:"Hét",scrollTitle:"Görgessen",toggleTitle:"Kattintson a váltáshoz",rangeSeparator:" - ",time_24hr:!0};X.l10ns.hu=J,X.l10ns;var Q="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},tt={weekdays:{shorthand:["Կիր","Երկ","Երք","Չրք","Հնգ","Ուրբ","Շբթ"],longhand:["Կիրակի","Եկուշաբթի","Երեքշաբթի","Չորեքշաբթի","Հինգշաբթի","Ուրբաթ","Շաբաթ"]},months:{shorthand:["Հնվ","Փտր","Մար","Ապր","Մայ","Հնս","Հլս","Օգս","Սեպ","Հոկ","Նմբ","Դեկ"],longhand:["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"ՇԲՏ",scrollTitle:"Ոլորեք՝ մեծացնելու համար",toggleTitle:"Սեղմեք՝ փոխելու համար",amPM:["ՄԿ","ԿՀ"],yearAriaLabel:"Տարի",monthAriaLabel:"Ամիս",hourAriaLabel:"Ժամ",minuteAriaLabel:"Րոպե",time_24hr:!0};Q.l10ns.hy=tt,Q.l10ns;var et="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},nt={weekdays:{shorthand:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],longhand:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},months:{shorthand:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nov","Des"],longhand:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},firstDayOfWeek:1,ordinal:function(){return""},time_24hr:!0,rangeSeparator:" - "};et.l10ns.id=nt,et.l10ns;var it="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},rt={weekdays:{shorthand:["Sun","Mán","Þri","Mið","Fim","Fös","Lau"],longhand:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"]},months:{shorthand:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],longhand:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"]},ordinal:function(){return"."},firstDayOfWeek:1,rangeSeparator:" til ",weekAbbreviation:"vika",yearAriaLabel:"Ár",time_24hr:!0};it.l10ns.is=rt,it.l10ns;var ot="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},at={weekdays:{shorthand:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],longhand:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"]},months:{shorthand:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],longhand:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"]},firstDayOfWeek:1,ordinal:function(){return"°"},rangeSeparator:" al ",weekAbbreviation:"Se",scrollTitle:"Scrolla per aumentare",toggleTitle:"Clicca per cambiare",time_24hr:!0};ot.l10ns.it=at,ot.l10ns;var st="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},lt={weekdays:{shorthand:["日","月","火","水","木","金","土"],longhand:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"]},months:{shorthand:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],longhand:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]},time_24hr:!0,rangeSeparator:" から ",monthAriaLabel:"月",amPM:["午前","午後"],yearAriaLabel:"年",hourAriaLabel:"時間",minuteAriaLabel:"分"};st.l10ns.ja=lt,st.l10ns;var ut="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ct={weekdays:{shorthand:["კვ","ორ","სა","ოთ","ხუ","პა","შა"],longhand:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"]},months:{shorthand:["იან","თებ","მარ","აპრ","მაი","ივნ","ივლ","აგვ","სექ","ოქტ","ნოე","დეკ"],longhand:["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"კვ.",scrollTitle:"დასქროლეთ გასადიდებლად",toggleTitle:"დააკლიკეთ გადართვისთვის",amPM:["AM","PM"],yearAriaLabel:"წელი",time_24hr:!0};ut.l10ns.ka=ct,ut.l10ns;var ht="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},dt={weekdays:{shorthand:["일","월","화","수","목","금","토"],longhand:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},months:{shorthand:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],longhand:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},ordinal:function(){return"일"},rangeSeparator:" ~ ",amPM:["오전","오후"]};ht.l10ns.ko=dt,ht.l10ns;var ft="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},pt={weekdays:{shorthand:["អាទិត្យ","ចន្ទ","អង្គារ","ពុធ","ព្រហស.","សុក្រ","សៅរ៍"],longhand:["អាទិត្យ","ចន្ទ","អង្គារ","ពុធ","ព្រហស្បតិ៍","សុក្រ","សៅរ៍"]},months:{shorthand:["មករា","កុម្ភះ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"],longhand:["មករា","កុម្ភះ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"]},ordinal:function(){return""},firstDayOfWeek:1,rangeSeparator:" ដល់ ",weekAbbreviation:"សប្តាហ៍",scrollTitle:"រំកិលដើម្បីបង្កើន",toggleTitle:"ចុចដើម្បីផ្លាស់ប្ដូរ",yearAriaLabel:"ឆ្នាំ",time_24hr:!0};ft.l10ns.km=pt,ft.l10ns;var mt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},gt={weekdays:{shorthand:["Жс","Дс","Сc","Ср","Бс","Жм","Сб"],longhand:["Жексенбi","Дүйсенбi","Сейсенбi","Сәрсенбi","Бейсенбi","Жұма","Сенбi"]},months:{shorthand:["Қаң","Ақп","Нау","Сәу","Мам","Мау","Шiл","Там","Қыр","Қаз","Қар","Жел"],longhand:["Қаңтар","Ақпан","Наурыз","Сәуiр","Мамыр","Маусым","Шiлде","Тамыз","Қыркүйек","Қазан","Қараша","Желтоқсан"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Апта",scrollTitle:"Үлкейту үшін айналдырыңыз",toggleTitle:"Ауыстыру үшін басыңыз",amPM:["ТД","ТК"],yearAriaLabel:"Жыл"};mt.l10ns.kz=gt,mt.l10ns;var vt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},yt={weekdays:{shorthand:["S","Pr","A","T","K","Pn","Š"],longhand:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis"]},months:{shorthand:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd"],longhand:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"]},firstDayOfWeek:1,ordinal:function(){return"-a"},rangeSeparator:" iki ",weekAbbreviation:"Sav",scrollTitle:"Keisti laiką pelės rateliu",toggleTitle:"Perjungti laiko formatą",time_24hr:!0};vt.l10ns.lt=yt,vt.l10ns;var bt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},_t={firstDayOfWeek:1,weekdays:{shorthand:["Sv","Pr","Ot","Tr","Ce","Pk","Se"],longhand:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena"]},months:{shorthand:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],longhand:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"]},rangeSeparator:" līdz ",time_24hr:!0};bt.l10ns.lv=_t,bt.l10ns;var wt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},xt={weekdays:{shorthand:["Не","По","Вт","Ср","Че","Пе","Са"],longhand:["Недела","Понеделник","Вторник","Среда","Четврток","Петок","Сабота"]},months:{shorthand:["Јан","Фев","Мар","Апр","Мај","Јун","Јул","Авг","Сеп","Окт","Ное","Дек"],longhand:["Јануари","Февруари","Март","Април","Мај","Јуни","Јули","Август","Септември","Октомври","Ноември","Декември"]},firstDayOfWeek:1,weekAbbreviation:"Нед.",rangeSeparator:" до ",time_24hr:!0};wt.l10ns.mk=xt,wt.l10ns;var kt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},St={firstDayOfWeek:1,weekdays:{shorthand:["Да","Мя","Лх","Пү","Ба","Бя","Ня"],longhand:["Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба","Ням"]},months:{shorthand:["1-р сар","2-р сар","3-р сар","4-р сар","5-р сар","6-р сар","7-р сар","8-р сар","9-р сар","10-р сар","11-р сар","12-р сар"],longhand:["Нэгдүгээр сар","Хоёрдугаар сар","Гуравдугаар сар","Дөрөвдүгээр сар","Тавдугаар сар","Зургаадугаар сар","Долдугаар сар","Наймдугаар сар","Есдүгээр сар","Аравдугаар сар","Арваннэгдүгээр сар","Арванхоёрдугаар сар"]},rangeSeparator:"-с ",time_24hr:!0};kt.l10ns.mn=St,kt.l10ns;var Ct="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Tt={weekdays:{shorthand:["Aha","Isn","Sel","Rab","Kha","Jum","Sab"],longhand:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"]},months:{shorthand:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],longhand:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"]},firstDayOfWeek:1,ordinal:function(){return""}};Ct.l10ns;var Ot="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Et={weekdays:{shorthand:["နွေ","လာ","ဂါ","ဟူး","ကြာ","သော","နေ"],longhand:["တနင်္ဂနွေ","တနင်္လာ","အင်္ဂါ","ဗုဒ္ဓဟူး","ကြာသပတေး","သောကြာ","စနေ"]},months:{shorthand:["ဇန်","ဖေ","မတ်","ပြီ","မေ","ဇွန်","လိုင်","သြ","စက်","အောက်","နို","ဒီ"],longhand:["ဇန်နဝါရီ","ဖေဖော်ဝါရီ","မတ်","ဧပြီ","မေ","ဇွန်","ဇူလိုင်","သြဂုတ်","စက်တင်ဘာ","အောက်တိုဘာ","နိုဝင်ဘာ","ဒီဇင်ဘာ"]},firstDayOfWeek:1,ordinal:function(){return""},time_24hr:!0};Ot.l10ns.my=Et,Ot.l10ns;var At="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Lt={weekdays:{shorthand:["zo","ma","di","wo","do","vr","za"],longhand:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},months:{shorthand:["jan","feb","mrt","apr","mei","jun","jul","aug","sept","okt","nov","dec"],longhand:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]},firstDayOfWeek:1,weekAbbreviation:"wk",rangeSeparator:" t/m ",scrollTitle:"Scroll voor volgende / vorige",toggleTitle:"Klik om te wisselen",time_24hr:!0,ordinal:function(t){return 1===t||8===t||t>=20?"ste":"de"}};At.l10ns.nl=Lt,At.l10ns;var Mt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Pt={weekdays:{shorthand:["Sø.","Må.","Ty.","On.","To.","Fr.","La."],longhand:["Søndag","Måndag","Tysdag","Onsdag","Torsdag","Fredag","Laurdag"]},months:{shorthand:["Jan","Feb","Mars","Apr","Mai","Juni","Juli","Aug","Sep","Okt","Nov","Des"],longhand:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"]},firstDayOfWeek:1,rangeSeparator:" til ",weekAbbreviation:"Veke",scrollTitle:"Scroll for å endre",toggleTitle:"Klikk for å veksle",time_24hr:!0,ordinal:function(){return"."}};Mt.l10ns.nn=Pt,Mt.l10ns;var Nt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Dt={weekdays:{shorthand:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],longhand:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"]},months:{shorthand:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],longhand:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"]},firstDayOfWeek:1,rangeSeparator:" til ",weekAbbreviation:"Uke",scrollTitle:"Scroll for å endre",toggleTitle:"Klikk for å veksle",time_24hr:!0,ordinal:function(){return"."}};Nt.l10ns.no=Dt,Nt.l10ns;var jt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},It={weekdays:{shorthand:["ਐਤ","ਸੋਮ","ਮੰਗਲ","ਬੁੱਧ","ਵੀਰ","ਸ਼ੁੱਕਰ","ਸ਼ਨਿੱਚਰ"],longhand:["ਐਤਵਾਰ","ਸੋਮਵਾਰ","ਮੰਗਲਵਾਰ","ਬੁੱਧਵਾਰ","ਵੀਰਵਾਰ","ਸ਼ੁੱਕਰਵਾਰ","ਸ਼ਨਿੱਚਰਵਾਰ"]},months:{shorthand:["ਜਨ","ਫ਼ਰ","ਮਾਰ","ਅਪ੍ਰੈ","ਮਈ","ਜੂਨ","ਜੁਲਾ","ਅਗ","ਸਤੰ","ਅਕ","ਨਵੰ","ਦਸੰ"],longhand:["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ"]},time_24hr:!0};jt.l10ns.pa=It,jt.l10ns;var Rt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Ft={weekdays:{shorthand:["Nd","Pn","Wt","Śr","Cz","Pt","So"],longhand:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"]},months:{shorthand:["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paź","Lis","Gru"],longhand:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"]},rangeSeparator:" do ",weekAbbreviation:"tydz.",scrollTitle:"Przewiń, aby zwiększyć",toggleTitle:"Kliknij, aby przełączyć",firstDayOfWeek:1,time_24hr:!0,ordinal:function(){return"."}};Rt.l10ns.pl=Ft,Rt.l10ns;var Bt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},zt={weekdays:{shorthand:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],longhand:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"]},months:{shorthand:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],longhand:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"]},rangeSeparator:" até ",time_24hr:!0};Bt.l10ns.pt=zt,Bt.l10ns;var qt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Ht={weekdays:{shorthand:["Dum","Lun","Mar","Mie","Joi","Vin","Sâm"],longhand:["Duminică","Luni","Marți","Miercuri","Joi","Vineri","Sâmbătă"]},months:{shorthand:["Ian","Feb","Mar","Apr","Mai","Iun","Iul","Aug","Sep","Oct","Noi","Dec"],longhand:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"]},firstDayOfWeek:1,time_24hr:!0,ordinal:function(){return""}};qt.l10ns.ro=Ht,qt.l10ns;var Wt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Ut={weekdays:{shorthand:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],longhand:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"]},months:{shorthand:["Янв","Фев","Март","Апр","Май","Июнь","Июль","Авг","Сен","Окт","Ноя","Дек"],longhand:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Нед.",scrollTitle:"Прокрутите для увеличения",toggleTitle:"Нажмите для переключения",amPM:["ДП","ПП"],yearAriaLabel:"Год",time_24hr:!0};Wt.l10ns.ru=Ut,Wt.l10ns;var Vt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Zt={weekdays:{shorthand:["ඉ","ස","අ","බ","බ්ර","සි","සෙ"],longhand:["ඉරිදා","සඳුදා","අඟහරුවාදා","බදාදා","බ්රහස්පතින්දා","සිකුරාදා","සෙනසුරාදා"]},months:{shorthand:["ජන","පෙබ","මාර්","අප්රේ","මැයි","ජුනි","ජූලි","අගෝ","සැප්","ඔක්","නොවැ","දෙසැ"],longhand:["ජනවාරි","පෙබරවාරි","මාර්තු","අප්රේල්","මැයි","ජුනි","ජූලි","අගෝස්තු","සැප්තැම්බර්","ඔක්තෝබර්","නොවැම්බර්","දෙසැම්බර්"]},time_24hr:!0};Vt.l10ns.si=Zt,Vt.l10ns;var Yt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},$t={weekdays:{shorthand:["Ned","Pon","Ut","Str","Štv","Pia","Sob"],longhand:["Nedeľa","Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota"]},months:{shorthand:["Jan","Feb","Mar","Apr","Máj","Jún","Júl","Aug","Sep","Okt","Nov","Dec"],longhand:["Január","Február","Marec","Apríl","Máj","Jún","Júl","August","September","Október","November","December"]},firstDayOfWeek:1,rangeSeparator:" do ",time_24hr:!0,ordinal:function(){return"."}};Yt.l10ns.sk=$t,Yt.l10ns;var Gt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Kt={weekdays:{shorthand:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"],longhand:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota"]},months:{shorthand:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],longhand:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"]},firstDayOfWeek:1,rangeSeparator:" do ",time_24hr:!0,ordinal:function(){return"."}};Gt.l10ns.sl=Kt,Gt.l10ns;var Xt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Jt={weekdays:{shorthand:["Di","Hë","Ma","Më","En","Pr","Sh"],longhand:["E Diel","E Hënë","E Martë","E Mërkurë","E Enjte","E Premte","E Shtunë"]},months:{shorthand:["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gus","Sht","Tet","Nën","Dhj"],longhand:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"]},firstDayOfWeek:1,rangeSeparator:" deri ",weekAbbreviation:"Java",yearAriaLabel:"Viti",monthAriaLabel:"Muaji",hourAriaLabel:"Ora",minuteAriaLabel:"Minuta",time_24hr:!0};Xt.l10ns.sq=Jt,Xt.l10ns;var Qt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},te={weekdays:{shorthand:["Ned","Pon","Uto","Sre","Čet","Pet","Sub"],longhand:["Nedelja","Ponedeljak","Utorak","Sreda","Četvrtak","Petak","Subota"]},months:{shorthand:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],longhand:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"]},firstDayOfWeek:1,weekAbbreviation:"Ned.",rangeSeparator:" do ",time_24hr:!0};Qt.l10ns.sr=te,Qt.l10ns;var ee="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ne={firstDayOfWeek:1,weekAbbreviation:"v",weekdays:{shorthand:["sön","mån","tis","ons","tor","fre","lör"],longhand:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"]},months:{shorthand:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],longhand:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]},rangeSeparator:" till ",time_24hr:!0,ordinal:function(){return"."}};ee.l10ns.sv=ne,ee.l10ns;var ie="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},re={weekdays:{shorthand:["อา","จ","อ","พ","พฤ","ศ","ส"],longhand:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"]},months:{shorthand:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],longhand:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"]},firstDayOfWeek:1,rangeSeparator:" ถึง ",scrollTitle:"เลื่อนเพื่อเพิ่มหรือลด",toggleTitle:"คลิกเพื่อเปลี่ยน",time_24hr:!0,ordinal:function(){return""}};ie.l10ns.th=re,ie.l10ns;var oe="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ae={weekdays:{shorthand:["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"],longhand:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"]},months:{shorthand:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],longhand:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"]},firstDayOfWeek:1,ordinal:function(){return"."},rangeSeparator:" - ",weekAbbreviation:"Hf",scrollTitle:"Artırmak için kaydırın",toggleTitle:"Aç/Kapa",amPM:["ÖÖ","ÖS"],time_24hr:!0};oe.l10ns.tr=ae,oe.l10ns;var se="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},le={firstDayOfWeek:1,weekdays:{shorthand:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],longhand:["Неділя","Понеділок","Вівторок","Середа","Четвер","П'ятниця","Субота"]},months:{shorthand:["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],longhand:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"]},time_24hr:!0};se.l10ns.uk=le,se.l10ns;var ue="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ce={weekdays:{shorthand:["Якш","Душ","Сеш","Чор","Пай","Жум","Шан"],longhand:["Якшанба","Душанба","Сешанба","Чоршанба","Пайшанба","Жума","Шанба"]},months:{shorthand:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],longhand:["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Ҳафта",scrollTitle:"Катталаштириш учун айлантиринг",toggleTitle:"Ўтиш учун босинг",amPM:["AM","PM"],yearAriaLabel:"Йил",time_24hr:!0};ue.l10ns.uz=ce,ue.l10ns;var he="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},de={weekdays:{shorthand:["Ya","Du","Se","Cho","Pa","Ju","Sha"],longhand:["Yakshanba","Dushanba","Seshanba","Chorshanba","Payshanba","Juma","Shanba"]},months:{shorthand:["Yan","Fev","Mar","Apr","May","Iyun","Iyul","Avg","Sen","Okt","Noy","Dek"],longhand:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avgust","Sentabr","Oktabr","Noyabr","Dekabr"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Hafta",scrollTitle:"Kattalashtirish uchun aylantiring",toggleTitle:"O‘tish uchun bosing",amPM:["AM","PM"],yearAriaLabel:"Yil",time_24hr:!0};he.l10ns.uz_latn=de,he.l10ns;var fe="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},pe={weekdays:{shorthand:["CN","T2","T3","T4","T5","T6","T7"],longhand:["Chủ nhật","Thứ hai","Thứ ba","Thứ tư","Thứ năm","Thứ sáu","Thứ bảy"]},months:{shorthand:["Th1","Th2","Th3","Th4","Th5","Th6","Th7","Th8","Th9","Th10","Th11","Th12"],longhand:["Tháng một","Tháng hai","Tháng ba","Tháng tư","Tháng năm","Tháng sáu","Tháng bảy","Tháng tám","Tháng chín","Tháng mười","Tháng mười một","Tháng mười hai"]},firstDayOfWeek:1,rangeSeparator:" đến "};fe.l10ns.vn=pe,fe.l10ns;var me="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ge={weekdays:{shorthand:["周日","周一","周二","周三","周四","周五","周六"],longhand:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},months:{shorthand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],longhand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},rangeSeparator:" 至 ",weekAbbreviation:"周",scrollTitle:"滚动切换",toggleTitle:"点击切换 12/24 小时时制"};me.l10ns.zh=ge,me.l10ns;var ve="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ye={weekdays:{shorthand:["週日","週一","週二","週三","週四","週五","週六"],longhand:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},months:{shorthand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],longhand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},rangeSeparator:" 至 ",weekAbbreviation:"週",scrollTitle:"滾動切換",toggleTitle:"點擊切換 12/24 小時時制"};ve.l10ns.zh_tw=ye,ve.l10ns;var be={ar:i,at:o,az:s,be:u,bg:f,bn:m,bs:h,ca:v,ckb:b,cat:v,cs:w,cy:k,da:C,de:O,default:e({},E),en:E,eo:L,es:P,et:D,fa:I,fi:F,fo:z,fr:H,gr:U,he:Z,hi:$,hr:K,hu:J,hy:tt,id:nt,is:rt,it:at,ja:lt,ka:ct,ko:dt,km:pt,kz:gt,lt:yt,lv:_t,mk:xt,mn:St,ms:Tt,my:Et,nl:Lt,nn:Pt,no:Dt,pa:It,pl:Ft,pt:zt,ro:Ht,ru:Ut,si:Zt,sk:$t,sl:Kt,sq:Jt,sr:te,sv:ne,th:re,tr:ae,uk:le,vn:pe,zh:ge,zh_tw:ye,uz:ce,uz_latn:de};t.default=be,Object.defineProperty(t,"__esModule",{value:!0})}(e)},645:function(t){t.exports=function(){"use strict";function t(){for(var t=0,e=0,n=arguments.length;e=o.length?t(e):o).length>e.length){var c=e[0],h=r?[o[0],c]:[c,o[1]];h[0].getTime()>h[1].getTime()&&(r?h[0]=h[1]:h[1]=h[0]),n.setDate(h,!1),o=t(h)}l=(s=n.selectedDates.map((function(t){return n.formatDate(t,a)})))[0],n._input.value=void 0===l?"":l,u=s[1],i.value=void 0===u?"":u}}};return l}}return e}()},3583:(t,e,n)=>{"use strict";function i(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function r(t){var e=t.getBoundingClientRect();return{top:e.top+(document.documentElement.scrollTop||document.body.scrollTop),left:e.left+(document.documentElement.scrollLeft||document.body.scrollLeft)}}function o(t){return t.titleHeight+t.margins.top+t.paddings.top}function a(t){return t.margins.left+t.paddings.left}function s(t){return t.margins.top+t.margins.bottom+t.paddings.top+t.paddings.bottom+t.titleHeight+t.legendHeight}function l(t){return t.margins.left+t.margins.right+t.paddings.left+t.paddings.right}function u(t){return parseFloat(t.toFixed(2))}function c(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];n||(n=i?t[0]:t[t.length-1]);var r=new Array(Math.abs(e)).fill(n);return i?r.concat(t):t.concat(r)}function h(t,e){return(t+"").length*e}function d(t,e){return{x:Math.sin(t*ut)*e,y:Math.cos(t*ut)*e}}function f(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(Number.isNaN(t)||void 0===t||!Number.isFinite(t)||e&&t<0)}function p(t){var e=void 0,n=void 0,i=void 0;if(t instanceof Date)return new Date(t.getTime());if("object"!==(void 0===t?"undefined":dt(t))||null===t)return t;for(i in e=Array.isArray(t)?[]:{},t)n=t[i],e[i]=p(n);return e}function m(t,e){var n=void 0,i=void 0;return t<=e?(n=e-t,i=t):(n=t-e,i=e),[n,i]}function g(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length-t.length;return n>0?t=c(t,n):e=c(e,n),[t,e]}function v(t,e){if(t)return t.length>e?t.slice(0,e-3)+"...":t}function y(t,e){for(var n=[],i=0;i255?255:t<0?0:t}function _(t,e){var n=pt(t),i=!1;"#"==n[0]&&(n=n.slice(1),i=!0);var r=parseInt(n,16),o=b((r>>16)+e),a=b((r>>8&255)+e);return(i?"#":"")+(b((255&r)+e)|a<<8|o<<16).toString(16)}function w(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function x(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg",t);for(var i in e){var r=e[i];if("inside"===i)w(r).appendChild(n);else if("around"===i){var o=w(r);o.parentNode.insertBefore(n,o),n.appendChild(o)}else"styles"===i?"object"===(void 0===r?"undefined":gt(r))&&Object.keys(r).map((function(t){n.style[t]=r[t]})):("className"===i&&(i="class"),"innerHTML"===i?n.textContent=r:n.setAttribute(i,r))}return n}function k(t,e,n,i){return x("stop",{inside:t,style:"stop-color: "+n,offset:e,"stop-opacity":i})}function S(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n={className:t,transform:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""};return e&&(n.inside=e),x("g",n)}function C(t){return x("path",{className:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",d:t,styles:{stroke:arguments.length>2&&void 0!==arguments[2]?arguments[2]:"none",fill:arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none","stroke-width":arguments.length>4&&void 0!==arguments[4]?arguments[4]:2}})}function T(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i="path-fill-gradient-"+e+"-"+(n?"lighter":"default"),r=function(t,e){return x("linearGradient",{inside:t,id:e,x1:0,x2:0,y1:0,y2:1})}(t,i),o=[1,.6,.2];return n&&(o=[.4,.2,0]),k(r,"0%",e,o[0]),k(r,"50%",e,o[1]),k(r,"100%",e,o[2]),i}function O(t,e,n,i,r){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},a={className:t,x:e,y:n,width:i,height:i,rx:r,fill:arguments.length>5&&void 0!==arguments[5]?arguments[5]:"none"};return Object.keys(o).map((function(t){a[t]=o[t]})),x("rect",a)}function E(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=r.fontSize||_t;return x("text",{className:t,x:e,y:n,dy:(void 0!==r.dy?r.dy:o/2)+"px","font-size":o+"px",fill:r.fill||xt,"text-anchor":r.textAnchor||"start",innerHTML:i})}function A(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};r.stroke||(r.stroke=wt),r.lineType||(r.lineType=""),r.shortenNumbers&&(e=function(t){var e=void 0;if("number"==typeof t)e=t;else if("string"==typeof t&&(e=Number(t),Number.isNaN(e)))return t;var n=Math.floor(Math.log10(Math.abs(e)));if(n<=2)return e;var i=Math.floor(n/3),r=Math.pow(10,n-3*i)*+(e/Math.pow(10,n)).toFixed(1);return Math.round(100*r)/100+" "+["","K","M","B","T"][i]}(e));var o=x("line",{className:"line-horizontal "+r.className+("dashed"===r.lineType?"dashed":""),x1:n,x2:i,y1:0,y2:0,styles:{stroke:r.stroke}}),a=x("text",{x:n3&&void 0!==arguments[3]?arguments[3]:{};f(t)||(t=0),i.pos||(i.pos="bottom"),i.offset||(i.offset=0),i.mode||(i.mode="span"),i.stroke||(i.stroke=wt),i.className||(i.className="");var r=n+vt,o="span"===i.mode?-1*vt:n;return"tick"===i.mode&&"top"===i.pos&&(r=-1*vt,o=0),function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};r.stroke||(r.stroke=wt);var o=x("line",{className:"line-vertical "+r.className,x1:0,x2:0,y1:n,y2:i,styles:{stroke:r.stroke}}),a=x("text",{x:0,y:n>i?n+yt:n-yt-_t,dy:_t+"px","font-size":_t+"px","text-anchor":"middle",innerHTML:e+""}),s=x("g",{transform:"translate("+t+", 0)"});return s.appendChild(o),s.appendChild(a),s}(t,e,r,o,{stroke:i.stroke,className:i.className,lineType:i.lineType})}function M(t,e,n,i){var r="string"==typeof e?e:e.join(", ");return[t,{transform:n.join(", ")},i,Lt,"translate",{transform:r}]}function P(t,e,n){return M(t,[0,n],[0,e],Et)}function N(t,e){return[t,{d:e},Tt,Lt]}function D(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"linear",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=t.cloneNode(!0),s=t.cloneNode(!0);for(var l in e){var u=void 0;u="transform"===l?document.createElementNS("http://www.w3.org/2000/svg","animateTransform"):document.createElementNS("http://www.w3.org/2000/svg","animate");var c=o[l]||t.getAttribute(l),h=e[l],d={attributeName:l,from:c,to:h,begin:"0s",dur:n/1e3+"s",values:c+";"+h,keySplines:Pt[i],keyTimes:"0;1",calcMode:"spline",fill:"freeze"};for(var f in r&&(d.type=r),d)u.setAttribute(f,d[f]);a.appendChild(u),r?s.setAttribute(l,"translate("+h+")"):s.setAttribute(l,h)}return[a,s]}function j(t,e){t.style.transform=e,t.style.webkitTransform=e,t.style.msTransform=e,t.style.mozTransform=e,t.style.oTransform=e}function I(t,e){var n=[],i=[];e.map((function(t){var e,r,o=t[0],a=o.parentNode;t[0]=o;var s=D.apply(void 0,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e9?"":"0")+n,(e>9?"":"0")+e].join("-")}function B(t){return new Date(t.getTime())}function z(t,e){var n=U(t);return Math.ceil(function(t,e){var n=qt*zt;return(R(e)-R(t))/n}(n,e)/Bt)}function q(t,e){return t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}function H(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Ht[t];return e?n.slice(0,3):n}function W(t,e){return new Date(e,t+1,0)}function U(t){var e=B(t),n=e.getDay();return 0!==n&&V(e,-1*n),e}function V(t,e){t.setDate(t.getDate()+e)}function Z(t,e,n){var i=Object.keys(Yt).filter((function(e){return t.includes(e)})),r=Yt[i[0]];return Object.assign(r,{constants:e,getData:n}),new Zt(r)}function Y(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0?1:-1;if(!isFinite(t))return{mantissa:4503599627370496*e,exponent:972};t=Math.abs(t);var n=Math.floor(Math.log10(t));return[e*(t/Math.pow(10,n)),n]}function G(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=$(t),i=te(n,2),r=i[0],o=i[1],a=e?e/Math.pow(10,o):0,s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Math.ceil(t),i=Math.floor(e),r=n-i,o=r,a=1;r>5&&(r%2!=0&&(r=++n-i),o=r/2,a=2),r<=2&&(a=r/(o=4)),0===r&&(o=5,a=1);for(var s=[],l=0;l<=o;l++)s.push(i+a*l);return s}(r=r.toFixed(6),a);return s.map((function(t){return t*Math.pow(10,o)}))}function K(t){return t[1]-t[0]}function X(t,e){return u(e.zeroLine-t*e.scaleMultiplier)}function J(t,e){return e.filter((function(e){return e1&&void 0!==arguments[1]?arguments[1]:[],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t/e.length;i<=0&&(i=1);var r=i/at,o=void 0;if(n){var a=Math.max.apply(Math,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);er&&(n?e%o!=0&&(t=""):t=r-3>0?t.slice(0,r-3)+" ...":t.slice(0,r)+".."),t}))}function tt(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);ede});!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}('.chart-container{position:relative;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.chart-container .axis,.chart-container .chart-label{fill:#555b51}.chart-container .axis line,.chart-container .chart-label line{stroke:#dadada}.chart-container .dataset-units circle{stroke:#fff;stroke-width:2}.chart-container .dataset-units path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container .dataset-path{stroke-width:2px}.chart-container .path-group path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container line.dashed{stroke-dasharray:5,3}.chart-container .axis-line .specific-value{text-anchor:start}.chart-container .axis-line .y-line{text-anchor:end}.chart-container .axis-line .x-line{text-anchor:middle}.chart-container .legend-dataset-text{fill:#6c7680;font-weight:600}.graph-svg-tip{position:absolute;z-index:99999;padding:10px;font-size:12px;color:#959da5;text-align:center;background:rgba(0,0,0,.8);border-radius:3px}.graph-svg-tip ol,.graph-svg-tip ul{padding-left:0;display:-webkit-box;display:-ms-flexbox;display:flex}.graph-svg-tip ul.data-point-list li{min-width:90px;-webkit-box-flex:1;-ms-flex:1;flex:1;font-weight:600}.graph-svg-tip strong{color:#dfe2e5;font-weight:600}.graph-svg-tip .svg-pointer{position:absolute;height:5px;margin:0 0 0 -5px;content:" ";border:5px solid transparent;border-top-color:rgba(0,0,0,.8)}.graph-svg-tip.comparison{padding:0;text-align:left;pointer-events:none}.graph-svg-tip.comparison .title{display:block;padding:10px;margin:0;font-weight:600;line-height:1;pointer-events:none}.graph-svg-tip.comparison ul{margin:0;white-space:nowrap;list-style:none}.graph-svg-tip.comparison li{display:inline-block;padding:5px 10px}');var et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};i.create=function(t,e){var n=document.createElement(t);for(var r in e){var o=e[r];if("inside"===r)i(o).appendChild(n);else if("around"===r){var a=i(o);a.parentNode.insertBefore(n,a),n.appendChild(a)}else"styles"===r?"object"===(void 0===o?"undefined":et(o))&&Object.keys(o).map((function(t){n.style[t]=o[t]})):r in n?n[r]=o:n.setAttribute(r,o)}return n};var nt={margins:{top:10,bottom:10,left:20,right:20},paddings:{top:20,bottom:40,left:30,right:10},baseHeight:240,titleHeight:20,legendHeight:30,titleFontSize:12},it=["line","bar"],rt=2,ot=10,at=7,st=["light-blue","blue","violet","red","orange","yellow","green","light-green","purple","magenta","light-grey","dark-grey"],lt={bar:st,line:st,pie:st,percentage:st,heatmap:["#ebedf0","#c6e48b","#7bc96f","#239a3b","#196127"],donut:st},ut=Math.PI/180,ct=function(){function t(t,e){for(var n=0;n\n\t\t\t\t\n\t\t\t\t'}),this.hideTip(),this.title=this.container.querySelector(".title"),this.dataPointList=this.container.querySelector(".data-point-list"),this.parent.addEventListener("mouseleave",(function(){t.hideTip()}))}},{key:"fill",value:function(){var t,e=this;this.index&&this.container.setAttribute("data-point-index",this.index),t=this.titleValueFirst?""+this.titleValue+""+this.titleName:this.titleName+""+this.titleValue+"",this.title.innerHTML=t,this.dataPointList.innerHTML="",this.listValues.map((function(t,n){var r=e.colors[n]||"black",o=0===t.formatted||t.formatted?t.formatted:t.value,a=i.create("li",{styles:{"border-top":"3px solid "+r},innerHTML:''+(0===o||o?o:"")+"\n\t\t\t\t\t"+(t.title?t.title:"")});e.dataPointList.appendChild(a)}))}},{key:"calcPosition",value:function(){var t=this.container.offsetWidth;this.top=this.y-this.container.offsetHeight-5,this.left=this.x-t/2;var e=this.parent.offsetWidth-t,n=this.container.querySelector(".svg-pointer");if(this.left<0)n.style.left="calc(50% - "+-1*this.left+"px)",this.left=0;else if(this.left>e){var i="calc(50% + "+(this.left-e)+"px)";n.style.left=i,this.left=e}else n.style.left="50%"}},{key:"setValues",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;this.titleName=n.name,this.titleValue=n.value,this.listValues=i,this.x=t,this.y=e,this.titleValueFirst=n.valueFirst||0,this.index=r,this.refresh()}},{key:"hideTip",value:function(){this.container.style.top="0px",this.container.style.left="0px",this.container.style.opacity="0"}},{key:"showTip",value:function(){this.container.style.top=this.top+"px",this.container.style.left=this.left+"px",this.container.style.opacity="1"}}]),t}(),dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ft={"light-blue":"#7cd6fd",blue:"#5e64ff",violet:"#743ee2",red:"#ff5858",orange:"#ffa00a",yellow:"#feef72",green:"#28a745","light-green":"#98d85b",purple:"#b554ff",magenta:"#ffa3ef",black:"#36114C",grey:"#bdd3e6","light-grey":"#f0f4f7","dark-grey":"#b8c2cc"},pt=function(t){return/rgb[a]{0,1}\([\d, ]+\)/gim.test(t)?/\D+(\d*)\D+(\d*)\D+(\d*)/gim.exec(t).map((function(t,e){return 0!==e?Number(t).toString(16):"#"})).reduce((function(t,e){return""+t+e})):ft[t]||t},mt=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt=6,yt=4,bt=15,_t=10,wt="#dadada",xt="#555b51",kt={bar:function(t){var e=void 0;"rect"!==t.nodeName&&(e=t.getAttribute("transform"),t=t.childNodes[0]);var n=t.cloneNode();return n.style.fill="#000000",n.style.opacity="0.4",e&&n.setAttribute("transform",e),n},dot:function(t){var e=void 0;"circle"!==t.nodeName&&(e=t.getAttribute("transform"),t=t.childNodes[0]);var n=t.cloneNode(),i=t.getAttribute("r"),r=t.getAttribute("fill");return n.setAttribute("r",parseInt(i)+4),n.setAttribute("fill",r),n.style.opacity="0.6",e&&n.setAttribute("transform",e),n},heat_square:function(t){var e=void 0;"circle"!==t.nodeName&&(e=t.getAttribute("transform"),t=t.childNodes[0]);var n=t.cloneNode(),i=t.getAttribute("r"),r=t.getAttribute("fill");return n.setAttribute("r",parseInt(i)+4),n.setAttribute("fill",r),n.style.opacity="0.6",e&&n.setAttribute("transform",e),n}},St={bar:function(t,e){var n=void 0;"rect"!==t.nodeName&&(n=t.getAttribute("transform"),t=t.childNodes[0]);var i=["x","y","width","height"];Object.values(t.attributes).filter((function(t){return i.includes(t.name)&&t.specified})).map((function(t){e.setAttribute(t.name,t.nodeValue)})),n&&e.setAttribute("transform",n)},dot:function(t,e){var n=void 0;"circle"!==t.nodeName&&(n=t.getAttribute("transform"),t=t.childNodes[0]);var i=["cx","cy"];Object.values(t.attributes).filter((function(t){return i.includes(t.name)&&t.specified})).map((function(t){e.setAttribute(t.name,t.nodeValue)})),n&&e.setAttribute("transform",n)},heat_square:function(t,e){var n=void 0;"circle"!==t.nodeName&&(n=t.getAttribute("transform"),t=t.childNodes[0]);var i=["cx","cy"];Object.values(t.attributes).filter((function(t){return i.includes(t.name)&&t.specified})).map((function(t){e.setAttribute(t.name,t.nodeValue)})),n&&e.setAttribute("transform",n)}},Ct=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Tt=350,Ot=350,Et=Tt,At=250,Lt="easein",Mt=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Pt={ease:"0.25 0.1 0.25 1",linear:"0 0 1 1",easein:"0.1 0.8 0.2 1",easeout:"0 0 0.58 1",easeinout:"0.42 0 0.58 1"},Nt=".chart-container{position:relative;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Roboto','Oxygen','Ubuntu','Cantarell','Fira Sans','Droid Sans','Helvetica Neue',sans-serif}.chart-container .axis,.chart-container .chart-label{fill:#555b51}.chart-container .axis line,.chart-container .chart-label line{stroke:#dadada}.chart-container .dataset-units circle{stroke:#fff;stroke-width:2}.chart-container .dataset-units path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container .dataset-path{stroke-width:2px}.chart-container .path-group path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container line.dashed{stroke-dasharray:5,3}.chart-container .axis-line .specific-value{text-anchor:start}.chart-container .axis-line .y-line{text-anchor:end}.chart-container .axis-line .x-line{text-anchor:middle}.chart-container .legend-dataset-text{fill:#6c7680;font-weight:600}.graph-svg-tip{position:absolute;z-index:99999;padding:10px;font-size:12px;color:#959da5;text-align:center;background:rgba(0,0,0,.8);border-radius:3px}.graph-svg-tip ul{padding-left:0;display:flex}.graph-svg-tip ol{padding-left:0;display:flex}.graph-svg-tip ul.data-point-list li{min-width:90px;flex:1;font-weight:600}.graph-svg-tip strong{color:#dfe2e5;font-weight:600}.graph-svg-tip .svg-pointer{position:absolute;height:5px;margin:0 0 0 -5px;content:' ';border:5px solid transparent;border-top-color:rgba(0,0,0,.8)}.graph-svg-tip.comparison{padding:0;text-align:left;pointer-events:none}.graph-svg-tip.comparison .title{display:block;padding:10px;margin:0;font-weight:600;line-height:1;pointer-events:none}.graph-svg-tip.comparison ul{margin:0;white-space:nowrap;list-style:none}.graph-svg-tip.comparison li{display:inline-block;padding:5px 10px}",Dt=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&function(t){return null===t.offsetParent}(this.parent)||(this.updateWidth(),this.calc(e),this.makeChartArea(),this.setupComponents(),this.components.forEach((function(e){return e.setup(t.drawArea)})),this.render(this.components,!1),n&&(this.data=this.realData,setTimeout((function(){t.update(t.data)}),this.initTimeout)),this.renderLegend(),this.setupNavigation(n))}},{key:"calc",value:function(){}},{key:"updateWidth",value:function(){this.baseWidth=function(t){var e=window.getComputedStyle(t),n=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight);return t.clientWidth-n}(this.parent),this.width=this.baseWidth-l(this.measures)}},{key:"makeChartArea",value:function(){this.svg&&this.container.removeChild(this.svg);var t=this.measures;this.svg=function(t,e,n,i){return x("svg",{className:e,inside:t,width:n,height:i})}(this.container,"frappe-chart chart",this.baseWidth,this.baseHeight),this.svgDefs=function(t){return x("defs",{inside:t})}(this.svg),this.title.length&&(this.titleEL=E("title",t.margins.left,t.margins.top,this.title,{fontSize:t.titleFontSize,fill:"#666666",dy:t.titleFontSize}));var e=o(t);this.drawArea=S(this.type+"-chart chart-draw-area","translate("+a(t)+", "+e+")"),this.config.showLegend&&(e+=this.height+t.paddings.bottom,this.legendArea=S("chart-legend","translate("+a(t)+", "+e+")")),this.title.length&&this.svg.appendChild(this.titleEL),this.svg.appendChild(this.drawArea),this.config.showLegend&&this.svg.appendChild(this.legendArea),this.updateTipOffset(a(t),o(t))}},{key:"updateTipOffset",value:function(t,e){this.tip.offset={x:t,y:e}}},{key:"setupComponents",value:function(){this.components=new Map}},{key:"update",value:function(t){this.data=this.prepareData(t),this.calc(),this.render(this.components,this.config.animate),this.renderLegend()}},{key:"render",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.components,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.config.isNavigable&&this.overlays.map((function(t){return t.parentNode.removeChild(t)}));var i=[];e.forEach((function(t){i=i.concat(t.update(n))})),i.length>0?(function(t,e,n){if(0!==n.length){var i=I(e,n);e.parentNode==t&&(t.removeChild(e),t.appendChild(i)),setTimeout((function(){i.parentNode==t&&(t.removeChild(i),t.appendChild(e))}),At)}}(this.container,this.svg,i),setTimeout((function(){e.forEach((function(t){return t.make()})),t.updateNav()}),400)):(e.forEach((function(t){return t.make()})),this.updateNav())}},{key:"updateNav",value:function(){this.config.isNavigable&&(this.makeOverlay(),this.bindUnits())}},{key:"renderLegend",value:function(){}},{key:"setupNavigation",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.config.isNavigable&&e&&(this.bindOverlay(),this.keyActions={13:this.onEnterKey.bind(this),37:this.onLeftArrow.bind(this),38:this.onUpArrow.bind(this),39:this.onRightArrow.bind(this),40:this.onDownArrow.bind(this)},document.addEventListener("keydown",(function(e){(function(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)})(t.container)&&(e=e||window.event,t.keyActions[e.keyCode]&&t.keyActions[e.keyCode]())})))}},{key:"makeOverlay",value:function(){}},{key:"updateOverlay",value:function(){}},{key:"bindOverlay",value:function(){}},{key:"bindUnits",value:function(){}},{key:"onLeftArrow",value:function(){}},{key:"onRightArrow",value:function(){}},{key:"onUpArrow",value:function(){}},{key:"onDownArrow",value:function(){}},{key:"onEnterKey",value:function(){}},{key:"addDataPoint",value:function(){}},{key:"removeDataPoint",value:function(){}},{key:"getDataPoint",value:function(){}},{key:"setCurrentDataPoint",value:function(){}},{key:"updateDataset",value:function(){}},{key:"export",value:function(){var t=function(t){var e=t.cloneNode(!0);e.classList.add("chart-container"),e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink");var n=i.create("style",{innerHTML:Nt});e.insertBefore(n,e.firstChild);var r=i.create("div");return r.appendChild(e),r.innerHTML}(this.svg);!function(t,e){var n=document.createElement("a");n.style="display: none";var i=new Blob(e,{type:"image/svg+xml; charset=utf-8"}),r=window.URL.createObjectURL(i);n.href=r,n.download=t,document.body.appendChild(n),n.click(),setTimeout((function(){document.body.removeChild(n),window.URL.revokeObjectURL(r)}),300)}(this.title||"Chart",[t])}}]),t}(),It=function(){function t(t,e){for(var n=0;n=0})),r=i;if(i.length>n){i.sort((function(t,e){return e[0]-t[0]})),r=i.slice(0,n-1);var o=0;i.slice(n-1).map((function(t){o+=t[0]})),r.push([o,"Rest"]),this.colors[n-1]="grey"}e.labels=[],r.map((function(t){e.sliceTotals.push(function(t){return Number(Math.round(t+"e4")+"e-4")}(t[0])),e.labels.push(t[1])})),e.grandTotal=e.sliceTotals.reduce((function(t,e){return t+e}),0),this.center={x:this.width/2,y:this.height/2}}},{key:"renderLegend",value:function(){var t=this,e=this.state;this.legendArea.textContent="",this.legendTotals=e.sliceTotals.slice(0,this.config.maxLegendPoints);var n=0,i=0;this.legendTotals.map((function(r,o){var a=150,s=Math.floor((t.width-l(t.measures))/a);t.legendTotals.lengths&&(n=0,i+=20);var u=a*n+5,c=t.config.truncateLegends?v(e.labels[o],a/10):e.labels[o],h=t.config.formatTooltipY?t.config.formatTooltipY(r):r,d=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",r=arguments[4];r=arguments.length>5&&void 0!==arguments[5]&&arguments[5]?v(r,bt):r;var o={className:"legend-dot",cx:0,cy:0,r:n,fill:i},a=x("text",{className:"legend-dataset-text",x:0,y:0,dx:_t+"px",dy:_t/3+"px","font-size":1.2*_t+"px","text-anchor":"start",fill:xt,innerHTML:r}),s=x("g",{transform:"translate("+t+", "+e+")"});return s.appendChild(x("circle",o)),s.appendChild(a),s}(u,i,5,t.colors[o],c+": "+h,!1);t.legendArea.appendChild(d),n++}))}}]),e}(jt),Bt=7,zt=1e3,qt=86400,Ht=["January","February","March","April","May","June","July","August","September","October","November","December"],Wt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ut=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Vt=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0])||arguments[0];this.refresh();var e=[];return t&&(e=this.animateElements(this.data)||[]),e}}]),t}(),Yt={donutSlices:{layerClass:"donut-slices",makeElements:function(t){return t.sliceStrings.map((function(e,n){var i=C(e,"donut-path",t.colors[n],"none",t.strokeWidth);return i.style.transition="transform .3s;",i}))},animateElements:function(t){return this.store.map((function(e,n){return N(e,t.sliceStrings[n])}))}},pieSlices:{layerClass:"pie-slices",makeElements:function(t){return t.sliceStrings.map((function(e,n){var i=C(e,"pie-path","none",t.colors[n]);return i.style.transition="transform .3s;",i}))},animateElements:function(t){return this.store.map((function(e,n){return N(e,t.sliceStrings[n])}))}},percentageBars:{layerClass:"percentage-bars",makeElements:function(t){var e=this;return t.xPositions.map((function(n,i){return function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:rt,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"none";return x("rect",{className:"percentage-bar",x:t,y:e,width:n,height:i,fill:o,styles:{stroke:_(o,-25),"stroke-dasharray":"0, "+(i+n)+", "+n+", "+i,"stroke-width":r}})}(n,0,t.widths[i],e.constants.barHeight,e.constants.barDepth,t.colors[i])}))},animateElements:function(t){if(t)return[]}},yAxis:{layerClass:"y axis",makeElements:function(t){var e=this;return t.positions.map((function(n,i){return function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};f(t)||(t=0),i.pos||(i.pos="left"),i.offset||(i.offset=0),i.mode||(i.mode="span"),i.stroke||(i.stroke=wt),i.className||(i.className="");var r=-1*vt,o="span"===i.mode?n+vt:0;return"tick"===i.mode&&"right"===i.pos&&(r=n+vt,o=n),A(t,e,r+=i.offset,o+=i.offset,{stroke:i.stroke,className:i.className,lineType:i.lineType,shortenNumbers:i.shortenNumbers})}(n,t.labels[i],e.constants.width,{mode:e.constants.mode,pos:e.constants.pos,shortenNumbers:e.constants.shortenNumbers})}))},animateElements:function(t){var e=t.positions,n=t.labels,i=this.oldData.positions,r=this.oldData.labels,o=g(i,e),a=Ut(o,2);i=a[0],e=a[1];var s=g(r,n),l=Ut(s,2);return r=l[0],n=l[1],this.render({positions:i,labels:n}),this.store.map((function(t,n){return P(t,e[n],i[n])}))}},xAxis:{layerClass:"x axis",makeElements:function(t){var e=this;return t.positions.map((function(n,i){return L(n,t.calcLabels[i],e.constants.height,{mode:e.constants.mode,pos:e.constants.pos})}))},animateElements:function(t){var e=t.positions,n=t.calcLabels,i=this.oldData.positions,r=this.oldData.calcLabels,o=g(i,e),a=Ut(o,2);i=a[0],e=a[1];var s=g(r,n),l=Ut(s,2);return r=l[0],n=l[1],this.render({positions:i,calcLabels:n}),this.store.map((function(t,n){return function(t,e,n){return M(t,[n,0],[e,0],Et)}(t,e[n],i[n])}))}},yMarkers:{layerClass:"y-markers",makeElements:function(t){var e=this;return t.map((function(t){return function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};i.labelPos||(i.labelPos="right");var r=x("text",{className:"chart-label",x:"left"===i.labelPos?yt:n-h(e,5)-yt,y:0,dy:_t/-2+"px","font-size":_t+"px","text-anchor":"start",innerHTML:e+""}),o=A(t,"",0,n,{stroke:i.stroke||wt,className:i.className||"",lineType:i.lineType});return o.appendChild(r),o}(t.position,t.label,e.constants.width,{labelPos:t.options.labelPos,mode:"span",lineType:"dashed"})}))},animateElements:function(t){var e=g(this.oldData,t),n=Ut(e,2);this.oldData=n[0];var i=(t=n[1]).map((function(t){return t.position})),r=t.map((function(t){return t.label})),o=t.map((function(t){return t.options})),a=this.oldData.map((function(t){return t.position}));return this.render(a.map((function(t,e){return{position:a[e],label:r[e],options:o[e]}}))),this.store.map((function(t,e){return P(t,i[e],a[e])}))}},yRegions:{layerClass:"y-regions",makeElements:function(t){var e=this;return t.map((function(t){return function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=t-e,a=x("rect",{className:"bar mini",styles:{fill:"rgba(228, 234, 239, 0.49)",stroke:wt,"stroke-dasharray":n+", "+o},x:0,y:0,width:n,height:o});r.labelPos||(r.labelPos="right");var s=x("text",{className:"chart-label",x:"left"===r.labelPos?yt:n-h(i+"",4.5)-yt,y:0,dy:_t/-2+"px","font-size":_t+"px","text-anchor":"start",innerHTML:i+""}),l=x("g",{transform:"translate(0, "+e+")"});return l.appendChild(a),l.appendChild(s),l}(t.startPos,t.endPos,e.constants.width,t.label,{labelPos:t.options.labelPos})}))},animateElements:function(t){var e=g(this.oldData,t),n=Ut(e,2);this.oldData=n[0];var i=(t=n[1]).map((function(t){return t.endPos})),r=t.map((function(t){return t.label})),o=t.map((function(t){return t.startPos})),a=t.map((function(t){return t.options})),s=this.oldData.map((function(t){return t.endPos})),l=this.oldData.map((function(t){return t.startPos}));this.render(s.map((function(t,e){return{startPos:l[e],endPos:s[e],label:r[e],options:a[e]}})));var u=[];return this.store.map((function(t,e){u=u.concat(function(t,e,n,i){var r=e-n,o=t.childNodes[0];return[[o,{height:r,"stroke-dasharray":o.getAttribute("width")+", "+r},Et,Lt],M(t,[0,i],[0,n],Et)]}(t,o[e],i[e],s[e]))})),u}},heatDomain:{layerClass:function(){return"heat-domain domain-"+this.constants.index},makeElements:function(t){var e=this,n=this.constants,i=n.index,r=n.colWidth,o=n.rowHeight,a=n.squareSize,s=n.radius,l=n.xTranslate,u=0;return this.serializedSubDomains=[],t.cols.map((function(t,n){1===n&&e.labels.push(E("domain-name",l,-12,H(i,!0).toUpperCase(),{fontSize:9})),t.map((function(t,n){if(t.fill){var i={"data-date":t.yyyyMmDd,"data-value":t.dataValue,"data-day":n},r=O("day",l,u,a,s,t.fill,i);e.serializedSubDomains.push(r)}u+=o})),u=0,l+=r})),this.serializedSubDomains},animateElements:function(t){if(t)return[]}},barGraph:{layerClass:function(){return"dataset-units dataset-bars dataset-"+this.constants.index},makeElements:function(t){var e=this.constants;return this.unitType="bar",this.units=t.yPositions.map((function(n,i){return function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=m(e,s.zeroLine),u=mt(l,2),c=u[0],h=u[1];h-=a,0===c&&(c=s.minHeight,h-=s.minHeight),f(t)||(t=0),f(h)||(h=0),f(c,!0)||(c=0),f(n,!0)||(n=0);var d=x("rect",{className:"bar mini",style:"fill: "+i,"data-point-index":o,x:t,y:h,width:n,height:c});if((r+="")||r.length){d.setAttribute("y",0),d.setAttribute("x",0);var p=x("text",{className:"data-point-value",x:n/2,y:0,dy:_t/2*-1+"px","font-size":_t+"px","text-anchor":"middle",innerHTML:r}),g=x("g",{"data-point-index":o,transform:"translate("+t+", "+h+")"});return g.appendChild(d),g.appendChild(p),g}return d}(t.xPositions[i],n,t.barWidth,e.color,t.labels[i],i,t.offsets[i],{zeroLine:t.zeroLine,barsWidth:t.barsWidth,minHeight:e.minHeight})})),this.units},animateElements:function(t){var e=t.xPositions,n=t.yPositions,i=t.offsets,r=t.labels,o=this.oldData.xPositions,a=this.oldData.yPositions,s=this.oldData.offsets,l=this.oldData.labels,u=g(o,e),c=Ut(u,2);o=c[0],e=c[1];var h=g(a,n),d=Ut(h,2);a=d[0],n=d[1];var f=g(s,i),p=Ut(f,2);s=p[0],i=p[1];var v=g(l,r),y=Ut(v,2);l=y[0],r=y[1],this.render({xPositions:o,yPositions:a,offsets:s,labels:r,zeroLine:this.oldData.zeroLine,barsWidth:this.oldData.barsWidth,barWidth:this.oldData.barWidth});var b=[];return this.store.map((function(r,o){b=b.concat(function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=m(n,(arguments.length>5&&void 0!==arguments[5]?arguments[5]:{}).zeroLine),a=Ct(o,2),s=a[0],l=a[1];return l-=r,"rect"!==t.nodeName?[[t.childNodes[0],{width:i,height:s},Tt,Lt],M(t,t.getAttribute("transform").split("(")[1].slice(0,-1),[e,l],Et)]:[[t,{width:i,height:s,x:e,y:l},Tt,Lt]]}(r,e[o],n[o],t.barWidth,i[o],{zeroLine:t.zeroLine}))})),b}},lineGraph:{layerClass:function(){return"dataset-units dataset-line dataset-"+this.constants.index},makeElements:function(t){var e=this.constants;return this.unitType="dot",this.paths={},e.hideLine||(this.paths=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=e.map((function(e,n){return t[n]+","+e})).join("L");i.spline&&(o=y(t,e));var a=C("M"+o,"line-graph-path",n);if(i.heatline){var s=T(r.svgDefs,n);a.style.stroke="url(#"+s+")"}var l={path:a};if(i.regionFill){var u=T(r.svgDefs,n,!0),c="M"+t[0]+","+r.zeroLine+"L"+o+"L"+t.slice(-1)[0]+","+r.zeroLine;l.region=C(c,"region-fill","none","url(#"+u+")")}return l}(t.xPositions,t.yPositions,e.color,{heatline:e.heatline,regionFill:e.regionFill,spline:e.spline},{svgDefs:e.svgDefs,zeroLine:t.zeroLine})),this.units=[],e.hideDots||(this.units=t.yPositions.map((function(n,i){return function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=x("circle",{style:"fill: "+i,"data-point-index":o,cx:t,cy:e,r:n});if((r+="")||r.length){a.setAttribute("cy",0),a.setAttribute("cx",0);var s=x("text",{className:"data-point-value",x:0,y:0,dy:_t/2*-1-n+"px","font-size":_t+"px","text-anchor":"middle",innerHTML:r}),l=x("g",{"data-point-index":o,transform:"translate("+t+", "+e+")"});return l.appendChild(a),l.appendChild(s),l}return a}(t.xPositions[i],n,t.radius,e.color,e.valuesOverPoints?t.values[i]:"",i)}))),Object.values(this.paths).concat(this.units)},animateElements:function(t){var e=t.xPositions,n=t.yPositions,i=t.values,r=this.oldData.xPositions,o=this.oldData.yPositions,a=this.oldData.values,s=g(r,e),l=Ut(s,2);r=l[0],e=l[1];var u=g(o,n),c=Ut(u,2);o=c[0],n=c[1];var h=g(a,i),d=Ut(h,2);a=d[0],i=d[1],this.render({xPositions:r,yPositions:o,values:i,zeroLine:this.oldData.zeroLine,radius:this.oldData.radius});var f=[];return Object.keys(this.paths).length&&(f=f.concat(function(t,e,n,i,r){var o=[],a=n.map((function(t,n){return e[n]+","+t})).join("L");r&&(a=y(e,n));var s=[t.path,{d:"M"+a},Ot,Lt];if(o.push(s),t.region){var l=e[0]+","+i+"L",u="L"+e.slice(-1)[0]+", "+i,c=[t.region,{d:"M"+l+a+u},Ot,Lt];o.push(c)}return o}(this.paths,e,n,t.zeroLine,this.constants.spline))),this.units.length&&this.units.map((function(t,i){f=f.concat(function(t,e,n){return"circle"!==t.nodeName?[M(t,t.getAttribute("transform").split("(")[1].slice(0,-1),[e,n],Et)]:[[t,{cx:e,cy:n},Tt,Lt]]}(t,e[i],n[i]))})),f}}},$t=function(){function t(t,e){for(var n=0;n0?t.formattedLabels[a]:t.state.labels[a])+": ",d=e.sliceTotals[a]/e.grandTotal;t.tip.setValues(u,c,{name:h,value:(100*d).toFixed(1)+"%"}),t.tip.showTip()}}))}}]),e}(Ft),Xt=function(){function t(t,e){for(var n=0;nthis.width?this.center.x:this.center.y;var i=this.radius,r=this.clockWise,o=n.slicesProperties||[];n.sliceStrings=[],n.slicesProperties=[];var a=180-this.config.startAngle;n.sliceTotals.map((function(e,s){var l=a,u=e/n.grandTotal*360,c=u>180?1:0,h=r?-u:u,f=a+=h,p=d(l,i),m=d(f,i),g=t.init&&o[s],v=void 0,y=void 0;t.init?(v=g?g.startPosition:p,y=g?g.endPosition:p):(v=p,y=m);var b=360===u?function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=n.x+t.x,s=n.y+t.y,l=n.x+e.x,u=2*n.y,c=n.y+e.y;return"M"+n.x+" "+n.y+"\n\t\tL"+a+" "+s+"\n\t\tA "+i+" "+i+" 0 "+o+" "+(r?1:0)+"\n\t\t"+l+" "+u+" z\n\t\tL"+a+" "+u+"\n\t\tA "+i+" "+i+" 0 "+o+" "+(r?1:0)+"\n\t\t"+l+" "+c+" z"}(v,y,t.center,t.radius,r,c):function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=n.x+t.x,s=n.y+t.y,l=n.x+e.x,u=n.y+e.y;return"M"+n.x+" "+n.y+"\n\t\tL"+a+" "+s+"\n\t\tA "+i+" "+i+" 0 "+o+" "+(r?1:0)+"\n\t\t"+l+" "+u+" z"}(v,y,t.center,t.radius,r,c);n.sliceStrings.push(b),n.slicesProperties.push({startPosition:p,endPosition:m,value:e,total:n.grandTotal,startAngle:l,endAngle:f,angle:h})})),this.init=0}},{key:"setupComponents",value:function(){var t=this.state,e=[["pieSlices",{},function(){return{sliceStrings:t.sliceStrings,colors:this.colors}}.bind(this)]];this.components=new Map(e.map((function(t){var e=Z.apply(void 0,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0?this.formatted_labels[e]:this.state.labels[e])+": ",c=(100*this.state.sliceTotals[e]/this.state.grandTotal).toFixed(1);this.tip.setValues(s,l,{name:u,value:c+"%"}),this.tip.showTip()}else j(t,"translate3d(0,0,0)"),this.tip.hideTip(),t.style.fill=o}}},{key:"bindTooltip",value:function(){this.container.addEventListener("mousemove",this.mouseMove),this.container.addEventListener("mouseleave",this.mouseLeave)}},{key:"mouseMove",value:function(t){var e=t.target,n=this.components.get("pieSlices").store,i=this.curActiveSliceIndex,r=this.curActiveSlice;if(n.includes(e)){var o=n.indexOf(e);this.hoverSlice(r,i,!1),this.curActiveSlice=e,this.curActiveSliceIndex=o,this.hoverSlice(e,o,!0,t)}else this.mouseLeave()}},{key:"mouseLeave",value:function(){this.hoverSlice(this.curActiveSlice,this.curActiveSliceIndex,!1)}}]),e}(Ft),te=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},ee=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.data;if(t.start&&t.end&&t.start>t.end)throw new Error("Start date cannot be greater than end date.");if(t.start||(t.start=new Date,t.start.setFullYear(t.start.getFullYear()-1)),t.end||(t.end=new Date),t.dataPoints=t.dataPoints||{},parseInt(Object.keys(t.dataPoints)[0])>1e5){var e={};Object.keys(t.dataPoints).forEach((function(n){var i=new Date(n*zt);e[F(i)]=t.dataPoints[n]})),t.dataPoints=e}return t}},{key:"calc",value:function(){var t=this.state;t.start=B(this.data.start),t.end=B(this.data.end),t.firstWeekStart=B(t.start),t.noOfWeeks=z(t.start,t.end),t.distribution=function(t,e){for(var n=Math.max.apply(Math,Y(t)),i=1/(e-1),r=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:"",n=[t.getMonth(),t.getFullYear()],i=n[0],r=n[1],o=U(t),a={index:i,cols:[]};V(e=B(e)||W(i,r),1);for(var s=z(o,e),l=[],u=void 0,c=0;c2&&void 0!==arguments[2]&&arguments[2],i=this.state,r=B(t),o=[],a=0;a=i.start&&r<=i.end;n||r.getMonth()!==e||!l?s.yyyyMmDd=F(r):s=this.getSubDomainConfig(r),o.push(s)}return o}},{key:"getSubDomainConfig",value:function(t){var e=F(t),n=this.data.dataPoints[e];return{yyyyMmDd:e,dataValue:n||0,fill:this.colors[J(n,this.state.distribution)]}}}]),e}(jt),oe=function(){function t(t,e){for(var n=0;nn?i.slice(0,n):c(i,n-i.length,0),t.values=i}else t.values=r;t.chartType||(it.includes(e),t.chartType=e)})),t.yRegions&&t.yRegions.map((function(t){if(t.end0&&void 0!==arguments[0]?arguments[0]:this.data,this.type)}},{key:"prepareFirstData",value:function(){return function(t){var e=t.labels.length,n=new Array(e).fill(0),i={labels:t.labels.slice(0,-1),datasets:t.datasets.map((function(t){return{name:"",values:n.slice(0,-1),chartType:t.chartType}}))};return t.yMarkers&&(i.yMarkers=[{value:0,label:""}]),t.yRegions&&(i.yRegions=[{start:0,end:0,label:""}]),i}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data)}},{key:"calc",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.calcXPositions(),t||this.calcYAxisParameters(this.getAllYValues(),"line"===this.type),this.makeDataByIndex()}},{key:"calcXPositions",value:function(){var t=this.state,e=this.data.labels;t.datasetLength=e.length,t.unitWidth=this.width/t.datasetLength,t.xOffset=t.unitWidth/2,t.xAxis={labels:e,positions:e.map((function(e,n){return u(t.xOffset+n*t.unitWidth)}))}}},{key:"calcYAxisParameters",value:function(t){var e=function(t){function e(t,e){for(var n=G(t),i=n[1]-n[0],r=0,o=1;r1&&void 0!==arguments[1]&&arguments[1],i=Math.max.apply(Math,Y(t)),r=Math.min.apply(Math,Y(t)),o=[];if(i>=0&&r>=0)$(i)[1],o=n?G(i,r):G(i);else if(i>0&&r<0){var a=Math.abs(r);i>=a?($(i)[1],o=e(i,a)):($(a)[1],o=e(a,i).reverse().map((function(t){return-1*t})))}else if(i<=0&&r<=0){var s=Math.abs(r),l=Math.abs(i);$(s)[1],o=(o=n?G(s,l):G(s)).reverse().map((function(t){return-1*t}))}return o}(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"false"),n=this.height/function(t){return t[t.length-1]-t[0]}(e),i=K(e)*n,r=this.height-function(t){var e=K(t);return t.indexOf(0)>=0?t.indexOf(0):t[0]>0?-1*t[0]/e:-1*t[t.length-1]/e+(t.length-1)}(e)*i;this.state.yAxis={labels:e,positions:e.map((function(t){return r-t*n})),scaleMultiplier:n,zeroLine:r},this.calcDatasetPoints(),this.calcYExtremes(),this.calcYRegions()}},{key:"calcDatasetPoints",value:function(){var t=this.state,e=function(e){return e.map((function(e){return X(e,t.yAxis)}))};t.datasets=this.data.datasets.map((function(t,n){var i=t.values,r=t.cumulativeYs||[];return{name:t.name&&t.name.replace(/<|>|&/g,(function(t){return"&"==t?"&":"<"==t?"<":">"})),index:n,chartType:t.chartType,values:i,yPositions:e(i),cumulativeYs:r,cumulativeYPos:e(r)}}))}},{key:"calcYExtremes",value:function(){var t=this.state;this.barOptions.stacked?t.yExtremes=t.datasets[t.datasets.length-1].cumulativeYPos:(t.yExtremes=new Array(t.datasetLength).fill(9999),t.datasets.map((function(e){e.yPositions.map((function(e,n){eo(n)?t.mapTooltipXPosition(s):t.tip.hideTip()}))}},{key:"mapTooltipXPosition",value:function(t){var e=this.state;if(e.yExtremes){var n=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e.reduce((function(e,n){return Math.abs(n-t)=0){var i=this.dataByIndex[n];this.tip.setValues(i.xPos+this.tip.offset.x,i.yExtreme+this.tip.offset.y,{name:i.formattedLabel,value:""},i.values,n),this.tip.showTip()}}}},{key:"renderLegend",value:function(){var t=this,e=this.data;e.datasets.length>1&&(this.legendArea.textContent="",e.datasets.map((function(e,n){var i=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",r=arguments[4];r=arguments.length>5&&void 0!==arguments[5]&&arguments[5]?v(r,bt):r;var o={className:"legend-bar",x:0,y:0,width:n,height:"2px",fill:i},a=x("text",{className:"legend-dataset-text",x:0,y:0,dy:2*_t+"px","font-size":1.2*_t+"px","text-anchor":"start",fill:xt,innerHTML:r}),s=x("g",{transform:"translate("+t+", "+e+")"});return s.appendChild(x("rect",o)),s.appendChild(a),s}(100*n,"0",100,t.colors[n],e.name,t.config.truncateLegends);t.legendArea.appendChild(i)})))}},{key:"makeOverlay",value:function(){var t=this;this.init?this.init=0:(this.overlayGuides&&this.overlayGuides.forEach((function(t){var e=t.overlay;e.parentNode.removeChild(e)})),this.overlayGuides=this.dataUnitComponents.map((function(t){return{type:t.unitType,overlay:void 0,units:t.units}})),void 0===this.state.currentIndex&&(this.state.currentIndex=this.state.datasetLength-1),this.overlayGuides.map((function(e){var n=e.units[t.state.currentIndex];e.overlay=kt[e.type](n),t.drawArea.appendChild(e.overlay)})))}},{key:"updateOverlayGuides",value:function(){this.overlayGuides&&this.overlayGuides.forEach((function(t){var e=t.overlay;e.parentNode.removeChild(e)}))}},{key:"bindOverlay",value:function(){var t=this;this.parent.addEventListener("data-select",(function(){t.updateOverlay()}))}},{key:"bindUnits",value:function(){var t=this;this.dataUnitComponents.map((function(e){e.units.map((function(e){e.addEventListener("click",(function(){var n=e.getAttribute("data-point-index");t.setCurrentDataPoint(n)}))}))})),this.tip.container.addEventListener("click",(function(){var e=t.tip.container.getAttribute("data-point-index");t.setCurrentDataPoint(e)}))}},{key:"updateOverlay",value:function(){var t=this;this.overlayGuides.map((function(e){var n=e.units[t.state.currentIndex];St[e.type](n,e.overlay)}))}},{key:"onLeftArrow",value:function(){this.setCurrentDataPoint(this.state.currentIndex-1)}},{key:"onRightArrow",value:function(){this.setCurrentDataPoint(this.state.currentIndex+1)}},{key:"getDataPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.currentIndex,e=this.state;return{index:t,label:e.xAxis.labels[t],values:e.datasets.map((function(e){return e.values[t]}))}}},{key:"setCurrentDataPoint",value:function(t){var e=this.state;(t=parseInt(t))<0&&(t=0),t>=e.xAxis.labels.length&&(t=e.xAxis.labels.length-1),t!==e.currentIndex&&(e.currentIndex=t,function(t,e,n){var i=document.createEvent("HTMLEvents");for(var r in i.initEvent(e,!0,!0),n)i[r]=n[r];t.dispatchEvent(i)}(this.parent,"data-select",this.getDataPoint()))}},{key:"addDataPoint",value:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.state.datasetLength;ae(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addDataPoint",this).call(this,t,n,i),this.data.labels.splice(i,0,t),this.data.datasets.map((function(t,e){t.values.splice(i,0,n[e])})),this.update(this.data)}},{key:"removeDataPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.datasetLength-1;this.data.labels.length<=1||(ae(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeDataPoint",this).call(this,t),this.data.labels.splice(t,1),this.data.datasets.map((function(e){e.values.splice(t,1)})),this.update(this.data))}},{key:"updateDataset",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.data.datasets[e].values=t,this.update(this.data)}},{key:"updateDatasets",value:function(t){this.data.datasets.map((function(e,n){t[n]&&(e.values=t[n])})),this.update(this.data)}}]),e}(jt),le=function(){function t(t,e){for(var n=0;nthis.width?this.center.x-this.strokeWidth/2:this.center.y-this.strokeWidth/2;var i=this.radius,r=this.clockWise,o=n.slicesProperties||[];n.sliceStrings=[],n.slicesProperties=[];var a=180-this.config.startAngle;n.sliceTotals.map((function(e,s){var l=a,u=e/n.grandTotal*360,c=u>180?1:0,h=r?-u:u,f=a+=h,p=d(l,i),m=d(f,i),g=t.init&&o[s],v=void 0,y=void 0;t.init?(v=g?g.startPosition:p,y=g?g.endPosition:p):(v=p,y=m);var b=360===u?function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=n.x+t.x,s=n.y+t.y,l=n.x+e.x,u=2*i+s;return"M"+a+" "+s+"\n\t\tA "+i+" "+i+" 0 "+o+" "+(r?1:0)+"\n\t\t"+l+" "+u+"\n\t\tM"+a+" "+u+"\n\t\tA "+i+" "+i+" 0 "+o+" "+(r?1:0)+"\n\t\t"+l+" "+(n.y+t.y)}(v,y,t.center,t.radius,t.clockWise,c):function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;return"M"+(n.x+t.x)+" "+(n.y+t.y)+"\n\t\tA "+i+" "+i+" 0 "+o+" "+(r?1:0)+"\n\t\t"+(n.x+e.x)+" "+(n.y+e.y)}(v,y,t.center,t.radius,t.clockWise,c);n.sliceStrings.push(b),n.slicesProperties.push({startPosition:p,endPosition:m,value:e,total:n.grandTotal,startAngle:l,endAngle:f,angle:h})})),this.init=0}},{key:"setupComponents",value:function(){var t=this.state,e=[["donutSlices",{},function(){return{sliceStrings:t.sliceStrings,colors:this.colors,strokeWidth:this.strokeWidth}}.bind(this)]];this.components=new Map(e.map((function(t){var e=Z.apply(void 0,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0?this.formatted_labels[e]:this.state.labels[e])+": ",c=(100*this.state.sliceTotals[e]/this.state.grandTotal).toFixed(1);this.tip.setValues(s,l,{name:u,value:c+"%"}),this.tip.showTip()}else j(t,"translate3d(0,0,0)"),this.tip.hideTip(),t.style.stroke=o}}},{key:"bindTooltip",value:function(){this.container.addEventListener("mousemove",this.mouseMove),this.container.addEventListener("mouseleave",this.mouseLeave)}},{key:"mouseMove",value:function(t){var e=t.target,n=this.components.get("donutSlices").store,i=this.curActiveSliceIndex,r=this.curActiveSlice;if(n.includes(e)){var o=n.indexOf(e);this.hoverSlice(r,i,!1),this.curActiveSlice=e,this.curActiveSliceIndex=o,this.hoverSlice(e,o,!0,t)}else this.mouseLeave()}},{key:"mouseLeave",value:function(){this.hoverSlice(this.curActiveSlice,this.curActiveSliceIndex,!1)}}]),e}(Ft),he={bar:se,line:se,percentage:Kt,heatmap:re,pie:Qt,donut:ce},de=function t(e,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"line",e=arguments[1],n=arguments[2];return"axis-mixed"===t?(n.type="line",new se(e,n)):he[t]?new he[t](e,n):void 0}(n.type,e,n)}},1660:function(t){"undefined"!=typeof self&&self,t.exports=function(){"use strict";var t={8741:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);e.default=n},3976:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(2839),r={_maxTestPos:500,placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:function(){},onincomplete:function(){},oncleared:function(){},repeat:0,greedy:!1,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,insertModeVisual:!0,clearIncomplete:!1,alias:null,onKeyDown:function(){},onBeforeMask:null,onBeforePaste:function(t,e){return"function"==typeof e.onBeforeMask?e.onBeforeMask.call(this,t,e):t},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:function(){},skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",_radixDance:!1,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","url","password","search"],ignorables:[i.keys.Backspace,i.keys.Tab,i.keys.Pause,i.keys.Escape,i.keys.PageUp,i.keys.PageDown,i.keys.End,i.keys.Home,i.keys.ArrowLeft,i.keys.ArrowUp,i.keys.ArrowRight,i.keys.ArrowDown,i.keys.Insert,i.keys.Delete,i.keys.ContextMenu,i.keys.F1,i.keys.F2,i.keys.F3,i.keys.F4,i.keys.F5,i.keys.F6,i.keys.F7,i.keys.F8,i.keys.F9,i.keys.F10,i.keys.F11,i.keys.F12,i.keys.Process,i.keys.Unidentified,i.keys.Shift,i.keys.Control,i.keys.Alt,i.keys.Tab,i.keys.AltGraph,i.keys.CapsLock],isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"text",importDataAttributes:!0,shiftPositions:!0,usePrototypeDefinitions:!0,validationEventTimeOut:3e3,substitutes:{}};e.default=r},7392:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={9:{validator:"[0-90-9]",definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",definitionSymbol:"*"},"*":{validator:"[0-90-9A-Za-zА-яЁёÀ-ÿµ]"}}},253:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){if(void 0===n)return t.__data?t.__data[e]:null;t.__data=t.__data||{},t.__data[e]=n}},3776:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Event=void 0,e.off=function(t,e){var n,i;return h(this[0])&&t&&(n=this[0].eventRegistry,i=this[0],t.split(" ").forEach((function(t){var r=l(t.split("."),2);(function(t,i){var r,o,a=[];if(t.length>0)if(void 0===e)for(r=0,o=n[t][i].length;r0?i:"global",handler:n[t][i][r]});else a.push({ev:t,namespace:i&&i.length>0?i:"global",handler:e});else if(i.length>0)for(var s in n)for(var l in n[s])if(l===i)if(void 0===e)for(r=0,o=n[s][l].length;rt.length)&&(e=t.length);for(var n=0,i=new Array(e);n0||o.indexOf("Trident/")>0,s=navigator.userAgentData&&navigator.userAgentData.mobile||r.default.navigator&&r.default.navigator.maxTouchPoints||"ontouchstart"in r.default,l=/iphone/i.test(o);e.iphone=l,e.mobile=s,e.ie=a},7184:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t.replace(n,"\\$1")};var n=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim")},6030:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EventHandlers=void 0;var i=n(8711),r=n(2839),o=n(9845),a=n(7215),s=n(7760),l=n(4713);function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0&&b.end>0&&(t.preventDefault(),i.caret.call(d,g,b.begin,b.end))):(b.begin=i.seekNext.call(d,b.begin,!0),b.end=i.seekNext.call(d,b.begin,!0),b.end=d.length?c.length:d.length,m=h.length>=f.length?h.length:f.length,g="",v=[],y="~";c.length0;){var a=o.pop();["submit","reset"].includes(r)?null!==t.form&&n(t.form).off(r,a):n(t).off(r,a)}delete t.inputmask.events[r]}}}};e.EventRuler=l},219:function(t,e,n){var i=d(n(2394)),r=n(2839),o=d(n(7184)),a=n(8711),s=n(4713);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&e--,Date.prototype.setMonth.call(this,e)},"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",function(t){var e=t?parseInt(t):0;return e>0&&e--,Date.prototype.setMonth.call(this,e)},"month",function(){return C(Date.prototype.getMonth.call(this)+1,2)}],mmm:[""],mmmm:[""],yy:["[0-9]{2}",Date.prototype.setFullYear,"year",function(){return C(Date.prototype.getFullYear.call(this),2)}],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return C(Date.prototype.getFullYear.call(this),4)}],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return C(Date.prototype.getHours.call(this),2)}],hx:[function(t){return"[0-9]{".concat(t,"}")},Date.prototype.setHours,"hours",function(t){return Date.prototype.getHours}],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["0[0-9]|1[0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return C(Date.prototype.getHours.call(this),2)}],Hx:[function(t){return"[0-9]{".concat(t,"}")},Date.prototype.setHours,"hours",function(t){return function(){return C(Date.prototype.getHours.call(this),t)}}],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setMinutes,"minutes",function(){return C(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setSeconds,"seconds",function(){return C(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return C(Date.prototype.getMilliseconds.call(this),3)},3],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return C(Date.prototype.getMilliseconds.call(this),2)},2],t:["[ap]",b,"ampm",_,1],tt:["[ap]m",b,"ampm",_,2],T:["[AP]",b,"ampm",_,1],TT:["[AP]M",b,"ampm",_,2],Z:[".*",void 0,"Z",function(){var t=this.toString().match(/\((.+)\)/)[1];return t.includes(" ")&&(t=(t=t.replace("-"," ").toUpperCase()).split(" ").map((function(t){return l(t,1)[0]})).join("")),t}],o:[""],S:[""]},y={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};function b(t){var e=this.getHours();t.toLowerCase().includes("p")?this.setHours(e+12):t.toLowerCase().includes("a")&&e>=12&&this.setHours(e-12)}function _(){var t=this.getHours();return(t=t||12)>=12?"PM":"AM"}function w(t){var e=new RegExp("\\d+$").exec(t[0]);if(e&&void 0!==e[0]){var n=v[t[0][0]+"x"].slice("");return n[0]=n[0](e[0]),n[3]=n[3](e[0]),n}if(v[t[0]])return v[t[0]]}function x(t){if(!t.tokenizer){var e=[],n=[];for(var i in v)if(/\.*x$/.test(i)){var r=i[0]+"\\d+";-1===n.indexOf(r)&&n.push(r)}else-1===e.indexOf(i[0])&&e.push(i[0]);t.tokenizer="("+(n.length>0?n.join("|")+"|":"")+e.join("+|")+")+?|.",t.tokenizer=new RegExp(t.tokenizer,"g")}return t.tokenizer}function k(t,e,n){if(!g)return!0;if(void 0===t.rawday||!isFinite(t.rawday)&&new Date(t.date.getFullYear(),isFinite(t.rawmonth)?t.month:t.date.getMonth()+1,0).getDate()>=t.day||"29"==t.day&&(!isFinite(t.rawyear)||void 0===t.rawyear||""===t.rawyear)||new Date(t.date.getFullYear(),isFinite(t.rawmonth)?t.month:t.date.getMonth()+1,0).getDate()>=t.day)return e;if("29"==t.day){var i=E(e.pos,n);if("yyyy"===i.targetMatch[0]&&e.pos-i.targetMatchIndex==2)return e.remove=e.pos+1,e}else if("02"==t.month&&"30"==t.day&&void 0!==e.c)return t.day="03",t.date.setDate(3),t.date.setMonth(1),e.insert=[{pos:e.pos,c:"0"},{pos:e.pos+1,c:e.c}],e.caret=a.seekNext.call(this,e.pos+1),e;return!1}function S(t,e,n,i){var r,a,s="";for(x(n).lastIndex=0;r=x(n).exec(t);)if(void 0===e)if(a=w(r))s+="("+a[0]+")";else switch(r[0]){case"[":s+="(";break;case"]":s+=")?";break;default:s+=(0,o.default)(r[0])}else(a=w(r))?!0!==i&&a[3]?s+=a[3].call(e.date):a[2]?s+=e["raw"+a[2]]:s+=r[0]:s+=r[0];return s}function C(t,e,n){for(t=String(t),e=e||2;t.length=t+1){n=i,i=x(e).exec(e.inputFormat);break}}return{targetMatchIndex:r-o,nextMatch:i,targetMatch:n}}i.default.extendAliases({datetime:{mask:function(t){return t.numericInput=!1,v.S=t.i18n.ordinalSuffix.join("|"),t.inputFormat=y[t.inputFormat]||t.inputFormat,t.displayFormat=y[t.displayFormat]||t.displayFormat||t.inputFormat,t.outputFormat=y[t.outputFormat]||t.outputFormat||t.inputFormat,t.placeholder=""!==t.placeholder?t.placeholder:t.inputFormat.replace(/[[\]]/,""),t.regex=S(t.inputFormat,void 0,t),t.min=T(t.min,t.inputFormat,t),t.max=T(t.max,t.inputFormat,t),null},placeholder:"",inputFormat:"isoDateTime",displayFormat:null,outputFormat:null,min:null,max:null,skipOptionalPartCharacter:"",i18n:{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]},preValidation:function(t,e,n,i,r,o,a,s){if(s)return!0;if(isNaN(n)&&t[e]!==n){var l=E(e,r);if(l.nextMatch&&l.nextMatch[0]===n&&l.targetMatch[0].length>1){var u=v[l.targetMatch[0]][0];if(new RegExp(u).test("0"+t[e-1]))return t[e]=t[e-1],t[e-1]="0",{fuzzy:!0,buffer:t,refreshFromBuffer:{start:e-1,end:e+1},pos:e+1}}}return!0},postValidation:function(t,e,n,i,r,o,a,l){var u,c;if(a)return!0;if(!1===i&&(((u=E(e+1,r)).targetMatch&&u.targetMatchIndex===e&&u.targetMatch[0].length>1&&void 0!==v[u.targetMatch[0]]||(u=E(e+2,r)).targetMatch&&u.targetMatchIndex===e+1&&u.targetMatch[0].length>1&&void 0!==v[u.targetMatch[0]])&&(c=v[u.targetMatch[0]][0]),void 0!==c&&(void 0!==o.validPositions[e+1]&&new RegExp(c).test(n+"0")?(t[e]=n,t[e+1]="0",i={pos:e+2,caret:e}):new RegExp(c).test("0"+n)&&(t[e]="0",t[e+1]=n,i={pos:e+2})),!1===i))return i;if(i.fuzzy&&(t=i.buffer,e=i.pos),(u=E(e,r)).targetMatch&&u.targetMatch[0]&&void 0!==v[u.targetMatch[0]]){var h=v[u.targetMatch[0]];c=h[0];var d=t.slice(u.targetMatchIndex,u.targetMatchIndex+u.targetMatch[0].length);if(!1===new RegExp(c).test(d.join(""))&&2===u.targetMatch[0].length&&o.validPositions[u.targetMatchIndex]&&o.validPositions[u.targetMatchIndex+1]&&(o.validPositions[u.targetMatchIndex+1].input="0"),"year"==h[2])for(var f=s.getMaskTemplate.call(this,!1,1,void 0,!0),p=e+1;p=s.getTime())&&(t.date.setFullYear(m),t.year=i,e.insert=[{pos:e.pos+1,c:a[0]},{pos:e.pos+2,c:a[1]}])}}return e}(y,g,r)),g=function(t,e,n,i,r){if(!e)return e;if(e&&n.min&&!isNaN(n.min.date.getTime())){var o;for(t.reset(),x(n).lastIndex=0;o=x(n).exec(n.inputFormat);){var a;if((a=w(o))&&a[3]){for(var s=a[1],l=t[a[2]],u=n.min[a[2]],c=n.max?n.max[a[2]]:u,h=[],d=!1,f=0;fu[f]):(h[f]=u[f],"year"===a[2]&&l.length-1==f&&u!=c&&(h=(parseInt(h.join(""))+1).toString().split("")),"ampm"===a[2]&&u!=c&&n.min.date.getTime()>t.date.getTime()&&(h[f]=c[f]));s.call(t._date,h.join(""))}}e=n.min.date.getTime()<=t.date.getTime(),t.reInit()}return e&&n.max&&(isNaN(n.max.date.getTime())||(e=n.max.date.getTime()>=t.date.getTime())),e}(y,g=k.call(this,y,g,r),r,o)),void 0!==e&&g&&i.pos!==e?{buffer:S(r.inputFormat,y,r).split(""),refreshFromBuffer:{start:e,end:i.pos},pos:i.caret||i.pos}:g},onKeyDown:function(t,e,n,i){t.ctrlKey&&t.key===r.keys.ArrowRight&&(this.inputmask._valueSet(O(new Date,i)),f(this).trigger("setvalue"))},onUnMask:function(t,e,n){return e?S(n.outputFormat,T(t,n.inputFormat,n),n,!0):e},casing:function(t,e,n,i){return 0==e.nativeDef.indexOf("[ap]")?t.toLowerCase():0==e.nativeDef.indexOf("[AP]")?t.toUpperCase():t},onBeforeMask:function(t,e){return"[object Date]"===Object.prototype.toString.call(t)&&(t=O(t,e)),t},insertMode:!1,insertModeVisual:!1,shiftPositions:!1,keepStatic:!1,inputmode:"numeric",prefillYear:!0}})},3851:function(t,e,n){var i,r=(i=n(2394))&&i.__esModule?i:{default:i},o=n(8711),a=n(4713);r.default.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}});var s=new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]");function l(t,e,n,i,r){return n-1>-1&&"."!==e.buffer[n-1]?(t=e.buffer[n-1]+t,t=n-2>-1&&"."!==e.buffer[n-2]?e.buffer[n-2]+t:"0"+t):t="00"+t,s.test(t)}r.default.extendAliases({cssunit:{regex:"[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"},url:{regex:"(https?|ftp)://.*",autoUnmask:!1,keepStatic:!1,tabThrough:!0},ip:{mask:"i{1,3}.j{1,3}.k{1,3}.l{1,3}",definitions:{i:{validator:l},j:{validator:l},k:{validator:l},l:{validator:l}},onUnMask:function(t,e,n){return t},inputmode:"decimal",substitutes:{",":"."}},email:{mask:function(t){var e=t.separator,n=t.quantifier,i="*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",r=i;if(e)for(var o=0;o0&&e>0&&(!n.digitsOptional||i)){var r=t.indexOf(n.radixPoint),o=!1;n.negationSymbol.back===t[t.length-1]&&(o=!0,t.length--),-1===r&&(t.push(n.radixPoint),r=t.length-1);for(var a=1;a<=e;a++)isFinite(t[r+a])||(t[r+a]="0")}return o&&t.push(n.negationSymbol.back),t}function h(t,e){var n=0;for(var i in"+"===t&&(n=o.seekNext.call(this,e.validPositions.length-1)),e.tests)if((i=parseInt(i))>=n)for(var r=0,a=e.tests[i].length;r1&&(t.placeholder=t.placeholder.charAt(0)),"radixFocus"===t.positionCaretOnClick&&""===t.placeholder&&(t.positionCaretOnClick="lvp");var e="0",n=t.radixPoint;!0===t.numericInput&&void 0===t.__financeInput?(e="1",t.positionCaretOnClick="radixFocus"===t.positionCaretOnClick?"lvp":t.positionCaretOnClick,t.digitsOptional=!1,isNaN(t.digits)&&(t.digits=2),t._radixDance=!1,n=","===t.radixPoint?"?":"!",""!==t.radixPoint&&void 0===t.definitions[n]&&(t.definitions[n]={},t.definitions[n].validator="["+t.radixPoint+"]",t.definitions[n].placeholder=t.radixPoint,t.definitions[n].static=!0,t.definitions[n].generated=!0)):(t.__financeInput=!1,t.numericInput=!0);var i,o="[+]";if(o+=u(t.prefix,t),""!==t.groupSeparator?(void 0===t.definitions[t.groupSeparator]&&(t.definitions[t.groupSeparator]={},t.definitions[t.groupSeparator].validator="["+t.groupSeparator+"]",t.definitions[t.groupSeparator].placeholder=t.groupSeparator,t.definitions[t.groupSeparator].static=!0,t.definitions[t.groupSeparator].generated=!0),o+=t._mask(t)):o+="9{+}",void 0!==t.digits&&0!==t.digits){var a=t.digits.toString().split(",");isFinite(a[0])&&a[1]&&isFinite(a[1])?o+=n+e+"{"+t.digits+"}":(isNaN(t.digits)||parseInt(t.digits)>0)&&(t.digitsOptional||t.jitMasking?(i=o+n+e+"{0,"+t.digits+"}",t.keepStatic=!0):o+=n+e+"{"+t.digits+"}")}else t.inputmode="numeric";return o+=u(t.suffix,t),o+="[-]",i&&(o=[i+u(t.suffix,t)+"[-]",o]),t.greedy=!1,function(t){void 0===t.parseMinMaxOptions&&(null!==t.min&&(t.min=t.min.toString().replace(new RegExp((0,r.default)(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.min=t.min.replace(t.radixPoint,".")),t.min=isFinite(t.min)?parseFloat(t.min):NaN,isNaN(t.min)&&(t.min=Number.MIN_VALUE)),null!==t.max&&(t.max=t.max.toString().replace(new RegExp((0,r.default)(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.max=t.max.replace(t.radixPoint,".")),t.max=isFinite(t.max)?parseFloat(t.max):NaN,isNaN(t.max)&&(t.max=Number.MAX_VALUE)),t.parseMinMaxOptions="done")}(t),""!==t.radixPoint&&t.substituteRadixPoint&&(t.substitutes["."==t.radixPoint?",":"."]=t.radixPoint),o},_mask:function(t){return"("+t.groupSeparator+"999){+|1}"},digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",_radixDance:!0,groupSeparator:"",allowMinus:!0,negationSymbol:{front:"-",back:""},prefix:"",suffix:"",min:null,max:null,SetMaxOnOverflow:!1,step:1,inputType:"text",unmaskAsNumber:!1,roundingFN:Math.round,inputmode:"decimal",shortcuts:{k:"1000",m:"1000000"},placeholder:"0",greedy:!1,rightAlign:!0,insertMode:!0,autoUnmask:!1,skipOptionalPartCharacter:"",usePrototypeDefinitions:!1,stripLeadingZeroes:!0,substituteRadixPoint:!0,definitions:{0:{validator:f},1:{validator:f,definitionSymbol:"9"},9:{validator:"[0-90-9٠-٩۰-۹]",definitionSymbol:"*"},"+":{validator:function(t,e,n,i,r){return r.allowMinus&&("-"===t||t===r.negationSymbol.front)}},"-":{validator:function(t,e,n,i,r){return r.allowMinus&&t===r.negationSymbol.back}}},preValidation:function(t,e,n,i,r,o,a,s){if(!1!==r.__financeInput&&n===r.radixPoint)return!1;var l=t.indexOf(r.radixPoint),u=e;if(e=function(t,e,n,i,r){return r._radixDance&&r.numericInput&&e!==r.negationSymbol.back&&t<=n&&(n>0||e==r.radixPoint)&&(void 0===i.validPositions[t-1]||i.validPositions[t-1].input!==r.negationSymbol.back)&&(t-=1),t}(e,n,l,o,r),"-"===n||n===r.negationSymbol.front){if(!0!==r.allowMinus)return!1;var c=!1,f=d("+",o),p=d("-",o);return-1!==f&&(c=[f,p]),!1!==c?{remove:c,caret:u-r.negationSymbol.back.length}:{insert:[{pos:h.call(this,"+",o),c:r.negationSymbol.front,fromIsValid:!0},{pos:h.call(this,"-",o),c:r.negationSymbol.back,fromIsValid:void 0}],caret:u+r.negationSymbol.back.length}}if(n===r.groupSeparator)return{caret:u};if(s)return!0;if(-1!==l&&!0===r._radixDance&&!1===i&&n===r.radixPoint&&void 0!==r.digits&&(isNaN(r.digits)||parseInt(r.digits)>0)&&l!==e)return{caret:r._radixDance&&e===l-1?l+1:l};if(!1===r.__financeInput)if(i){if(r.digitsOptional)return{rewritePosition:a.end};if(!r.digitsOptional){if(a.begin>l&&a.end<=l)return n===r.radixPoint?{insert:{pos:l+1,c:"0",fromIsValid:!0},rewritePosition:l}:{rewritePosition:l+1};if(a.begin0&&""===this.__valueGet.call(this.el))return{rewritePosition:l};return{rewritePosition:e}},postValidation:function(t,e,n,i,r,o,a){if(!1===i)return i;if(a)return!0;if(null!==r.min||null!==r.max){var s=r.onUnMask(t.slice().reverse().join(""),void 0,l.extend({},r,{unmaskAsNumber:!0}));if(null!==r.min&&sr.min.toString().length||s<0))return!1;if(null!==r.max&&s>r.max)return!!r.SetMaxOnOverflow&&{refreshFromBuffer:!0,buffer:c(r.max.toString().replace(".",r.radixPoint).split(""),r.digits,r).reverse()}}return i},onUnMask:function(t,e,n){if(""===e&&!0===n.nullable)return e;var i=t.replace(n.prefix,"");return i=(i=i.replace(n.suffix,"")).replace(new RegExp((0,r.default)(n.groupSeparator),"g"),""),""!==n.placeholder.charAt(0)&&(i=i.replace(new RegExp(n.placeholder.charAt(0),"g"),"0")),n.unmaskAsNumber?(""!==n.radixPoint&&-1!==i.indexOf(n.radixPoint)&&(i=i.replace(r.default.call(this,n.radixPoint),".")),i=(i=i.replace(new RegExp("^"+(0,r.default)(n.negationSymbol.front)),"-")).replace(new RegExp((0,r.default)(n.negationSymbol.back)+"$"),""),Number(i)):i},isComplete:function(t,e){var n=(e.numericInput?t.slice().reverse():t).join("");return n=(n=(n=(n=(n=n.replace(new RegExp("^"+(0,r.default)(e.negationSymbol.front)),"-")).replace(new RegExp((0,r.default)(e.negationSymbol.back)+"$"),"")).replace(e.prefix,"")).replace(e.suffix,"")).replace(new RegExp((0,r.default)(e.groupSeparator)+"([0-9]{3})","g"),"$1"),","===e.radixPoint&&(n=n.replace((0,r.default)(e.radixPoint),".")),isFinite(n)},onBeforeMask:function(t,e){var n=e.radixPoint||",";isFinite(e.digits)&&(e.digits=parseInt(e.digits)),"number"!=typeof t&&"number"!==e.inputType||""===n||(t=t.toString().replace(".",n));var i="-"===t.charAt(0)||t.charAt(0)===e.negationSymbol.front,o=t.split(n),a=o[0].replace(/[^\-0-9]/g,""),s=o.length>1?o[1].replace(/[^0-9]/g,""):"",l=o.length>1;t=a+(""!==s?n+s:s);var u=0;if(""!==n&&(u=e.digitsOptional?e.digitse.max&&(t=e.max.toString().replace(".",n))}return i&&"-"!==t.charAt(0)&&(t="-"+t),c(t.toString().split(""),u,e,l).join("")},onBeforeWrite:function(t,e,n,i){function o(t,e){if(!1!==i.__financeInput||e){var n=t.indexOf(i.radixPoint);-1!==n&&t.splice(n,1)}if(""!==i.groupSeparator)for(;-1!==(n=t.indexOf(i.groupSeparator));)t.splice(n,1);return t}var a,s;if(i.stripLeadingZeroes&&(s=function(t,e){var n=new RegExp("(^"+(""!==e.negationSymbol.front?(0,r.default)(e.negationSymbol.front)+"?":"")+(0,r.default)(e.prefix)+")(.*)("+(0,r.default)(e.suffix)+(""!=e.negationSymbol.back?(0,r.default)(e.negationSymbol.back)+"?":"")+"$)").exec(t.slice().reverse().join("")),i=n?n[2]:"",o=!1;return i&&(i=i.split(e.radixPoint.charAt(0))[0],o=new RegExp("^[0"+e.groupSeparator+"]*").exec(i)),!(!o||!(o[0].length>1||o[0].length>0&&o[0].length0;d--)delete this.maskset.validPositions[u+d],delete e[u+d];if(t)switch(t.type){case"blur":case"checkval":if(null!==i.min){var f=i.onUnMask(e.slice().reverse().join(""),void 0,l.extend({},i,{unmaskAsNumber:!0}));if(null!==i.min&&f1)return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())*parseInt(s)),o.trigger("setvalue"),!1}if(t.ctrlKey)switch(t.key){case a.keys.ArrowUp:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())+parseInt(i.step)),o.trigger("setvalue"),!1;case a.keys.ArrowDown:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())-parseInt(i.step)),o.trigger("setvalue"),!1}if(!t.shiftKey&&(t.key===a.keys.Delete||t.key===a.keys.Backspace||t.key===a.keys.BACKSPACE_SAFARI)&&n.begin!==e.length){if(e[t.key===a.keys.Delete?n.begin-1:n.end]===i.negationSymbol.front)return r=e.slice().reverse(),""!==i.negationSymbol.front&&r.shift(),""!==i.negationSymbol.back&&r.pop(),o.trigger("setvalue",[r.join(""),n.begin]),!1;if(!0===i._radixDance){var h=e.indexOf(i.radixPoint);if(i.digitsOptional){if(0===h)return(r=e.slice().reverse()).pop(),o.trigger("setvalue",[r.join(""),n.begin>=r.length?r.length:n.begin]),!1}else if(-1!==h&&(n.begin=r.length?h+1:n.begin]),!1}}}}},currency:{prefix:"",groupSeparator:",",alias:"numeric",digits:2,digitsOptional:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",inputmode:"numeric",digits:0},percentage:{alias:"numeric",min:0,max:100,suffix:" %",digits:0,allowMinus:!1},indianns:{alias:"numeric",_mask:function(t){return"("+t.groupSeparator+"99){*|1}("+t.groupSeparator+"999){1|1}"},groupSeparator:",",radixPoint:".",placeholder:"0",digits:2,digitsOptional:!1}})},9380:function(t,e,n){var i;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=((i=n(8741))&&i.__esModule?i:{default:i}).default?window:{};e.default=r},7760:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.HandleNativePlaceholder=function(t,e){var n=t?t.inputmask:this;if(s.ie){if(t.inputmask._valueGet()!==e&&(t.placeholder!==e||""===t.placeholder)){var i=o.getBuffer.call(n).slice(),r=t.inputmask._valueGet();if(r!==e){var a=o.getLastValidPosition.call(n);-1===a&&r===o.getBufferTemplate.call(n).join("")?i=[]:-1!==a&&c.call(n,i),d(t,i)}}}else t.placeholder!==e&&(t.placeholder=e,""===t.placeholder&&t.removeAttribute("placeholder"))},e.applyInputValue=u,e.checkVal=h,e.clearOptionalTail=c,e.unmaskedvalue=function(t){var e=t?t.inputmask:this,n=e.opts,i=e.maskset;if(t){if(void 0===t.inputmask)return t.value;t.inputmask&&t.inputmask.refreshValue&&u(t,t.inputmask._valueGet(!0))}for(var r=[],a=i.validPositions,s=0,l=a.length;s0&&" "===n[i-1];)i--;var a=0===i&&!o.isMask.call(u,t)&&(r.getTest.call(u,t).match.nativeDef===e.charAt(0)||!0===r.getTest.call(u,t).match.static&&r.getTest.call(u,t).match.nativeDef==="'"+e.charAt(0)||" "===r.getTest.call(u,t).match.nativeDef&&(r.getTest.call(u,t+1).match.nativeDef===e.charAt(0)||!0===r.getTest.call(u,t+1).match.static&&r.getTest.call(u,t+1).match.nativeDef==="'"+e.charAt(0)));if(!a&&i>0&&!o.isMask.call(u,t,!1,!0)){var s=o.seekNext.call(u,t);u.caretPos.begin0){var w,x,k=o.seekNext.call(u,-1,void 0,!1);if(!a.isComplete.call(u,o.getBuffer.call(u))&&b.length<=k||a.isComplete.call(u,o.getBuffer.call(u))&&b.length>0&&b.length!==k&&0===b[0])for(var S=k;void 0!==(w=b.shift());){var C=new f.Event("_checkval");if((x=c.validPositions[w]).generatedInput=!0,C.key=x.input,(v=l.EventHandlers.keypressEvent.call(u,C,!0,!1,n,S))&&void 0!==v.pos&&v.pos!==w&&c.validPositions[v.pos]&&!0===c.validPositions[v.pos].match.static)b.push(v.pos);else if(!v)break;S++}}e&&d.call(u,t,o.getBuffer.call(u),v?v.forwardPosition:u.caretPos.begin,s||new f.Event("checkval"),s&&("input"===s.type&&u.undoValue!==o.getBuffer.call(u).join("")||"paste"===s.type)),h.skipOptionalPartCharacter=y}function d(t,e,n,r,s){var l=t?t.inputmask:this,u=l.opts,c=l.dependencyLib;if(r&&"function"==typeof u.onBeforeWrite){var h=u.onBeforeWrite.call(l,r,e,n,u);if(h){if(h.refreshFromBuffer){var d=h.refreshFromBuffer;a.refreshFromBuffer.call(l,!0===d?d:d.start,d.end,h.buffer||e),e=o.getBuffer.call(l,!0)}void 0!==n&&(n=void 0!==h.caret?h.caret:n)}}if(void 0!==t&&(t.inputmask._valueSet(e.join("")),void 0===n||void 0!==r&&"blur"===r.type||o.caret.call(l,t,n,void 0,void 0,void 0!==r&&"keydown"===r.type&&(r.key===i.keys.Delete||r.key===i.keys.Backspace)),!0===s)){var f=c(t),p=t.inputmask._valueGet();t.inputmask.skipInputEvent=!0,f.trigger("input"),setTimeout((function(){p===o.getBufferTemplate.call(l).join("")?f.trigger("cleared"):!0===a.isComplete.call(l,e)&&f.trigger("complete")}),0)}}},2394:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(157),r=g(n(4963)),o=g(n(9380)),a=n(2391),s=n(4713),l=n(8711),u=n(7215),c=n(7760),h=n(9716),d=g(n(7392)),f=g(n(3976)),p=g(n(8741));function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function g(t){return t&&t.__esModule?t:{default:t}}var v=o.default.document,y="_inputmask_opts";function b(t,e,n){if(p.default){if(!(this instanceof b))return new b(t,e,n);this.dependencyLib=r.default,this.el=void 0,this.events={},this.maskset=void 0,!0!==n&&("[object Object]"===Object.prototype.toString.call(t)?e=t:(e=e||{},t&&(e.alias=t)),this.opts=r.default.extend(!0,{},this.defaults,e),this.noMasksCache=e&&void 0!==e.definitions,this.userOptions=e||{},_(this.opts.alias,e,this.opts)),this.refreshValue=!1,this.undoValue=void 0,this.$el=void 0,this.skipInputEvent=!1,this.validationEvent=!1,this.ignorable=!1,this.maxLength,this.mouseEnter=!1,this.clicked=0,this.originalPlaceholder=void 0,this.isComposing=!1,this.hasAlternator=!1}}function _(t,e,n){var i=b.prototype.aliases[t];return i?(i.alias&&_(i.alias,void 0,n),r.default.extend(!0,n,i),r.default.extend(!0,n,e),!0):(null===n.mask&&(n.mask=t),!1)}b.prototype={dataAttribute:"data-inputmask",defaults:f.default,definitions:d.default,aliases:{},masksCache:{},get isRTL(){return this.opts.isRTL||this.opts.numericInput},mask:function(t){var e=this;return"string"==typeof t&&(t=v.getElementById(t)||v.querySelectorAll(t)),(t=t.nodeName?[t]:Array.isArray(t)?t:[].slice.call(t)).forEach((function(t,n){var s=r.default.extend(!0,{},e.opts);if(function(t,e,n,i){function a(e,r){var a=""===i?e:i+"-"+e;null!==(r=void 0!==r?r:t.getAttribute(a))&&("string"==typeof r&&(0===e.indexOf("on")?r=o.default[r]:"false"===r?r=!1:"true"===r&&(r=!0)),n[e]=r)}if(!0===e.importDataAttributes){var s,l,u,c,h=t.getAttribute(i);if(h&&""!==h&&(h=h.replace(/'/g,'"'),l=JSON.parse("{"+h+"}")),l)for(c in u=void 0,l)if("alias"===c.toLowerCase()){u=l[c];break}for(s in a("alias",u),n.alias&&_(n.alias,n,e),e){if(l)for(c in u=void 0,l)if(c.toLowerCase()===s.toLowerCase()){u=l[c];break}a(s,u)}}return r.default.extend(!0,e,n),("rtl"===t.dir||e.rightAlign)&&(t.style.textAlign="right"),("rtl"===t.dir||e.numericInput)&&(t.dir="ltr",t.removeAttribute("dir"),e.isRTL=!0),Object.keys(n).length}(t,s,r.default.extend(!0,{},e.userOptions),e.dataAttribute)){var l=(0,a.generateMaskSet)(s,e.noMasksCache);void 0!==l&&(void 0!==t.inputmask&&(t.inputmask.opts.autoUnmask=!0,t.inputmask.remove()),t.inputmask=new b(void 0,void 0,!0),t.inputmask.opts=s,t.inputmask.noMasksCache=e.noMasksCache,t.inputmask.userOptions=r.default.extend(!0,{},e.userOptions),t.inputmask.el=t,t.inputmask.$el=(0,r.default)(t),t.inputmask.maskset=l,r.default.data(t,y,e.userOptions),i.mask.call(t.inputmask))}})),t&&t[0]&&t[0].inputmask||this},option:function(t,e){return"string"==typeof t?this.opts[t]:"object"===m(t)?(r.default.extend(this.userOptions,t),this.el&&!0!==e&&this.mask(this.el),this):void 0},unmaskedvalue:function(t){if(this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache),void 0===this.el||void 0!==t){var e=("function"==typeof this.opts.onBeforeMask&&this.opts.onBeforeMask.call(this,t,this.opts)||t).split("");c.checkVal.call(this,void 0,!1,!1,e),"function"==typeof this.opts.onBeforeWrite&&this.opts.onBeforeWrite.call(this,void 0,l.getBuffer.call(this),0,this.opts)}return c.unmaskedvalue.call(this,this.el)},remove:function(){if(this.el){r.default.data(this.el,y,null);var t=this.opts.autoUnmask?(0,c.unmaskedvalue)(this.el):this._valueGet(this.opts.autoUnmask);t!==l.getBufferTemplate.call(this).join("")?this._valueSet(t,this.opts.autoUnmask):this._valueSet(""),h.EventRuler.off(this.el),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el),"value")&&this.__valueGet&&Object.defineProperty(this.el,"value",{get:this.__valueGet,set:this.__valueSet,configurable:!0}):v.__lookupGetter__&&this.el.__lookupGetter__("value")&&this.__valueGet&&(this.el.__defineGetter__("value",this.__valueGet),this.el.__defineSetter__("value",this.__valueSet)),this.el.inputmask=void 0}return this.el},getemptymask:function(){return this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache),(this.isRTL?l.getBufferTemplate.call(this).reverse():l.getBufferTemplate.call(this)).join("")},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache),u.isComplete.call(this,l.getBuffer.call(this))},getmetadata:function(){if(this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache),Array.isArray(this.maskset.metadata)){var t=s.getMaskTemplate.call(this,!0,0,!1).join("");return this.maskset.metadata.forEach((function(e){return e.mask!==t||(t=e,!1)})),t}return this.maskset.metadata},isValid:function(t){if(this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache),t){var e=("function"==typeof this.opts.onBeforeMask&&this.opts.onBeforeMask.call(this,t,this.opts)||t).split("");c.checkVal.call(this,void 0,!0,!1,e)}else t=this.isRTL?l.getBuffer.call(this).slice().reverse().join(""):l.getBuffer.call(this).join("");for(var n=l.getBuffer.call(this),i=l.determineLastRequiredPosition.call(this),r=n.length-1;r>i&&!l.isMask.call(this,r);r--);return n.splice(i,r+1-i),u.isComplete.call(this,n)&&t===(this.isRTL?l.getBuffer.call(this).slice().reverse().join(""):l.getBuffer.call(this).join(""))},format:function(t,e){this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache);var n=("function"==typeof this.opts.onBeforeMask&&this.opts.onBeforeMask.call(this,t,this.opts)||t).split("");c.checkVal.call(this,void 0,!0,!1,n);var i=this.isRTL?l.getBuffer.call(this).slice().reverse().join(""):l.getBuffer.call(this).join("");return e?{value:i,metadata:this.getmetadata()}:i},setValue:function(t){this.el&&(0,r.default)(this.el).trigger("setvalue",[t])},analyseMask:a.analyseMask},b.extendDefaults=function(t){r.default.extend(!0,b.prototype.defaults,t)},b.extendDefinitions=function(t){r.default.extend(!0,b.prototype.definitions,t)},b.extendAliases=function(t){r.default.extend(!0,b.prototype.aliases,t)},b.format=function(t,e,n){return b(e).format(t,n)},b.unmask=function(t,e){return b(e).unmaskedvalue(t)},b.isValid=function(t,e){return b(e).isValid(t)},b.remove=function(t){"string"==typeof t&&(t=v.getElementById(t)||v.querySelectorAll(t)),(t=t.nodeName?[t]:t).forEach((function(t){t.inputmask&&t.inputmask.remove()}))},b.setValue=function(t,e){"string"==typeof t&&(t=v.getElementById(t)||v.querySelectorAll(t)),(t=t.nodeName?[t]:t).forEach((function(t){t.inputmask?t.inputmask.setValue(e):(0,r.default)(t).trigger("setvalue",[e])}))},b.dependencyLib=r.default,o.default.Inputmask=b;var w=b;e.default=w},5296:function(t,e,n){function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var r=p(n(9380)),o=p(n(2394)),a=p(n(8741));function s(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,i=new Array(e);n0){if(y(l=m[m.length-1],a),l.isAlternator){u=m.pop();for(var t=0;t0?(l=m[m.length-1]).matches.push(u):p.matches.push(u)}}else y(p,a)}function _(t){var e=new r.default(!0);return e.openGroup=!1,e.matches=t,e}function w(){if((s=m.pop()).openGroup=!1,void 0!==s)if(m.length>0){if((l=m[m.length-1]).matches.push(s),l.isAlternator){for(var t=(u=m.pop()).matches[0].matches?u.matches[0].matches.length:1,e=0;e0?(l=m[m.length-1]).matches.push(u):p.matches.push(u)}}else p.matches.push(s);else b()}function x(t){var e=t.pop();return e.isQuantifier&&(e=_([t.pop(),e])),e}for(e&&(n.optionalmarker[0]=void 0,n.optionalmarker[1]=void 0);i=e?d.exec(t):h.exec(t);){if(a=i[0],e){switch(a.charAt(0)){case"?":a="{0,1}";break;case"+":case"*":a="{"+a+"}";break;case"|":if(0===m.length){var k=_(p.matches);k.openGroup=!0,m.push(k),p.matches=[],v=!0}}switch(a){case"\\d":a="[0-9]";break;case"\\p":a+=d.exec(t)[0],a+=d.exec(t)[0]}}if(f)b();else switch(a.charAt(0)){case"$":case"^":e||b();break;case n.escapeChar:f=!0,e&&b();break;case n.optionalmarker[1]:case n.groupmarker[1]:w();break;case n.optionalmarker[0]:m.push(new r.default(!1,!0));break;case n.groupmarker[0]:m.push(new r.default(!0));break;case n.quantifiermarker[0]:var S=new r.default(!1,!1,!0),C=(a=a.replace(/[{}?]/g,"")).split("|"),T=C[0].split(","),O=isNaN(T[0])?T[0]:parseInt(T[0]),E=1===T.length?O:isNaN(T[1])?T[1]:parseInt(T[1]),A=isNaN(C[1])?C[1]:parseInt(C[1]);"*"!==O&&"+"!==O||(O="*"===E?0:1),S.quantifier={min:O,max:E,jit:A};var L=m.length>0?m[m.length-1].matches:p.matches;(i=L.pop()).isGroup||(i=_([i])),L.push(i),L.push(S);break;case n.alternatormarker:if(m.length>0){var M=(l=m[m.length-1]).matches[l.matches.length-1];c=l.openGroup&&(void 0===M.matches||!1===M.isGroup&&!1===M.isAlternator)?m.pop():x(l.matches)}else c=x(p.matches);if(c.isAlternator)m.push(c);else if(c.alternatorGroup?(u=m.pop(),c.alternatorGroup=!1):u=new r.default(!1,!1,!1,!0),u.matches.push(c),m.push(u),c.openGroup){c.openGroup=!1;var P=new r.default(!0);P.alternatorGroup=!0,m.push(P)}break;default:b()}}for(v&&w();m.length>0;)s=m.pop(),p.matches.push(s);return p.matches.length>0&&(function t(i){i&&i.matches&&i.matches.forEach((function(r,o){var a=i.matches[o+1];(void 0===a||void 0===a.matches||!1===a.isQuantifier)&&r&&r.isGroup&&(r.isGroup=!1,e||(y(r,n.groupmarker[0],0),!0!==r.openGroup&&y(r,n.groupmarker[1]))),t(r)}))}(p),g.push(p)),(n.numericInput||n.isRTL)&&function t(e){for(var i in e.matches=e.matches.reverse(),e.matches)if(Object.prototype.hasOwnProperty.call(e.matches,i)){var r=parseInt(i);if(e.matches[i].isQuantifier&&e.matches[r+1]&&e.matches[r+1].isGroup){var o=e.matches[i];e.matches.splice(i,1),e.matches.splice(r+1,0,o)}void 0!==e.matches[i].matches?e.matches[i]=t(e.matches[i]):e.matches[i]=((a=e.matches[i])===n.optionalmarker[0]?a=n.optionalmarker[1]:a===n.optionalmarker[1]?a=n.optionalmarker[0]:a===n.groupmarker[0]?a=n.groupmarker[1]:a===n.groupmarker[1]&&(a=n.groupmarker[0]),a)}var a;return e}(g[0]),g},e.generateMaskSet=function(t,e){var n;function r(t,e){var n=e.repeat,i=e.groupmarker,r=e.quantifiermarker,o=e.keepStatic;if(n>0||"*"===n||"+"===n){var l="*"===n?0:"+"===n?1:n;t=i[0]+t+i[1]+r[0]+l+","+n+r[1]}if(!0===o){var u=t.match(new RegExp("(.)\\[([^\\]]*)\\]","g"));u&&u.forEach((function(e,n){var i=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.split("["),2),r=i[0],o=i[1];o=o.replace("]",""),t=t.replace(new RegExp("".concat((0,a.default)(r),"\\[").concat((0,a.default)(o),"\\]")),r.charAt(0)===o.charAt(0)?"(".concat(r,"|").concat(r).concat(o,")"):"".concat(r,"[").concat(o,"]"))}))}return t}function l(t,n,a){var s,l,u=!1;return null!==t&&""!==t||((u=null!==a.regex)?t=(t=a.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(u=!0,t=".*")),1===t.length&&!1===a.greedy&&0!==a.repeat&&(a.placeholder=""),t=r(t,a),l=u?"regex_"+a.regex:a.numericInput?t.split("").reverse().join(""):t,null!==a.keepStatic&&(l="ks_"+a.keepStatic+l),void 0===o.default.prototype.masksCache[l]||!0===e?(s={mask:t,maskToken:o.default.prototype.analyseMask(t,u,a),validPositions:[],_buffer:void 0,buffer:void 0,tests:{},excludes:{},metadata:n,maskLength:void 0,jitOffset:{}},!0!==e&&(o.default.prototype.masksCache[l]=s,s=i.default.extend(!0,{},o.default.prototype.masksCache[l]))):s=i.default.extend(!0,{},o.default.prototype.masksCache[l]),s}if("function"==typeof t.mask&&(t.mask=t.mask(t)),Array.isArray(t.mask)){if(t.mask.length>1){null===t.keepStatic&&(t.keepStatic=!0);var u=t.groupmarker[0];return(t.isRTL?t.mask.reverse():t.mask).forEach((function(e){u.length>1&&(u+=t.alternatormarker),void 0!==e.mask&&"function"!=typeof e.mask?u+=e.mask:u+=e})),l(u+=t.groupmarker[1],t.mask,t)}t.mask=t.mask.pop()}return n=t.mask&&void 0!==t.mask.mask&&"function"!=typeof t.mask.mask?l(t.mask.mask,t.mask,t):l(t.mask,t.mask,t),null===t.keepStatic&&(t.keepStatic=!1),n};var i=l(n(4963)),r=l(n(9695)),o=l(n(2394)),a=l(n(7184));function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n>>0;if(0===i)return!1;for(var r=0|e,o=Math.max(r>=0?r:i-Math.abs(r),0);othis.length)&&-1!==this.indexOf(t,e)})},8711:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.caret=function(t,e,n,i,r){var o,a=this,s=this.opts;if(void 0===e)return"selectionStart"in t&&"selectionEnd"in t?(e=t.selectionStart,n=t.selectionEnd):window.getSelection?(o=window.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==t&&o.commonAncestorContainer!==t||(e=o.startOffset,n=o.endOffset):document.selection&&document.selection.createRange&&(n=(e=0-(o=document.selection.createRange()).duplicate().moveStart("character",-t.inputmask._valueGet().length))+o.text.length),{begin:i?e:u.call(a,e),end:i?n:u.call(a,n)};if(Array.isArray(e)&&(n=a.isRTL?e[0]:e[1],e=a.isRTL?e[1]:e[0]),void 0!==e.begin&&(n=a.isRTL?e.begin:e.end,e=a.isRTL?e.end:e.begin),"number"==typeof e){e=i?e:u.call(a,e),n="number"==typeof(n=i?n:u.call(a,n))?n:e;var l=parseInt(((t.ownerDocument.defaultView||window).getComputedStyle?(t.ownerDocument.defaultView||window).getComputedStyle(t,null):t.currentStyle).fontSize)*n;if(t.scrollLeft=l>t.scrollWidth?l:0,t.inputmask.caretPos={begin:e,end:n},s.insertModeVisual&&!1===s.insertMode&&e===n&&(r||n++),t===(t.inputmask.shadowRoot||t.ownerDocument).activeElement)if("setSelectionRange"in t)t.setSelectionRange(e,n);else if(window.getSelection){if(o=document.createRange(),void 0===t.firstChild||null===t.firstChild){var c=document.createTextNode("");t.appendChild(c)}o.setStart(t.firstChild,eh&&((n=d[e]).match.optionality||n.match.optionalQuantifier&&n.match.newBlockMarker||m&&(m!==d[e].locator[f.alternation]&&1!=n.match.static||!0===n.match.static&&n.locator[f.alternation]&&r.checkAlternationMatch.call(o,n.locator[f.alternation].toString().split(","),m.toString().split(","))&&""!==i.getTests.call(o,e)[0].def))&&u[e]===i.getPlaceholder.call(o,e,n.match);e--)c--;return t?{l:c,def:d[c]?d[c].match:void 0}:c},e.determineNewCaretPosition=function(t,e,n){var r=this,u=r.maskset,c=r.opts;if(e&&(r.isRTL?t.end=t.begin:t.begin=t.end),t.begin===t.end){switch(n=n||c.positionCaretOnClick){case"none":break;case"select":t={begin:0,end:o.call(r).length};break;case"ignore":t.end=t.begin=l.call(r,a.call(r));break;case"radixFocus":if(r.clicked>1&&0==u.validPositions.length)break;if(function(t){if(""!==c.radixPoint&&0!==c.digits){var e=u.validPositions;if(void 0===e[t]||e[t].input===i.getPlaceholder.call(r,t)){if(t=y||d===p)&&(p=y)}t.end=t.begin=p}}return t}},e.getBuffer=o,e.getBufferTemplate=function(){var t=this.maskset;return void 0===t._buffer&&(t._buffer=i.getMaskTemplate.call(this,!1,1),void 0===t.buffer&&(t.buffer=t._buffer.slice())),t._buffer},e.getLastValidPosition=a,e.isMask=s,e.resetMaskSet=function(t){var e=this.maskset;e.buffer=void 0,!0!==t&&(e.validPositions=[],e.p=0)},e.seekNext=l,e.seekPrevious=function(t,e){var n=this,r=t-1;if(t<=0)return 0;for(;r>0&&(!0===e&&(!0!==i.getTest.call(n,r).match.newBlockMarker||!s.call(n,r,void 0,!0))||!0!==e&&!s.call(n,r,void 0,!0));)r--;return r},e.translatePosition=u;var i=n(4713),r=n(7215);function o(t){var e=this,n=e.maskset;return void 0!==n.buffer&&!0!==t||(n.buffer=i.getMaskTemplate.call(e,!0,a.call(e),!0),void 0===n._buffer&&(n._buffer=n.buffer.slice())),n.buffer}function a(t,e,n){var i=this.maskset,r=-1,o=-1,a=n||i.validPositions;void 0===t&&(t=-1);for(var s=0,l=a.length;s=t&&(o=s));return-1===r||r==t?o:-1==o||t-r-1){if(n){var s=i.getTests.call(r,t);return s.length>1+(""===s[s.length-1].match.def?1:0)}var l=i.determineTestTemplate.call(r,t,i.getTests.call(r,t)),u=i.getPlaceholder.call(r,t,l.match);return l.match.def!==u}return!1}function l(t,e,n){var r=this;void 0===n&&(n=!0);for(var o=t+1;""!==i.getTest.call(r,o).match.def&&(!0===e&&(!0!==i.getTest.call(r,o).match.newBlockMarker||!s.call(r,o,void 0,!0))||!0!==e&&!s.call(r,o,void 0,n));)o++;return o}function u(t){var e=this.opts,n=this.el;return!this.isRTL||"number"!=typeof t||e.greedy&&""===e.placeholder||!n||(t=this._valueGet().length-t)<0&&(t=0),t}},4713:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.determineTestTemplate=u,e.getDecisionTaker=a,e.getMaskTemplate=function(t,e,n,i,r){var o=this,a=this.opts,c=this.maskset,h=a.greedy;r&&a.greedy&&(a.greedy=!1,o.maskset.tests={}),e=e||0;var f,p,m,g,v=[],y=0;do{if(!0===t&&c.validPositions[y])p=(m=r&&c.validPositions[y].match.optionality&&void 0===c.validPositions[y+1]&&(!0===c.validPositions[y].generatedInput||c.validPositions[y].input==a.skipOptionalPartCharacter&&y>0)?u.call(o,y,d.call(o,y,f,y-1)):c.validPositions[y]).match,f=m.locator.slice(),v.push(!0===n?m.input:!1===n?p.nativeDef:s.call(o,y,p));else{p=(m=l.call(o,y,f,y-1)).match,f=m.locator.slice();var b=!0!==i&&(!1!==a.jitMasking?a.jitMasking:p.jit);(g=(g&&p.static&&p.def!==a.groupSeparator&&null===p.fn||c.validPositions[y-1]&&p.static&&p.def!==a.groupSeparator&&null===p.fn)&&c.tests[y])||!1===b||void 0===b||"number"==typeof b&&isFinite(b)&&b>y?v.push(!1===n?p.nativeDef:s.call(o,v.length,p)):g=!1}y++}while(!0!==p.static||""!==p.def||e>y);return""===v[v.length-1]&&v.pop(),!1===n&&void 0!==c.maskLength||(c.maskLength=y-1),a.greedy=h,v},e.getPlaceholder=s,e.getTest=c,e.getTestTemplate=l,e.getTests=d,e.isSubsetOf=h;var i,r=(i=n(2394))&&i.__esModule?i:{default:i};function o(t,e){var n=(null!=t.alternation?t.mloc[a(t)]:t.locator).join("");if(""!==n)for(;n.length0&&(e=e.split(",")[0]),void 0!==e?e.toString():""}function s(t,e,n){var i=this.opts,r=this.maskset;if(void 0!==(e=e||c.call(this,t).match).placeholder||!0===n)return"function"==typeof e.placeholder?e.placeholder(i):e.placeholder;if(!0===e.static){if(t>-1&&void 0===r.validPositions[t]){var o,a=d.call(this,t),s=[];if(a.length>1+(""===a[a.length-1].match.def?1:0))for(var l=0;l1&&/[0-9a-bA-Z]/.test(s[0].match.def)))return i.placeholder.charAt(t%i.placeholder.length)}return e.def}return i.placeholder.charAt(t%i.placeholder.length)}function l(t,e,n){return this.maskset.validPositions[t]||u.call(this,t,d.call(this,t,e?e.slice():e,n))}function u(t,e){var n=this.opts,i=0,r=function(t,e){var n=0,i=!1;return e.forEach((function(t){t.match.optionality&&(0!==n&&n!==t.match.optionality&&(i=!0),(0===n||n>t.match.optionality)&&(n=t.match.optionality))})),n&&(0==t||1==e.length?n=0:i||(n=0)),n}(t,e);t=t>0?t-1:0;var a,s,l,u=o(c.call(this,t));n.greedy&&e.length>1&&""===e[e.length-1].match.def&&(i=1);for(var h=0;h0&&"master"===l.match.newBlockMarker&&(!d.match.optionality||d.match.optionality-r<1||!d.match.newBlockMarker)||l&&!n.greedy&&l.match.optionalQuantifier&&!d.match.optionalQuantifier)&&(s=f,l=d)}return l}function c(t,e){var n=this.maskset;return n.validPositions[t]?n.validPositions[t]:(e||d.call(this,t))[0]}function h(t,e,n){function i(t){for(var e,n=[],i=-1,r=0,o=t.length;re.alternation)for(var r=e.alternation;rt+c._maxTestPos)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+l.mask;if(p===t&&void 0===o.matches){if(g.push({match:o,locator:s.reverse(),cd:y,mloc:{}}),!o.optionality||void 0!==f||!(c.definitions&&c.definitions[o.nativeDef]&&c.definitions[o.nativeDef].optional||r.default.prototype.definitions[o.nativeDef]&&r.default.prototype.definitions[o.nativeDef].optional))return!0;v=!0,p=t}else if(void 0!==o.matches){if(o.isGroup&&f!==o)return function(){if(o=u(e.matches[e.matches.indexOf(o)+1],s,f))return!0}();if(o.isOptional)return function(){var e=o,r=g.length;if(o=b(o,n,s,f),g.length>0){if(g.forEach((function(t,e){e>=r&&(t.match.optionality=t.match.optionality?t.match.optionality+1:1)})),i=g[g.length-1].match,void 0!==f||!m(i,e))return o;v=!0,p=t}}();if(o.isAlternator)return function(){a.hasAlternator=!0;var i,r,m,y=o,b=[],_=g.slice(),S=s.length,C=!1,T=n.length>0?n.shift():-1;if(-1===T||"string"==typeof T){var O,E=p,A=n.slice(),L=[];if("string"==typeof T)L=T.split(",");else for(O=0;O=c.keepStatic)&&(L=L.slice(0,1));for(var j=0;jy.matches[0].matches.length)break;i=g.slice(),p=E,g=[];for(var R=0;R0,o=b.length>0,n=A.slice()}else o=u(y.matches[T]||e.matches[T],[T].concat(s),f);if(o)return!0}();if(o.isQuantifier&&f!==e.matches[e.matches.indexOf(o)-1])return function(){for(var r=o,a=!1,h=n.length>0?n.shift():0;h<(isNaN(r.quantifier.max)?h+1:r.quantifier.max)&&p<=t;h++){var d=e.matches[e.matches.indexOf(r)-1];if(o=u(d,[h].concat(s),d)){if(g.forEach((function(e,n){(i=_(d,e.match)?e.match:g[g.length-1].match).optionalQuantifier=h>=r.quantifier.min,i.jit=(h+1)*(d.matches.indexOf(i)+1)>r.quantifier.jit,i.optionalQuantifier&&m(i,d)&&(v=!0,p=t,c.greedy&&null==l.validPositions[t-1]&&h>r.quantifier.min&&-1!=["*","+"].indexOf(r.quantifier.max)&&(g.pop(),y=void 0),a=!0,o=!1),!a&&i.jit&&(l.jitOffset[t]=d.matches.length-d.matches.indexOf(i))})),a)break;return!0}}}();if(o=b(o,n,s,f))return!0}else p++}for(var f=n.length>0?n.shift():0;ft)break}}function _(t,e){var n=-1!=t.matches.indexOf(e);return n||t.matches.forEach((function(t,i){void 0===t.matches||n||(n=_(t,e))})),n}if(t>-1){if(void 0===e){for(var w,x=t-1;void 0===(w=l.validPositions[x]||l.tests[x])&&x>-1;)x--;void 0!==w&&x>-1&&(m=function(t,e){var n,i=[];return Array.isArray(e)||(e=[e]),e.length>0&&(void 0===e[0].alternation||!0===c.keepStatic?0===(i=u.call(a,t,e.slice()).locator.slice()).length&&(i=e[0].locator.slice()):e.forEach((function(t){""!==t.def&&(0===i.length?(n=t.alternation,i=t.locator.slice()):t.locator[n]&&-1===i[n].toString().indexOf(t.locator[n])&&(i[n]+=","+t.locator[n]))}))),i}(x,w),y=m.join(""),p=x)}if(l.tests[t]&&l.tests[t][0].cd===y)return l.tests[t];for(var k=m.shift();kt);k++);}return(0===g.length||v)&&g.push({match:{fn:null,static:!0,optionality:!1,casing:null,def:"",placeholder:""},locator:[],mloc:{},cd:y}),void 0!==e&&l.tests[t]?o=s.extend(!0,[],g):(l.tests[t]=s.extend(!0,[],g),o=l.tests[t]),g.forEach((function(t){t.match.optionality=t.match.defOptionality||!1})),o}},7215:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.alternate=s,e.checkAlternationMatch=function(t,e,n){for(var i,r=this.opts.greedy?e:e.slice(0,1),o=!1,a=void 0!==n?n.split(","):[],s=0;s=o.getBuffer.call(u).length&&p>=n.end&&(n.end=p+1),e===r.keys.Backspace?n.end-n.begin<1&&(n.begin=o.seekPrevious.call(u,n.begin)):e===r.keys.Delete&&n.begin===n.end&&(n.end=o.isMask.call(u,n.end,!0,!0)?n.end+1:o.seekNext.call(u,n.end)+1),!1!==(f=m.call(u,n))){if(!0!==a&&!1!==h.keepStatic||null!==h.regex&&-1!==i.getTest.call(u,n.begin).match.def.indexOf("|")){var g=s.call(u,!0);if(g){var v=void 0!==g.caret?g.caret:g.pos?o.seekNext.call(u,g.pos.begin?g.pos.begin:g.pos):o.getLastValidPosition.call(u,-1,!0);(e!==r.keys.Delete||n.begin>v)&&n.begin}}!0!==a&&(c.p=e===r.keys.Delete?n.begin+f:n.begin,c.p=o.determineNewCaretPosition.call(u,{begin:c.p,end:c.p},!1,!1===h.insertMode&&e===r.keys.Backspace?"none":void 0).begin)}},e.isComplete=u,e.isSelection=c,e.isValid=h,e.refreshFromBuffer=f,e.revalidateMask=m;var i=n(4713),r=n(2839),o=n(8711),a=n(6030);function s(t,e,n,r,a,l){var u,c,d,f,p,m,g,v,y,b,_,w=this,x=this.dependencyLib,k=this.opts,S=w.maskset,C=x.extend(!0,[],S.validPositions),T=x.extend(!0,{},S.tests),O=!1,E=!1,A=void 0!==a?a:o.getLastValidPosition.call(w);if(l&&(b=l.begin,_=l.end,l.begin>l.end&&(b=l.end,_=l.begin)),-1===A&&void 0===a)u=0,c=(f=i.getTest.call(w,u)).alternation;else for(;A>=0;A--)if((d=S.validPositions[A])&&void 0!==d.alternation){if(A<=(t||0)&&f&&f.locator[d.alternation]!==d.locator[d.alternation])break;u=A,c=S.validPositions[u].alternation,f=d}if(void 0!==c){g=parseInt(u),S.excludes[g]=S.excludes[g]||[],!0!==t&&S.excludes[g].push((0,i.getDecisionTaker)(f)+":"+f.alternation);var L=[],M=-1;for(p=g;p=_)&&L.push(m.input),delete S.validPositions[p];for(-1===M&&void 0!==e&&(L.push(e),M=L.length-1);void 0!==S.excludes[g]&&S.excludes[g].length<10;){for(S.tests={},o.resetMaskSet.call(w,!0),O=!0,p=0;pe:t.end-t.begin>e}function h(t,e,n,r,a,d,g){var v=this,y=this.dependencyLib,b=this.opts,_=v.maskset;n=!0===n;var w=t;function x(t){if(void 0!==t){if(void 0!==t.remove&&(Array.isArray(t.remove)||(t.remove=[t.remove]),t.remove.sort((function(t,e){return v.isRTL?t.pos-e.pos:e.pos-t.pos})).forEach((function(t){m.call(v,{begin:t,end:t+1})})),t.remove=void 0),void 0!==t.insert&&(Array.isArray(t.insert)||(t.insert=[t.insert]),t.insert.sort((function(t,e){return v.isRTL?e.pos-t.pos:t.pos-e.pos})).forEach((function(t){""!==t.c&&h.call(v,t.pos,t.c,void 0===t.strict||t.strict,void 0!==t.fromIsValid?t.fromIsValid:r)})),t.insert=void 0),t.refreshFromBuffer&&t.buffer){var e=t.refreshFromBuffer;f.call(v,!0===e?e:e.start,e.end,t.buffer),t.refreshFromBuffer=void 0}void 0!==t.rewritePosition&&(w=t.rewritePosition,t=!0)}return t}function k(e,n,a){var s=!1;return i.getTests.call(v,e).every((function(u,h){var d=u.match;if(o.getBuffer.call(v,!0),!1!==(s=(!d.jit||void 0!==_.validPositions[o.seekPrevious.call(v,e)])&&(null!=d.fn?d.fn.test(n,_,e,a,b,c.call(v,t)):(n===d.def||n===b.skipOptionalPartCharacter)&&""!==d.def&&{c:i.getPlaceholder.call(v,e,d,!0)||d.def,pos:e}))){var f=void 0!==s.c?s.c:n,p=e;return f=f===b.skipOptionalPartCharacter&&!0===d.static?i.getPlaceholder.call(v,e,d,!0)||d.def:f,!0!==(s=x(s))&&void 0!==s.pos&&s.pos!==e&&(p=s.pos),!0!==s&&void 0===s.pos&&void 0===s.c||!1===m.call(v,t,y.extend({},u,{input:l.call(v,f,d,p)}),r,p)&&(s=!1),!1}return!0})),s}void 0!==t.begin&&(w=v.isRTL?t.end:t.begin);var S=!0,C=y.extend(!0,{},_.validPositions);if(!1===b.keepStatic&&void 0!==_.excludes[w]&&!0!==a&&!0!==r)for(var T=w;T<(v.isRTL?t.begin:t.end);T++)void 0!==_.excludes[T]&&(_.excludes[T]=void 0,delete _.tests[T]);if("function"==typeof b.preValidation&&!0!==r&&!0!==d&&(S=x(S=b.preValidation.call(v,o.getBuffer.call(v),w,e,c.call(v,t),b,_,t,n||a))),!0===S){if(S=k(w,e,n),(!n||!0===r)&&!1===S&&!0!==d){var O=_.validPositions[w];if(!O||!0!==O.match.static||O.match.def!==e&&e!==b.skipOptionalPartCharacter){if(b.insertMode||void 0===_.validPositions[o.seekNext.call(v,w)]||t.end>w){var E=!1;if(_.jitOffset[w]&&void 0===_.validPositions[o.seekNext.call(v,w)]&&!1!==(S=h.call(v,w+_.jitOffset[w],e,!0,!0))&&(!0!==a&&(S.caret=w),E=!0),t.end>w&&(_.validPositions[w]=void 0),!E&&!o.isMask.call(v,w,b.keepStatic&&0===w))for(var A=w+1,L=o.seekNext.call(v,w,!1,0!==w);A<=L;A++)if(!1!==(S=k(A,e,n))){S=p.call(v,w,void 0!==S.pos?S.pos:A)||S,w=A;break}}}else S={caret:o.seekNext.call(v,w)}}v.hasAlternator&&!0!==a&&!n&&(!1===S&&b.keepStatic&&(u.call(v,o.getBuffer.call(v))||0===w)?S=s.call(v,w,e,n,r,void 0,t):(c.call(v,t)&&_.tests[w]&&_.tests[w].length>1&&b.keepStatic||1==S&&!0!==b.numericInput&&_.tests[w]&&_.tests[w].length>1&&o.getLastValidPosition.call(v,void 0,!0)>w)&&(S=s.call(v,!0))),!0===S&&(S={pos:w})}if("function"==typeof b.postValidation&&!0!==r&&!0!==d){var M=b.postValidation.call(v,o.getBuffer.call(v,!0),void 0!==t.begin?v.isRTL?t.end:t.begin:t,e,S,b,_,n,g);void 0!==M&&(S=!0===M?S:M)}S&&void 0===S.pos&&(S.pos=w),!1===S||!0===d?(o.resetMaskSet.call(v,!0),_.validPositions=y.extend(!0,[],C)):p.call(v,void 0,w,!0);var P=x(S);return void 0!==v.maxLength&&o.getBuffer.call(v).length>v.maxLength&&!r&&(o.resetMaskSet.call(v,!0),_.validPositions=y.extend(!0,[],C),P=!1),P}function d(t,e,n){for(var r=this.maskset,o=!1,a=i.getTests.call(this,t),s=0;s0&&!a.validPositions[t];t--);for(var l=t;lt+1?e[t+1]&&!0===e[t+1].match.static&&e[t+1]:e[t+1];return r&&o}return!1}var f=0,p=void 0!==t.begin?t.begin:t,m=void 0!==t.end?t.end:t,g=!0;if(t.begin>t.end&&(p=t.end,m=t.begin),r=void 0!==r?r:p,void 0===n&&(p!==m||l.insertMode&&void 0!==s.validPositions[r]||void 0===e||e.match.optionalQuantifier||e.match.optionality)){var v,y=u.extend(!0,{},s.validPositions),b=o.getLastValidPosition.call(a,void 0,!0);for(s.p=p,v=b;v>=p;v--)delete s.validPositions[v],void 0===e&&delete s.tests[v+1];var _,w,x=r,k=x;for(e&&(s.validPositions[r]=u.extend(!0,{},e),k++,x++),v=e?m:m-1;v<=b;v++){if(void 0!==(_=y[v])&&!0!==_.generatedInput&&(v>=m||v>=p&&c(v,y,{begin:p,end:m}))){for(;""!==i.getTest.call(a,k).match.def;){if(!1!==(w=d.call(a,k,_,l))||"+"===_.match.def){"+"===_.match.def&&o.getBuffer.call(a,!0);var S=h.call(a,k,_.input,"+"!==_.match.def,!0);if(g=!1!==S,x=(S.pos||k)+1,!g&&w)break}else g=!1;if(g){void 0===e&&_.match.static&&v===t.begin&&f++;break}if(!g&&o.getBuffer.call(a),k>s.maskLength)break;k++}""==i.getTest.call(a,k).match.def&&(g=!1),k=x}if(!g)break}if(!g)return s.validPositions=u.extend(!0,[],y),o.resetMaskSet.call(a,!0),!1}else e&&i.getTest.call(a,r).match.cd===e.match.cd&&(s.validPositions[r]=u.extend(!0,{},e));return o.resetMaskSet.call(a,!0),f}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}var i={};return function(){var t,e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n(7149),n(3194),n(9302),n(4013),n(3851),n(219),n(207),n(5296);var r=((t=n(2394))&&t.__esModule?t:{default:t}).default;e.default=r}(),i}()},3481:function(t,e){!function(t){"use strict";var e="1.9.4";function n(t){var e,n,i,r;for(n=1,i=arguments.length;n0?Math.floor(t):Math.ceil(t)};function j(t,e,n){return t instanceof N?t:v(t)?new N(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new N(t.x,t.y):new N(t,e,n)}function I(t,e){if(t)for(var n=e?[t,e]:t,i=0,r=n.length;i=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=t.max,o=r.x>=e.x&&i.x<=n.x,a=r.y>=e.y&&i.y<=n.y;return o&&a},overlaps:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=t.max,o=r.x>e.x&&i.xe.y&&i.y=i.lat&&n.lat<=r.lat&&e.lng>=i.lng&&n.lng<=r.lng},intersects:function(t){t=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>=e.lat&&i.lat<=n.lat,a=r.lng>=e.lng&&i.lng<=n.lng;return o&&a},overlaps:function(t){t=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>e.lat&&i.late.lng&&i.lng1,Lt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",u,e),window.removeEventListener("testPassiveEventSupport",u,e)}catch(t){}return t}(),Mt=!!document.createElement("canvas").getContext,Pt=!(!document.createElementNS||!X("svg").createSVGRect),Nt=!!Pt&&((Q=document.createElement("div")).innerHTML="","http://www.w3.org/2000/svg"===(Q.firstChild&&Q.firstChild.namespaceURI)),Dt=!Pt&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),jt=0===navigator.platform.indexOf("Mac"),It=0===navigator.platform.indexOf("Linux");function Rt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Ft={ie:et,ielt9:nt,edge:it,webkit:rt,android:ot,android23:at,androidStock:lt,opera:ut,chrome:ct,gecko:ht,safari:dt,phantom:ft,opera12:pt,win:mt,ie3d:gt,webkit3d:vt,gecko3d:yt,any3d:bt,mobile:_t,mobileWebkit:wt,mobileWebkit3d:xt,msPointer:kt,pointer:St,touch:Tt,touchNative:Ct,mobileOpera:Ot,mobileGecko:Et,retina:At,passiveEvents:Lt,canvas:Mt,svg:Pt,vml:Dt,inlineSvg:Nt,mac:jt,linux:It},Bt=Ft.msPointer?"MSPointerDown":"pointerdown",zt=Ft.msPointer?"MSPointerMove":"pointermove",qt=Ft.msPointer?"MSPointerUp":"pointerup",Ht=Ft.msPointer?"MSPointerCancel":"pointercancel",Wt={touchstart:Bt,touchmove:zt,touchend:qt,touchcancel:Ht},Ut={touchstart:te,touchmove:Qt,touchend:Qt,touchcancel:Qt},Vt={},Zt=!1;function Yt(t,e,n){return"touchstart"===e&&Jt(),Ut[e]?(n=Ut[e].bind(this,n),t.addEventListener(Wt[e],n,!1),n):u}function $t(t,e,n){Wt[e]&&t.removeEventListener(Wt[e],n,!1)}function Gt(t){Vt[t.pointerId]=t}function Kt(t){Vt[t.pointerId]&&(Vt[t.pointerId]=t)}function Xt(t){delete Vt[t.pointerId]}function Jt(){Zt||(document.addEventListener(Bt,Gt,!0),document.addEventListener(zt,Kt,!0),document.addEventListener(qt,Xt,!0),document.addEventListener(Ht,Xt,!0),Zt=!0)}function Qt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],Vt)e.touches.push(Vt[n]);e.changedTouches=[e],t(e)}}function te(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Ge(e),Qt(t,e)}function ee(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return t=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}var ne=200;function ie(t,e){t.addEventListener("dblclick",e);var n,i=0;function r(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var r=Xe(t);if(!r.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||r.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var o=Date.now();o-i<=ne?2==++n&&e(ee(t)):n=1,i=o}}}else n=t.detail}return t.addEventListener("click",r),{dblclick:e,simDblclick:r}}function re(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var oe,ae,se,le,ue,ce=Oe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),he=Oe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===he||"OTransition"===he?he+"End":"transitionend";function fe(t){return"string"==typeof t?document.getElementById(t):t}function pe(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function me(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function ge(t){var e=t.parentNode;e&&e.removeChild(t)}function ve(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ye(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function be(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function _e(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=Se(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function we(t,e){if(void 0!==t.classList)for(var n=d(e),i=0,r=n.length;i0?2*window.devicePixelRatio:1;function tn(t){return Ft.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Qe:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function en(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var nn={__proto__:null,on:Be,off:qe,stopPropagation:Ze,disableScrollPropagation:Ye,disableClickPropagation:$e,preventDefault:Ge,stop:Ke,getPropagationPath:Xe,getMousePosition:Je,getWheelDelta:tn,isExternalTarget:en,addListener:Be,removeListener:qe},rn=P.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=Le(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=C(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;ethis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,B(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=j((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=j(e.paddingBottomRight||e.padding||[0,0]),r=this.project(this.getCenter()),o=this.project(t),a=this.getPixelBounds(),s=R([a.min.add(n),a.max.subtract(i)]),l=s.getSize();if(!s.contains(o)){this._enforcingBounds=!0;var u=o.subtract(s.getCenter()),c=s.extend(o).getSize().subtract(l);r.x+=u.x<0?-c.x:c.x,r.y+=u.y<0?-c.y:c.y,this.panTo(this.unproject(r),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),o=e.divideBy(2).round(),a=i.divideBy(2).round(),s=o.subtract(a);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=r(this._handleGeolocationResponse,this),i=r(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new z(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var r=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(r,i.maxZoom):r)}var o={latlng:e,bounds:n,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(o[a]=t.coords[a]);this.fire("locationfound",o)}},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ge(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(T(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ge(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=me("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new F(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=B(t),n=j(n||[0,0]);var i=this.getZoom()||0,r=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),l=this.getSize().subtract(n),u=R(this.project(s,i),this.project(a,i)).getSize(),c=Ft.any3d?this.options.zoomSnap:1,h=l.x/u.x,d=l.y/u.y,f=e?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(f,i),c&&(i=Math.round(i/(c/100))*(c/100),i=e?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(r,Math.min(o,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new N(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new I(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(q(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(j(t),e)},layerPointToLatLng:function(t){var e=j(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(q(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(q(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(B(t))},distance:function(t,e){return this.options.crs.distance(q(t),q(e))},containerPointToLayerPoint:function(t){return j(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return j(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(j(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(q(t)))},mouseEventToContainerPoint:function(t){return Je(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=fe(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Be(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ft.any3d,we(t,"leaflet-container"+(Ft.touch?" leaflet-touch":"")+(Ft.retina?" leaflet-retina":"")+(Ft.ielt9?" leaflet-oldie":"")+(Ft.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=pe(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Ae(this._mapPane,new N(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(we(t.markerPane,"leaflet-zoom-hide"),we(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,n){Ae(this._mapPane,new N(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var r=this._zoom!==e;this._moveStart(r,n)._move(t,e)._moveEnd(r),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n,i){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return T(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Ae(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[a(this._container)]=this;var e=t?qe:Be;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Ft.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){T(this._resizeRequest),this._resizeRequest=C((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],r="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,s=!1;o;){if((n=this._targets[a(o)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(r&&!en(o,t))break;if(i.push(n),r)break}if(o===this._container)break;o=o.parentNode}return i.length||s||r||!this.listens(e,!0)||(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var n=t.type;"mousedown"===n&&De(e),this._fireDOMEvent(t,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var r=n({},t);r.type="preclick",this._fireDOMEvent(r,r.type,i)}var o=this._findEventTargets(t,e);if(i){for(var a=[],s=0;s0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=Ft.any3d?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){xe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=me("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=ce,n=this._proxy.style[e];Ee(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ge(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Ee(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),r=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(r)||(C((function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,we(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&xe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function an(t,e){return new on(t,e)}var sn=E.extend({options:{position:"topright"},initialize:function(t){f(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return we(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ge(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),ln=function(t){return new sn(t)};on.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=me("div",e+"control-container",this._container);function i(i,r){var o=e+i+" "+e+r;t[i+r]=me("div",o,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ge(this._controlCorners[t]);ge(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var un=sn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(a(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+a(this),i),this._layerControlInputs.push(e),e.layerId=a(t.layer),Be(e,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+t.name;var o=document.createElement("span");return n.appendChild(o),o.appendChild(e),o.appendChild(r),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t,e,n=this._layerControlInputs,i=[],r=[];this._handlingClick=!0;for(var o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||r.push(e);for(o=0;o=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&ie.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,Be(t,"click",Ge),this.expand();var e=this;setTimeout((function(){qe(t,"click",Ge),e._preventClick=!1}))}}),cn=function(t,e,n){return new un(t,e,n)},hn=sn.extend({options:{position:"topleft",zoomInText:'+',zoomInTitle:"Zoom in",zoomOutText:'−',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=me("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,r){var o=me("a",n,i);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),$e(o),Be(o,"click",Ke),Be(o,"click",r,this),Be(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";xe(this._zoomInButton,e),xe(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(we(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(we(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});on.mergeOptions({zoomControl:!0}),on.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new hn,this.addControl(this.zoomControl))}));var dn=function(t){return new hn(t)},fn=sn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=me("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=me("div",e,n)),t.imperial&&(this._iScale=me("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,r=3.2808399*t;r>5280?(e=r/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(r),this._updateScale(this._iScale,i+" ft",i/r))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),pn=function(t){return new fn(t)},mn='',gn=sn.extend({options:{position:"bottomright",prefix:''+(Ft.inlineSvg?mn+" ":"")+"Leaflet"},initialize:function(t){f(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=me("div","leaflet-control-attribution"),$e(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' | ')}}});on.mergeOptions({attributionControl:!0}),on.addInitHook((function(){this.options.attributionControl&&(new gn).addTo(this)}));var vn=function(t){return new gn(t)};sn.Layers=un,sn.Zoom=hn,sn.Scale=fn,sn.Attribution=gn,ln.layers=cn,ln.zoom=dn,ln.scale=pn,ln.attribution=vn;var yn=E.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});yn.addTo=function(t,e){return t.addHandler(e,this),this};var bn={Events:M},_n=Ft.touch?"touchstart mousedown":"mousedown",wn=P.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){f(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Be(this._dragStartTarget,_n,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(wn._dragging===this&&this.finishDrag(!0),qe(this._dragStartTarget,_n,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!_e(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)wn._dragging===this&&this.finishDrag();else if(!(wn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(wn._dragging=this,this._preventOutline&&De(this._element),Pe(),oe(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Ie(this._element);this._startPoint=new N(e.clientX,e.clientY),this._startPos=Le(this._element),this._parentScale=Re(n);var i="mousedown"===t.type;Be(document,i?"mousemove":"touchmove",this._onMove,this),Be(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new N(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)l&&(o=a,l=s);l>n&&(e[o]=1,Mn(t,e,n,i,o),Mn(t,e,n,o,r))}function Pn(t,e){for(var n=[t[0]],i=1,r=0,o=t.length;ie&&(n.push(t[i]),r=i);return re.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function In(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function Rn(t,e,n,i){var r,o=e.x,a=e.y,s=n.x-o,l=n.y-a,u=s*s+l*l;return u>0&&((r=((t.x-o)*s+(t.y-a)*l)/u)>1?(o=n.x,a=n.y):r>0&&(o+=s*r,a+=l*r)),s=t.x-o,l=t.y-a,i?s*s+l*l:new N(o,a)}function Fn(t){return!v(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Bn(t){return Fn(t)}function zn(t,e){var n,i,r,o,a,s,l,u;if(!t||0===t.length)throw new Error("latlngs not passed");Fn(t)||(t=t[0]);var c=q([0,0]),h=B(t);h.getNorthWest().distanceTo(h.getSouthWest())*h.getNorthEast().distanceTo(h.getNorthWest())<1700&&(c=Sn(t));var d=t.length,f=[];for(n=0;ni){l=(o-i)/r,u=[s.x-l*(s.x-a.x),s.y-l*(s.y-a.y)];break}var m=e.unproject(j(u));return q([m.lat+c.lat,m.lng+c.lng])}var qn={__proto__:null,simplify:On,pointToSegmentDistance:En,closestPointOnSegment:An,clipSegment:Nn,_getEdgeIntersection:Dn,_getBitCode:jn,_sqClosestPointOnSegment:Rn,isFlat:Fn,_flat:Bn,polylineCenter:zn},Hn={project:function(t){return new N(t.lng,t.lat)},unproject:function(t){return new z(t.y,t.x)},bounds:new I([-180,-90],[180,90])},Wn={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,r=this.R_MINOR/n,o=Math.sqrt(1-r*r),a=o*Math.sin(i),s=Math.tan(Math.PI/4-i/2)/Math.pow((1-a)/(1+a),o/2);return i=-n*Math.log(Math.max(s,1e-10)),new N(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,r=this.R_MINOR/i,o=Math.sqrt(1-r*r),a=Math.exp(-t.y/i),s=Math.PI/2-2*Math.atan(a),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)e=o*Math.sin(s),e=Math.pow((1-e)/(1+e),o/2),s+=u=Math.PI/2-2*Math.atan(a*e)-s;return new z(s*n,t.x*n/i)}},Un={__proto__:null,LonLat:Hn,Mercator:Wn,SphericalMercator:Z},Vn=n({},U,{code:"EPSG:3395",projection:Wn,transformation:function(){var t=.5/(Math.PI*Wn.R);return $(t,.5,-t,.5)}()}),Zn=n({},U,{code:"EPSG:4326",projection:Hn,transformation:$(1/180,1,-1/180,.5)}),Yn=n({},W,{projection:Hn,transformation:$(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});W.Earth=U,W.EPSG3395=Vn,W.EPSG3857=G,W.EPSG900913=K,W.EPSG4326=Zn,W.Simple=Yn;var $n=P.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[a(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[a(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});on.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=a(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return a(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?v(t)?t:[t]:[]).length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()=2&&e[0]instanceof z&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){ci.prototype._setLatLngs.call(this,t),Fn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Fn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new N(e,e);if(t=new I(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,r=0,o=this._rings.length;rt.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||ci.prototype._containsPoint.call(this,t,!0)}});function fi(t,e){return new di(t,e)}var pi=Xn.extend({initialize:function(t,e){f(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,r=v(t)?t:t.features;if(r){for(e=0,n=r.length;e0&&r.push(r[0].slice()),r}function wi(t,e){return t.feature?n({},t.feature,{geometry:e}):xi(e)}function xi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var ki={toGeoJSON:function(t){return wi(this,{type:"Point",coordinates:bi(this.getLatLng(),t)})}};function Si(t,e){return new pi(t,e)}ii.include(ki),li.include(ki),ai.include(ki),ci.include({toGeoJSON:function(t){var e=!Fn(this._latlngs);return wi(this,{type:(e?"Multi":"")+"LineString",coordinates:_i(this._latlngs,e?1:0,!1,t)})}}),di.include({toGeoJSON:function(t){var e=!Fn(this._latlngs),n=e&&!Fn(this._latlngs[0]),i=_i(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),wi(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Gn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),wi(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var r=e.toGeoJSON(t);if(n)i.push(r.geometry);else{var o=xi(r);"FeatureCollection"===o.type?i.push.apply(i,o.features):i.push(o)}}})),n?wi(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var Ci=Si,Ti=$n.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=B(e),f(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(we(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ge(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ye(this._image),this},bringToBack:function(){return this._map&&be(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=B(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:me("img");we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onload=r(this.fire,this,"load"),e.onerror=r(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Ee(this._image,n,e)},_reset:function(){var t=this._image,e=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();Ae(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){Ce(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Oi=function(t,e,n){return new Ti(t,e,n)},Ei=Ti.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:me("video");if(we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onloadeddata=r(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],o=0;o0?i:[e.src]}else{v(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var a=0;a×',Be(i,"click",(function(t){Ge(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,r=this.options.maxHeight,o="leaflet-popup-scrolled";r&&i>r?(e.height=r+"px",we(t,o)):xe(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Ae(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(pe(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,r=new N(this._containerLeft,-n-this._containerBottom);r._add(Le(this._container));var o=t.layerPointToContainerPoint(r),a=j(this.options.autoPanPadding),s=j(this.options.autoPanPaddingTopLeft||a),l=j(this.options.autoPanPaddingBottomRight||a),u=t.getSize(),c=0,h=0;o.x+i+l.x>u.x&&(c=o.x+i-u.x+l.x),o.x-c-s.x<0&&(c=o.x-s.x),o.y+n+l.y>u.y&&(h=o.y+n-u.y+l.y),o.y-h-s.y<0&&(h=o.y-s.y),(c||h)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,h]))}},_getAnchor:function(){return j(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Di=function(t,e){return new Ni(t,e)};on.mergeOptions({closePopupOnClick:!0}),on.include({openPopup:function(t,e,n){return this._initOverlay(Ni,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),$n.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Ni,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Xn||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Ke(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof oi?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var ji=Pi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Pi.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Pi.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Pi.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=me("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+a(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,r=this._container,o=i.latLngToContainerPoint(i.getCenter()),a=i.layerPointToContainerPoint(t),s=this.options.direction,l=r.offsetWidth,u=r.offsetHeight,c=j(this.options.offset),h=this._getAnchor();"top"===s?(e=l/2,n=u):"bottom"===s?(e=l/2,n=0):"center"===s?(e=l/2,n=u/2):"right"===s?(e=0,n=u/2):"left"===s?(e=l,n=u/2):a.xthis.options.maxZoom||ni&&this._retainParent(r,o,a,i))},_retainChildren:function(t,e,n,i){for(var r=2*t;r<2*t+2;r++)for(var o=2*e;o<2*e+2;o++){var a=new N(r,o);a.z=n+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1this.options.maxZoom||void 0!==this.options.minZoom&&r1)this._setView(t,n);else{for(var h=r.min.y;h<=r.max.y;h++)for(var d=r.min.x;d<=r.max.x;d++){var f=new N(d,h);if(f.z=this._tileZoom,this._isValidTile(f)){var p=this._tiles[this._tileCoordsToKey(f)];p?p.current=!0:a.push(f)}}if(a.sort((function(t,e){return t.distanceTo(o)-e.distanceTo(o)})),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;dn.max.x)||!e.wrapLat&&(t.yn.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return B(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),r=i.add(n);return[e.unproject(i,t.z),e.unproject(r,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new F(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new N(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ge(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){we(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,Ft.ielt9&&this.options.opacity<1&&Ce(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),r(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&C(r(this._tileReady,this,t,null,o)),Ae(o,n),this._tiles[i]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(Ce(n.el,0),T(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(we(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ft.ielt9||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new N(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new I(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function zi(t){return new Bi(t)}var qi=Bi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=f(this,e)).detectRetina&&Ft.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Be(n,"load",r(this._tileOnLoad,this,e,n)),Be(n,"error",r(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Ft.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return g(this._url,n(e,this.options))},_tileOnLoad:function(t,e){Ft.ielt9?setTimeout(r(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=u,e.onerror=u,!e.complete)){e.src=b;var n=this._tiles[t].coords;ge(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",b),Bi.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==b))return Bi.prototype._tileReady.call(this,t,e,n)}});function Hi(t,e){return new qi(t,e)}var Wi=qi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var r in e)r in this.options||(i[r]=e[r]);var o=(e=f(this,e)).detectRetina&&Ft.retina?2:1,a=this.getTileSize();i.width=a.x*o,i.height=a.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,qi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=R(n.project(e[0]),n.project(e[1])),r=i.min,o=i.max,a=(this._wmsVersion>=1.3&&this._crs===Zn?[r.y,r.x,o.y,o.x]:[r.x,r.y,o.x,o.y]).join(","),s=qi.prototype.getTileUrl.call(this,t);return s+p(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function Ui(t,e){return new Wi(t,e)}qi.WMS=Wi,Hi.wms=Ui;var Vi=$n.extend({options:{padding:.1},initialize:function(t){f(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),we(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),o=i.multiplyBy(-n).add(r).subtract(this._map._getNewPixelOrigin(t,e));Ft.any3d?Ee(this._container,o,n):Ae(this._container,o)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new I(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Zi=Vi.extend({options:{tolerance:0},getEvents:function(){var t=Vi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Vi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Be(t,"mousemove",this._onMouseMove,this),Be(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Be(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){T(this._redrawRequest),delete this._ctx,ge(this._container),qe(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Vi.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Ft.retina?2:1;Ae(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Ft.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Vi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[a(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[a(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),r=[];for(n=0;n')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Gi={_initContainer:function(){this._container=me("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Vi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=$i("shape");we(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=$i("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ge(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,r=t._container;r.stroked=!!i.stroke,r.filled=!!i.fill,i.stroke?(e||(e=t._stroke=$i("stroke")),r.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=v(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(r.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=$i("fill")),r.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(r.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ye(t._container)},_bringToBack:function(t){be(t._container)}},Ki=Ft.vml?$i:X,Xi=Vi.extend({_initContainer:function(){this._container=Ki("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ki("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ge(this._container),qe(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Vi.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),Ae(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Ki("path");t.options.className&&we(e,t.options.className),t.options.interactive&&we(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ge(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,J(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",r=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,r)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ye(t._path)},_bringToBack:function(t){be(t._path)}});function Ji(t){return Ft.svg||Ft.vml?new Xi(t):null}Ft.vml&&Xi.include(Gi),on.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Yi(t)||Ji(t)}});var Qi=di.extend({initialize:function(t,e){di.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=B(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function tr(t,e){return new Qi(t,e)}Xi.create=Ki,Xi.pointsToPath=J,pi.geometryToLayer=mi,pi.coordsToLatLng=vi,pi.coordsToLatLngs=yi,pi.latLngToCoords=bi,pi.latLngsToCoords=_i,pi.getFeature=wi,pi.asFeature=xi,on.mergeOptions({boxZoom:!0});var er=yn.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Be(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){qe(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ge(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),oe(),Pe(),this._startPoint=this._map.mouseEventToContainerPoint(t),Be(document,{contextmenu:Ke,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=me("div","leaflet-zoom-box",this._container),we(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new I(this._point,this._startPoint),n=e.getSize();Ae(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ge(this._box),xe(this._container,"leaflet-crosshair")),ae(),Ne(),qe(document,{contextmenu:Ke,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0);var e=new F(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});on.addInitHook("addHandler","boxZoom",er),on.mergeOptions({doubleClickZoom:!0});var nr=yn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,r=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(r):e.setZoomAround(t.containerPoint,r)}});on.addInitHook("addHandler","doubleClickZoom",nr),on.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ir=yn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new wn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}we(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){xe(this._map._container,"leaflet-grab"),xe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=B(this._map.options.maxBounds);this._offsetLimit=R(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,r=(i-e+n)%t+e-n,o=(i+e+n)%t-e-n,a=Math.abs(r+n)0?o:-o))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});on.addInitHook("addHandler","scrollWheelZoom",or);var ar=600;on.mergeOptions({tapHold:Ft.touchNative&&Ft.safari&&Ft.mobile,tapTolerance:15});var sr=yn.extend({addHooks:function(){Be(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){qe(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new N(e.clientX,e.clientY),this._holdTimeout=setTimeout(r((function(){this._cancel(),this._isTapValid()&&(Be(document,"touchend",Ge),Be(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),ar),Be(document,"touchend touchcancel contextmenu",this._cancel,this),Be(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){qe(document,"touchend",Ge),qe(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),qe(document,"touchend touchcancel contextmenu",this._cancel,this),qe(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new N(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}});on.addInitHook("addHandler","tapHold",sr),on.mergeOptions({touchZoom:Ft.touch,bounceAtZoomLimits:!0});var lr=yn.extend({addHooks:function(){we(this._map._container,"leaflet-touch-zoom"),Be(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){xe(this._map._container,"leaflet-touch-zoom"),qe(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Be(document,"touchmove",this._onTouchMove,this),Be(document,"touchend touchcancel",this._onTouchEnd,this),Ge(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var a=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),T(this._animRequest);var s=r(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=C(s,this,!0),Ge(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,T(this._animRequest),qe(document,"touchmove",this._onTouchMove,this),qe(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});on.addInitHook("addHandler","touchZoom",lr),on.BoxZoom=er,on.DoubleClickZoom=nr,on.Drag=ir,on.Keyboard=rr,on.ScrollWheelZoom=or,on.TapHold=sr,on.TouchZoom=lr,t.Bounds=I,t.Browser=Ft,t.CRS=W,t.Canvas=Zi,t.Circle=li,t.CircleMarker=ai,t.Class=E,t.Control=sn,t.DivIcon=Ri,t.DivOverlay=Pi,t.DomEvent=nn,t.DomUtil=Fe,t.Draggable=wn,t.Evented=P,t.FeatureGroup=Xn,t.GeoJSON=pi,t.GridLayer=Bi,t.Handler=yn,t.Icon=Qn,t.ImageOverlay=Ti,t.LatLng=z,t.LatLngBounds=F,t.Layer=$n,t.LayerGroup=Gn,t.LineUtil=qn,t.Map=on,t.Marker=ii,t.Mixin=bn,t.Path=oi,t.Point=N,t.PolyUtil=Tn,t.Polygon=di,t.Polyline=ci,t.Popup=Ni,t.PosAnimation=rn,t.Projection=Un,t.Rectangle=Qi,t.Renderer=Vi,t.SVG=Xi,t.SVGOverlay=Li,t.TileLayer=qi,t.Tooltip=ji,t.Transformation=Y,t.Util=O,t.VideoOverlay=Ei,t.bind=r,t.bounds=R,t.canvas=Yi,t.circle=ui,t.circleMarker=si,t.control=ln,t.divIcon=Fi,t.extend=n,t.featureGroup=Jn,t.geoJSON=Si,t.geoJson=Ci,t.gridLayer=zi,t.icon=ti,t.imageOverlay=Oi,t.latLng=q,t.latLngBounds=B,t.layerGroup=Kn,t.map=an,t.marker=ri,t.point=j,t.polygon=fi,t.polyline=hi,t.popup=Di,t.rectangle=tr,t.setOptions=f,t.stamp=a,t.svg=Ji,t.svgOverlay=Mi,t.tileLayer=Hi,t.tooltip=Ii,t.transformation=$,t.version=e,t.videoOverlay=Ai;var ur=window.L;t.noConflict=function(){return window.L=ur,this},window.L=t}(e)},1574:function(t,e,n){var i,r=n(8287).hp;"undefined"!=typeof self&&self,i=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),r=n(18),o=n(19),a=n(45),s=n(46),l=n(47),u=n(48),c=n(49),h=n(12),d=n(32),f=n(33),p=n(31),m=n(1),g={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:i.default,Format:r.default,Leaf:o.default,Embed:u.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:c.default,Attributor:{Attribute:h.default,Class:d.default,Style:f.default,Store:p.default}};e.default=g},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return r(e,t),e}(Error);e.ParchmentError=o;var a,s={},l={},u={},c={};function h(t,e){var n;if(void 0===e&&(e=a.ANY),"string"==typeof t)n=c[t]||s[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof t)t&a.LEVEL&a.BLOCK?n=c.block:t&a.LEVEL&a.INLINE&&(n=c.inline);else if(t instanceof HTMLElement){var i=(t.getAttribute("class")||"").split(/\s+/);for(var r in i)if(n=l[i[r]])break;n=n||u[t.tagName]}return null==n?null:e&a.LEVEL&n.scope&&e&a.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(a=e.Scope||(e.Scope={})),e.create=function(t,e){var n=h(t);if(null==n)throw new o("Unable to create "+t+" blot");var i=n,r=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(e);return new i(r,e)},e.find=function t(n,i){return void 0===i&&(i=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:i?t(n.parentNode,i):null},e.query=h,e.register=function t(){for(var e=[],n=0;n1)return e.map((function(e){return t(e)}));var i=e[0];if("string"!=typeof i.blotName&&"string"!=typeof i.attrName)throw new o("Invalid definition");if("abstract"===i.blotName)throw new o("Cannot register abstract class");return c[i.blotName||i.attrName]=i,"string"==typeof i.keyName?s[i.keyName]=i:(null!=i.className&&(l[i.className]=i),null!=i.tagName&&(Array.isArray(i.tagName)?i.tagName=i.tagName.map((function(t){return t.toUpperCase()})):i.tagName=i.tagName.toUpperCase(),(Array.isArray(i.tagName)?i.tagName:[i.tagName]).forEach((function(t){null!=u[t]&&null!=i.className||(u[t]=i)})))),i}},function(t,e,n){var i=n(51),r=n(11),o=n(3),a=n(20),s=String.fromCharCode(0),l=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};l.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},l.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},l.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},l.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=o(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(r(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},l.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},l.prototype.filter=function(t){return this.ops.filter(t)},l.prototype.forEach=function(t){this.ops.forEach(t)},l.prototype.map=function(t){return this.ops.map(t)},l.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(i){(t(i)?e:n).push(i)})),[e,n]},l.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},l.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+a.length(e):e.delete?t-e.delete:t}),0)},l.prototype.length=function(){return this.reduce((function(t,e){return t+a.length(e)}),0)},l.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],i=a.iterator(this.ops),r=0;r0&&n.next(o.retain-s)}for(var u=new l(i);e.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===e.peekType())u.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),h=e.next(c),d=n.next(c);if("number"==typeof d.retain){var f={};"number"==typeof h.retain?f.retain=c:f.insert=h.insert;var p=a.attributes.compose(h.attributes,d.attributes,"number"==typeof h.retain);if(p&&(f.attributes=p),u.push(f),!n.hasNext()&&r(u.ops[u.ops.length-1],f)){var m=new l(e.rest());return u.concat(m).chop()}}else"number"==typeof d.delete&&"number"==typeof h.retain&&u.push(d)}return u.chop()},l.prototype.concat=function(t){var e=new l(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},l.prototype.diff=function(t,e){if(this.ops===t.ops)return new l;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),o=new l,u=i(n[0],n[1],e),c=a.iterator(this.ops),h=a.iterator(t.ops);return u.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case i.INSERT:n=Math.min(h.peekLength(),e),o.push(h.next(n));break;case i.DELETE:n=Math.min(e,c.peekLength()),c.next(n),o.delete(n);break;case i.EQUAL:n=Math.min(c.peekLength(),h.peekLength(),e);var s=c.next(n),l=h.next(n);r(s.insert,l.insert)?o.retain(n,a.attributes.diff(s.attributes,l.attributes)):o.push(l).delete(n)}e-=n}})),o.chop()},l.prototype.eachLine=function(t,e){e=e||"\n";for(var n=a.iterator(this.ops),i=new l,r=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),u="string"==typeof o.insert?o.insert.indexOf(e,s)-s:-1;if(u<0)i.push(n.next());else if(u>0)i.push(n.next(u));else{if(!1===t(i,n.next(1).attributes||{},r))return;r+=1,i=new l}}i.length()>0&&t(i,{},r)},l.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=a.iterator(this.ops),i=a.iterator(t.ops),r=new l;n.hasNext()||i.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===i.peekType())if("insert"===i.peekType())r.push(i.next());else{var o=Math.min(n.peekLength(),i.peekLength()),s=n.next(o),u=i.next(o);if(s.delete)continue;u.delete?r.push(u):r.retain(o,a.attributes.transform(s.attributes,u.attributes,e))}else r.retain(a.length(n.next()));return r.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=a.iterator(this.ops),i=0;n.hasNext()&&i<=t;){var r=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(i0&&(t1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var i=this.clone();return 0===t?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}var o=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}(s.default.Block);function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,o.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:v(t.parent,e))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[u.default,s.default.Embed,c.default],e.bubbleFormats=v,e.BlockEmbed=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=_(e,i),this.container=this.options.container,null==this.container)return y.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new d.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t){t===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(l.default.events.SCROLL_UPDATE,(function(t,e){var i=n.selection.lastRange,r=i&&0===i.length?i.index:void 0;w.call(n,(function(){return n.editor.update(null,e,r)}),t)}));var o=this.clipboard.convert("");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),p.default.level(t)}},{key:"find",value:function(t){return t.__quill||c.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&y.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var r=t.attrName||t.blotName;"string"==typeof r?this.register("formats/"+r,t,e):Object.keys(t).forEach((function(i){n.register(i,t[i],e)}))}else null==this.imports[t]||i||y.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?c.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),o(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var i=this,o=x(t,e,n),a=r(o,4);return t=a[0],e=a[1],n=a[3],w.call(this,(function(){return i.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return w.call(this,(function(){var i=n.getSelection(!0),r=new a.default;if(null==i)return r;if(c.default.query(t,c.default.Scope.BLOCK))r=n.editor.formatLine(i.index,i.length,v({},t,e));else{if(0===i.length)return n.selection.format(t,e),r;r=n.editor.formatText(i.index,i.length,v({},t,e))}return n.setSelection(i,l.default.sources.SILENT),r}),i)}},{key:"formatLine",value:function(t,e,n,i,o){var a,s=this,l=x(t,e,n,i,o),u=r(l,4);return t=u[0],e=u[1],a=u[2],o=u[3],w.call(this,(function(){return s.editor.formatLine(t,e,a)}),o,t,0)}},{key:"formatText",value:function(t,e,n,i,o){var a,s=this,l=x(t,e,n,i,o),u=r(l,4);return t=u[0],e=u[1],a=u[2],o=u[3],w.call(this,(function(){return s.editor.formatText(t,e,a)}),o,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var i=this.container.getBoundingClientRect();return{bottom:n.bottom-i.top,height:n.height,left:n.left-i.left,right:n.right-i.left,top:n.top-i.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=x(t,e),i=r(n,2);return t=i[0],e=i[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=x(t,e),i=r(n,2);return t=i[0],e=i[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return w.call(this,(function(){return r.editor.insertEmbed(e,n,i)}),o,e)}},{key:"insertText",value:function(t,e,n,i,o){var a,s=this,l=x(t,0,n,i,o),u=r(l,4);return t=u[0],a=u[2],o=u[3],w.call(this,(function(){return s.editor.insertText(t,e,a)}),o,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var i=this,o=x(t,e,n),a=r(o,4);return t=a[0],e=a[1],n=a[3],w.call(this,(function(){return i.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return w.call(this,(function(){t=new a.default(t);var n=e.getLength(),i=e.editor.deleteText(0,n),r=e.editor.applyDelta(t),o=r.ops[r.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),r.delete(1)),i.compose(r)}),n)}},{key:"setSelection",value:function(e,n,i){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=x(e,n,i),a=r(o,4);e=a[0],n=a[1],i=a[3],this.selection.setRange(new h.Range(e,n),i),i!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new a.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return w.call(this,(function(){return t=new a.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();function _(t,e){if((e=(0,f.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==b.DEFAULTS.theme){if(e.theme=b.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=m.default;var n=(0,f.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var i=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=b.import("modules/"+e);return null==n?y.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,f.default)(!0,{},b.DEFAULTS,{modules:i},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function w(t,e,n,i){if(this.options.strict&&!this.isEnabled()&&e===l.default.sources.USER)return new a.default;var r=null==n?null:this.getSelection(),o=this.editor.delta,s=t();if(null!=r&&(!0===n&&(n=r.index),null==i?r=k(r,s,e):0!==i&&(r=k(r,n,i,e)),this.setSelection(r,l.default.sources.SILENT)),s.length()>0){var u,c,h=[l.default.events.TEXT_CHANGE,s,o,e];(u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(h)),e!==l.default.sources.SILENT&&(c=this.emitter).emit.apply(c,h)}return s}function x(t,e,n,r,o){var a={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=r,r=n,n=e,e=0),"object"===(void 0===n?"undefined":i(n))?(a=n,o=r):"string"==typeof n&&(null!=r?a[n]=r:o=n),[t,e,a,o=o||l.default.sources.API]}function k(t,e,n,i){if(null==t)return null;var o=void 0,s=void 0;if(e instanceof a.default){var u=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,i!==l.default.sources.USER)})),c=r(u,2);o=c[0],s=c[1]}else{var d=[t.index,t.index+t.length].map((function(t){return t=0?t+n:Math.max(e,t+n)})),f=r(d,2);o=f[0],s=f[1]}return new h.Range(o,s-o)}b.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},b.events=l.default.events,b.sources=l.default.sources,b.version="1.3.7",b.imports={delta:a.default,parchment:c.default,"core/module":u.default,"core/theme":m.default},e.expandConfig=_,e.overload=x,e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var i=e.order.indexOf(t),r=e.order.indexOf(n);return i>=0||r>=0?i-r:t===n?0:t1?e-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n};i.DEFAULTS={},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=["error","warn","log","info"],r="warn";function o(t){if(i.indexOf(t)<=i.indexOf(r)){for(var e,n=arguments.length,o=Array(n>1?n-1:0),a=1;a=0;u--)if(h[u]!=d[u])return!1;for(u=h.length-1;u>=0;u--)if(c=h[u],!a(t[c],e[c],n))return!1;return typeof t==typeof e}(t,e,n))};function s(t){return null==t}function l(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var r=i.Scope.TYPE&i.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&i.Scope.LEVEL|r:this.scope=i.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=i.query(t,i.Scope.BLOT&(this.scope|i.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n=t+n)){var a=this.newlineIndex(t,!0)+1,l=o-a+1,u=this.isolate(a,l),c=u.next;u.format(i,r),c instanceof e&&c.formatAt(0,t-a+n-l,i,r)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=this.descendant(c.default,t),o=i(r,2),a=o[0],s=o[1];a.insertAt(s,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=s.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof s.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(l.default);g.blotName="code-block",g.tagName="PRE",g.TAB=" ",e.Code=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n=o&&!f.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,f);var p=e.scroll.line(t),m=r(p,2),v=m[0],y=m[1],b=(0,g.default)({},(0,h.bubbleFormats)(v));if(v instanceof d.default){var _=v.descendant(l.default.Leaf,y),w=r(_,1)[0];b=(0,g.default)(b,(0,h.bubbleFormats)(w))}c=s.default.attributes.diff(b,c)||{}}else if("object"===i(a.insert)){var x=Object.keys(a.insert)[0];if(null==x)return t;e.scroll.insertAt(t,x,a.insert[x])}o+=u}return Object.keys(c).forEach((function(n){e.scroll.formatAt(t,u,n,c[n])})),t+u}),0),t.reduce((function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new a.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(i).forEach((function(r){if(null==n.scroll.whitelist||n.scroll.whitelist[r]){var o=n.scroll.lines(t,Math.max(e,1)),a=e;o.forEach((function(e){var o=e.length();if(e instanceof u.default){var s=t-e.offset(n.scroll),l=e.newlineIndex(s+a)-s+1;e.formatAt(s,l,r,i[r])}else e.format(r,i[r]);a-=o}))}})),this.scroll.optimize(),this.update((new a.default).retain(t).retain(e,(0,p.default)(i)))}},{key:"formatText",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(i).forEach((function(r){n.scroll.formatAt(t,e,r,i[r])})),this.update((new a.default).retain(t).retain(e,(0,p.default)(i)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new a.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],i=[];0===e?this.scroll.path(t).forEach((function(t){var e=r(t,1)[0];e instanceof d.default?n.push(e):e instanceof l.default.Leaf&&i.push(e)})):(n=this.scroll.lines(t,e),i=this.scroll.descendants(l.default.Leaf,t,e));var o=[n,i].map((function(t){if(0===t.length)return{};for(var e=(0,h.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=_((0,h.bubbleFormats)(n),e)}return e}));return g.default.apply(g.default,o)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new a.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(i).forEach((function(r){n.scroll.formatAt(t,e.length,r,i[r])})),this.update((new a.default).retain(t).insert(e,(0,p.default)(i)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===d.default.blotName&&!(t.children.length>1)&&t.children.head instanceof f.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),i=this.scroll.line(t+e),o=r(i,2),s=o[0],l=o[1],c=0,h=new a.default;null!=s&&(c=s instanceof u.default?s.newlineIndex(l)-l+1:s.length()-l,h=s.delta().slice(l,l+c-1).insert("\n"));var d=this.getContents(t,e+c).diff((new a.default).insert(n).concat(h)),f=(new a.default).retain(t).concat(d);return this.applyDelta(f)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(y)&&l.default.find(e[0].target)){var r=l.default.find(e[0].target),o=(0,h.bubbleFormats)(r),s=r.offset(this.scroll),u=e[0].oldValue.replace(c.default.CONTENTS,""),d=(new a.default).insert(u),f=(new a.default).insert(r.value());t=(new a.default).retain(s).concat(d.diff(f,n)).reduce((function(t,e){return e.insert?t.insert(e.insert,o):t.push(e)}),new a.default),this.delta=i.compose(t)}else this.delta=this.getDelta(),t&&(0,m.default)(i.compose(t),this.delta)||(t=i.diff(this.delta,n));return t}}]),t}();function _(t,e){return Object.keys(e).reduce((function(n,i){return null==t[i]||(e[i]===t[i]?n[i]=e[i]:Array.isArray(e[i])?e[i].indexOf(t[i])<0&&(n[i]=e[i].concat([t[i]])):n[i]=[e[i],t[i]]),n}),{})}e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;h(this,t),this.index=e,this.length=n},p=function(){function t(e,n){var i=this;h(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new f(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){i.mouseDown||setTimeout(i.update.bind(i,l.default.sources.USER),1)})),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t,e){t===l.default.events.TEXT_CHANGE&&e.length()>0&&i.update(l.default.sources.SILENT)})),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,(function(){if(i.hasFocus()){var t=i.getNativeRange();null!=t&&t.start.node!==i.cursor.textNode&&i.emitter.once(l.default.events.SCROLL_UPDATE,(function(){try{i.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}}))}})),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,r=n.startNode,o=n.startOffset,a=n.endNode,s=n.endOffset;i.setNativeRange(r,o,a,s)}})),this.update(l.default.sources.SILENT)}return r(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(l.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(t,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var i=o.default.find(n.start.node,!1);if(null==i)return;if(i instanceof o.default.Leaf){var r=i.split(n.start.offset);i.parent.insertBefore(this.cursor,r)}else i.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var r=void 0,o=this.scroll.leaf(t),a=i(o,2),s=a[0],l=a[1];if(null==s)return null;var u=s.position(l,!0),c=i(u,2);r=c[0],l=c[1];var h=document.createRange();if(e>0){h.setStart(r,l);var d=this.scroll.leaf(t+e),f=i(d,2);if(s=f[0],l=f[1],null==s)return null;var p=s.position(l,!0),m=i(p,2);return r=m[0],l=m[1],h.setEnd(r,l),h.getBoundingClientRect()}var g="left",v=void 0;return r instanceof Text?(l0&&(g="right")),{bottom:v.top+v.height,height:v.height,left:v[g],right:v[g],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return d.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var r=n.map((function(t){var n=i(t,2),r=n[0],a=n[1],s=o.default.find(r,!0),l=s.offset(e.scroll);return 0===a?l:s instanceof o.default.Container?l+s.length():l+s.index(r,a)})),a=Math.min(Math.max.apply(Math,c(r)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(c(r)));return new f(s,a-s)}},{key:"normalizeNative",value:function(t){if(!m(this.root,t.startContainer)||!t.collapsed&&!m(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],r=[],o=this.scroll.length();return n.forEach((function(t,n){t=Math.min(o-1,t);var a,s=e.scroll.leaf(t),l=i(s,2),u=l[0],c=l[1],h=u.position(c,0!==n),d=i(h,2);a=d[0],c=d[1],r.push(a,c)})),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var r=this.scroll.length()-1,o=this.scroll.line(Math.min(e.index,r)),a=i(o,1)[0],s=a;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,r));s=i(l,1)[0]}if(null!=a&&null!=s){var u=t.getBoundingClientRect();n.topu.bottom&&(t.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(d.info("setNativeRange",t,e,n,i),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||r||t!==a.startContainer||e!==a.startOffset||n!==a.endContainer||i!==a.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(i=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(t,e),s.setEnd(n,i),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof e&&(n=e,e=!1),d.info("setRange",t),null!=t){var i=this.rangeToNative(t);this.setNativeRange.apply(this,c(i).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.lastRange,n=this.getRange(),r=i(n,2),o=r[0],u=r[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(e,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var h,d=[l.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(e),t];(c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(d)),t!==l.default.sources.SILENT&&(h=this.emitter).emit.apply(h,d)}}}]),t}();function m(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=f,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){var i=n(11),r=n(3),o={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var i=r(!0,{},e);for(var o in n||(i=Object.keys(i).reduce((function(t,e){return null!=i[e]&&(t[e]=i[e]),t}),{})),t)void 0!==t[o]&&void 0===e[o]&&(i[o]=t[o]);return Object.keys(i).length>0?i:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,r){return i(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var i=Object.keys(e).reduce((function(n,i){return void 0===t[i]&&(n[i]=e[i]),n}),{});return Object.keys(i).length>0?i:void 0}}},iterator:function(t){return new a(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function a(t){this.ops=t,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,i=o.length(e);if(t>=i-n?(t=i-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var r={};return e.attributes&&(r.attributes=e.attributes),"number"==typeof e.retain?r.retain=t:"string"==typeof e.insert?r.insert=e.insert.substr(n,t):r.insert=e.insert,r}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),i=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(i)}return[]},t.exports=o},function(t,e){var n=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,i;try{e=Map}catch(t){e=function(){}}try{n=Set}catch(t){n=function(){}}try{i=Promise}catch(t){i=function(){}}function o(a,l,u,c,h){"object"==typeof l&&(u=l.depth,c=l.prototype,h=l.includeNonEnumerable,l=l.circular);var d=[],f=[],p=void 0!==r;return void 0===l&&(l=!0),void 0===u&&(u=1/0),function a(u,m){if(null===u)return null;if(0===m)return u;var g,v;if("object"!=typeof u)return u;if(t(u,e))g=new e;else if(t(u,n))g=new n;else if(t(u,i))g=new i((function(t,e){u.then((function(e){t(a(e,m-1))}),(function(t){e(a(t,m-1))}))}));else if(o.__isArray(u))g=[];else if(o.__isRegExp(u))g=new RegExp(u.source,s(u)),u.lastIndex&&(g.lastIndex=u.lastIndex);else if(o.__isDate(u))g=new Date(u.getTime());else{if(p&&r.isBuffer(u))return g=r.allocUnsafe?r.allocUnsafe(u.length):new r(u.length),u.copy(g),g;t(u,Error)?g=Object.create(u):void 0===c?(v=Object.getPrototypeOf(u),g=Object.create(v)):(g=Object.create(c),v=c)}if(l){var y=d.indexOf(u);if(-1!=y)return f[y];d.push(u),f.push(g)}for(var b in t(u,e)&&u.forEach((function(t,e){var n=a(e,m-1),i=a(t,m-1);g.set(n,i)})),t(u,n)&&u.forEach((function(t){var e=a(t,m-1);g.add(e)})),u){var _;v&&(_=Object.getOwnPropertyDescriptor(v,b)),_&&null==_.set||(g[b]=a(u[b],m-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(u);for(b=0;b0){if(s instanceof l.BlockEmbed||f instanceof l.BlockEmbed)return void this.optimize();if(s instanceof h.default){var p=s.newlineIndex(s.length(),!0);if(p>-1&&(s=s.split(p+1))===f)return void this.optimize()}else if(f instanceof h.default){var m=f.newlineIndex(0);m>-1&&f.split(m+1)}var g=f.children.head instanceof c.default?null:f.children.head;s.moveChildren(f,g),s.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,i,r){(null==this.whitelist||this.whitelist[i])&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,i,r),this.optimize())}},{key:"insertAt",value:function(t,n,i){if(null==i||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==i||null==a.default.query(n,a.default.Scope.BLOCK)){var r=a.default.create(this.statics.defaultChild);this.appendChild(r),null==i&&n.endsWith("\n")&&(n=n.slice(0,-1)),r.insertAt(0,n,i)}else{var s=a.default.create(n,i);this.appendChild(s)}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===a.default.Scope.INLINE_BLOT){var i=a.default.create(this.statics.defaultChild);i.appendChild(t),t=i}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(p,t)}},{key:"lines",value:function(){return function t(e,n,i){var r=[],o=i;return e.children.forEachAt(n,i,(function(e,n,i){p(e)?r.push(e):e instanceof a.default.Container&&(r=r.concat(t(e,n,o))),o-=i})),r}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=s.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,t),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,t)}}}]),e}(a.default.Scroll);m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[u.default,l.BlockEmbed,d.default],e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=O(t);if(null==i||null==i.key)return v.warn("Attempted to add invalid keyboard binding",i);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),i=(0,l.default)(i,e,n),this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(t.bindings[o]||[]).filter((function(t){return e.match(n,t)}));if(0!==a.length){var l=t.quill.getSelection();if(null!=l&&t.quill.hasFocus()){var u=t.quill.getLine(l.index),c=r(u,2),d=c[0],f=c[1],p=t.quill.getLeaf(l.index),m=r(p,2),g=m[0],v=m[1],y=0===l.length?[g,v]:t.quill.getLeaf(l.index+l.length),b=r(y,2),_=b[0],w=b[1],x=g instanceof h.default.Text?g.value().slice(0,v):"",k=_ instanceof h.default.Text?_.value().slice(w):"",S={collapsed:0===l.length,empty:0===l.length&&d.length()<=1,format:t.quill.getFormat(l),offset:f,prefix:x,suffix:k};a.some((function(e){if(null!=e.collapsed&&e.collapsed!==S.collapsed)return!1;if(null!=e.empty&&e.empty!==S.empty)return!1;if(null!=e.offset&&e.offset!==S.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==S.format[t]})))return!1}else if("object"===i(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=S.format[t]:!1===e.format[t]?null==S.format[t]:(0,s.default)(e.format[t],S.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(S.prefix)||null!=e.suffix&&!e.suffix.test(S.suffix)||!0===e.handler.call(t,l,S))}))&&n.preventDefault()}}}}))}}]),e}(p.default);function _(t,e){var n,i=t===b.keys.LEFT?"prefix":"suffix";return g(n={key:t,shiftKey:e,altKey:null},i,/^$/),g(n,"handler",(function(n){var i=n.index;t===b.keys.RIGHT&&(i+=n.length+1);var o=this.quill.getLeaf(i);return!(r(o,1)[0]instanceof h.default.Embed&&(t===b.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index-1,d.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index+n.length+1,d.default.sources.USER),1))})),n}function w(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),i=r(n,1)[0],o={};if(0===e.offset){var a=this.quill.getLine(t.index-1),s=r(a,1)[0];if(null!=s&&s.length()>1){var l=i.formats(),u=this.quill.getFormat(t.index-1,1);o=c.default.attributes.diff(l,u)||{}}}var h=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-h,h,d.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index-h,h,o,d.default.sources.USER),this.quill.focus()}}function x(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var i={},o=0,a=this.quill.getLine(t.index),s=r(a,1)[0];if(e.offset>=s.length()-1){var l=this.quill.getLine(t.index+1),u=r(l,1)[0];if(u){var h=s.formats(),f=this.quill.getFormat(t.index,1);i=c.default.attributes.diff(h,f)||{},o=u.length()}}this.quill.deleteText(t.index,n,d.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index+o-1,n,i,d.default.sources.USER)}}function k(t){var e=this.quill.getLines(t),n={};if(e.length>1){var i=e[0].formats(),r=e[e.length-1].formats();n=c.default.attributes.diff(r,i)||{}}this.quill.deleteText(t,d.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,d.default.sources.USER),this.quill.setSelection(t.index,d.default.sources.SILENT),this.quill.focus()}function S(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var i=Object.keys(e.format).reduce((function(t,n){return h.default.query(n,h.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",i,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==i[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],d.default.sources.USER))}))}function C(t){return{key:b.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=h.default.query("code-block"),i=e.index,o=e.length,a=this.quill.scroll.descendant(n,i),s=r(a,2),l=s[0],u=s[1];if(null!=l){var c=this.quill.getIndex(l),f=l.newlineIndex(u,!0)+1,p=l.newlineIndex(c+u+o),m=l.domNode.textContent.slice(f,p).split("\n");u=0,m.forEach((function(e,r){t?(l.insertAt(f+u,n.TAB),u+=n.TAB.length,0===r?i+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(l.deleteAt(f+u,n.TAB.length),u-=n.TAB.length,0===r?i-=n.TAB.length:o-=n.TAB.length),u+=e.length+1})),this.quill.update(d.default.sources.USER),this.quill.setSelection(i,o,d.default.sources.SILENT)}}}}function T(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],d.default.sources.USER)}}}function O(t){if("string"==typeof t||"number"==typeof t)return O({key:t});if("object"===(void 0===t?"undefined":i(t))&&(t=(0,a.default)(t,!1)),"string"==typeof t.key)if(null!=b.keys[t.key.toUpperCase()])t.key=b.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[y]=t.shortKey,delete t.shortKey),t}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:T("bold"),italic:T("italic"),underline:T("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",d.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",d.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",d.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,d.default.sources.USER)}},"indent code-block":C(!0),"outdent code-block":C(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,d.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new u.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,d.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,d.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,d.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=r(e,2),i=n[0],o=n[1],a=(0,l.default)({},i.formats(),{list:"checked"}),s=(new u.default).retain(t.index).insert("\n",a).retain(i.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),i=r(n,2),o=i[0],a=i[1],s=(new u.default).retain(t.index).insert("\n",e.format).retain(o.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,i=this.quill.getLine(t.index),o=r(i,2),a=o[0],s=o[1];if(s>n)return!0;var l=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(t.index," ",d.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(t.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:l});this.quill.updateContents(c,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,d.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=r(e,2),i=n[0],o=n[1],a=(new u.default).retain(t.index+i.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,d.default.sources.USER)}},"embed left":_(b.keys.LEFT,!1),"embed left shift":_(b.keys.LEFT,!0),"embed right":_(b.keys.RIGHT,!1),"embed right shift":_(b.keys.RIGHT,!0)}},e.default=b,e.SHORTKEY=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=function(){function t(t,e){for(var n=0;n-1}s.blotName="link",s.tagName="A",s.SANITIZED_URL="about:blank",s.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=s,e.sanitize=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":i(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=v(n(0)),r=v(n(5)),o=n(4),a=v(o),s=v(n(16)),l=v(n(25)),u=v(n(24)),c=v(n(35)),h=v(n(6)),d=v(n(22)),f=v(n(7)),p=v(n(55)),m=v(n(42)),g=v(n(23));function v(t){return t&&t.__esModule?t:{default:t}}r.default.register({"blots/block":a.default,"blots/block/embed":o.BlockEmbed,"blots/break":s.default,"blots/container":l.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":h.default,"blots/scroll":d.default,"blots/text":f.default,"modules/clipboard":p.default,"modules/history":m.default,"modules/keyboard":g.default}),i.default.register(a.default,s.default,u.default,h.default,d.default,f.default),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(){function t(t){this.domNode=t,this.domNode[i.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new i.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return i.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[i.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,r){var o=this.isolate(t,e);if(null!=i.query(n,i.Scope.BLOT)&&r)o.wrap(n,r);else if(null!=i.query(n,i.Scope.ATTRIBUTE)){var a=i.create(this.statics.scope);o.wrap(a),a.format(n,r)}},t.prototype.insertAt=function(t,e,n){var r=null==n?i.create("text",e):i.create(e,n),o=this.split(t);this.parent.insertBefore(r,o)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[i.DATA_KEY]&&delete this.domNode[i.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?i.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?i.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(12),r=n(32),o=n(33),a=n(1),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=i.default.keys(this.domNode),n=r.default.keys(this.domNode),s=o.default.keys(this.domNode);e.concat(n).concat(s).forEach((function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof i.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var i=e.attributes[n].value(e.domNode);t.format(n,i)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){o(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(o(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[o(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[o(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[o(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;ni&&this.stack.undo.length>0){var r=this.stack.undo.pop();n=n.compose(r.undo),t=r.redo.compose(t)}else this.lastRecorded=i;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(a(n(9)).default);function l(t){var e=t.reduce((function(t,e){return t+=e.delete||0}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=r.default.query(t,r.default.Scope.BLOCK)})))}(t)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=s,e.getLastChangeIndex=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t,e,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var i=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,s.default.sources.USER)),this.quill.root.scrollTop=i;break;case"video":n=(e=(t=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/))?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t;case"formula":if(!n)break;var r=this.quill.getSelection(!0);if(null!=r){var o=r.index+r.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),n,s.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",s.default.sources.USER),this.quill.setSelection(o+2,s.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(f.default);function C(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var i=document.createElement("option");e===n?i.setAttribute("selected","selected"):i.setAttribute("value",e),t.appendChild(i)}))}e.BaseTooltip=S,e.default=k},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,i=this.iterator();n=i();){var r=n.length();if(ta?n(i,t-a,Math.min(e,a+l-t)):n(i,0,Math.min(l,t+e-a)),a+=l}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,i=this.iterator();n=i();)e=t(e,n);return e},t}();e.default=i},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),a=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,s),n.attach(),n}return r(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,i,r){this.update(),t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.insertAt=function(e,n,i){this.update(),t.prototype.insertAt.call(this,e,n,i)},e.prototype.optimize=function(e,n){var i=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var r=[].slice.call(this.observer.takeRecords());r.length>0;)e.push(r.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==i&&null!=t.domNode.parentNode&&(null==t.domNode[a.DATA_KEY].mutations&&(t.domNode[a.DATA_KEY].mutations=[]),e&&s(t.parent))},l=function(t){null!=t.domNode[a.DATA_KEY]&&null!=t.domNode[a.DATA_KEY].mutations&&(t instanceof o.default&&t.children.forEach(l),t.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(t){var e=a.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(a.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=a.find(t,!1);s(e,!1),e instanceof o.default&&e.children.forEach((function(t){s(t,!1)}))}))):"attributes"===t.type&&s(e.prev)),s(e))})),this.children.forEach(l),r=(u=[].slice.call(this.observer.takeRecords())).slice();r.length>0;)e.push(r.pop())}},e.prototype.update=function(e,n){var i=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=a.find(t.target,!0);return null==e?null:null==e.domNode[a.DATA_KEY].mutations?(e.domNode[a.DATA_KEY].mutations=[t],e):(e.domNode[a.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==i&&null!=t.domNode[a.DATA_KEY]&&t.update(t.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="DIV",e}(o.default);e.default=l},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,i){var r=this;n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):(this.children.forEach((function(t){t instanceof o.default||(t=t.wrap(e.blotName,!0)),r.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,i,r){null!=this.formats()[i]||a.query(i,a.Scope.ATTRIBUTE)?this.isolate(e,n).format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var i=this.formats();if(0===Object.keys(i).length)return this.unwrap();var r=this.next;r instanceof e&&r.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(i,r.formats())&&(r.moveChildren(this),r.remove())},e.blotName="inline",e.scope=a.Scope.INLINE_BLOT,e.tagName="SPAN",e}(o.default);e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){var i=a.query(e.blotName).tagName;if(n.tagName!==i)return t.formats.call(this,n)},e.prototype.format=function(n,i){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,i,r){null!=a.query(i,a.Scope.BLOCK)?this.format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.insertAt=function(e,n,i){if(null==i||null!=a.query(n,a.Scope.INLINE))t.prototype.insertAt.call(this,e,n,i);else{var r=this.split(e),o=a.create(n,i);r.parent.insertBefore(o,r)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="P",e}(o.default);e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,i,r){0===e&&n===this.length()?this.format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=o},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(19),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return r(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,i){null==i?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,i)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=a.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){"use strict";var i=document.createElement("div");if(i.classList.toggle("test-class",!1),i.classList.contains("test-class")){var r=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:r.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),i=n.length>>>0,r=arguments[1],o=0;oe.length?t:e,h=t.length>e.length?e:t,d=c.indexOf(h);if(-1!=d)return u=[[i,c.substring(0,d)],[r,h],[i,c.substring(d+h.length)]],t.length>e.length&&(u[0][0]=u[2][0]=n),u;if(1==h.length)return[[n,t],[i,e]];var f=function(t,e){var n=t.length>e.length?t:e,i=t.length>e.length?e:t;if(n.length<4||2*i.length=t.length?[i,r,o,a,h]:null}var o,a,u,c,h,d=r(n,i,Math.ceil(n.length/4)),f=r(n,i,Math.ceil(n.length/2));if(!d&&!f)return null;o=f?d&&d[4].length>f[4].length?d:f:d,t.length>e.length?(a=o[0],u=o[1],c=o[2],h=o[3]):(c=o[0],h=o[1],a=o[2],u=o[3]);var p=o[4];return[a,u,c,h,p]}(t,e);if(f){var p=f[0],m=f[1],g=f[2],v=f[3],y=f[4],b=o(p,g),_=o(m,v);return b.concat([[r,y]],_)}return function(t,e){for(var r=t.length,o=e.length,s=Math.ceil((r+o)/2),l=s,u=2*s,c=new Array(u),h=new Array(u),d=0;dr)g+=2;else if(x>o)m+=2;else if(p&&(C=l+f-_)>=0&&C=(S=r-h[C]))return a(t,e,O,x)}for(var k=-b+v;k<=b-y;k+=2){for(var S,C=l+k,T=(S=k==-b||k!=b&&h[C-1]r)y+=2;else if(T>o)v+=2;else if(!p){var O;if((w=l+f-k)>=0&&w