/*! For license information please see 207.f37c7cddd9242233.js.LICENSE.txt */ "use strict";(self.webpackChunkWebComponents=self.webpackChunkWebComponents||[]).push([[207],{78207:(e,t,n)=>{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;tMn});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 k(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,i=r.length;if(n)for(;o=i:o<=i))return r;if(r===N())break;r=R(r,!1)}return!1}function T(e,t,n,r){for(var o=0,i=0,a=e.children;i2&&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=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,U);X.pluginEvent.bind(Pe)(e,t,o({dragEl:W,parentEl:G,ghostEl:q,rootEl:Z,nextEl:V,lastDownEl:J,cloneEl:Q,cloneHidden:ee,dragStarted:ge,putSortable:ae,activeSortable:Pe.active,originalEvent:r,oldIndex:te,oldDraggableIndex:re,newIndex:ne,newDraggableIndex:oe,hideGhostForTarget:Ie,unhideGhostForTarget:Re,cloneNowHidden:function(){ee=!0},cloneNowShown:function(){ee=!1},dispatchSortableEvent:function(e){K({sortable:t,name:e,originalEvent:r})}},i))};function K(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),X.getEventProperties(r,t));for(var w in E)v[w]=E[w];n&&n.dispatchEvent(v),_[y]&&_[y].call(t,v)}}(o({putSortable:ae,cloneEl:Q,targetEl:W,rootEl:Z,oldIndex:te,oldDraggableIndex:re,newIndex:ne,newDraggableIndex:oe},e))}var W,G,q,Z,V,J,Q,ee,te,ne,re,oe,ie,ae,se,le,ce,de,ue,he,ge,pe,fe,me,be,ve=!1,_e=!1,ye=[],Ee=!1,we=!1,xe=[],Se=!1,Ae=[],ke="undefined"!=typeof document,Ne=g,Oe=d||c?"cssFloat":"float",Ce=ke&&!p&&!g&&"draggable"in document.createElement("div"),Te=function(){if(ke){if(c)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),De=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[Oe]||i&&"none"===n[Oe]&&l+c>r)?"vertical":"horizontal"},Me=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},Ie=function(){!Te&&q&&S(q,"display","none")},Re=function(){!Te&&q&&S(q,"display","")};ke&&document.addEventListener("click",(function(e){if(_e)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),_e=!1,!1}),!0);var Be=function(e){if(W){e=e.touches?e.touches[0]:e;var t=(o=e.clientX,i=e.clientY,ye.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},Le=function(e){W&&W.parentNode[$]._isOutsideThisEl(e.target)};function Pe(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={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 De(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!==Pe.supportPointer&&"PointerEvent"in window&&!h,emptyInsertThreshold:5};for(var r in X.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var o in Me(t),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!t.forceFallback&&Ce,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)),ye.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),s(this,z())}function je(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 $e(e){e.draggable=!1}function ze(){Se=!1}function Fe(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 He(e){return setTimeout(e,0)}function Xe(e){return clearTimeout(e)}Pe.prototype={constructor:Pe,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(pe=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,W):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){Ae.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&Ae.push(r)}}(n),!W&&!(/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||J===s)){if(te=M(s),re=M(s,r.draggable),"function"==typeof c){if(c.call(this,e,s,this))return K({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),Y("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 K({sortable:t,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),Y("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&&!W&&n.parentNode===i){var l=O(n);if(Z=i,G=(W=n).parentNode,V=W.nextSibling,J=n,ie=a.group,Pe.dragged=W,se={target:W,clientX:(t||e).clientX,clientY:(t||e).clientY},ue=se.clientX-l.left,he=se.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,W.style["will-change"]="all",r=function(){Y("delayEnded",o,{evt:e}),Pe.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!u&&o.nativeDraggable&&(W.draggable=!0),o._triggerDragStart(e,t),K({sortable:o,name:"choose",originalEvent:e}),x(W,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){k(W,e.trim(),$e)})),m(s,"dragover",Be),m(s,"mousemove",Be),m(s,"touchmove",Be),m(s,"mouseup",o._onDrop),m(s,"touchend",o._onDrop),m(s,"touchcancel",o._onDrop),u&&this.nativeDraggable&&(this.options.touchStartThreshold=4,W.draggable=!0),Y("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(d||c))r();else{if(Pe.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(){W&&$e(W),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(W,"dragend",this),m(Z,"dragstart",this._onDragStart));try{document.selection?He((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(ve=!1,Z&&W){Y("dragStarted",this,{evt:t}),this.nativeDraggable&&m(document,"dragover",Le);var n=this.options;!e&&x(W,n.dragClass,!1),x(W,n.ghostClass,!0),Pe.active=this,e&&this._appendGhost(),K({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(le){this._lastX=le.clientX,this._lastY=le.clientY,Ie();for(var e=document.elementFromPoint(le.clientX,le.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(le.clientX,le.clientY))!==t;)t=e;if(W.parentNode[$]._isOutsideThisEl(e),t)do{if(t[$]&&t[$]._onDragOver({clientX:le.clientX,clientY:le.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);Re()}},_onTouchMove:function(e){if(se){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,o=e.touches?e.touches[0]:e,i=q&&A(q,!0),a=q&&i&&i.a,s=q&&i&&i.d,l=Ne&&be&&I(be),c=(o.clientX-se.clientX+r.x)/(a||1)+(l?l[0]-xe[0]:0)/(a||1),d=(o.clientY-se.clientY+r.y)/(s||1)+(l?l[1]-xe[1]:0)/(s||1);if(!Pe.active&&!ve){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))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===W)return H(!1);if(m&&a===e.target&&(s=m),s&&(n=O(s)),!1!==je(Z,a,W,t,s,n,e,!!s))return F(),a.appendChild(W),G=a,X(),H(!0)}else if(m&&function(e,t,n){var r=O(T(n.el,0,n.options,!0));return t?e.clientXd+c*i/2:lu-me)return-fe}else if(l>d+c*(1-o)/2&&lu-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,we,pe===s),0!==v){var R=M(W);do{R-=v,E=G.children[R]}while(E&&("none"===S(E,"display")||E===q))}if(0===v||E===s)return H(!1);pe=s,fe=v;var B=s.nextElementSibling,L=!1,j=je(Z,a,W,t,s,n,e,L=1===v);if(!1!==j)return 1!==j&&-1!==j||(L=1===j),Se=!0,setTimeout(ze,30),F(),L&&!B?a.appendChild(W):s.parentNode.insertBefore(W,L?B:s),N&&P(N,0,I-N.scrollTop),G=W.parentNode,void 0===_||we||(me=Math.abs(_-O(s)[k])),X(),H(!0)}if(a.contains(W))return H(!1)}return!1}function z(l,c){Y(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 je(Z,a,W,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(W,ae?ae.options.ghostClass:d.options.ghostClass,!1),x(W,l.ghostClass,!0)),ae!==p&&p!==Pe.active?ae=p:p===Pe.active&&ae&&(ae=null),g===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){z("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==g&&(g.animateAll(),g._ignoreWhileAnimating=null)),(s===W&&!W.animated||s===a&&!s.animated)&&(pe=null),l.dragoverBubble||e.rootEl||s===document||(W.parentNode[$]._isOutsideThisEl(e.target),!t&&Be(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),f=!0}function X(){ne=M(W),oe=M(W,l.draggable),K({sortable:p,name:"change",toEl:a,newIndex:ne,newDraggableIndex:oe,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",Be),b(document,"mousemove",Be),b(document,"touchmove",Be)},_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;ne=M(W),oe=M(W,n.draggable),Y("drop",this,{evt:e}),G=W&&W.parentNode,ne=M(W),oe=M(W,n.draggable),Pe.eventCanceled||(ve=!1,we=!1,Ee=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Xe(this.cloneId),Xe(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),h&&S(document.body,"user-select",""),S(W,"transform",""),e&&(ge&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),q&&q.parentNode&&q.parentNode.removeChild(q),(Z===G||ae&&"clone"!==ae.lastPutMode)&&Q&&Q.parentNode&&Q.parentNode.removeChild(Q),W&&(this.nativeDraggable&&b(W,"dragend",this),$e(W),W.style["will-change"]="",ge&&!ve&&x(W,ae?ae.options.ghostClass:this.options.ghostClass,!1),x(W,this.options.chosenClass,!1),K({sortable:this,name:"unchoose",toEl:G,newIndex:null,newDraggableIndex:null,originalEvent:e}),Z!==G?(ne>=0&&(K({rootEl:G,name:"add",toEl:G,fromEl:Z,originalEvent:e}),K({sortable:this,name:"remove",toEl:G,originalEvent:e}),K({rootEl:G,name:"sort",toEl:G,fromEl:Z,originalEvent:e}),K({sortable:this,name:"sort",toEl:G,originalEvent:e})),ae&&ae.save()):ne!==te&&ne>=0&&(K({sortable:this,name:"update",toEl:G,originalEvent:e}),K({sortable:this,name:"sort",toEl:G,originalEvent:e})),Pe.active&&(null!=ne&&-1!==ne||(ne=te,oe=re),K({sortable:this,name:"end",toEl:G,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Y("nulling",this),Z=W=G=q=V=Q=J=ee=se=le=ge=ne=oe=te=re=pe=fe=ae=ie=Pe.dragged=Pe.ghost=Pe.clone=Pe.active=null,Ae.forEach((function(e){e.checked=!0})),Ae.length=ce=de=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":W&&(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/g,">").replace(/"/g,""").replace(/'/g,"'")}function ct(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 dt=e=>!!e.scope||e.sublanguage&&e.language;class ut{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=lt(e)}openNode(e){if(!dt(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){dt(e)&&(this.buffer+="")}value(){return this.buffer}span(e){this.buffer+=``}}const ht=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class gt{constructor(){this.rootNode=ht(),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=ht({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=>{gt._collapse(e)})))}}class pt extends gt{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 ut(this,this.options).value()}finalize(){return!0}}function ft(e){return e?"string"==typeof e?e:e.source:null}function mt(e){return _t("(?=",e,")")}function bt(e){return _t("(?:",e,")*")}function vt(e){return _t("(?:",e,")?")}function _t(...e){return e.map((e=>ft(e))).join("")}function yt(...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=>ft(e))).join("|")+")"}function Et(e){return new RegExp(e.toString()+"|").exec("").length-1}const wt=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function xt(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let r=ft(e),o="";for(;r.length>0;){const e=wt.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 St="[a-zA-Z]\\w*",At="[a-zA-Z_]\\w*",kt="\\b\\d+(\\.\\d+)?",Nt="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ot="\\b(0b[01]+)",Ct={begin:"\\\\[\\s\\S]",relevance:0},Tt={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ct]},Dt={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ct]},Mt=function(e,t,n={}){const r=ct({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=yt("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:_t(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},It=Mt("//","$"),Rt=Mt("/\\*","\\*/"),Bt=Mt("#","$"),Lt={scope:"number",begin:kt,relevance:0},Pt={scope:"number",begin:Nt,relevance:0},jt={scope:"number",begin:Ot,relevance:0},$t={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Ct,{begin:/\[/,end:/\]/,relevance:0,contains:[Ct]}]}]},zt={scope:"title",begin:St,relevance:0},Ft={scope:"title",begin:At,relevance:0},Ht={begin:"\\.\\s*"+At,relevance:0};var Xt=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:St,UNDERSCORE_IDENT_RE:At,NUMBER_RE:kt,C_NUMBER_RE:Nt,BINARY_NUMBER_RE:Ot,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=_t(t,/.*\b/,e.binary,/\b.*/)),ct({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:Ct,APOS_STRING_MODE:Tt,QUOTE_STRING_MODE:Dt,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:Mt,C_LINE_COMMENT_MODE:It,C_BLOCK_COMMENT_MODE:Rt,HASH_COMMENT_MODE:Bt,NUMBER_MODE:Lt,C_NUMBER_MODE:Pt,BINARY_NUMBER_MODE:jt,REGEXP_MODE:$t,TITLE_MODE:zt,UNDERSCORE_TITLE_MODE:Ft,METHOD_GUARD:Ht,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 Ut(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function Yt(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function Kt(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Ut,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function Wt(e,t){Array.isArray(e.illegal)&&(e.illegal=yt(...e.illegal))}function Gt(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 qt(e,t){void 0===e.relevance&&(e.relevance=1)}const Zt=(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=_t(n.beforeMatch,mt(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Vt=["of","and","for","in","not","or","if","then","parent","list","value"];function Jt(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,Jt(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,Qt(n[0],n[1])]}))}}function Qt(e,t){return t?Number(t):function(e){return Vt.includes(e.toLowerCase())}(e)?0:1}const en={},tn=e=>{console.error(e)},nn=(e,...t)=>{console.log(`WARN: ${e}`,...t)},rn=(e,t)=>{en[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),en[`${e}/${t}`]=!0)},on=new Error;function an(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+=Et(t[e-1]);e[n]=a,e[n]._emit=i,e[n]._multi=!0}function sn(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 tn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),on;if("object"!=typeof e.beginScope||null===e.beginScope)throw tn("beginScope must be object"),on;an(e,e.begin,{key:"beginScope"}),e.begin=xt(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw tn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),on;if("object"!=typeof e.endScope||null===e.endScope)throw tn("endScope must be object"),on;an(e,e.end,{key:"endScope"}),e.end=xt(e.end,{joinWith:""})}}(e)}function ln(e){function t(t,n){return new RegExp(ft(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+=Et(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(xt(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=ct(e.classNameAliases||{}),function n(o,i){const a=o;if(o.isCompiled)return a;[Yt,Gt,sn,Zt].forEach((e=>e(o,i))),e.compilerExtensions.forEach((e=>e(o,i))),o.__beforeBegin=null,[Kt,Wt,qt].forEach((e=>e(o,i))),o.isCompiled=!0;let s=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),s=o.keywords.$pattern,delete o.keywords.$pattern),s=s||/\w+/,o.keywords&&(o.keywords=Jt(o.keywords,e.case_insensitive)),a.keywordPatternRe=t(s,!0),i&&(o.begin||(o.begin=/\B|\b/),a.beginRe=t(a.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(a.endRe=t(a.end)),a.terminatorEnd=ft(a.end)||"",o.endsWithParent&&i.terminatorEnd&&(a.terminatorEnd+=(o.end?"|":"")+i.terminatorEnd)),o.illegal&&(a.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 ct(e,{variants:null},t)}))),e.cachedVariants?e.cachedVariants:cn(e)?ct(e,{starts:e.starts?ct(e.starts):null}):Object.isFrozen(e)?ct(e):e}("self"===e?o:e)}))),o.contains.forEach((function(e){n(e,a)})),o.starts&&n(o.starts,i),a.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}(a),a}(e)}function cn(e){return!!e&&(e.endsWithParent||cn(e.starts))}class dn extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const un=lt,hn=ct,gn=Symbol("nomatch");var pn=function(e){const t=Object.create(null),n=Object.create(null),r=[];let o=!0;const i="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let s={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:pt};function l(e){return s.noHighlightRe.test(e)}function c(e,t,n){let r="",o="";"object"==typeof t?(r=e,n=t.ignoreIllegals,o=t.language):(rn("10.7.0","highlight(lang, code, ...args) has been deprecated."),rn("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};v("before:highlight",i);const a=i.result?i.result:d(i.language,i.code,n);return a.code=i.code,v("after:highlight",a),a}function d(e,n,r,a){const l=Object.create(null);function c(){if(!S.keywords)return void k.addText(N);let e=0;S.keywordPatternRe.lastIndex=0;let t=S.keywordPatternRe.exec(N),n="";for(;t;){n+=N.substring(e,t.index);const o=E.case_insensitive?t[0].toLowerCase():t[0],i=(r=o,S.keywords[r]);if(i){const[e,r]=i;if(k.addText(n),n="",l[o]=(l[o]||0)+1,l[o]<=7&&(O+=r),e.startsWith("_"))n+=t[0];else{const n=E.classNameAliases[e]||e;k.addKeyword(t[0],n)}}else n+=t[0];e=S.keywordPatternRe.lastIndex,t=S.keywordPatternRe.exec(N)}var r;n+=N.substring(e),k.addText(n)}function h(){null!=S.subLanguage?function(){if(""===N)return;let e=null;if("string"==typeof S.subLanguage){if(!t[S.subLanguage])return void k.addText(N);e=d(S.subLanguage,N,!0,A[S.subLanguage]),A[S.subLanguage]=e._top}else e=u(N,S.subLanguage.length?S.subLanguage:null);S.relevance>0&&(O+=e.relevance),k.addSublanguage(e._emitter,e.language)}():c(),N=""}function g(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):(N=o,c(),N=""),n++}}function p(e,t){return e.scope&&"string"==typeof e.scope&&k.openNode(E.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(k.addKeyword(N,E.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),N=""):e.beginScope._multi&&(g(e.beginScope,t),N="")),S=Object.create(e,{parent:{value:S}}),S}function m(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new st(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return m(e.parent,t,n)}function b(e){return 0===S.matcher.regexIndex?(N+=e[0],1):(D=!0,0)}function v(e){const t=e[0],r=n.substring(e.index),o=m(S,e,r);if(!o)return gn;const i=S;S.endScope&&S.endScope._wrap?(h(),k.addKeyword(t,S.endScope._wrap)):S.endScope&&S.endScope._multi?(h(),g(S.endScope,e)):i.skip?N+=t:(i.returnEnd||i.excludeEnd||(N+=t),h(),i.excludeEnd&&(N=t));do{S.scope&&k.closeNode(),S.skip||S.subLanguage||(O+=S.relevance),S=S.parent}while(S!==o.parent);return o.starts&&p(o.starts,e),i.returnEnd?0:t.length}let _={};function y(t,i){const a=i&&i[0];if(N+=t,null==a)return h(),0;if("begin"===_.type&&"end"===i.type&&_.index===i.index&&""===a){if(N+=n.slice(i.index,i.index+1),!o){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=_.rule,t}return 1}if(_=i,"begin"===i.type)return function(e){const t=e[0],n=e.rule,r=new st(n),o=[n.__beforeBegin,n["on:begin"]];for(const n of o)if(n&&(n(e,r),r.isMatchIgnored))return b(t);return n.skip?N+=t:(n.excludeBegin&&(N+=t),h(),n.returnBegin||n.excludeBegin||(N=t)),p(n,e),n.returnBegin?0:t.length}(i);if("illegal"===i.type&&!r){const e=new Error('Illegal lexeme "'+a+'" for mode "'+(S.scope||"")+'"');throw e.mode=S,e}if("end"===i.type){const e=v(i);if(e!==gn)return e}if("illegal"===i.type&&""===a)return 1;if(T>1e5&&T>3*i.index)throw new Error("potential infinite loop, way more iterations than matches");return N+=a,a.length}const E=f(e);if(!E)throw tn(i.replace("{}",e)),new Error('Unknown language: "'+e+'"');const w=ln(E);let x="",S=a||w;const A={},k=new s.__emitter(s);!function(){const e=[];for(let t=S;t!==E;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>k.openNode(e)))}();let N="",O=0,C=0,T=0,D=!1;try{for(S.matcher.considerAll();;){T++,D?D=!1:S.matcher.considerAll(),S.matcher.lastIndex=C;const e=S.matcher.exec(n);if(!e)break;const t=y(n.substring(C,e.index),e);C=e.index+t}return y(n.substring(C)),k.closeAllNodes(),k.finalize(),x=k.toHTML(),{language:e,value:x,relevance:O,illegal:!1,_emitter:k,_top:S}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:un(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:C,context:n.slice(C-100,C+100),mode:t.mode,resultSoFar:x},_emitter:k};if(o)return{language:e,value:un(n),illegal:!1,relevance:0,errorRaised:t,_emitter:k,_top:S};throw t}}function u(e,n){n=n||s.languages||Object.keys(t);const r=function(e){const t={value:un(e),illegal:!1,relevance:0,_top:a,_emitter:new s.__emitter(s)};return t._emitter.addText(e),t}(e),o=n.filter(f).filter(b).map((t=>d(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(f(e.language).supersetOf===t.language)return 1;if(f(t.language).supersetOf===e.language)return-1}return 0})),[l,c]=i,u=l;return u.secondBest=c,u}function h(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=s.languageDetectRe.exec(t);if(n){const t=f(n[1]);return t||(nn(i.replace("{}",n[1])),nn("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||f(e)))}(e);if(l(r))return;if(v("before:highlightElement",{el:e,language:r}),e.children.length>0&&(s.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)),s.throwUnescapedHTML))throw new dn("One of your code blocks includes unescaped HTML.",e.innerHTML);t=e;const o=t.textContent,a=r?c(o,{language:r,ignoreIllegals:!0}):u(o);e.innerHTML=a.value,function(e,t,r){const o=t&&n[t]||r;e.classList.add("hljs"),e.classList.add(`language-${o}`)}(e,r,a.language),e.result={language:a.language,re:a.relevance,relevance:a.relevance},a.secondBest&&(e.secondBest={language:a.secondBest.language,relevance:a.secondBest.relevance}),v("after:highlightElement",{el:e,result:a,text:o})}let g=!1;function p(){"loading"!==document.readyState?document.querySelectorAll(s.cssSelector).forEach(h):g=!0}function f(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function m(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function b(e){const t=f(e);return t&&!t.disableAutodetect}function v(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){g&&p()}),!1),Object.assign(e,{highlight:c,highlightAuto:u,highlightAll:p,highlightElement:h,highlightBlock:function(e){return rn("10.7.0","highlightBlock will be removed entirely in v12.0"),rn("10.7.0","Please use highlightElement now."),h(e)},configure:function(e){s=hn(s,e)},initHighlighting:()=>{p(),rn("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){p(),rn("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,r){let i=null;try{i=r(e)}catch(e){if(tn("Language definition for '{}' could not be registered.".replace("{}",n)),!o)throw e;tn(e),i=a}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&m(i.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:f,registerAliases:m,autoDetection:b,inherit:hn,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),r.push(e)}}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString="11.7.0",e.regex={concat:_t,lookahead:mt,either:yt,optional:vt,anyNumberOfTimes:bt};for(const e in Xt)"object"==typeof Xt[e]&&it.exports(Xt[e]);return Object.assign(e,Xt),e}({}),fn=pn;pn.HighlightJS=pn,pn.default=pn;var mn=fn;class bn{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};getBlockIndices=()=>{const e=this._dropArea.querySelectorAll(".parsons-block");return Array.from(e).map((e=>parseInt(e.dataset.index||"-1")))};_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{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._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:et.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:et.InputAction.REMOVE,position:[t,-1],answer:this._getTextArray()};this.parentElement.logEvent(n)}};_initSortable=()=>{this.reusable?(this._dragSortable=new Pe(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 Pe(this._dropArea,{group:"shared",direction:"horizontal",animation:150,draggable:".parsons-block",onAdd:e=>{const t={type:"input",action:et.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=et.InputAction.MOVE;const r=this._dropArea.getBoundingClientRect().top,o=this._dropArea.getBoundingClientRect().bottom;if(e.originalEvent.clientY>o||e.originalEvent.clientY{const t={type:"input",action:et.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?et.InputAction.REMOVE:et.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{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;nTn(e,t,n-1)))}mn.registerLanguage("javascript",(function(e){const t=e.regex,n=vn,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="",k={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},k,{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:/\$[(.]/}]}})),mn.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}]}})),mn.registerLanguage("java",(function(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+Tn("(?:<"+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,Cn,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Cn,i]}})),mn.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:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[o,s,a,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[o,i,s,a]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[s]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\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}]}]}})),mn.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 Dn extends HTMLElement{root;_parsonsData;parsonsExplanation;hparsonsInput;inputType;static toolCount=0;toolNumber;temporaryInputEvent;language;hljsLanguage;codeBefore;codeAfter;constructor(){super(),Dn.toolCount+=1,this.toolNumber=Dn.toolCount,this.root=this;const e=!!this.getAttribute("reuse"),t=!!this.getAttribute("randomize");this.hparsonsInput=new bn(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 bn(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()}getBlockIndices(){return this.hparsonsInput.getBlockIndices()}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),mn.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),mn.highlightElement(t))}}}const Mn=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=``;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",Dn)}}]); //# sourceMappingURL=207.f37c7cddd9242233.js.map