Files
Probability-and-Statistics-…/_static/669.05a3639d12541567.js
T
2026-01-11 13:24:27 -05:00

3 lines
84 KiB
JavaScript
Executable File

/*! For license information please see 669.05a3639d12541567.js.LICENSE.txt */
(self.webpackChunkWebComponents=self.webpackChunkWebComponents||[]).push([[669],{38416:e=>{var t={exports:{}};function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var r=e[t];"object"!=typeof r||Object.isFrozen(r)||n(r)})),e}t.exports=n,t.exports.default=n;class r{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function o(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function i(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const a=e=>!!e.scope||e.sublanguage&&e.language;class s{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=o(e)}openNode(e){if(!a(e))return;let t="";t=e.sublanguage?`language-${e.language}`:((e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)}closeNode(e){a(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const l=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class c{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=l({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{c._collapse(e)})))}}class d extends c{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){return new s(this,this.options).value()}finalize(){return!0}}function u(e){return e?"string"==typeof e?e:e.source:null}function h(e){return f("(?=",e,")")}function g(e){return f("(?:",e,")*")}function p(e){return f("(?:",e,")?")}function f(...e){return e.map((e=>u(e))).join("")}function m(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map((e=>u(e))).join("|")+")"}function b(e){return new RegExp(e.toString()+"|").exec("").length-1}const v=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function _(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let r=u(e),o="";for(;r.length>0;){const e=v.exec(r);if(!e){o+=r;break}o+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?o+="\\"+String(Number(e[1])+t):(o+=e[0],"("===e[0]&&n++)}return o})).map((e=>`(${e})`)).join(t)}const y="[a-zA-Z]\\w*",E="[a-zA-Z_]\\w*",w="\\b\\d+(\\.\\d+)?",x="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",S="\\b(0b[01]+)",A={begin:"\\\\[\\s\\S]",relevance:0},N={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[A]},k={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[A]},O=function(e,t,n={}){const r=i({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=m("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:f(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},C=O("//","$"),T=O("/\\*","\\*/"),D=O("#","$"),M={scope:"number",begin:w,relevance:0},I={scope:"number",begin:x,relevance:0},R={scope:"number",begin:S,relevance:0},B={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[A,{begin:/\[/,end:/\]/,relevance:0,contains:[A]}]}]},L={scope:"title",begin:y,relevance:0},P={scope:"title",begin:E,relevance:0},j={begin:"\\.\\s*"+E,relevance:0};var $=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:y,UNDERSCORE_IDENT_RE:E,NUMBER_RE:w,C_NUMBER_RE:x,BINARY_NUMBER_RE:S,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=f(t,/.*\b/,e.binary,/\b.*/)),i({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:A,APOS_STRING_MODE:N,QUOTE_STRING_MODE:k,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT:O,C_LINE_COMMENT_MODE:C,C_BLOCK_COMMENT_MODE:T,HASH_COMMENT_MODE:D,NUMBER_MODE:M,C_NUMBER_MODE:I,BINARY_NUMBER_MODE:R,REGEXP_MODE:B,TITLE_MODE:L,UNDERSCORE_TITLE_MODE:P,METHOD_GUARD:j,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function z(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function F(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function H(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=z,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function X(e,t){Array.isArray(e.illegal)&&(e.illegal=m(...e.illegal))}function U(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Y(e,t){void 0===e.relevance&&(e.relevance=1)}const K=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=f(n.beforeMatch,h(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},W=["of","and","for","in","not","or","if","then","parent","list","value"];function G(e,t,n="keyword"){const r=Object.create(null);return"string"==typeof e?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach((function(n){Object.assign(r,G(e[n],t,n))})),r;function o(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,Z(n[0],n[1])]}))}}function Z(e,t){return t?Number(t):function(e){return W.includes(e.toLowerCase())}(e)?0:1}const q={},V=e=>{console.error(e)},J=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Q=(e,t)=>{q[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),q[`${e}/${t}`]=!0)},ee=new Error;function te(e,t,{key:n}){let r=0;const o=e[n],i={},a={};for(let e=1;e<=t.length;e++)a[e+r]=o[e],i[e+r]=!0,r+=b(t[e-1]);e[n]=a,e[n]._emit=i,e[n]._multi=!0}function ne(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw V("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ee;if("object"!=typeof e.beginScope||null===e.beginScope)throw V("beginScope must be object"),ee;te(e,e.begin,{key:"beginScope"}),e.begin=_(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw V("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ee;if("object"!=typeof e.endScope||null===e.endScope)throw V("endScope must be object"),ee;te(e,e.end,{key:"endScope"}),e.end=_(e.end,{joinWith:""})}}(e)}function re(e){function t(t,n){return new RegExp(u(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(_(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=i(e.classNameAliases||{}),function n(o,a){const s=o;if(o.isCompiled)return s;[F,U,ne,K].forEach((e=>e(o,a))),e.compilerExtensions.forEach((e=>e(o,a))),o.__beforeBegin=null,[H,X,Y].forEach((e=>e(o,a))),o.isCompiled=!0;let l=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),l=o.keywords.$pattern,delete o.keywords.$pattern),l=l||/\w+/,o.keywords&&(o.keywords=G(o.keywords,e.case_insensitive)),s.keywordPatternRe=t(l,!0),a&&(o.begin||(o.begin=/\B|\b/),s.beginRe=t(s.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(s.endRe=t(s.end)),s.terminatorEnd=u(s.end)||"",o.endsWithParent&&a.terminatorEnd&&(s.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(s.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map((function(e){return function(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return i(e,{variants:null},t)}))),e.cachedVariants?e.cachedVariants:oe(e)?i(e,{starts:e.starts?i(e.starts):null}):Object.isFrozen(e)?i(e):e}("self"===e?o:e)}))),o.contains.forEach((function(e){n(e,s)})),o.starts&&n(o.starts,a),s.matcher=function(e){const t=new r;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function oe(e){return!!e&&(e.endsWithParent||oe(e.starts))}class ie extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const ae=o,se=i,le=Symbol("nomatch");var ce=function(e){const n=Object.create(null),o=Object.create(null),i=[];let a=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",l={disableAutodetect:!0,name:"Plain text",contains:[]};let c={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:d};function u(e){return c.noHighlightRe.test(e)}function b(e,t,n){let r="",o="";"object"==typeof t?(r=e,n=t.ignoreIllegals,o=t.language):(Q("10.7.0","highlight(lang, code, ...args) has been deprecated."),Q("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,r=t),void 0===n&&(n=!0);const i={code:r,language:o};N("before:highlight",i);const a=i.result?i.result:v(i.language,i.code,n);return a.code=i.code,N("after:highlight",a),a}function v(e,t,o,i){const l=Object.create(null);function d(){if(!A.keywords)return void k.addText(O);let e=0;A.keywordPatternRe.lastIndex=0;let t=A.keywordPatternRe.exec(O),n="";for(;t;){n+=O.substring(e,t.index);const o=E.case_insensitive?t[0].toLowerCase():t[0],i=(r=o,A.keywords[r]);if(i){const[e,r]=i;if(k.addText(n),n="",l[o]=(l[o]||0)+1,l[o]<=7&&(C+=r),e.startsWith("_"))n+=t[0];else{const n=E.classNameAliases[e]||e;k.addKeyword(t[0],n)}}else n+=t[0];e=A.keywordPatternRe.lastIndex,t=A.keywordPatternRe.exec(O)}var r;n+=O.substring(e),k.addText(n)}function u(){null!=A.subLanguage?function(){if(""===O)return;let e=null;if("string"==typeof A.subLanguage){if(!n[A.subLanguage])return void k.addText(O);e=v(A.subLanguage,O,!0,N[A.subLanguage]),N[A.subLanguage]=e._top}else e=_(O,A.subLanguage.length?A.subLanguage:null);A.relevance>0&&(C+=e.relevance),k.addSublanguage(e._emitter,e.language)}():d(),O=""}function h(e,t){let n=1;const r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}const r=E.classNameAliases[e[n]]||e[n],o=t[n];r?k.addKeyword(o,r):(O=o,d(),O=""),n++}}function g(e,t){return e.scope&&"string"==typeof e.scope&&k.openNode(E.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(k.addKeyword(O,E.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),O=""):e.beginScope._multi&&(h(e.beginScope,t),O="")),A=Object.create(e,{parent:{value:A}}),A}function p(e,t,n){let o=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(o){if(e["on:end"]){const n=new r(e);e["on:end"](t,n),n.isMatchIgnored&&(o=!1)}if(o){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return p(e.parent,t,n)}function f(e){return 0===A.matcher.regexIndex?(O+=e[0],1):(M=!0,0)}function m(e){const n=e[0],r=t.substring(e.index),o=p(A,e,r);if(!o)return le;const i=A;A.endScope&&A.endScope._wrap?(u(),k.addKeyword(n,A.endScope._wrap)):A.endScope&&A.endScope._multi?(u(),h(A.endScope,e)):i.skip?O+=n:(i.returnEnd||i.excludeEnd||(O+=n),u(),i.excludeEnd&&(O=n));do{A.scope&&k.closeNode(),A.skip||A.subLanguage||(C+=A.relevance),A=A.parent}while(A!==o.parent);return o.starts&&g(o.starts,e),i.returnEnd?0:n.length}let b={};function y(n,i){const s=i&&i[0];if(O+=n,null==s)return u(),0;if("begin"===b.type&&"end"===i.type&&b.index===i.index&&""===s){if(O+=t.slice(i.index,i.index+1),!a){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=b.rule,t}return 1}if(b=i,"begin"===i.type)return function(e){const t=e[0],n=e.rule,o=new r(n),i=[n.__beforeBegin,n["on:begin"]];for(const n of i)if(n&&(n(e,o),o.isMatchIgnored))return f(t);return n.skip?O+=t:(n.excludeBegin&&(O+=t),u(),n.returnBegin||n.excludeBegin||(O=t)),g(n,e),n.returnBegin?0:t.length}(i);if("illegal"===i.type&&!o){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(A.scope||"<unnamed>")+'"');throw e.mode=A,e}if("end"===i.type){const e=m(i);if(e!==le)return e}if("illegal"===i.type&&""===s)return 1;if(D>1e5&&D>3*i.index)throw new Error("potential infinite loop, way more iterations than matches");return O+=s,s.length}const E=x(e);if(!E)throw V(s.replace("{}",e)),new Error('Unknown language: "'+e+'"');const w=re(E);let S="",A=i||w;const N={},k=new c.__emitter(c);!function(){const e=[];for(let t=A;t!==E;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>k.openNode(e)))}();let O="",C=0,T=0,D=0,M=!1;try{for(A.matcher.considerAll();;){D++,M?M=!1:A.matcher.considerAll(),A.matcher.lastIndex=T;const e=A.matcher.exec(t);if(!e)break;const n=y(t.substring(T,e.index),e);T=e.index+n}return y(t.substring(T)),k.closeAllNodes(),k.finalize(),S=k.toHTML(),{language:e,value:S,relevance:C,illegal:!1,_emitter:k,_top:A}}catch(n){if(n.message&&n.message.includes("Illegal"))return{language:e,value:ae(t),illegal:!0,relevance:0,_illegalBy:{message:n.message,index:T,context:t.slice(T-100,T+100),mode:n.mode,resultSoFar:S},_emitter:k};if(a)return{language:e,value:ae(t),illegal:!1,relevance:0,errorRaised:n,_emitter:k,_top:A};throw n}}function _(e,t){t=t||c.languages||Object.keys(n);const r=function(e){const t={value:ae(e),illegal:!1,relevance:0,_top:l,_emitter:new c.__emitter(c)};return t._emitter.addText(e),t}(e),o=t.filter(x).filter(A).map((t=>v(t,e,!1)));o.unshift(r);const i=o.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(x(e.language).supersetOf===t.language)return 1;if(x(t.language).supersetOf===e.language)return-1}return 0})),[a,s]=i,d=a;return d.secondBest=s,d}function y(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=c.languageDetectRe.exec(t);if(n){const t=x(n[1]);return t||(J(s.replace("{}",n[1])),J("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>u(e)||x(e)))}(e);if(u(n))return;if(N("before:highlightElement",{el:e,language:n}),e.children.length>0&&(c.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),c.throwUnescapedHTML))throw new ie("One of your code blocks includes unescaped HTML.",e.innerHTML);t=e;const r=t.textContent,i=n?b(r,{language:n,ignoreIllegals:!0}):_(r);e.innerHTML=i.value,function(e,t,n){const r=t&&o[t]||n;e.classList.add("hljs"),e.classList.add(`language-${r}`)}(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),N("after:highlightElement",{el:e,result:i,text:r})}let E=!1;function w(){"loading"!==document.readyState?document.querySelectorAll(c.cssSelector).forEach(y):E=!0}function x(e){return e=(e||"").toLowerCase(),n[e]||n[o[e]]}function S(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{o[e.toLowerCase()]=t}))}function A(e){const t=x(e);return t&&!t.disableAutodetect}function N(e,t){const n=e;i.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){E&&w()}),!1),Object.assign(e,{highlight:b,highlightAuto:_,highlightAll:w,highlightElement:y,highlightBlock:function(e){return Q("10.7.0","highlightBlock will be removed entirely in v12.0"),Q("10.7.0","Please use highlightElement now."),y(e)},configure:function(e){c=se(c,e)},initHighlighting:()=>{w(),Q("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){w(),Q("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(t,r){let o=null;try{o=r(e)}catch(e){if(V("Language definition for '{}' could not be registered.".replace("{}",t)),!a)throw e;V(e),o=l}o.name||(o.name=t),n[t]=o,o.rawDefinition=r.bind(null,e),o.aliases&&S(o.aliases,{languageName:t})},unregisterLanguage:function(e){delete n[e];for(const t of Object.keys(o))o[t]===e&&delete o[t]},listLanguages:function(){return Object.keys(n)},getLanguage:x,registerAliases:S,autoDetection:A,inherit:se,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),i.push(e)}}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString="11.7.0",e.regex={concat:f,lookahead:h,either:m,optional:p,anyNumberOfTimes:g};for(const e in $)"object"==typeof $[e]&&t.exports($[e]);return Object.assign(e,$),e}({});e.exports=ce,ce.HighlightJS=ce,ce.default=ce},70669:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}n.d(t,{z:()=>xt});var c=l(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),d=l(/Edge/i),u=l(/firefox/i),h=l(/safari/i)&&!l(/chrome/i)&&!l(/android/i),g=l(/iP(ad|od|hone)/i),p=l(/chrome/i)&&l(/android/i),f={capture:!1,passive:!1};function m(e,t,n){e.addEventListener(t,n,!c&&f)}function b(e,t,n){e.removeEventListener(t,n,!c&&f)}function v(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function _(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function y(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&v(e,t):v(e,t))||r&&e===n)return e;if(e===n)break}while(e=_(e))}return null}var E,w=/\s+/g;function x(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(w," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(w," ")}}function S(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function A(e,t){var n="";if("string"==typeof e)n=e;else do{var r=S(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function N(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function k(){return document.scrollingElement||document.documentElement}function O(e,t,n,r,o){if(e.getBoundingClientRect||e===window){var i,a,s,l,d,u,h;if(e!==window&&e.parentNode&&e!==k()?(a=(i=e.getBoundingClientRect()).top,s=i.left,l=i.bottom,d=i.right,u=i.height,h=i.width):(a=0,s=0,l=window.innerHeight,d=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!c))do{if(o&&o.getBoundingClientRect&&("none"!==S(o,"transform")||n&&"static"!==S(o,"position"))){var g=o.getBoundingClientRect();a-=g.top+parseInt(S(o,"border-top-width")),s-=g.left+parseInt(S(o,"border-left-width")),l=a+i.height,d=s+i.width;break}}while(o=o.parentNode);if(r&&e!==window){var p=A(o||e),f=p&&p.a,m=p&&p.d;p&&(l=(a/=m)+(u/=m),d=(s/=f)+(h/=f))}return{top:a,left:s,bottom:l,right:d,width:h,height:u}}}function C(e,t,n){for(var r=R(e,!0),o=O(e)[t];r;){var i=O(r)[n];if(!("top"===n||"left"===n?o>=i:o<=i))return r;if(r===k())break;r=R(r,!1)}return!1}function T(e,t,n,r){for(var o=0,i=0,a=e.children;i<a.length;){if("none"!==a[i].style.display&&a[i]!==Le.ghost&&(r||a[i]!==Le.dragged)&&y(a[i],n.draggable,e,!1)){if(o===t)return a[i];o++}i++}return null}function D(e,t){for(var n=e.lastElementChild;n&&(n===Le.ghost||"none"===S(n,"display")||t&&!v(n,t));)n=n.previousElementSibling;return n||null}function M(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Le.clone||t&&!v(e,t)||n++;return n}function I(e){var t=0,n=0,r=k();if(e)do{var o=A(e),i=o.a,a=o.d;t+=e.scrollLeft*i,n+=e.scrollTop*a}while(e!==r&&(e=e.parentNode));return[t,n]}function R(e,t){if(!e||!e.getBoundingClientRect)return k();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=S(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return k();if(r||t)return n;r=!0}}}while(n=n.parentNode);return k()}function B(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function L(e,t){return function(){if(!E){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),E=setTimeout((function(){E=void 0}),t)}}}function P(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function j(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var $="Sortable"+(new Date).getTime();var z=[],F={initializeByDefault:!0},H={mount:function(e){for(var t in F)F.hasOwnProperty(t)&&!(t in e)&&(e[t]=F[t]);z.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),z.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=e+"Global";z.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][i]&&t[r.pluginName][i](o({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](o({sortable:t},n)))}))},initializePlugins:function(e,t,n,r){for(var o in z.forEach((function(r){var o=r.pluginName;if(e.options[o]||r.initializeByDefault){var i=new r(e,t,e.options);i.sortable=e,i.options=e.options,e[o]=i,s(n,i.defaults)}})),e.options)if(e.options.hasOwnProperty(o)){var i=this.modifyOption(e,o,e.options[o]);void 0!==i&&(e.options[o]=i)}},getEventProperties:function(e,t){var n={};return z.forEach((function(r){"function"==typeof r.eventProperties&&s(n,r.eventProperties.call(t[r.pluginName],e))})),n},modifyOption:function(e,t,n){var r;return z.forEach((function(o){e[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[t]&&(r=o.optionListeners[t].call(e[o.pluginName],n))})),r}};var X=["evt"],U=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,X);H.pluginEvent.bind(Le)(e,t,o({dragEl:K,parentEl:W,ghostEl:G,rootEl:Z,nextEl:q,lastDownEl:V,cloneEl:J,cloneHidden:Q,dragStarted:he,putSortable:ie,activeSortable:Le.active,originalEvent:r,oldIndex:ee,oldDraggableIndex:ne,newIndex:te,newDraggableIndex:re,hideGhostForTarget:Me,unhideGhostForTarget:Ie,cloneNowHidden:function(){Q=!0},cloneNowShown:function(){Q=!1},dispatchSortableEvent:function(e){Y({sortable:t,name:e,originalEvent:r})}},i))};function Y(e){!function(e){var t=e.sortable,n=e.rootEl,r=e.name,i=e.targetEl,a=e.cloneEl,s=e.toEl,l=e.fromEl,u=e.oldIndex,h=e.newIndex,g=e.oldDraggableIndex,p=e.newDraggableIndex,f=e.originalEvent,m=e.putSortable,b=e.extraEventProperties;if(t=t||n&&n[$]){var v,_=t.options,y="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||c||d?(v=document.createEvent("Event")).initEvent(r,!0,!0):v=new CustomEvent(r,{bubbles:!0,cancelable:!0}),v.to=s||n,v.from=l||n,v.item=i||n,v.clone=a,v.oldIndex=u,v.newIndex=h,v.oldDraggableIndex=g,v.newDraggableIndex=p,v.originalEvent=f,v.pullMode=m?m.lastPutMode:void 0;var E=o(o({},b),H.getEventProperties(r,t));for(var w in E)v[w]=E[w];n&&n.dispatchEvent(v),_[y]&&_[y].call(t,v)}}(o({putSortable:ie,cloneEl:J,targetEl:K,rootEl:Z,oldIndex:ee,oldDraggableIndex:ne,newIndex:te,newDraggableIndex:re},e))}var K,W,G,Z,q,V,J,Q,ee,te,ne,re,oe,ie,ae,se,le,ce,de,ue,he,ge,pe,fe,me,be=!1,ve=!1,_e=[],ye=!1,Ee=!1,we=[],xe=!1,Se=[],Ae="undefined"!=typeof document,Ne=g,ke=d||c?"cssFloat":"float",Oe=Ae&&!p&&!g&&"draggable"in document.createElement("div"),Ce=function(){if(Ae){if(c)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Te=function(e,t){var n=S(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=T(e,0,t),i=T(e,1,t),a=o&&S(o),s=i&&S(i),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+O(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+O(i).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(o&&a.float&&"none"!==a.float){var d="left"===a.float?"left":"right";return!i||"both"!==s.clear&&s.clear!==d?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=r&&"none"===n[ke]||i&&"none"===n[ke]&&l+c>r)?"vertical":"horizontal"},De=function(e){function t(e,n){return function(r,o,i,a){var s=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,o,i,a),n)(r,o,i,a);var l=(n?r:o).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},r=e.group;r&&"object"==i(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},Me=function(){!Ce&&G&&S(G,"display","none")},Ie=function(){!Ce&&G&&S(G,"display","")};Ae&&!p&&document.addEventListener("click",(function(e){if(ve)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ve=!1,!1}),!0);var Re=function(e){if(K){var t=(o=(e=e.touches?e.touches[0]:e).clientX,i=e.clientY,_e.some((function(e){var t=e[$].options.emptyInsertThreshold;if(t&&!D(e)){var n=O(e),r=o>=n.left-t&&o<=n.right+t,s=i>=n.top-t&&i<=n.bottom+t;return r&&s?a=e:void 0}})),a);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[$]._onDragOver(n)}}var o,i,a},Be=function(e){K&&K.parentNode[$]._isOutsideThisEl(e.target)};function Le(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=s({},t),e[$]=this;var n,r,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Te(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.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!==Le.supportPointer&&"PointerEvent"in window&&!h,emptyInsertThreshold:5};for(var a in H.initializePlugins(this,e,i),i)!(a in t)&&(t[a]=i[a]);for(var l in De(t),this)"_"===l.charAt(0)&&"function"==typeof this[l]&&(this[l]=this[l].bind(this));this.nativeDraggable=!t.forceFallback&&Oe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?m(e,"pointerdown",this._onTapStart):(m(e,"mousedown",this._onTapStart),m(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(m(e,"dragover",this),m(e,"dragenter",this)),_e.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),s(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==S(e,"display")&&e!==Le.ghost){r.push({target:e,rect:O(e)});var t=o({},r[r.length-1].rect);if(e.thisAnimationDuration){var n=A(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){r.push(e)},removeAnimationState:function(e){r.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}(r,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var o=!1,i=0;r.forEach((function(e){var n=0,r=e.target,a=r.fromRect,s=O(r),l=r.prevFromRect,c=r.prevToRect,d=e.rect,u=A(r,!0);u&&(s.top-=u.f,s.left-=u.e),r.toRect=s,r.thisAnimationDuration&&B(l,s)&&!B(a,s)&&(d.top-s.top)/(d.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(n=function(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}(d,l,c,t.options)),B(s,a)||(r.prevFromRect=a,r.prevToRect=s,n||(n=t.options.animation),t.animate(r,d,s,n)),n&&(o=!0,i=Math.max(i,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),o?n=setTimeout((function(){"function"==typeof e&&e()}),i):"function"==typeof e&&e(),r=[]},animate:function(e,t,n,r){if(r){S(e,"transition",""),S(e,"transform","");var o=A(this.el),i=o&&o.a,a=o&&o.d,s=(t.left-n.left)/(i||1),l=(t.top-n.top)/(a||1);e.animatingX=!!s,e.animatingY=!!l,S(e,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),S(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),S(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){S(e,"transition",""),S(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),r)}}}))}function Pe(e,t,n,r,o,i,a,s){var l,u,h=e[$],g=h.options.onMove;return!window.CustomEvent||c||d?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=o||t,l.relatedRect=i||O(t),l.willInsertAfter=s,l.originalEvent=a,e.dispatchEvent(l),g&&(u=g.call(h,l,a)),u}function je(e){e.draggable=!1}function $e(){xe=!1}function ze(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function Fe(e){return setTimeout(e,0)}function He(e){return clearTimeout(e)}Le.prototype={constructor:Le,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(ge=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,K):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,o=r.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=r.filter;if(function(e){Se.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&Se.push(r)}}(n),!K&&!(/mousedown|pointerdown/.test(i)&&0!==e.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!h||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=y(s,r.draggable,n,!1))&&s.animated||V===s)){if(ee=M(s),ne=M(s,r.draggable),"function"==typeof c){if(c.call(this,e,s,this))return Y({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),U("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=y(l,r.trim(),n,!1))return Y({sortable:t,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),U("filter",t,{evt:e}),!0}))))return void(o&&e.cancelable&&e.preventDefault());r.handle&&!y(l,r.handle,n,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,n){var r,o=this,i=o.el,a=o.options,s=i.ownerDocument;if(n&&!K&&n.parentNode===i){var l=O(n);if(Z=i,W=(K=n).parentNode,q=K.nextSibling,V=n,oe=a.group,Le.dragged=K,ae={target:K,clientX:(t||e).clientX,clientY:(t||e).clientY},de=ae.clientX-l.left,ue=ae.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,K.style["will-change"]="all",r=function(){U("delayEnded",o,{evt:e}),Le.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!u&&o.nativeDraggable&&(K.draggable=!0),o._triggerDragStart(e,t),Y({sortable:o,name:"choose",originalEvent:e}),x(K,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){N(K,e.trim(),je)})),m(s,"dragover",Re),m(s,"mousemove",Re),m(s,"touchmove",Re),m(s,"mouseup",o._onDrop),m(s,"touchend",o._onDrop),m(s,"touchcancel",o._onDrop),u&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),U("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(d||c))r();else{if(Le.eventCanceled)return void this._onDrop();m(s,"mouseup",o._disableDelayedDrag),m(s,"touchend",o._disableDelayedDrag),m(s,"touchcancel",o._disableDelayedDrag),m(s,"mousemove",o._delayedDragTouchMoveHandler),m(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&m(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&je(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._disableDelayedDrag),b(e,"touchend",this._disableDelayedDrag),b(e,"touchcancel",this._disableDelayedDrag),b(e,"mousemove",this._delayedDragTouchMoveHandler),b(e,"touchmove",this._delayedDragTouchMoveHandler),b(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?m(document,"pointermove",this._onTouchMove):m(document,t?"touchmove":"mousemove",this._onTouchMove):(m(K,"dragend",this),m(Z,"dragstart",this._onDragStart));try{document.selection?Fe((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(be=!1,Z&&K){U("dragStarted",this,{evt:t}),this.nativeDraggable&&m(document,"dragover",Be);var n=this.options;!e&&x(K,n.dragClass,!1),x(K,n.ghostClass,!0),Le.active=this,e&&this._appendGhost(),Y({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(se){this._lastX=se.clientX,this._lastY=se.clientY,Me();for(var e=document.elementFromPoint(se.clientX,se.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(se.clientX,se.clientY))!==t;)t=e;if(K.parentNode[$]._isOutsideThisEl(e),t)do{if(t[$]&&t[$]._onDragOver({clientX:se.clientX,clientY:se.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);Ie()}},_onTouchMove:function(e){if(ae){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,o=e.touches?e.touches[0]:e,i=G&&A(G,!0),a=G&&i&&i.a,s=G&&i&&i.d,l=Ne&&me&&I(me),c=(o.clientX-ae.clientX+r.x)/(a||1)+(l?l[0]-we[0]:0)/(a||1),d=(o.clientY-ae.clientY+r.y)/(s||1)+(l?l[1]-we[1]:0)/(s||1);if(!Le.active&&!be){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(G){i?(i.e+=c-(le||0),i.f+=d-(ce||0)):i={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");S(G,"webkitTransform",u),S(G,"mozTransform",u),S(G,"msTransform",u),S(G,"transform",u),le=c,ce=d,se=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!G){var e=this.options.fallbackOnBody?document.body:Z,t=O(K,!0,Ne,!0,e),n=this.options;if(Ne){for(me=e;"static"===S(me,"position")&&"none"===S(me,"transform")&&me!==document;)me=me.parentNode;me!==document.body&&me!==document.documentElement?(me===document&&(me=k()),t.top+=me.scrollTop,t.left+=me.scrollLeft):me=k(),we=I(me)}x(G=K.cloneNode(!0),n.ghostClass,!1),x(G,n.fallbackClass,!0),x(G,n.dragClass,!0),S(G,"transition",""),S(G,"transform",""),S(G,"box-sizing","border-box"),S(G,"margin",0),S(G,"top",t.top),S(G,"left",t.left),S(G,"width",t.width),S(G,"height",t.height),S(G,"opacity","0.8"),S(G,"position",Ne?"absolute":"fixed"),S(G,"zIndex","100000"),S(G,"pointerEvents","none"),Le.ghost=G,e.appendChild(G),S(G,"transform-origin",de/parseInt(G.style.width)*100+"% "+ue/parseInt(G.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,o=n.options;U("dragStart",this,{evt:e}),Le.eventCanceled?this._onDrop():(U("setupClone",this),Le.eventCanceled||((J=j(K)).removeAttribute("id"),J.draggable=!1,J.style["will-change"]="",this._hideClone(),x(J,this.options.chosenClass,!1),Le.clone=J),n.cloneId=Fe((function(){U("clone",n),Le.eventCanceled||(n.options.removeCloneOnHide||Z.insertBefore(J,K),n._hideClone(),Y({sortable:n,name:"clone"}))})),!t&&x(K,o.dragClass,!0),t?(ve=!0,n._loopId=setInterval(n._emulateDragOver,50)):(b(document,"mouseup",n._onDrop),b(document,"touchend",n._onDrop),b(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,K)),m(document,"drop",n),S(K,"transform","translateZ(0)")),be=!0,n._dragStartId=Fe(n._dragStarted.bind(n,t,e)),m(document,"selectstart",n),he=!0,h&&S(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,i,a=this.el,s=e.target,l=this.options,c=l.group,d=Le.active,u=oe===c,h=l.sort,g=ie||d,p=this,f=!1;if(!xe){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),s=y(s,l.draggable,a,!0),z("dragOver"),Le.eventCanceled)return f;if(K.contains(e.target)||s.animated&&s.animatingX&&s.animatingY||p._ignoreWhileAnimating===s)return H(!1);if(ve=!1,d&&!l.disabled&&(u?h||(r=W!==Z):ie===this||(this.lastPutMode=oe.checkPull(this,d,K,e))&&c.checkPut(this,d,K,e))){if(i="vertical"===this._getDirection(e,s),t=O(K),z("dragOverValid"),Le.eventCanceled)return f;if(r)return W=Z,F(),this._hideClone(),z("revert"),Le.eventCanceled||(q?Z.insertBefore(K,q):Z.appendChild(K)),H(!0);var m=D(a,l.draggable);if(!m||function(e,t,n){var r=O(D(n.el,n.options.draggable));return t?e.clientX>r.right+10||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+10}(e,i,this)&&!m.animated){if(m===K)return H(!1);if(m&&a===e.target&&(s=m),s&&(n=O(s)),!1!==Pe(Z,a,K,t,s,n,e,!!s))return F(),m&&m.nextSibling?a.insertBefore(K,m.nextSibling):a.appendChild(K),W=a,X(),H(!0)}else if(m&&function(e,t,n){var r=O(T(n.el,0,n.options,!0));return t?e.clientX<r.left-10||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-10||e.clientY<r.bottom&&e.clientX<r.left}(e,i,this)){var b=T(a,0,l,!0);if(b===K)return H(!1);if(n=O(s=b),!1!==Pe(Z,a,K,t,s,n,e,!1))return F(),a.insertBefore(K,b),W=a,X(),H(!0)}else if(s.parentNode===a){n=O(s);var v,_,E,w=K.parentNode!==a,A=!function(e,t,n){var r=n?e.left:e.top,o=n?e.right:e.bottom,i=n?e.width:e.height,a=n?t.left:t.top,s=n?t.right:t.bottom,l=n?t.width:t.height;return r===a||o===s||r+i/2===a+l/2}(K.animated&&K.toRect||t,s.animated&&s.toRect||n,i),N=i?"top":"left",k=C(s,"top","top")||C(K,"top","top"),I=k?k.scrollTop:void 0;if(ge!==s&&(_=n[N],ye=!1,Ee=!A&&l.invertSwap||w),v=function(e,t,n,r,o,i,a,s){var l=r?e.clientY:e.clientX,c=r?n.height:n.width,d=r?n.top:n.left,u=r?n.bottom:n.right,h=!1;if(!a)if(s&&fe<c*o){if(!ye&&(1===pe?l>d+c*i/2:l<u-c*i/2)&&(ye=!0),ye)h=!0;else if(1===pe?l<d+fe:l>u-fe)return-pe}else if(l>d+c*(1-o)/2&&l<u-c*(1-o)/2)return function(e){return M(K)<M(e)?1:-1}(t);return(h=h||a)&&(l<d+c*i/2||l>u-c*i/2)?l>d+c/2?1:-1:0}(e,s,n,i,A?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Ee,ge===s),0!==v){var R=M(K);do{R-=v,E=W.children[R]}while(E&&("none"===S(E,"display")||E===G))}if(0===v||E===s)return H(!1);ge=s,pe=v;var B=s.nextElementSibling,L=!1,j=Pe(Z,a,K,t,s,n,e,L=1===v);if(!1!==j)return 1!==j&&-1!==j||(L=1===j),xe=!0,setTimeout($e,30),F(),L&&!B?a.appendChild(K):s.parentNode.insertBefore(K,L?B:s),k&&P(k,0,I-k.scrollTop),W=K.parentNode,void 0===_||Ee||(fe=Math.abs(_-O(s)[N])),X(),H(!0)}if(a.contains(K))return H(!1)}return!1}function z(l,c){U(l,p,o({evt:e,isOwner:u,axis:i?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:h,fromSortable:g,target:s,completed:H,onMove:function(n,r){return Pe(Z,a,K,t,n,O(n),e,r)},changed:X},c))}function F(){z("dragOverAnimationCapture"),p.captureAnimationState(),p!==g&&g.captureAnimationState()}function H(t){return z("dragOverCompleted",{insertion:t}),t&&(u?d._hideClone():d._showClone(p),p!==g&&(x(K,ie?ie.options.ghostClass:d.options.ghostClass,!1),x(K,l.ghostClass,!0)),ie!==p&&p!==Le.active?ie=p:p===Le.active&&ie&&(ie=null),g===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){z("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==g&&(g.animateAll(),g._ignoreWhileAnimating=null)),(s===K&&!K.animated||s===a&&!s.animated)&&(ge=null),l.dragoverBubble||e.rootEl||s===document||(K.parentNode[$]._isOutsideThisEl(e.target),!t&&Re(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),f=!0}function X(){te=M(K),re=M(K,l.draggable),Y({sortable:p,name:"change",toEl:a,newIndex:te,newDraggableIndex:re,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",Re),b(document,"mousemove",Re),b(document,"touchmove",Re)},_offUpEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._onDrop),b(e,"touchend",this._onDrop),b(e,"pointerup",this._onDrop),b(e,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;te=M(K),re=M(K,n.draggable),U("drop",this,{evt:e}),W=K&&K.parentNode,te=M(K),re=M(K,n.draggable),Le.eventCanceled||(be=!1,Ee=!1,ye=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),He(this.cloneId),He(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),h&&S(document.body,"user-select",""),S(K,"transform",""),e&&(he&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),G&&G.parentNode&&G.parentNode.removeChild(G),(Z===W||ie&&"clone"!==ie.lastPutMode)&&J&&J.parentNode&&J.parentNode.removeChild(J),K&&(this.nativeDraggable&&b(K,"dragend",this),je(K),K.style["will-change"]="",he&&!be&&x(K,ie?ie.options.ghostClass:this.options.ghostClass,!1),x(K,this.options.chosenClass,!1),Y({sortable:this,name:"unchoose",toEl:W,newIndex:null,newDraggableIndex:null,originalEvent:e}),Z!==W?(te>=0&&(Y({rootEl:W,name:"add",toEl:W,fromEl:Z,originalEvent:e}),Y({sortable:this,name:"remove",toEl:W,originalEvent:e}),Y({rootEl:W,name:"sort",toEl:W,fromEl:Z,originalEvent:e}),Y({sortable:this,name:"sort",toEl:W,originalEvent:e})),ie&&ie.save()):te!==ee&&te>=0&&(Y({sortable:this,name:"update",toEl:W,originalEvent:e}),Y({sortable:this,name:"sort",toEl:W,originalEvent:e})),Le.active&&(null!=te&&-1!==te||(te=ee,re=ne),Y({sortable:this,name:"end",toEl:W,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){U("nulling",this),Z=K=W=G=q=J=V=Q=ae=se=he=te=re=ee=ne=ge=pe=ie=oe=Le.dragged=Le.ghost=Le.clone=Le.active=null,Se.forEach((function(e){e.checked=!0})),Se.length=le=ce=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":K&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,o=n.length,i=this.options;r<o;r++)y(e=n[r],i.draggable,this.el,!1)&&t.push(e.getAttribute(i.dataIdAttr)||ze(e));return t},sort:function(e,t){var n={},r=this.el;this.toArray().forEach((function(e,t){var o=r.children[t];y(o,this.options.draggable,r,!1)&&(n[e]=o)}),this),t&&this.captureAnimationState(),e.forEach((function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return y(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=H.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&De(n)},destroy:function(){U("destroy",this);var e=this.el;e[$]=null,b(e,"mousedown",this._onTapStart),b(e,"touchstart",this._onTapStart),b(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(b(e,"dragover",this),b(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),_e.splice(_e.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Q){if(U("hideClone",this),Le.eventCanceled)return;S(J,"display","none"),this.options.removeCloneOnHide&&J.parentNode&&J.parentNode.removeChild(J),Q=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(Q){if(U("showClone",this),Le.eventCanceled)return;K.parentNode!=Z||this.options.group.revertClone?q?Z.insertBefore(J,q):Z.appendChild(J):Z.insertBefore(J,K),this.options.group.revertClone&&this.animate(K,J),S(J,"display",""),Q=!1}}else this._hideClone()}},Ae&&m(document,"touchmove",(function(e){(Le.active||be)&&e.cancelable&&e.preventDefault()})),Le.utils={on:m,off:b,css:S,find:N,is:function(e,t){return!!y(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:L,closest:y,toggleClass:x,clone:j,index:M,nextTick:Fe,cancelNextTick:He,detectDirection:Te,getChild:T},Le.get=function(e){return e[$]},Le.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Le.utils=o(o({},Le.utils),e.utils)),H.mount(e)}))},Le.create=function(e,t){return new Le(e,t)},Le.version="1.15.0";var Xe,Ue,Ye,Ke,We,Ge,Ze=[],qe=!1;function Ve(){Ze.forEach((function(e){clearInterval(e.pid)})),Ze=[]}function Je(){clearInterval(Ge)}var Qe=L((function(e,t,n,r){if(t.scroll){var o,i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,c=k(),d=!1;Ue!==n&&(Ue=n,Ve(),Xe=t.scroll,o=t.scrollFn,!0===Xe&&(Xe=R(n,!0)));var u=0,h=Xe;do{var g=h,p=O(g),f=p.top,m=p.bottom,b=p.left,v=p.right,_=p.width,y=p.height,E=void 0,w=void 0,x=g.scrollWidth,A=g.scrollHeight,N=S(g),C=g.scrollLeft,T=g.scrollTop;g===c?(E=_<x&&("auto"===N.overflowX||"scroll"===N.overflowX||"visible"===N.overflowX),w=y<A&&("auto"===N.overflowY||"scroll"===N.overflowY||"visible"===N.overflowY)):(E=_<x&&("auto"===N.overflowX||"scroll"===N.overflowX),w=y<A&&("auto"===N.overflowY||"scroll"===N.overflowY));var D=E&&(Math.abs(v-i)<=s&&C+_<x)-(Math.abs(b-i)<=s&&!!C),M=w&&(Math.abs(m-a)<=s&&T+y<A)-(Math.abs(f-a)<=s&&!!T);if(!Ze[u])for(var I=0;I<=u;I++)Ze[I]||(Ze[I]={});Ze[u].vx==D&&Ze[u].vy==M&&Ze[u].el===g||(Ze[u].el=g,Ze[u].vx=D,Ze[u].vy=M,clearInterval(Ze[u].pid),0==D&&0==M||(d=!0,Ze[u].pid=setInterval(function(){r&&0===this.layer&&Le.active._onTouchMove(We);var t=Ze[this.layer].vy?Ze[this.layer].vy*l:0,n=Ze[this.layer].vx?Ze[this.layer].vx*l:0;"function"==typeof o&&"continue"!==o.call(Le.dragged.parentNode[$],n,t,e,We,Ze[this.layer].el)||P(Ze[this.layer].el,n,t)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&h!==c&&(h=R(h,!1)));qe=d}}),30),et=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,o=e.activeSortable,i=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var l=n||o;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(c.clientX,c.clientY);s(),l&&!l.el.contains(d)&&(i("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function tt(){}function nt(){}tt.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=T(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:et},s(tt,{pluginName:"revertOnSpill"}),nt.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:et},s(nt,{pluginName:"removeOnSpill"}),Le.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?m(document,"dragover",this._handleAutoScroll):this.options.supportPointer?m(document,"pointermove",this._handleFallbackAutoScroll):t.touches?m(document,"touchmove",this._handleFallbackAutoScroll):m(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),Je(),Ve(),clearTimeout(E),E=void 0},nulling:function(){We=Ue=Xe=qe=Ge=Ye=Ke=null,Ze.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,i=document.elementFromPoint(r,o);if(We=e,t||this.options.forceAutoScrollFallback||d||c||h){Qe(e,this.options,i,t);var a=R(i,!0);!qe||Ge&&r===Ye&&o===Ke||(Ge&&Je(),Ge=setInterval((function(){var i=R(document.elementFromPoint(r,o),!0);i!==a&&(a=i,Ve()),Qe(e,n.options,i,t)}),10),Ye=r,Ke=o)}else{if(!this.options.bubbleScroll||R(i,!0)===k())return void Ve();Qe(e,this.options,R(i,!1),!1)}}},s(e,{pluginName:"scroll",initializeByDefault:!0})}),Le.mount(nt,tt);const rt=Le,ot=n(38416);var it,at,st;(st=(at=it||(it={})).InputAction||(at.InputAction={})).ADD="add",st.MOVE="move",st.REMOVE="remove";class lt{el;_dropArea;_dragArea;_dropSortable;_dragSortable;parentElement;_prevPosition;reusable;randomize;storedSourceBlocks;storedSourceBlockExplanations;blockOrder;hljsLanguage;initialized;constructor(e,t,n){this.el=document.createElement("div"),this.el.classList.add("hparsons-input"),this.parentElement=e,this.el.id="hparsonstool-"+this.parentElement.toolNumber+"-parsons-input";const r=document.createElement("div");r.innerText="Drag or click the blocks below to form your code:",r.classList.add("hparsons-tip"),this.el.append(r),this._dragArea=document.createElement("div"),this.el.appendChild(this._dragArea),this._dragArea.classList.add("drag-area");const o=document.createElement("div");o.innerText="Your code (click on a block to remove it):",o.classList.add("hparsons-tip"),this.el.append(o),this._dropArea=document.createElement("div"),this.el.appendChild(this._dropArea),this._dropArea.classList.add("drop-area"),this._prevPosition=-1,this.storedSourceBlocks=[],this.blockOrder=[],this.storedSourceBlockExplanations=null,this.reusable=t,this.randomize=n,this._dragSortable=null,this._dropSortable=null,this._initSortable(),this.initialized=!1}getText=e=>{let t="";if(this._dropArea.hasChildNodes()){let n=this._dropArea.firstChild;for(t+=this._getTextFromBlock(n);n.nextSibling;)n=n.nextSibling,t+=e?" ":"",t+=this._getTextFromBlock(n);return t}return t};_getTextFromBlock=e=>{if("raw"==this.parentElement.language)return e.innerHTML;if(!e.lastChild||e.lastChild.nodeType!=Node.ELEMENT_NODE)return e.textContent||"";const t=e.lastChild.classList.contains("parsons-tooltip")&&e.lastChild.textContent?.length||0;return t>0?(e.textContent||"").slice(0,-t):e.textContent||""};shuffleArray(e){for(let t=e.length-1;t>0;t--){let n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}}setSourceBlocks=(e,t)=>{this.blockOrder=[];for(let t=0;t<e.length;++t)this.blockOrder.push(t);if(this.randomize){let e=JSON.stringify(this.blockOrder);for(this.shuffleArray(this.blockOrder);JSON.stringify(this.blockOrder)==e;)this.shuffleArray(this.blockOrder)}this.storedSourceBlocks=e,this.storedSourceBlockExplanations=t,this._resetInput()};_resetInput=()=>{for(;this._dragArea.firstChild;)this._dragArea.removeChild(this._dragArea.firstChild);for(;this._dropArea.firstChild;)this._dropArea.removeChild(this._dropArea.firstChild);for(let e=0;e<this.blockOrder.length;++e){const t=document.createElement("div");if(this._dragArea.appendChild(t)," "===this.storedSourceBlocks[this.blockOrder[e]]?t.innerHTML="&nbsp;":this.parentElement.hljsLanguage?t.innerHTML=ot.highlight(this.storedSourceBlocks[this.blockOrder[e]],{language:this.parentElement.hljsLanguage,ignoreIllegals:!0}).value:"raw"==this.parentElement.language?t.innerHTML=this.storedSourceBlocks[this.blockOrder[e]]:t.innerText=this.storedSourceBlocks[this.blockOrder[e]],t.style.display="inline-block",t.classList.add("parsons-block"),t.onclick=e=>{this._onBlockClicked(t,e)},this.storedSourceBlockExplanations&&this.storedSourceBlockExplanations[this.blockOrder[e]]){const n=document.createElement("div");n.innerText=this.storedSourceBlockExplanations[this.blockOrder[e]],n.classList.add("parsons-tooltip"),t.appendChild(n)}}};_onBlockClicked=(e,t)=>{if(e.parentElement==this._dragArea){let n;if(this.reusable){const t=e.cloneNode(!0);t.onclick=e=>this._onBlockClicked(t,e),this._dropArea.appendChild(t),n=this._getBlockPosition(t)}else this._dropArea.appendChild(e),n=this._getBlockPosition(e);const r={type:"input",action:it.InputAction.ADD,position:[-1,n],answer:this._getTextArray()};t.isTrusted&&this.parentElement.logEvent(r)}else{const t=this._getBlockPosition(e);this.reusable?this._dropArea.removeChild(e):this._dragArea.appendChild(e);const n={type:"input",action:it.InputAction.REMOVE,position:[t,-1],answer:this._getTextArray()};this.parentElement.logEvent(n)}};_initSortable=()=>{this.reusable?(this._dragSortable=new rt(this._dragArea,{group:{name:"shared",pull:"clone",put:!1},sort:!1,direction:"horizontal",animation:150,draggable:".parsons-block",onClone:e=>{const t=e.clone;t.onclick=e=>this._onBlockClicked(t,e)}}),this._dropSortable=new rt(this._dropArea,{group:"shared",direction:"horizontal",animation:150,draggable:".parsons-block",onAdd:e=>{const t={type:"input",action:it.InputAction.ADD,position:[-1,this._getBlockPosition(e.item)],answer:this._getTextArray()};this.parentElement.logEvent(t)},onStart:e=>{this._prevPosition=this._getBlockPosition(e.item)},onEnd:e=>{let t,n=it.InputAction.MOVE;const r=this._dropArea.getBoundingClientRect().top,o=this._dropArea.getBoundingClientRect().bottom;if(e.originalEvent.clientY>o||e.originalEvent.clientY<r){const r=e.item;r.parentNode&&r.parentNode.removeChild(r),t=-1,n=it.InputAction.REMOVE}else t=this._getBlockPosition(e.item);const i={type:"input",action:n,position:[this._prevPosition,t],answer:this._getTextArray()};this.parentElement.logEvent(i)}})):(this._dragSortable=new rt(this._dragArea,{group:{name:"shared"},direction:"horizontal",animation:150,draggable:".parsons-block"}),this._dropSortable=new rt(this._dropArea,{group:"shared",direction:"horizontal",animation:150,draggable:".parsons-block",onAdd:e=>{const t={type:"input",action:it.InputAction.ADD,position:[-1,this._getBlockPosition(e.item)],answer:this._getTextArray()};this.parentElement.logEvent(t)},onStart:e=>{this._prevPosition=this._getBlockPosition(e.item)},onEnd:e=>{let t=this._getBlockPosition(e.item);const n={type:"input",action:-1==t?it.InputAction.REMOVE:it.InputAction.MOVE,position:[this._prevPosition,t],answer:this._getTextArray()};this.parentElement.logEvent(n)}}))};updateTestStatus=e=>{this._dropArea.classList.contains(e)||(this._dropArea.classList.contains("Pass")?this._dropArea.classList.remove("Pass"):this._dropArea.classList.contains("Fail")?this._dropArea.classList.remove("Fail"):this._dropArea.classList.contains("Error")&&this._dropArea.classList.remove("Error"),this._dropArea.classList.add(e))};_getBlockPosition=e=>{let t=-1;const n=this._dropArea;if(n)for(t=0;t<n.childNodes.length&&n.childNodes[t]!==e;++t);return t};_getTextArray=()=>{let e=[];if(this._dropArea.hasChildNodes()){let t=this._dropArea.firstChild;for(e.push(this._getTextFromBlock(t));t.nextSibling;)t=t.nextSibling,e.push(this._getTextFromBlock(t))}return e};removeFormat=()=>{if(this._dropArea.hasChildNodes()){let e=this._dropArea.firstChild;for(e.style.removeProperty("background-color");e.nextSibling;)e=e.nextSibling,e.style.removeProperty("background-color")}};resetInput=()=>{if(this.reusable)for(;this._dropArea.firstChild;)this._dropArea.removeChild(this._dropArea.firstChild);else this._resetInput()};restoreAnswer(e){this.resetInput();const t=/^\s+$/;for(let n=0;n<e.length;++n){let r=t.test(e[n]);if(this._dragArea.hasChildNodes()){let o=this._dragArea.firstChild;for(;o;){if(r){if(t.test(this._getTextFromBlock(o))&&e[n].length==this._getTextFromBlock(o).length){o.click();break}}else if(this._getTextFromBlock(o)==e[n]){o.click();break}o=o.nextSibling}}}const n={type:"restore",answer:e};this.parentElement.logEvent(n)}}const ct="[A-Za-z$_][0-9A-Za-z$_]*",dt=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],ut=["true","false","null","undefined","NaN","Infinity"],ht=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],gt=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],pt=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],ft=["arguments","this","super","console","window","document","localStorage","module","global"],mt=[].concat(pt,ht,gt);var bt="[0-9](_*[0-9])*",vt=`\\.(${bt})`,_t="[0-9a-fA-F](_*[0-9a-fA-F])*",yt={className:"number",variants:[{begin:`(\\b(${bt})((${vt})|\\.)?|(${vt}))[eE][+-]?(${bt})[fFdD]?\\b`},{begin:`\\b(${bt})((${vt})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${vt})[fFdD]?\\b`},{begin:`\\b(${bt})[fFdD]\\b`},{begin:`\\b0[xX]((${_t})\\.?|(${_t})?\\.(${_t}))[pP][+-]?(${bt})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${_t})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Et(e,t,n){return-1===n?"":e.replace(t,(r=>Et(e,t,n-1)))}ot.registerLanguage("javascript",(function(e){const t=e.regex,n=ct,r={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let o;">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());const i=e.input.substring(n);((o=i.match(/^\s*=/))||(o=i.match(/^\s+extends\s+/))&&0===o.index)&&t.ignoreMatch()}},o={$pattern:ct,keyword:dt,literal:ut,built_in:mt,"variable.language":ft},i="[0-9](_?[0-9])*",a=`\\.(${i})`,s="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",l={className:"number",variants:[{begin:`(\\b(${s})((${a})|\\.)?|(${a}))[eE][+-]?(${i})\\b`},{begin:`\\b(${s})\\b((${a})\\b|\\.)?|(${a})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},c={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"xml"}},u={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"css"}},h={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,c]},g={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},p=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,u,h,{match:/\$\d+/},l];c.contains=p.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(p)});const f=[].concat(g,c.contains),m=f.concat([{begin:/\(/,end:/\)/,keywords:o,contains:["self"].concat(f)}]),b={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:m},v={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...ht,...gt]}},y={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[b],illegal:/%/},E={match:t.concat(/\b/,(w=[...pt,"super","import"],t.concat("(?!",w.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var w;const x={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},S={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},b]},A="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",N={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(A)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[b]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:m,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,u,h,g,{match:/\$\d+/},l,_,{className:"attr",begin:n+t.lookahead(":"),relevance:0},N,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[g,e.REGEXP_MODE,{className:"function",begin:A,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:m}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:"<>",end:"</>"},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:r.begin,"on:begin":r.isTrulyOpeningTag,end:r.end}],subLanguage:"xml",contains:[{begin:r.begin,end:r.end,skip:!0,contains:["self"]}]}]},y,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[b,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},x,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[b]},E,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},v,S,{match:/\$[(.]/}]}})),ot.registerLanguage("sql",(function(e){const t=e.regex,n=e.COMMENT("--","$"),r=["true","false","unknown"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],i=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],a=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],s=i,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!i.includes(e))),c={begin:t.concat(/\b/,t.either(...s),/\s*\(/),relevance:0,keywords:{built_in:s}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const r=n;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e))}(l,{when:e=>e.length<3}),literal:r,type:o,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:t.either(...a),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:l.concat(a),literal:r,type:o}},{className:"type",begin:t.either("double precision","large object","with timezone","without timezone")},c,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),ot.registerLanguage("java",(function(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+Et("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),o={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},i={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},a={className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:o,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:o,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,yt,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},yt,i]}})),ot.registerLanguage("xml",(function(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},i=e.inherit(o,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),s=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,s,a,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,i,s,a]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[s]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),ot.registerLanguage("python",(function(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},i={className:"meta",begin:/^(>>>|\.\.\.) /},a={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},s={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,i],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,i],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,i,s,a]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,i,s,a]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,a]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,a]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",d=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,u=`\\b|${r.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${d}))[eE][+-]?(${c})[jJ]?(?=${u})`},{begin:`(${d})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${u})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${u})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${u})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${u})`},{begin:`\\b(${c})[jJ](?=${u})`}]},g={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},p={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",i,h,l,e.HASH_COMMENT_MODE]}]};return a.contains=[l,h,i],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|->|\?)|=>/,contains:[i,h,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},l,g,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[p]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,p,l]}]}}));class wt extends HTMLElement{root;_parsonsData;parsonsExplanation;hparsonsInput;inputType;static toolCount=0;toolNumber;temporaryInputEvent;language;hljsLanguage;codeBefore;codeAfter;constructor(){super(),wt.toolCount+=1,this.toolNumber=wt.toolCount,this.root=this;const e=!!this.getAttribute("reuse"),t=!!this.getAttribute("randomize");this.hparsonsInput=new lt(this,e,t),this._parsonsData=new Array,this.parsonsExplanation=null,this.inputType="parsons",this.language=this.getAttribute("language")||"none";let n=new Map(Object.entries({html:"xml",python:"python",javascript:"javascript",java:"java",sql:"sql"}));this.hljsLanguage=n.get(this.language),this.initInput(),this.temporaryInputEvent=null,this.codeBefore=null,this.codeAfter=null}set parsonsData(e){this._parsonsData=e,"parsons"==this.inputType&&this.hparsonsInput.setSourceBlocks(e,this.parsonsExplanation)}get parsonsData(){return this._parsonsData}logEvent=e=>{const t=new CustomEvent("micro-parsons",{bubbles:!0,detail:{...e}});this.dispatchEvent(t)};initInput(){this.inputType="parsons",this._parsonsData=new Array,this.parsonsExplanation=null;const e=null!=this.getAttribute("reuse"),t=null!=this.getAttribute("randomize");this.hparsonsInput=new lt(this,e,t),this.root.appendChild(this.hparsonsInput.el)}resetInput(){this.hparsonsInput.resetInput(),this.logEvent({type:"reset"})}restoreAnswer(e){this.hparsonsInput.restoreAnswer(e)}getCurrentInput(e){return this.hparsonsInput.getText(e)}getParsonsTextArray(){return this.hparsonsInput._getTextArray()}setCodeContext(e){if(e.before){let t;this.codeBefore=e.before,this.querySelector(".context.before")?t=this.querySelector(".context.before"):(t=document.createElement("pre"),t.className="context before",this.querySelector(".hparsons-input").insertBefore(t,this.querySelector(".drop-area"))),t.innerHTML=this.codeBefore,this.hljsLanguage&&(t.className="context before",t.classList.add(this.hljsLanguage),ot.highlightElement(t))}if(e.after){let t;this.codeAfter=e.after,this.querySelector(".context.after")?t=this.querySelector(".context.after"):(t=document.createElement("pre"),t.className="context after",this.querySelector(".hparsons-input").appendChild(t)),t.innerHTML=this.codeAfter,this.hljsLanguage&&(t.className="context after",t.classList.add(this.hljsLanguage),ot.highlightElement(t))}}}const xt=e=>{let t;try{t=document.querySelector(e.selector)}catch{throw"micro-parsons: init: selector error"}if(null==t||"DIV"!=t.tagName)throw"micro-parsons: element not a div";const n=-1==["javascript","sql","java","html","python","raw"].indexOf(e.language||"")?"":`language='${e.language}'`,r=e.id?`id='${e.id}'`:"",o=`<micro-parsons ${e.reuse?"reuse":""} ${!1===e.randomize?"":"randomize"} ${n} ${r}></micro-parsons>`;t.innerHTML=o;const i=t.firstChild;i.parsonsExplanation=e.parsonsTooltips,i.parsonsData=e.parsonsBlocks,e.context&&i.setCodeContext(e.context)};customElements.define("micro-parsons",wt)}}]);
//# sourceMappingURL=669.05a3639d12541567.js.map