From 40ef6408a7605b5ab163aa7ecc28d76b062af61c Mon Sep 17 00:00:00 2001 From: Giuseppe Criscione <18699708+giuscris@users.noreply.github.com> Date: Tue, 26 Dec 2023 12:15:51 +0100 Subject: [PATCH] Use Map instead of Object --- panel/assets/js/app.min.js | 2 +- panel/src/js/components/icons.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/panel/assets/js/app.min.js b/panel/assets/js/app.min.js index dd4549d9..25d76d49 100644 --- a/panel/assets/js/app.min.js +++ b/panel/assets/js/app.min.js @@ -23,7 +23,7 @@ b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e. z-index: 1000; background: `+(g?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var C;b&&(C=i.ownerDocument.defaultView.scrollY),n.input.focus(),b&&i.ownerDocument.defaultView.scrollTo(null,C),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=D,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function T(){if(i.selectionStart!=null){var W=r.somethingSelected(),U="\u200B"+(W?i.value:"");i.value="\u21DA",i.value=U,t.prevInput=W?"":"\u200B",i.selectionStart=1,i.selectionEnd=U.length,n.selForContextMenu=r.doc.sel}}function D(){if(t.contextMenuPending==D&&(t.contextMenuPending=!1,t.wrapper.style.cssText=m,i.style.cssText=h,g&&v<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=f),i.selectionStart!=null)){(!g||g&&v<9)&&T();var W=0,U=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?tt(r,bu)(r):W++<10?n.detectingSelectAll=setTimeout(U,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(U,200)}}if(g&&v>=9&&T(),$){Fr(e);var F=function(){Ce(window,"mouseup",F),setTimeout(D,20)};ue(window,"mouseup",F)}else setTimeout(D,50)},Ye.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ye.prototype.setUneditable=function(){},Ye.prototype.needsContentAttribute=!1;function mh(e,t){if(t=t?st(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=be(we(e));t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=d.getValue()}var i;if(e.form&&(ue(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var l=e.form;i=l.submit;try{var f=l.submit=function(){n(),l.submit=i,l.submit(),l.submit=f}}catch(h){}}t.finishInit=function(h){h.save=n,h.getTextArea=function(){return e},h.toTextArea=function(){h.toTextArea=isNaN,n(),e.parentNode.removeChild(h.getWrapperElement()),e.style.display="",e.form&&(Ce(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var d=Fe(function(h){return e.parentNode.insertBefore(h,e.nextSibling)},t);return d}function vh(e){e.off=Ce,e.on=ue,e.wheelEventPixels=kd,e.Doc=xt,e.splitLines=ca,e.countColumn=Ue,e.findColumn=Ot,e.isWordChar=Or,e.Pass=ze,e.signal=Me,e.Line=Jn,e.changeEnd=xn,e.scrollbarModel=Qs,e.Pos=G,e.cmpPos=he,e.modes=ha,e.mimeModes=Qn,e.resolveMode=Di,e.getMode=pa,e.modeExtensions=Zn,e.extendMode=xc,e.copyState=An,e.startState=ns,e.innerMode=ga,e.commands=ii,e.keyMap=sn,e.keyName=Pu,e.isModifierKey=Fu,e.lookupKey=cr,e.normalizeKeyMap=jd,e.StringStream=je,e.SharedTextMarker=ti,e.TextMarker=wn,e.LineWidget=ei,e.e_preventDefault=vt,e.e_stopPropagation=es,e.e_stop=Fr,e.addClass=Oe,e.contains=ne,e.rmClass=oe,e.keyNames=Sn}sh(Fe),dh(Fe);var yh="iter insert remove copy getEditor constructor".split(" ");for(var oo in xt.prototype)xt.prototype.hasOwnProperty(oo)&&Ne(yh,oo)<0&&(Fe.prototype[oo]=function(e){return function(){return e.apply(this.doc,arguments)}}(xt.prototype[oo]));return $n(xt),Fe.inputStyles={textarea:Ye,contenteditable:Te},Fe.defineMode=function(e){!Fe.defaults.mode&&e!="null"&&(Fe.defaults.mode=e),vc.apply(this,arguments)},Fe.defineMIME=yc,Fe.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Fe.defineMIME("text/plain","null"),Fe.defineExtension=function(e,t){Fe.prototype[e]=t},Fe.defineDocExtension=function(e,t){xt.prototype[e]=t},Fe.fromTextArea=mh,vh(Fe),Fe.version="5.65.16",Fe})});var Bf=vr((Hf,Pf)=>{(function(u){typeof Hf=="object"&&typeof Pf=="object"?u(jn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],u):u(CodeMirror)})(function(u){"use strict";var o={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},a={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};u.defineMode("xml",function(s,c){var p=s.indentUnit,g={},v=c.htmlMode?o:a;for(var b in v)g[b]=v[b];for(var b in c)g[b]=c[b];var S,L;function A(w,R){function _(Oe){return R.tokenize=Oe,Oe(w,R)}var ne=w.next();if(ne=="<")return w.eat("!")?w.eat("[")?w.match("CDATA[")?_(E("atom","]]>")):null:w.match("--")?_(E("comment","-->")):w.match("DOCTYPE",!0,!0)?(w.eatWhile(/[\w\._\-]/),_(z(1))):null:w.eat("?")?(w.eatWhile(/[\w\._\-]/),R.tokenize=E("meta","?>"),"meta"):(S=w.eat("/")?"closeTag":"openTag",R.tokenize=M,"tag bracket");if(ne=="&"){var be;return w.eat("#")?w.eat("x")?be=w.eatWhile(/[a-fA-F\d]/)&&w.eat(";"):be=w.eatWhile(/[\d]/)&&w.eat(";"):be=w.eatWhile(/[\w\.\-:]/)&&w.eat(";"),be?"atom":"error"}else return w.eatWhile(/[^&<]/),null}A.isInText=!0;function M(w,R){var _=w.next();if(_==">"||_=="/"&&w.eat(">"))return R.tokenize=A,S=_==">"?"endTag":"selfcloseTag","tag bracket";if(_=="=")return S="equals",null;if(_=="<"){R.tokenize=A,R.state=Y,R.tagName=R.tagStart=null;var ne=R.tokenize(w,R);return ne?ne+" tag error":"tag error"}else return/[\'\"]/.test(_)?(R.tokenize=I(_),R.stringStartCol=w.column(),R.tokenize(w,R)):(w.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function I(w){var R=function(_,ne){for(;!_.eol();)if(_.next()==w){ne.tokenize=M;break}return"string"};return R.isInAttribute=!0,R}function E(w,R){return function(_,ne){for(;!_.eol();){if(_.match(R)){ne.tokenize=A;break}_.next()}return w}}function z(w){return function(R,_){for(var ne;(ne=R.next())!=null;){if(ne=="<")return _.tokenize=z(w+1),_.tokenize(R,_);if(ne==">")if(w==1){_.tokenize=A;break}else return _.tokenize=z(w-1),_.tokenize(R,_)}return"meta"}}function q(w){return w&&w.toLowerCase()}function J(w,R,_){this.prev=w.context,this.tagName=R||"",this.indent=w.indented,this.startOfLine=_,(g.doNotIndent.hasOwnProperty(R)||w.context&&w.context.noIndent)&&(this.noIndent=!0)}function V(w){w.context&&(w.context=w.context.prev)}function N(w,R){for(var _;;){if(!w.context||(_=w.context.tagName,!g.contextGrabbers.hasOwnProperty(q(_))||!g.contextGrabbers[q(_)].hasOwnProperty(q(R))))return;V(w)}}function Y(w,R,_){return w=="openTag"?(_.tagStart=R.column(),re):w=="closeTag"?P:Y}function re(w,R,_){return w=="word"?(_.tagName=R.current(),L="tag",B):g.allowMissingTagName&&w=="endTag"?(L="tag bracket",B(w,R,_)):(L="error",re)}function P(w,R,_){if(w=="word"){var ne=R.current();return _.context&&_.context.tagName!=ne&&g.implicitlyClosed.hasOwnProperty(q(_.context.tagName))&&V(_),_.context&&_.context.tagName==ne||g.matchClosing===!1?(L="tag",H):(L="tag error",$)}else return g.allowMissingTagName&&w=="endTag"?(L="tag bracket",H(w,R,_)):(L="error",$)}function H(w,R,_){return w!="endTag"?(L="error",H):(V(_),Y)}function $(w,R,_){return L="error",H(w,R,_)}function B(w,R,_){if(w=="word")return L="attribute",oe;if(w=="endTag"||w=="selfcloseTag"){var ne=_.tagName,be=_.tagStart;return _.tagName=_.tagStart=null,w=="selfcloseTag"||g.autoSelfClosers.hasOwnProperty(q(ne))?N(_,ne):(N(_,ne),_.context=new J(_,ne,be==_.indented)),Y}return L="error",B}function oe(w,R,_){return w=="equals"?de:(g.allowMissing||(L="error"),B(w,R,_))}function de(w,R,_){return w=="string"?j:w=="word"&&g.allowUnquoted?(L="string",B):(L="error",B(w,R,_))}function j(w,R,_){return w=="string"?j:B(w,R,_)}return{startState:function(w){var R={tokenize:A,state:Y,indented:w||0,tagName:null,tagStart:null,context:null};return w!=null&&(R.baseIndent=w),R},token:function(w,R){if(!R.tagName&&w.sol()&&(R.indented=w.indentation()),w.eatSpace())return null;S=null;var _=R.tokenize(w,R);return(_||S)&&_!="comment"&&(L=null,R.state=R.state(S||_,w,R),L&&(_=L=="error"?_+" error":L)),_},indent:function(w,R,_){var ne=w.context;if(w.tokenize.isInAttribute)return w.tagStart==w.indented?w.stringStartCol+1:w.indented+p;if(ne&&ne.noIndent)return u.Pass;if(w.tokenize!=M&&w.tokenize!=A)return _?_.match(/^(\s*)/)[0].length:0;if(w.tagName)return g.multilineTagIndentPastTag!==!1?w.tagStart+w.tagName.length+2:w.tagStart+p*(g.multilineTagIndentFactor||1);if(g.alignCDATA&&/$/,blockCommentStart:"",configuration:g.htmlMode?"html":"xml",helperType:g.htmlMode?"html":"xml",skipAttribute:function(w){w.state==de&&(w.state=B)},xmlCurrentTag:function(w){return w.tagName?{name:w.tagName,close:w.type=="closeTag"}:null},xmlCurrentContext:function(w){for(var R=[],_=w.context;_;_=_.prev)R.push(_.tagName);return R.reverse()}}}),u.defineMIME("text/xml","xml"),u.defineMIME("application/xml","xml"),u.mimeModes.hasOwnProperty("text/html")||u.defineMIME("text/html",{name:"xml",htmlMode:!0})})});var zf=vr((Wf,Rf)=>{(function(u){typeof Wf=="object"&&typeof Rf=="object"?u(jn()):typeof define=="function"&&define.amd?define(["../lib/codemirror"],u):u(CodeMirror)})(function(u){"use strict";u.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var o=0;o-1&&s.substring(g+1,s.length);if(v)return u.findModeByExtension(v)},u.findModeByName=function(s){s=s.toLowerCase();for(var c=0;c{(function(u){typeof _f=="object"&&typeof Gf=="object"?u(jn(),Bf(),zf()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],u):u(CodeMirror)})(function(u){"use strict";u.defineMode("markdown",function(o,a){var s=u.getMode(o,"text/html"),c=s.name=="null";function p(k){if(u.findModeByName){var y=u.findModeByName(k);y&&(k=y.mime||y.mimes[0])}var ie=u.getMode(o,k);return ie.name=="null"?null:ie}a.highlightFormatting===void 0&&(a.highlightFormatting=!1),a.maxBlockquoteDepth===void 0&&(a.maxBlockquoteDepth=0),a.taskLists===void 0&&(a.taskLists=!1),a.strikethrough===void 0&&(a.strikethrough=!1),a.emoji===void 0&&(a.emoji=!1),a.fencedCodeBlockHighlighting===void 0&&(a.fencedCodeBlockHighlighting=!0),a.fencedCodeBlockDefaultMode===void 0&&(a.fencedCodeBlockDefaultMode="text/plain"),a.xml===void 0&&(a.xml=!0),a.tokenTypeOverrides===void 0&&(a.tokenTypeOverrides={});var g={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var v in g)g.hasOwnProperty(v)&&a.tokenTypeOverrides[v]&&(g[v]=a.tokenTypeOverrides[v]);var b=/^([*\-_])(?:\s*\1){2,}\s*$/,S=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,L=/^\[(x| )\](?=\s)/i,A=a.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,M=/^ {0,3}(?:\={1,}|-{2,})\s*$/,I=/^[^#!\[\]*_\\<>` "'(~:]+/,E=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,z=/^\s*\[[^\]]+?\]:.*$/,q=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,J=" ";function V(k,y,ie){return y.f=y.inline=ie,ie(k,y)}function N(k,y,ie){return y.f=y.block=ie,ie(k,y)}function Y(k){return!k||!/\S/.test(k.string)}function re(k){if(k.linkTitle=!1,k.linkHref=!1,k.linkText=!1,k.em=!1,k.strong=!1,k.strikethrough=!1,k.quote=0,k.indentedCode=!1,k.f==H){var y=c;if(!y){var ie=u.innerMode(s,k.htmlState);y=ie.mode.name=="xml"&&ie.state.tagStart===null&&!ie.state.context&&ie.state.tokenize.isInText}y&&(k.f=de,k.block=P,k.htmlState=null)}return k.trailingSpace=0,k.trailingSpaceNewLine=!1,k.prevLine=k.thisLine,k.thisLine={stream:null},null}function P(k,y){var ie=k.column()===y.indentation,we=Y(y.prevLine.stream),ge=y.indentedCode,Je=y.prevLine.hr,st=y.list!==!1,Ue=(y.listStack[y.listStack.length-1]||0)+3;y.indentedCode=!1;var Ve=y.indentation;if(y.indentationDiff===null&&(y.indentationDiff=y.indentation,st)){for(y.list=null;Ve=4&&(ge||y.prevLine.fencedCodeEnd||y.prevLine.header||we))return k.skipToEnd(),y.indentedCode=!0,g.code;if(k.eatSpace())return null;if(ie&&y.indentation<=Ue&&(ze=k.match(A))&&ze[1].length<=6)return y.quote=0,y.header=ze[1].length,y.thisLine.header=!0,a.highlightFormatting&&(y.formatting="header"),y.f=y.inline,B(y);if(y.indentation<=Ue&&k.eat(">"))return y.quote=ie?1:y.quote+1,a.highlightFormatting&&(y.formatting="quote"),k.eatSpace(),B(y);if(!Ie&&!y.setext&&ie&&y.indentation<=Ue&&(ze=k.match(S))){var at=ze[1]?"ol":"ul";return y.indentation=Ve+k.current().length,y.list=!0,y.quote=0,y.listStack.push(y.indentation),y.em=!1,y.strong=!1,y.code=!1,y.strikethrough=!1,a.taskLists&&k.match(L,!1)&&(y.taskList=!0),y.f=y.inline,a.highlightFormatting&&(y.formatting=["list","list-"+at]),B(y)}else{if(ie&&y.indentation<=Ue&&(ze=k.match(E,!0)))return y.quote=0,y.fencedEndRE=new RegExp(ze[1]+"+ *$"),y.localMode=a.fencedCodeBlockHighlighting&&p(ze[2]||a.fencedCodeBlockDefaultMode),y.localMode&&(y.localState=u.startState(y.localMode)),y.f=y.block=$,a.highlightFormatting&&(y.formatting="code-block"),y.code=-1,B(y);if(y.setext||(!Ne||!st)&&!y.quote&&y.list===!1&&!y.code&&!Ie&&!z.test(k.string)&&(ze=k.lookAhead(1))&&(ze=ze.match(M)))return y.setext?(y.header=y.setext,y.setext=0,k.skipToEnd(),a.highlightFormatting&&(y.formatting="header")):(y.header=ze[0].charAt(0)=="="?1:2,y.setext=y.header),y.thisLine.header=!0,y.f=y.inline,B(y);if(Ie)return k.skipToEnd(),y.hr=!0,y.thisLine.hr=!0,g.hr;if(k.peek()==="[")return V(k,y,ne)}return V(k,y,y.inline)}function H(k,y){var ie=s.token(k,y.htmlState);if(!c){var we=u.innerMode(s,y.htmlState);(we.mode.name=="xml"&&we.state.tagStart===null&&!we.state.context&&we.state.tokenize.isInText||y.md_inside&&k.current().indexOf(">")>-1)&&(y.f=de,y.block=P,y.htmlState=null)}return ie}function $(k,y){var ie=y.listStack[y.listStack.length-1]||0,we=y.indentation=k.quote?y.push(g.formatting+"-"+k.formatting[ie]+"-"+k.quote):y.push("error"))}if(k.taskOpen)return y.push("meta"),y.length?y.join(" "):null;if(k.taskClosed)return y.push("property"),y.length?y.join(" "):null;if(k.linkHref?y.push(g.linkHref,"url"):(k.strong&&y.push(g.strong),k.em&&y.push(g.em),k.strikethrough&&y.push(g.strikethrough),k.emoji&&y.push(g.emoji),k.linkText&&y.push(g.linkText),k.code&&y.push(g.code),k.image&&y.push(g.image),k.imageAltText&&y.push(g.imageAltText,"link"),k.imageMarker&&y.push(g.imageMarker)),k.header&&y.push(g.header,g.header+"-"+k.header),k.quote&&(y.push(g.quote),!a.maxBlockquoteDepth||a.maxBlockquoteDepth>=k.quote?y.push(g.quote+"-"+k.quote):y.push(g.quote+"-"+a.maxBlockquoteDepth)),k.list!==!1){var we=(k.listStack.length-1)%3;we?we===1?y.push(g.list2):y.push(g.list3):y.push(g.list1)}return k.trailingSpaceNewLine?y.push("trailing-space-new-line"):k.trailingSpace&&y.push("trailing-space-"+(k.trailingSpace%2?"a":"b")),y.length?y.join(" "):null}function oe(k,y){if(k.match(I,!0))return B(y)}function de(k,y){var ie=y.text(k,y);if(typeof ie!="undefined")return ie;if(y.list)return y.list=null,B(y);if(y.taskList){var we=k.match(L,!0)[1]===" ";return we?y.taskOpen=!0:y.taskClosed=!0,a.highlightFormatting&&(y.formatting="task"),y.taskList=!1,B(y)}if(y.taskOpen=!1,y.taskClosed=!1,y.header&&k.match(/^#+$/,!0))return a.highlightFormatting&&(y.formatting="header"),B(y);var ge=k.next();if(y.linkTitle){y.linkTitle=!1;var Je=ge;ge==="("&&(Je=")"),Je=(Je+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var st="^\\s*(?:[^"+Je+"\\\\]+|\\\\\\\\|\\\\.)"+Je;if(k.match(new RegExp(st),!0))return g.linkHref}if(ge==="`"){var Ue=y.formatting;a.highlightFormatting&&(y.formatting="code"),k.eatWhile("`");var Ve=k.current().length;if(y.code==0&&(!y.quote||Ve==1))return y.code=Ve,B(y);if(Ve==y.code){var Ne=B(y);return y.code=0,Ne}else return y.formatting=Ue,B(y)}else if(y.code)return B(y);if(ge==="\\"&&(k.next(),a.highlightFormatting)){var Ie=B(y),ze=g.formatting+"-escape";return Ie?Ie+" "+ze:ze}if(ge==="!"&&k.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return y.imageMarker=!0,y.image=!0,a.highlightFormatting&&(y.formatting="image"),B(y);if(ge==="["&&y.imageMarker&&k.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return y.imageMarker=!1,y.imageAltText=!0,a.highlightFormatting&&(y.formatting="image"),B(y);if(ge==="]"&&y.imageAltText){a.highlightFormatting&&(y.formatting="image");var Ie=B(y);return y.imageAltText=!1,y.image=!1,y.inline=y.f=w,Ie}if(ge==="["&&!y.image)return y.linkText&&k.match(/^.*?\]/)||(y.linkText=!0,a.highlightFormatting&&(y.formatting="link")),B(y);if(ge==="]"&&y.linkText){a.highlightFormatting&&(y.formatting="link");var Ie=B(y);return y.linkText=!1,y.inline=y.f=k.match(/\(.*?\)| ?\[.*?\]/,!1)?w:de,Ie}if(ge==="<"&&k.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){y.f=y.inline=j,a.highlightFormatting&&(y.formatting="link");var Ie=B(y);return Ie?Ie+=" ":Ie="",Ie+g.linkInline}if(ge==="<"&&k.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){y.f=y.inline=j,a.highlightFormatting&&(y.formatting="link");var Ie=B(y);return Ie?Ie+=" ":Ie="",Ie+g.linkEmail}if(a.xml&&ge==="<"&&k.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var at=k.string.indexOf(">",k.pos);if(at!=-1){var hn=k.string.substring(k.start,at);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(hn)&&(y.md_inside=!0)}return k.backUp(1),y.htmlState=u.startState(s),N(k,y,H)}if(a.xml&&ge==="<"&&k.match(/^\/\w*?>/))return y.md_inside=!1,"tag";if(ge==="*"||ge==="_"){for(var Nt=1,Ot=k.pos==1?" ":k.string.charAt(k.pos-2);Nt<3&&k.eat(ge);)Nt++;var Et=k.peek()||" ",Rt=!/\s/.test(Et)&&(!q.test(Et)||/\s/.test(Ot)||q.test(Ot)),ye=!/\s/.test(Ot)&&(!q.test(Ot)||/\s/.test(Et)||q.test(Et)),Lt=null,zt=null;if(Nt%2&&(!y.em&&Rt&&(ge==="*"||!ye||q.test(Ot))?Lt=!0:y.em==ge&&ye&&(ge==="*"||!Rt||q.test(Et))&&(Lt=!1)),Nt>1&&(!y.strong&&Rt&&(ge==="*"||!ye||q.test(Ot))?zt=!0:y.strong==ge&&ye&&(ge==="*"||!Rt||q.test(Et))&&(zt=!1)),zt!=null||Lt!=null){a.highlightFormatting&&(y.formatting=Lt==null?"strong":zt==null?"em":"strong em"),Lt===!0&&(y.em=ge),zt===!0&&(y.strong=ge);var Ne=B(y);return Lt===!1&&(y.em=!1),zt===!1&&(y.strong=!1),Ne}}else if(ge===" "&&(k.eat("*")||k.eat("_"))){if(k.peek()===" ")return B(y);k.backUp(1)}if(a.strikethrough){if(ge==="~"&&k.eatWhile(ge)){if(y.strikethrough){a.highlightFormatting&&(y.formatting="strikethrough");var Ne=B(y);return y.strikethrough=!1,Ne}else if(k.match(/^[^\s]/,!1))return y.strikethrough=!0,a.highlightFormatting&&(y.formatting="strikethrough"),B(y)}else if(ge===" "&&k.match("~~",!0)){if(k.peek()===" ")return B(y);k.backUp(2)}}if(a.emoji&&ge===":"&&k.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){y.emoji=!0,a.highlightFormatting&&(y.formatting="emoji");var Tn=B(y);return y.emoji=!1,Tn}return ge===" "&&(k.match(/^ +$/,!1)?y.trailingSpace++:y.trailingSpace&&(y.trailingSpaceNewLine=!0)),B(y)}function j(k,y){var ie=k.next();if(ie===">"){y.f=y.inline=de,a.highlightFormatting&&(y.formatting="link");var we=B(y);return we?we+=" ":we="",we+g.linkInline}return k.match(/^[^>]+/,!0),g.linkInline}function w(k,y){if(k.eatSpace())return null;var ie=k.next();return ie==="("||ie==="["?(y.f=y.inline=_(ie==="("?")":"]"),a.highlightFormatting&&(y.formatting="link-string"),y.linkHref=!0,B(y)):"error"}var R={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function _(k){return function(y,ie){var we=y.next();if(we===k){ie.f=ie.inline=de,a.highlightFormatting&&(ie.formatting="link-string");var ge=B(ie);return ie.linkHref=!1,ge}return y.match(R[k]),ie.linkHref=!0,B(ie)}}function ne(k,y){return k.match(/^([^\]\\]|\\.)*\]:/,!1)?(y.f=be,k.next(),a.highlightFormatting&&(y.formatting="link"),y.linkText=!0,B(y)):V(k,y,de)}function be(k,y){if(k.match("]:",!0)){y.f=y.inline=Oe,a.highlightFormatting&&(y.formatting="link");var ie=B(y);return y.linkText=!1,ie}return k.match(/^([^\]\\]|\\.)+/,!0),g.linkText}function Oe(k,y){return k.eatSpace()?null:(k.match(/^[^\s]+/,!0),k.peek()===void 0?y.linkTitle=!0:k.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),y.f=y.inline=de,g.linkHref+" url")}var gt={startState:function(){return{f:P,prevLine:{stream:null},thisLine:{stream:null},block:P,htmlState:null,indentation:0,inline:de,text:oe,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(k){return{f:k.f,prevLine:k.prevLine,thisLine:k.thisLine,block:k.block,htmlState:k.htmlState&&u.copyState(s,k.htmlState),indentation:k.indentation,localMode:k.localMode,localState:k.localMode?u.copyState(k.localMode,k.localState):null,inline:k.inline,text:k.text,formatting:!1,linkText:k.linkText,linkTitle:k.linkTitle,linkHref:k.linkHref,code:k.code,em:k.em,strong:k.strong,strikethrough:k.strikethrough,emoji:k.emoji,header:k.header,setext:k.setext,hr:k.hr,taskList:k.taskList,list:k.list,listStack:k.listStack.slice(0),quote:k.quote,indentedCode:k.indentedCode,trailingSpace:k.trailingSpace,trailingSpaceNewLine:k.trailingSpaceNewLine,md_inside:k.md_inside,fencedEndRE:k.fencedEndRE}},token:function(k,y){if(y.formatting=!1,k!=y.thisLine.stream){if(y.header=0,y.hr=!1,k.match(/^\s*$/,!0))return re(y),null;if(y.prevLine=y.thisLine,y.thisLine={stream:k},y.taskList=!1,y.trailingSpace=0,y.trailingSpaceNewLine=!1,!y.localState&&(y.f=y.block,y.f!=H)){var ie=k.match(/^\s*/,!0)[0].replace(/\t/g,J).length;if(y.indentation=ie,y.indentationDiff=null,ie>0)return null}}return y.f(k,y)},innerMode:function(k){return k.block==H?{state:k.htmlState,mode:s}:k.localState?{state:k.localState,mode:k.localMode}:{state:k,mode:gt}},indent:function(k,y,ie){return k.block==H&&s.indent?s.indent(k.htmlState,y,ie):k.localState&&k.localMode.indent?k.localMode.indent(k.localState,y,ie):u.Pass},blankLine:re,getType:B,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return gt},"xml"),u.defineMIME("text/markdown","markdown"),u.defineMIME("text/x-markdown","markdown")})});var jf=vr((Yf,qf)=>{(function(u){typeof Yf=="object"&&typeof qf=="object"?u(jn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],u):u(CodeMirror)})(function(u){u.defineOption("placeholder","",function(v,b,S){var L=S&&S!=u.Init;if(b&&!L)v.on("blur",c),v.on("change",p),v.on("swapDoc",p),u.on(v.getInputField(),"compositionupdate",v.state.placeholderCompose=function(){s(v)}),p(v);else if(!b&&L){v.off("blur",c),v.off("change",p),v.off("swapDoc",p),u.off(v.getInputField(),"compositionupdate",v.state.placeholderCompose),o(v);var A=v.getWrapperElement();A.className=A.className.replace(" CodeMirror-empty","")}b&&!v.hasFocus()&&c(v)});function o(v){v.state.placeholder&&(v.state.placeholder.parentNode.removeChild(v.state.placeholder),v.state.placeholder=null)}function a(v){o(v);var b=v.state.placeholder=document.createElement("pre");b.style.cssText="height: 0; overflow: visible",b.style.direction=v.getOption("direction"),b.className="CodeMirror-placeholder CodeMirror-line-like";var S=v.getOption("placeholder");typeof S=="string"&&(S=document.createTextNode(S)),b.appendChild(S),v.display.lineSpace.insertBefore(b,v.display.lineSpace.firstChild)}function s(v){setTimeout(function(){var b=!1;if(v.lineCount()==1){var S=v.getInputField();b=S.nodeName=="TEXTAREA"?!v.getLine(0).length:!/[^\u200b]/.test(S.querySelector(".CodeMirror-line").textContent)}b?a(v):o(v)},20)}function c(v){g(v)&&a(v)}function p(v){var b=v.getWrapperElement(),S=g(v);b.className=b.className.replace(" CodeMirror-empty","")+(S?" CodeMirror-empty":""),S?a(v):o(v)}function g(v){return v.lineCount()===1&&v.getLine(0)===""}})});var $f=vr((Xf,Kf)=>{(function(u){typeof Xf=="object"&&typeof Kf=="object"?u(jn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],u):u(CodeMirror)})(function(u){"use strict";var o=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,a=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,s=/[*+-]\s/;u.commands.newlineAndIndentContinueMarkdownList=function(p){if(p.getOption("disableInput"))return u.Pass;for(var g=p.listSelections(),v=[],b=0;b\s*$/.test(E),V=!/>\s*$/.test(E);(J||V)&&p.replaceRange("",{line:S.line,ch:0},{line:S.line,ch:S.ch+1}),v[b]=` `}else{var N=z[1],Y=z[5],re=!(s.test(z[2])||z[2].indexOf(">")>=0),P=re?parseInt(z[3],10)+1+z[4]:z[2].replace("x"," ");v[b]=` -`+N+P+Y,re&&c(p,S)}}p.replaceSelections(v)};function c(p,g){var v=g.line,b=0,S=0,L=o.exec(p.getLine(v)),A=L[1];do{b+=1;var M=v+b,I=p.getLine(M),E=o.exec(I);if(E){var z=E[1],q=parseInt(L[3],10)+b-S,J=parseInt(E[3],10),V=J;if(A===z&&!isNaN(J))q===J&&(V=J+1),q>J&&(V=q+1),p.replaceRange(I.replace(o,z+V+E[4]+E[5]),{line:M,ch:0},{line:M,ch:I.length});else{if(A.length>z.length||A.lengthHe});function af(){let u=[],o=document.cookie.split(";");for(let a of o){let s=a.split("=",2);s.length===2&&(u[s[0].trim()]=decodeURIComponent(s[1].trim()))}return u}function lf(u,o,a){let s=`${u}=${o}`;for(let c in a)s+=`;${c}=${a[c]}`;document.cookie=s}var uo=class{constructor(){let o=()=>{let a=af(),s="formwork_preferred_color_scheme",c=s in a?a[s]:null,p=null;window.matchMedia("(prefers-color-scheme: light)").matches?p="light":window.matchMedia("(prefers-color-scheme: dark)").matches&&(p="dark"),p!==c&&lf(s,p,{"max-age":2592e3,path:He.config.baseUri,samesite:"strict"})};window.addEventListener("beforeunload",o),window.addEventListener("pagehide",o)}};function O(u,o=document){return o.querySelector(u)}function ee(u,o=document){return o.querySelectorAll(u)}function fo(u){let o=getComputedStyle(u);return u.offsetWidth+parseInt(o.marginLeft)+parseInt(o.marginRight)}function co(u){let o=getComputedStyle(u);return u.offsetHeight+parseInt(o.marginTop)+parseInt(o.marginBottom)}function yr(u,o,a){let s,c=null;function p(){let g=this,v=arguments;return c&&clearTimeout(c),a&&!c&&(s=u.apply(g,v)),c=setTimeout(()=>{a||(s=u.apply(g,v)),c=null},o),s}return p}function ho(u,o){let a,s=0,c=null;function p(){let g=Date.now();s===0&&(s=g);let v=s+o-g,b=this,S=arguments;return v<=0||v>o?(c&&(clearTimeout(c),c=null),s=g,a=u.apply(b,S)):c||(c=setTimeout(()=>{s=Date.now(),a=u.apply(b,S),c=null},v)),a}return p}var po=class{constructor(){O(".dropdown")&&document.addEventListener("click",o=>{ee(".dropdown-menu").forEach(s=>s.style.display="");let a=o.target.closest(".dropdown-button");if(a){let s=document.getElementById(a.dataset.dropdown),c=getComputedStyle(s).display!=="none";o.preventDefault();let p=ho(()=>sf(s),100);s&&!c?(s.style.display="block",sf(s),window.addEventListener("resize",p)):window.removeEventListener("resize",p)}})}};function sf(u){u.style.left=0,u.style.right="";let o=u.getBoundingClientRect(),a=o.top+window.scrollY,s=o.left+window.scrollX,c=fo(u),p=co(u),g=document.documentElement.clientWidth,v=document.documentElement.clientHeight;s+c>g&&(u.style.left="auto",u.style.right=0),(a{let a=O(".input-togglegroup",o),s=window.localStorage.getItem("formwork.filesListViewAs");s&&(ee("input",a).forEach(c=>c.checked=!1),O(`input[value=${s}]`,o).checked=!0,o.classList.toggle("is-thumbnails",s==="thumbnails")),ee("input",a).forEach(c=>{c.addEventListener("input",()=>{o.classList.toggle("is-thumbnails",c.value==="thumbnails"),window.localStorage.setItem("formwork.filesListViewAs",c.value)})})})}};"requestSubmit"in window.HTMLFormElement.prototype||(window.HTMLFormElement.prototype.requestSubmit=function(u){u?(u instanceof HTMLElement||o(TypeError,"parameter 1 is not of type 'HTMLElement'"),u.type!=="submit"&&o(TypeError,"The specified element is not a submit button"),u.form!==this&&o(DOMException,"The specified element is not owned by this form element","NotFoundError"),u.click()):(u=document.createElement("input"),u.type="submit",u.hidden=!0,this.appendChild(u),u.click(),this.removeChild(u));function o(a,s,c){throw new a(`Failed to execute 'requestSubmit' on 'HTMLFormElement': ${s}.`,c)}});function uf(u,o){var a=Object.keys(u);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(u);o&&(s=s.filter(function(c){return Object.getOwnPropertyDescriptor(u,c).enumerable})),a.push.apply(a,s)}return a}function en(u){for(var o=1;o=0)&&(a[c]=u[c]);return a}function Mh(u,o){if(u==null)return{};var a=Th(u,o),s,c;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(u);for(c=0;c=0)&&Object.prototype.propertyIsEnumerable.call(u,s)&&(a[s]=u[s])}return a}var Ah="1.15.1";function fn(u){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(u)}var dn=fn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),yi=fn(/Edge/i),ff=fn(/firefox/i),hi=fn(/safari/i)&&!fn(/chrome/i)&&!fn(/android/i),yf=fn(/iP(ad|od|hone)/i),xf=fn(/chrome/i)&&fn(/android/i),bf={capture:!1,passive:!1};function Le(u,o,a){u.addEventListener(o,a,!dn&&bf)}function ke(u,o,a){u.removeEventListener(o,a,!dn&&bf)}function Eo(u,o){if(o){if(o[0]===">"&&(o=o.substring(1)),u)try{if(u.matches)return u.matches(o);if(u.msMatchesSelector)return u.msMatchesSelector(o);if(u.webkitMatchesSelector)return u.webkitMatchesSelector(o)}catch(a){return!1}return!1}}function Nh(u){return u.host&&u!==document&&u.host.nodeType?u.host:u.parentNode}function Jt(u,o,a,s){if(u){a=a||document;do{if(o!=null&&(o[0]===">"?u.parentNode===a&&Eo(u,o):Eo(u,o))||s&&u===a)return u;if(u===a)break}while(u=Nh(u))}return null}var cf=/\s+/g;function Ft(u,o,a){if(u&&o)if(u.classList)u.classList[a?"add":"remove"](o);else{var s=(" "+u.className+" ").replace(cf," ").replace(" "+o+" "," ");u.className=(s+(a?" "+o:"")).replace(cf," ")}}function fe(u,o,a){var s=u&&u.style;if(s){if(a===void 0)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(u,""):u.currentStyle&&(a=u.currentStyle),o===void 0?a:a[o];!(o in s)&&o.indexOf("webkit")===-1&&(o="-webkit-"+o),s[o]=a+(typeof a=="string"?"":"px")}}function Cr(u,o){var a="";if(typeof u=="string")a=u;else do{var s=fe(u,"transform");s&&s!=="none"&&(a=s+" "+a)}while(!o&&(u=u.parentNode));var c=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return c&&new c(a)}function wf(u,o,a){if(u){var s=u.getElementsByTagName(o),c=0,p=s.length;if(a)for(;c=p:g=c<=p,!g)return s;if(s===Vt())break;s=Ln(s,!1)}return!1}function kr(u,o,a,s){for(var c=0,p=0,g=u.children;p2&&arguments[2]!==void 0?arguments[2]:{},c=s.evt,p=Mh(s,Rh);xi.pluginEvent.bind(ce)(o,a,en({dragEl:Q,parentEl:qe,ghostEl:ve,rootEl:Re,nextEl:qn,lastDownEl:wo,cloneEl:Ge,cloneHidden:En,dragStarted:fi,putSortable:ct,activeSortable:ce.active,originalEvent:c,oldIndex:Sr,oldDraggableIndex:gi,newIndex:Ht,newDraggableIndex:kn,hideGhostForTarget:Mf,unhideGhostForTarget:Af,cloneNowHidden:function(){En=!0},cloneNowShown:function(){En=!1},dispatchSortableEvent:function(v){Ct({sortable:a,name:v,originalEvent:c})}},p))};function Ct(u){Wh(en({putSortable:ct,cloneEl:Ge,targetEl:Q,rootEl:Re,oldIndex:Sr,oldDraggableIndex:gi,newIndex:Ht,newDraggableIndex:kn},u))}var Q,qe,ve,Re,qn,wo,Ge,En,Sr,Ht,gi,kn,mo,ct,wr=!1,Lo=!1,Do=[],Un,qt,yl,xl,pf,gf,fi,br,mi,vi=!1,vo=!1,So,pt,bl=[],El=!1,To=[],Ao=typeof document!="undefined",yo=yf,mf=yi||dn?"cssFloat":"float",zh=Ao&&!xf&&!yf&&"draggable"in document.createElement("div"),Lf=function(){if(Ao){if(dn)return!1;var u=document.createElement("x");return u.style.cssText="pointer-events:auto",u.style.pointerEvents==="auto"}}(),Df=function(o,a){var s=fe(o),c=parseInt(s.width)-parseInt(s.paddingLeft)-parseInt(s.paddingRight)-parseInt(s.borderLeftWidth)-parseInt(s.borderRightWidth),p=kr(o,0,a),g=kr(o,1,a),v=p&&fe(p),b=g&&fe(g),S=v&&parseInt(v.marginLeft)+parseInt(v.marginRight)+Ze(p).width,L=b&&parseInt(b.marginLeft)+parseInt(b.marginRight)+Ze(g).width;if(s.display==="flex")return s.flexDirection==="column"||s.flexDirection==="column-reverse"?"vertical":"horizontal";if(s.display==="grid")return s.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(p&&v.float&&v.float!=="none"){var A=v.float==="left"?"left":"right";return g&&(b.clear==="both"||b.clear===A)?"vertical":"horizontal"}return p&&(v.display==="block"||v.display==="flex"||v.display==="table"||v.display==="grid"||S>=c&&s[mf]==="none"||g&&s[mf]==="none"&&S+L>c)?"vertical":"horizontal"},_h=function(o,a,s){var c=s?o.left:o.top,p=s?o.right:o.bottom,g=s?o.width:o.height,v=s?a.left:a.top,b=s?a.right:a.bottom,S=s?a.width:a.height;return c===v||p===b||c+g/2===v+S/2},Gh=function(o,a){var s;return Do.some(function(c){var p=c[Pt].options.emptyInsertThreshold;if(!(!p||Ml(c))){var g=Ze(c),v=o>=g.left-p&&o<=g.right+p,b=a>=g.top-p&&a<=g.bottom+p;if(v&&b)return s=c}}),s},Tf=function(o){function a(p,g){return function(v,b,S,L){var A=v.options.group.name&&b.options.group.name&&v.options.group.name===b.options.group.name;if(p==null&&(g||A))return!0;if(p==null||p===!1)return!1;if(g&&p==="clone")return p;if(typeof p=="function")return a(p(v,b,S,L),g)(v,b,S,L);var M=(g?v:b).options.group.name;return p===!0||typeof p=="string"&&p===M||p.join&&p.indexOf(M)>-1}}var s={},c=o.group;(!c||bo(c)!="object")&&(c={name:c}),s.name=c.name,s.checkPull=a(c.pull,!0),s.checkPut=a(c.put),s.revertClone=c.revertClone,o.group=s},Mf=function(){!Lf&&ve&&fe(ve,"display","none")},Af=function(){!Lf&&ve&&fe(ve,"display","")};Ao&&!xf&&document.addEventListener("click",function(u){if(Lo)return u.preventDefault(),u.stopPropagation&&u.stopPropagation(),u.stopImmediatePropagation&&u.stopImmediatePropagation(),Lo=!1,!1},!0);var Yn=function(o){if(Q){o=o.touches?o.touches[0]:o;var a=Gh(o.clientX,o.clientY);if(a){var s={};for(var c in o)o.hasOwnProperty(c)&&(s[c]=o[c]);s.target=s.rootEl=a,s.preventDefault=void 0,s.stopPropagation=void 0,a[Pt]._onDragOver(s)}}},Uh=function(o){Q&&Q.parentNode[Pt]._isOutsideThisEl(o.target)};function ce(u,o){if(!(u&&u.nodeType&&u.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(u));this.el=u,this.options=o=cn({},o),u[Pt]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(u.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Df(u,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(g,v){g.setData("Text",v.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:ce.supportPointer!==!1&&"PointerEvent"in window&&!hi,emptyInsertThreshold:5};xi.initializePlugins(this,u,a);for(var s in a)!(s in o)&&(o[s]=a[s]);Tf(o);for(var c in this)c.charAt(0)==="_"&&typeof this[c]=="function"&&(this[c]=this[c].bind(this));this.nativeDraggable=o.forceFallback?!1:zh,this.nativeDraggable&&(this.options.touchStartThreshold=1),o.supportPointer?Le(u,"pointerdown",this._onTapStart):(Le(u,"mousedown",this._onTapStart),Le(u,"touchstart",this._onTapStart)),this.nativeDraggable&&(Le(u,"dragover",this),Le(u,"dragenter",this)),Do.push(this.el),o.store&&o.store.get&&this.sort(o.store.get(this)||[]),cn(this,Hh())}ce.prototype={constructor:ce,_isOutsideThisEl:function(o){!this.el.contains(o)&&o!==this.el&&(br=null)},_getDirection:function(o,a){return typeof this.options.direction=="function"?this.options.direction.call(this,o,a,Q):this.options.direction},_onTapStart:function(o){if(o.cancelable){var a=this,s=this.el,c=this.options,p=c.preventOnFilter,g=o.type,v=o.touches&&o.touches[0]||o.pointerType&&o.pointerType==="touch"&&o,b=(v||o).target,S=o.target.shadowRoot&&(o.path&&o.path[0]||o.composedPath&&o.composedPath()[0])||b,L=c.filter;if(Zh(s),!Q&&!(/mousedown|pointerdown/.test(g)&&o.button!==0||c.disabled)&&!S.isContentEditable&&!(!this.nativeDraggable&&hi&&b&&b.tagName.toUpperCase()==="SELECT")&&(b=Jt(b,c.draggable,s,!1),!(b&&b.animated)&&wo!==b)){if(Sr=Wt(b),gi=Wt(b,c.draggable),typeof L=="function"){if(L.call(this,o,b,this)){Ct({sortable:a,rootEl:S,name:"filter",targetEl:b,toEl:s,fromEl:s}),Mt("filter",a,{evt:o}),p&&o.cancelable&&o.preventDefault();return}}else if(L&&(L=L.split(",").some(function(A){if(A=Jt(S,A.trim(),s,!1),A)return Ct({sortable:a,rootEl:A,name:"filter",targetEl:b,fromEl:s,toEl:s}),Mt("filter",a,{evt:o}),!0}),L)){p&&o.cancelable&&o.preventDefault();return}c.handle&&!Jt(S,c.handle,s,!1)||this._prepareDragStart(o,v,b)}}},_prepareDragStart:function(o,a,s){var c=this,p=c.el,g=c.options,v=p.ownerDocument,b;if(s&&!Q&&s.parentNode===p){var S=Ze(s);if(Re=p,Q=s,qe=Q.parentNode,qn=Q.nextSibling,wo=s,mo=g.group,ce.dragged=Q,Un={target:Q,clientX:(a||o).clientX,clientY:(a||o).clientY},pf=Un.clientX-S.left,gf=Un.clientY-S.top,this._lastX=(a||o).clientX,this._lastY=(a||o).clientY,Q.style["will-change"]="all",b=function(){if(Mt("delayEnded",c,{evt:o}),ce.eventCanceled){c._onDrop();return}c._disableDelayedDragEvents(),!ff&&c.nativeDraggable&&(Q.draggable=!0),c._triggerDragStart(o,a),Ct({sortable:c,name:"choose",originalEvent:o}),Ft(Q,g.chosenClass,!0)},g.ignore.split(",").forEach(function(L){wf(Q,L.trim(),wl)}),Le(v,"dragover",Yn),Le(v,"mousemove",Yn),Le(v,"touchmove",Yn),Le(v,"mouseup",c._onDrop),Le(v,"touchend",c._onDrop),Le(v,"touchcancel",c._onDrop),ff&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Q.draggable=!0),Mt("delayStart",this,{evt:o}),g.delay&&(!g.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(yi||dn))){if(ce.eventCanceled){this._onDrop();return}Le(v,"mouseup",c._disableDelayedDrag),Le(v,"touchend",c._disableDelayedDrag),Le(v,"touchcancel",c._disableDelayedDrag),Le(v,"mousemove",c._delayedDragTouchMoveHandler),Le(v,"touchmove",c._delayedDragTouchMoveHandler),g.supportPointer&&Le(v,"pointermove",c._delayedDragTouchMoveHandler),c._dragStartTimer=setTimeout(b,g.delay)}else b()}},_delayedDragTouchMoveHandler:function(o){var a=o.touches?o.touches[0]:o;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Q&&wl(Q),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var o=this.el.ownerDocument;ke(o,"mouseup",this._disableDelayedDrag),ke(o,"touchend",this._disableDelayedDrag),ke(o,"touchcancel",this._disableDelayedDrag),ke(o,"mousemove",this._delayedDragTouchMoveHandler),ke(o,"touchmove",this._delayedDragTouchMoveHandler),ke(o,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(o,a){a=a||o.pointerType=="touch"&&o,!this.nativeDraggable||a?this.options.supportPointer?Le(document,"pointermove",this._onTouchMove):a?Le(document,"touchmove",this._onTouchMove):Le(document,"mousemove",this._onTouchMove):(Le(Q,"dragend",this),Le(Re,"dragstart",this._onDragStart));try{document.selection?Co(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(s){}},_dragStarted:function(o,a){if(wr=!1,Re&&Q){Mt("dragStarted",this,{evt:a}),this.nativeDraggable&&Le(document,"dragover",Uh);var s=this.options;!o&&Ft(Q,s.dragClass,!1),Ft(Q,s.ghostClass,!0),ce.active=this,o&&this._appendGhost(),Ct({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(qt){this._lastX=qt.clientX,this._lastY=qt.clientY,Mf();for(var o=document.elementFromPoint(qt.clientX,qt.clientY),a=o;o&&o.shadowRoot&&(o=o.shadowRoot.elementFromPoint(qt.clientX,qt.clientY),o!==a);)a=o;if(Q.parentNode[Pt]._isOutsideThisEl(o),a)do{if(a[Pt]){var s=void 0;if(s=a[Pt]._onDragOver({clientX:qt.clientX,clientY:qt.clientY,target:o,rootEl:a}),s&&!this.options.dragoverBubble)break}o=a}while(a=a.parentNode);Af()}},_onTouchMove:function(o){if(Un){var a=this.options,s=a.fallbackTolerance,c=a.fallbackOffset,p=o.touches?o.touches[0]:o,g=ve&&Cr(ve,!0),v=ve&&g&&g.a,b=ve&&g&&g.d,S=yo&&pt&&hf(pt),L=(p.clientX-Un.clientX+c.x)/(v||1)+(S?S[0]-bl[0]:0)/(v||1),A=(p.clientY-Un.clientY+c.y)/(b||1)+(S?S[1]-bl[1]:0)/(b||1);if(!ce.active&&!wr){if(s&&Math.max(Math.abs(p.clientX-this._lastX),Math.abs(p.clientY-this._lastY))=0&&(Ct({rootEl:qe,name:"add",toEl:qe,fromEl:Re,originalEvent:o}),Ct({sortable:this,name:"remove",toEl:qe,originalEvent:o}),Ct({rootEl:qe,name:"sort",toEl:qe,fromEl:Re,originalEvent:o}),Ct({sortable:this,name:"sort",toEl:qe,originalEvent:o})),ct&&ct.save()):Ht!==Sr&&Ht>=0&&(Ct({sortable:this,name:"update",toEl:qe,originalEvent:o}),Ct({sortable:this,name:"sort",toEl:qe,originalEvent:o})),ce.active&&((Ht==null||Ht===-1)&&(Ht=Sr,kn=gi),Ct({sortable:this,name:"end",toEl:qe,originalEvent:o}),this.save()))),this._nulling()},_nulling:function(){Mt("nulling",this),Re=Q=qe=ve=qn=Ge=wo=En=Un=qt=fi=Ht=kn=Sr=gi=br=mi=ct=mo=ce.dragged=ce.ghost=ce.clone=ce.active=null,To.forEach(function(o){o.checked=!0}),To.length=yl=xl=0},handleEvent:function(o){switch(o.type){case"drop":case"dragend":this._onDrop(o);break;case"dragenter":case"dragover":Q&&(this._onDragOver(o),Yh(o));break;case"selectstart":o.preventDefault();break}},toArray:function(){for(var o=[],a,s=this.el.children,c=0,p=s.length,g=this.options;cc.right+p||u.clientY>s.bottom&&u.clientX>s.left:u.clientY>c.bottom+p||u.clientX>s.right&&u.clientY>s.top}function Kh(u,o,a,s,c,p,g,v){var b=s?u.clientY:u.clientX,S=s?a.height:a.width,L=s?a.top:a.left,A=s?a.bottom:a.right,M=!1;if(!g){if(v&&SoL+S*p/2:bA-So)return-mi}else if(b>L+S*(1-c)/2&&bA-S*p/2)?b>L+S/2?1:-1:0}function $h(u){return Wt(Q)b(S)),Of.create(o,{handle:".sort-handle",forceFallback:!0});function c(S){let L=S.cloneNode(!0);g(L),b(L),S.nextSibling?S.parentNode.insertBefore(L,S.nextSibling):S.parentNode.appendChild(L)}function p(S){ee(".input-array-row",S.parentNode).length>1?S.parentNode.removeChild(S):g(S)}function g(S){if(a){let A=O(".input-array-key",S);A.value="",A.removeAttribute("value")}let L=O(".input-array-value",S);L.value="",L.removeAttribute("value"),L.name=`${s}[]`}function v(S){let L=O(".input-array-key",S),A=O(".input-array-value",S);A.name=`${s}[${L.value.trim()}]`}function b(S){let L=O(".input-array-add",S),A=O(".input-array-remove",S);if(L.addEventListener("click",c.bind(L,S)),A.addEventListener("click",p.bind(A,S)),a){let M=O(".input-array-key",S),I=O(".input-array-value",S);M.addEventListener("keyup",v.bind(M,S)),I.addEventListener("keyup",v.bind(I,S))}}}};var Ol={};function Il(u,o){if(u in Ol){o(Ol[u]);return}let a=new XMLHttpRequest;a.onload=function(){let s=this.status===200?this.response:"";s!==""&&(Ol[u]=s),o(s)},a.open("GET",`${He.config.baseUri}assets/icons/svg/${u}.svg`),a.send()}function At(u,o,a="afterBegin"){Il(u,s=>o.insertAdjacentHTML(a,s))}var Er={};function Lr(u,o,a,s){let c;function p(){clearTimeout(c)}u.addEventListener("mousedown",function(g){let v=this;g.button!==0?p():(o.call(v,g),c=setTimeout(()=>c=setInterval(o.bind(v,g),s),a))}),u.addEventListener("mouseout",p),window.addEventListener("mouseup",p)}var Oo=class{constructor(o,a){a=Object.assign({},{weekStarts:0,format:"YYYY-MM-DD",time:!1,labels:{today:"Today",weekdays:{long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},months:{long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}}},a),Er[o.id]=new Date;let c=new v(O(".calendar"),Er[o.id]);a.onChange=N=>{let Y=g();Y!==null&&(Er[Y.id]=N,Y.value=V(N))},p();function p(){let N=o.value;o.readOnly=!0,o.size=a.format.length,A(N)&&(Er[o.id]=new Date(N),o.value=V(Er[o.id])),o.addEventListener("focus",()=>{c.gotoDate(Er[o.id]),c.show()}),o.addEventListener("blur",()=>{c.hide()}),o.addEventListener("keydown",Y=>{switch(Y.key){case"Backspace":o.value="",o.blur();break;case"Escape":o.blur();break;case"Tab":o.blur();return}Y.preventDefault()})}function g(){let N=document.activeElement;return N.matches(".input-date")?N:null}function v(N,Y){let re,P,H,$,B,oe;N=N||oa(),de(Y);function de(xe){re=xe.getFullYear(),P=xe.getMonth(),H=xe.getDate(),$=xe.getHours(),B=xe.getMinutes(),oe=xe.getSeconds()}function j(xe){de(xe),Pe()}function w(){return new Date(re,P,H,$,B,oe)}function R(){return N}function _(){de(new Date)}function ne(){_(),Pe()}function be(){re--}function Oe(){be(),Pe()}function gt(){re++}function k(){gt(),Pe()}function y(){H=I(P,re)}function ie(){y(),Pe()}function we(){P=S(P-1,12),P===11&&be(),H>I(P,re)&&y()}function ge(){we(),Pe()}function Je(){P=S(P+1,12),P===0&>(),H>I(P,re)&&y()}function st(){Je(),Pe()}function Ue(){H-=7,H<1&&(we(),H+=I(P,re))}function Ve(){Ue(),Pe()}function Ne(){H+=7,H>I(P,re)&&(H-=I(P,re),Je())}function Ie(){Ne(),Pe()}function ze(){H--,H<1&&(we(),y())}function at(){ze(),Pe()}function hn(){H++,H>I(P,re)&&(Je(),H=1)}function Nt(){hn(),Pe()}function Ot(){$=S($+1,24),$===0&&hn()}function Et(){Ot(),Pe()}function Rt(){$=S($-1,24),$===23&&ze()}function ye(){Rt(),Pe()}function Lt(){B=S(B+1,60),B===0&&Ot()}function zt(){Lt(),Pe()}function Tn(){B=S(B-1,60),B===59&&Rt()}function Nr(){Tn(),Pe()}function ra(){oe=S(oe+1,60),oe===0&&Lt()}function Or(){ra(),Pe()}function Kn(){oe=S(oe-1,60),oe===59&&Tn()}function Li(){Kn(),Pe()}function ia(){N.style.display="block",b()}function Mn(){N.style.display="none"}function Ir(){return N.style.display!=="none"}function Pe(){O(".calendar-table",N).innerHTML=xe(),Se(),a.time&&aa();function xe(){let mt=new Date(re,P,1).getDay(),pn=S(mt-a.weekStarts,7),ue=I(P,re),nn=1,Ce="";Ce+='',Ce+=`${a.labels.months.long[P]} ${re}`,Ce+="",Ce+="";for(let Me=0;Me<7;Me++)Ce+='',Ce+=a.labels.weekdays.short[S(Me+a.weekStarts,7)],Ce+="";Ce+="";for(let Me=0;Me<6;Me++){for(let Be=0;Be<7;Be++)nn<=ue&&(Me>0||Be>=pn)?(nn===H?Ce+='':Ce+='',Ce+=nn++):nn===1?(Ce+='',Ce+=I(S(P-1,12),re)-pn+Be+1):(Ce+='',Ce+=nn++-ue),Ce+="";Ce+=""}return Ce+="",Ce}function Se(){ee(".calendar-day",N).forEach(mt=>{mt.addEventListener("mousedown",pn=>{pn.stopPropagation(),pn.preventDefault()}),mt.addEventListener("click",()=>{H=parseInt(mt.textContent),Pe(),a.onChange(w())})})}function aa(){O(".calendar-hours",N).innerHTML=L(J(a.format)?S($,12)||12:$,2),O(".calendar-minutes",N).innerHTML=L(B,2),O(".calendar-meridiem",N).innerHTML=J(a.format)?$<12?"AM":"PM":""}}function oa(){let xe=document.createElement("div");return xe.className="calendar",xe.innerHTML=`
`,a.time&&(xe.innerHTML+='
:
',At("chevron-down",O(".prevHour",xe)),At("chevron-up",O(".nextHour",xe)),At("chevron-down",O(".prevMinute",xe)),At("chevron-up",O(".nextMinute",xe))),At("calendar-clock",O(".currentMonth",xe)),At("chevron-left",O(".prevMonth",xe)),At("chevron-right",O(".nextMonth",xe)),O(".currentMonth",xe).addEventListener("mousedown",Se=>{ne(),a.onChange(w()),Se.preventDefault()}),Lr(O(".prevMonth",xe),Se=>{ge(),a.onChange(w()),Se.preventDefault()},750,500),Lr(O(".nextMonth",xe),Se=>{st(),a.onChange(w()),Se.preventDefault()},750,500),a.time&&(Lr(O(".nextHour",xe),Se=>{Et(),a.onChange(w()),Se.preventDefault()},750,250),Lr(O(".prevHour",xe),Se=>{ye(),a.onChange(w()),Se.preventDefault()},750,250),Lr(O(".nextMinute",xe),Se=>{zt(),a.onChange(w()),Se.preventDefault()},750,250),Lr(O(".prevMinute",xe),Se=>{Nr(),a.onChange(w()),Se.preventDefault()},750,250)),window.addEventListener("resize",ho(b,100)),window.addEventListener("mousedown",Se=>{xe.style.display!=="none"&&Se.target.closest(".calendar")&&Se.preventDefault()}),window.addEventListener("keydown",Se=>{if(Ir()){switch(Se.key){case"Enter":O(".calendar-day.selected",xe).click(),Mn();break;case"Backspace":case"Escape":case"Tab":Mn();break;case"ArrowLeft":Se.ctrlKey||Se.metaKey?Se.shiftKey?Oe():ge():at(),a.onChange(w());break;case"ArrowUp":Ve(),a.onChange(w());break;case"ArrowRight":Se.ctrlKey||Se.metaKey?Se.shiftKey?k():st():Nt(),a.onChange(w());break;case"ArrowDown":Ie(),a.onChange(w());break;case"0":(Se.ctrlKey||Se.metaKey)&&ne(),a.onChange(w());break;default:return}Se.preventDefault()}}),document.body.appendChild(xe),xe}return{setDate:de,gotoDate:j,getDate:w,getElement:R,now:ne,prevYear:Oe,nextYear:k,lastDayOfMonth:ie,prevMonth:ge,nextMonth:st,prevWeek:Ve,nextWeek:Ie,prevDay:at,nextDay:Nt,nextHour:Et,prevHour:ye,nextMinute:zt,prevMinute:Nr,nextSecond:Or,prevSecond:Li,show:ia,hide:Mn,isVisible:Ir}}function b(){let N=g();if(!N||!c.isVisible())return;let Y=N.getBoundingClientRect(),re=Y.top+window.scrollY,P=Y.left+window.scrollX,H=c.getElement();H.style.top=`${re+N.offsetHeight}px`,H.style.left=`${P+N.offsetLeft}px`;let $=H.getBoundingClientRect(),B=$.top+window.scrollY,oe=$.left+window.scrollX,de=fo(H),j=co(H),w=document.documentElement.clientWidth,R=document.documentElement.clientHeight;oe+de>w&&(H.style.left=`${w-de}px`),(B=P.getTime()?Y+1:N.getTime()>=re.getTime()?Y:Y-1}function q(N){let Y=Y(N),re=P(new Date(Y,0,4),1),P=P(N,1);return Math.round((P.getTime()-re.getTime())/6048e5)+1}function J(N){let Y=N.match(/\[([^\]]*)\]|H{1,2}/);return Y!==null&&Y[0][0]==="H"}function V(N,Y=a.format){let re=/\[([^\]]*)\]|[YR]{4}|uuu|[YR]{2}|[MD]{1,4}|[WHhms]{1,2}|[AaZz]/g;function P(H){let $=H>0?"-":"+",B=Math.floor(Math.abs(H)/60),oe=Math.abs(H)%60;return[$+L(B,2),L(oe,2)]}return Y.replace(re,(H,$)=>{switch(H){case"YY":return N.getFullYear().toString().substr(-2);case"YYYY":return N.getFullYear();case"M":return N.getMonth()+1;case"MM":return L(N.getMonth()+1,2);case"MMM":return a.labels.months.short[N.getMonth()];case"MMMM":return a.labels.months.long[N.getMonth()];case"D":return N.getDate();case"DD":return L(N.getDate(),2);case"DDD":return a.labels.weekdays.short[S(N.getDay()+a.weekStarts,7)];case"DDDD":return a.labels.weekdays.long[S(N.getDay()+a.weekStarts,7)];case"W":return q(N);case"WW":return L(q(N),2);case"RR":return z(N).toString().substr(-2);case"RRRR":return z(N);case"H":return S(N.getHours(),12)||12;case"HH":return L(S(N.getHours(),12)||12,2);case"h":return N.getHours();case"hh":return L(N.getHours(),2);case"m":return N.getMinutes();case"mm":return L(N.getMinutes(),2);case"s":return N.getSeconds();case"ss":return L(N.getSeconds(),2);case"uuu":return L(N.getMilliseconds(),3);case"A":return N.getHours()<12?"AM":"PM";case"a":return N.getHours()<12?"am":"pm";case"Z":return P(N.getTimezoneOffset()).join(":");case"z":return P(N.getTimezoneOffset()).join("");default:return $||H}})}}};function If(u){let o=Number.MAX_SAFE_INTEGER,a=-o;return u>o?o:u1&&(N.step=V[Y]),o.disabled&&(N.disabled=!0),v[Y]=N,N.addEventListener("input",function(){for(;this.value.charAt(0)==="0"&&this.value.length>1&&!this.value.charAt(1).match(/[.,]/);)this.value=this.value.slice(1);for(;this.value>Number.MAX_SAFE_INTEGER;)this.value=this.value.slice(0,-1);I(),A(),E()}),N.addEventListener("blur",()=>{A(),M(),I(),E()}),N.addEventListener("focus",()=>p.classList.add("focused")),N.addEventListener("blur",()=>p.classList.remove("focused")),re.addEventListener("mousedown",function(H){let $=O("input",this);$&&H.target!==$&&($.focus(),H.preventDefault())});let P=document.createElement("label");P.innerHTML=a.labels[Y][parseInt(N.value)===1?0:1],b[Y]=P,re.appendChild(N),re.appendChild(P),p.appendChild(re)}return p.addEventListener("mousedown",function(Y){Y.target===this&&(N.focus(),Y.preventDefault())}),p}function q(){g=document.createElement("input"),g.className="input-duration-hidden",g.name=o.name,g.id=o.id,g.type="text",g.value=o.value,g.readOnly=!0,g.hidden=!0,o.min&&(g.min=o.min),o.max&&(g.max=o.max),o.step&&(g.step=o.step),o.required&&(g.required=!0),o.disabled&&(g.disabled=!0),"intervals"in o.dataset&&(a.intervals=o.dataset.intervals.split(", ")),"unit"in o.dataset&&(a.unit=o.dataset.unit);let J=o.value*c[a.unit],V=o.step*c[a.unit],N=z(S(J||0),S(V||1));o.parentNode.replaceChild(N,o),N.appendChild(g)}}};var Qf=lo(jn(),1);function Ff(u,o){if(u.length!==o.length)return!1;for(let a=0;a({extend:!1,addNew:!1})}),c=O(`.editor-toolbar[data-for=${o.id}]`),p=o.parentNode.classList.contains("editor-wrap")?o.parentNode:null,g=[];s.getWrapperElement().style.height=`${a}px`,O("[data-command=bold]",c).addEventListener("click",()=>{L("**")}),O("[data-command=italic]",c).addEventListener("click",()=>{L("_")}),O("[data-command=ul]",c).addEventListener("click",()=>{L(`${S()}- `,"")}),O("[data-command=ol]",c).addEventListener("click",()=>{let E=/^\d+\./.exec(v(s.getValue()));L(E?` +`+N+P+Y,re&&c(p,S)}}p.replaceSelections(v)};function c(p,g){var v=g.line,b=0,S=0,L=o.exec(p.getLine(v)),A=L[1];do{b+=1;var M=v+b,I=p.getLine(M),E=o.exec(I);if(E){var z=E[1],q=parseInt(L[3],10)+b-S,J=parseInt(E[3],10),V=J;if(A===z&&!isNaN(J))q===J&&(V=J+1),q>J&&(V=q+1),p.replaceRange(I.replace(o,z+V+E[4]+E[5]),{line:M,ch:0},{line:M,ch:I.length});else{if(A.length>z.length||A.lengthHe});function af(){let u=[],o=document.cookie.split(";");for(let a of o){let s=a.split("=",2);s.length===2&&(u[s[0].trim()]=decodeURIComponent(s[1].trim()))}return u}function lf(u,o,a){let s=`${u}=${o}`;for(let c in a)s+=`;${c}=${a[c]}`;document.cookie=s}var uo=class{constructor(){let o=()=>{let a=af(),s="formwork_preferred_color_scheme",c=s in a?a[s]:null,p=null;window.matchMedia("(prefers-color-scheme: light)").matches?p="light":window.matchMedia("(prefers-color-scheme: dark)").matches&&(p="dark"),p!==c&&lf(s,p,{"max-age":2592e3,path:He.config.baseUri,samesite:"strict"})};window.addEventListener("beforeunload",o),window.addEventListener("pagehide",o)}};function O(u,o=document){return o.querySelector(u)}function ee(u,o=document){return o.querySelectorAll(u)}function fo(u){let o=getComputedStyle(u);return u.offsetWidth+parseInt(o.marginLeft)+parseInt(o.marginRight)}function co(u){let o=getComputedStyle(u);return u.offsetHeight+parseInt(o.marginTop)+parseInt(o.marginBottom)}function yr(u,o,a){let s,c=null;function p(){let g=this,v=arguments;return c&&clearTimeout(c),a&&!c&&(s=u.apply(g,v)),c=setTimeout(()=>{a||(s=u.apply(g,v)),c=null},o),s}return p}function ho(u,o){let a,s=0,c=null;function p(){let g=Date.now();s===0&&(s=g);let v=s+o-g,b=this,S=arguments;return v<=0||v>o?(c&&(clearTimeout(c),c=null),s=g,a=u.apply(b,S)):c||(c=setTimeout(()=>{s=Date.now(),a=u.apply(b,S),c=null},v)),a}return p}var po=class{constructor(){O(".dropdown")&&document.addEventListener("click",o=>{ee(".dropdown-menu").forEach(s=>s.style.display="");let a=o.target.closest(".dropdown-button");if(a){let s=document.getElementById(a.dataset.dropdown),c=getComputedStyle(s).display!=="none";o.preventDefault();let p=ho(()=>sf(s),100);s&&!c?(s.style.display="block",sf(s),window.addEventListener("resize",p)):window.removeEventListener("resize",p)}})}};function sf(u){u.style.left=0,u.style.right="";let o=u.getBoundingClientRect(),a=o.top+window.scrollY,s=o.left+window.scrollX,c=fo(u),p=co(u),g=document.documentElement.clientWidth,v=document.documentElement.clientHeight;s+c>g&&(u.style.left="auto",u.style.right=0),(a{let a=O(".input-togglegroup",o),s=window.localStorage.getItem("formwork.filesListViewAs");s&&(ee("input",a).forEach(c=>c.checked=!1),O(`input[value=${s}]`,o).checked=!0,o.classList.toggle("is-thumbnails",s==="thumbnails")),ee("input",a).forEach(c=>{c.addEventListener("input",()=>{o.classList.toggle("is-thumbnails",c.value==="thumbnails"),window.localStorage.setItem("formwork.filesListViewAs",c.value)})})})}};"requestSubmit"in window.HTMLFormElement.prototype||(window.HTMLFormElement.prototype.requestSubmit=function(u){u?(u instanceof HTMLElement||o(TypeError,"parameter 1 is not of type 'HTMLElement'"),u.type!=="submit"&&o(TypeError,"The specified element is not a submit button"),u.form!==this&&o(DOMException,"The specified element is not owned by this form element","NotFoundError"),u.click()):(u=document.createElement("input"),u.type="submit",u.hidden=!0,this.appendChild(u),u.click(),this.removeChild(u));function o(a,s,c){throw new a(`Failed to execute 'requestSubmit' on 'HTMLFormElement': ${s}.`,c)}});function uf(u,o){var a=Object.keys(u);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(u);o&&(s=s.filter(function(c){return Object.getOwnPropertyDescriptor(u,c).enumerable})),a.push.apply(a,s)}return a}function en(u){for(var o=1;o=0)&&(a[c]=u[c]);return a}function Mh(u,o){if(u==null)return{};var a=Th(u,o),s,c;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(u);for(c=0;c=0)&&Object.prototype.propertyIsEnumerable.call(u,s)&&(a[s]=u[s])}return a}var Ah="1.15.1";function fn(u){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(u)}var dn=fn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),yi=fn(/Edge/i),ff=fn(/firefox/i),hi=fn(/safari/i)&&!fn(/chrome/i)&&!fn(/android/i),yf=fn(/iP(ad|od|hone)/i),xf=fn(/chrome/i)&&fn(/android/i),bf={capture:!1,passive:!1};function Le(u,o,a){u.addEventListener(o,a,!dn&&bf)}function ke(u,o,a){u.removeEventListener(o,a,!dn&&bf)}function Eo(u,o){if(o){if(o[0]===">"&&(o=o.substring(1)),u)try{if(u.matches)return u.matches(o);if(u.msMatchesSelector)return u.msMatchesSelector(o);if(u.webkitMatchesSelector)return u.webkitMatchesSelector(o)}catch(a){return!1}return!1}}function Nh(u){return u.host&&u!==document&&u.host.nodeType?u.host:u.parentNode}function Jt(u,o,a,s){if(u){a=a||document;do{if(o!=null&&(o[0]===">"?u.parentNode===a&&Eo(u,o):Eo(u,o))||s&&u===a)return u;if(u===a)break}while(u=Nh(u))}return null}var cf=/\s+/g;function Ft(u,o,a){if(u&&o)if(u.classList)u.classList[a?"add":"remove"](o);else{var s=(" "+u.className+" ").replace(cf," ").replace(" "+o+" "," ");u.className=(s+(a?" "+o:"")).replace(cf," ")}}function fe(u,o,a){var s=u&&u.style;if(s){if(a===void 0)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(u,""):u.currentStyle&&(a=u.currentStyle),o===void 0?a:a[o];!(o in s)&&o.indexOf("webkit")===-1&&(o="-webkit-"+o),s[o]=a+(typeof a=="string"?"":"px")}}function Cr(u,o){var a="";if(typeof u=="string")a=u;else do{var s=fe(u,"transform");s&&s!=="none"&&(a=s+" "+a)}while(!o&&(u=u.parentNode));var c=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return c&&new c(a)}function wf(u,o,a){if(u){var s=u.getElementsByTagName(o),c=0,p=s.length;if(a)for(;c=p:g=c<=p,!g)return s;if(s===Vt())break;s=Ln(s,!1)}return!1}function kr(u,o,a,s){for(var c=0,p=0,g=u.children;p2&&arguments[2]!==void 0?arguments[2]:{},c=s.evt,p=Mh(s,Rh);xi.pluginEvent.bind(ce)(o,a,en({dragEl:Q,parentEl:qe,ghostEl:ve,rootEl:Re,nextEl:qn,lastDownEl:wo,cloneEl:Ge,cloneHidden:En,dragStarted:fi,putSortable:ct,activeSortable:ce.active,originalEvent:c,oldIndex:Sr,oldDraggableIndex:gi,newIndex:Ht,newDraggableIndex:kn,hideGhostForTarget:Mf,unhideGhostForTarget:Af,cloneNowHidden:function(){En=!0},cloneNowShown:function(){En=!1},dispatchSortableEvent:function(v){Ct({sortable:a,name:v,originalEvent:c})}},p))};function Ct(u){Wh(en({putSortable:ct,cloneEl:Ge,targetEl:Q,rootEl:Re,oldIndex:Sr,oldDraggableIndex:gi,newIndex:Ht,newDraggableIndex:kn},u))}var Q,qe,ve,Re,qn,wo,Ge,En,Sr,Ht,gi,kn,mo,ct,wr=!1,Lo=!1,Do=[],Un,qt,yl,xl,pf,gf,fi,br,mi,vi=!1,vo=!1,So,pt,bl=[],El=!1,To=[],Ao=typeof document!="undefined",yo=yf,mf=yi||dn?"cssFloat":"float",zh=Ao&&!xf&&!yf&&"draggable"in document.createElement("div"),Lf=function(){if(Ao){if(dn)return!1;var u=document.createElement("x");return u.style.cssText="pointer-events:auto",u.style.pointerEvents==="auto"}}(),Df=function(o,a){var s=fe(o),c=parseInt(s.width)-parseInt(s.paddingLeft)-parseInt(s.paddingRight)-parseInt(s.borderLeftWidth)-parseInt(s.borderRightWidth),p=kr(o,0,a),g=kr(o,1,a),v=p&&fe(p),b=g&&fe(g),S=v&&parseInt(v.marginLeft)+parseInt(v.marginRight)+Ze(p).width,L=b&&parseInt(b.marginLeft)+parseInt(b.marginRight)+Ze(g).width;if(s.display==="flex")return s.flexDirection==="column"||s.flexDirection==="column-reverse"?"vertical":"horizontal";if(s.display==="grid")return s.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(p&&v.float&&v.float!=="none"){var A=v.float==="left"?"left":"right";return g&&(b.clear==="both"||b.clear===A)?"vertical":"horizontal"}return p&&(v.display==="block"||v.display==="flex"||v.display==="table"||v.display==="grid"||S>=c&&s[mf]==="none"||g&&s[mf]==="none"&&S+L>c)?"vertical":"horizontal"},_h=function(o,a,s){var c=s?o.left:o.top,p=s?o.right:o.bottom,g=s?o.width:o.height,v=s?a.left:a.top,b=s?a.right:a.bottom,S=s?a.width:a.height;return c===v||p===b||c+g/2===v+S/2},Gh=function(o,a){var s;return Do.some(function(c){var p=c[Pt].options.emptyInsertThreshold;if(!(!p||Ml(c))){var g=Ze(c),v=o>=g.left-p&&o<=g.right+p,b=a>=g.top-p&&a<=g.bottom+p;if(v&&b)return s=c}}),s},Tf=function(o){function a(p,g){return function(v,b,S,L){var A=v.options.group.name&&b.options.group.name&&v.options.group.name===b.options.group.name;if(p==null&&(g||A))return!0;if(p==null||p===!1)return!1;if(g&&p==="clone")return p;if(typeof p=="function")return a(p(v,b,S,L),g)(v,b,S,L);var M=(g?v:b).options.group.name;return p===!0||typeof p=="string"&&p===M||p.join&&p.indexOf(M)>-1}}var s={},c=o.group;(!c||bo(c)!="object")&&(c={name:c}),s.name=c.name,s.checkPull=a(c.pull,!0),s.checkPut=a(c.put),s.revertClone=c.revertClone,o.group=s},Mf=function(){!Lf&&ve&&fe(ve,"display","none")},Af=function(){!Lf&&ve&&fe(ve,"display","")};Ao&&!xf&&document.addEventListener("click",function(u){if(Lo)return u.preventDefault(),u.stopPropagation&&u.stopPropagation(),u.stopImmediatePropagation&&u.stopImmediatePropagation(),Lo=!1,!1},!0);var Yn=function(o){if(Q){o=o.touches?o.touches[0]:o;var a=Gh(o.clientX,o.clientY);if(a){var s={};for(var c in o)o.hasOwnProperty(c)&&(s[c]=o[c]);s.target=s.rootEl=a,s.preventDefault=void 0,s.stopPropagation=void 0,a[Pt]._onDragOver(s)}}},Uh=function(o){Q&&Q.parentNode[Pt]._isOutsideThisEl(o.target)};function ce(u,o){if(!(u&&u.nodeType&&u.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(u));this.el=u,this.options=o=cn({},o),u[Pt]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(u.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Df(u,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(g,v){g.setData("Text",v.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:ce.supportPointer!==!1&&"PointerEvent"in window&&!hi,emptyInsertThreshold:5};xi.initializePlugins(this,u,a);for(var s in a)!(s in o)&&(o[s]=a[s]);Tf(o);for(var c in this)c.charAt(0)==="_"&&typeof this[c]=="function"&&(this[c]=this[c].bind(this));this.nativeDraggable=o.forceFallback?!1:zh,this.nativeDraggable&&(this.options.touchStartThreshold=1),o.supportPointer?Le(u,"pointerdown",this._onTapStart):(Le(u,"mousedown",this._onTapStart),Le(u,"touchstart",this._onTapStart)),this.nativeDraggable&&(Le(u,"dragover",this),Le(u,"dragenter",this)),Do.push(this.el),o.store&&o.store.get&&this.sort(o.store.get(this)||[]),cn(this,Hh())}ce.prototype={constructor:ce,_isOutsideThisEl:function(o){!this.el.contains(o)&&o!==this.el&&(br=null)},_getDirection:function(o,a){return typeof this.options.direction=="function"?this.options.direction.call(this,o,a,Q):this.options.direction},_onTapStart:function(o){if(o.cancelable){var a=this,s=this.el,c=this.options,p=c.preventOnFilter,g=o.type,v=o.touches&&o.touches[0]||o.pointerType&&o.pointerType==="touch"&&o,b=(v||o).target,S=o.target.shadowRoot&&(o.path&&o.path[0]||o.composedPath&&o.composedPath()[0])||b,L=c.filter;if(Zh(s),!Q&&!(/mousedown|pointerdown/.test(g)&&o.button!==0||c.disabled)&&!S.isContentEditable&&!(!this.nativeDraggable&&hi&&b&&b.tagName.toUpperCase()==="SELECT")&&(b=Jt(b,c.draggable,s,!1),!(b&&b.animated)&&wo!==b)){if(Sr=Wt(b),gi=Wt(b,c.draggable),typeof L=="function"){if(L.call(this,o,b,this)){Ct({sortable:a,rootEl:S,name:"filter",targetEl:b,toEl:s,fromEl:s}),Mt("filter",a,{evt:o}),p&&o.cancelable&&o.preventDefault();return}}else if(L&&(L=L.split(",").some(function(A){if(A=Jt(S,A.trim(),s,!1),A)return Ct({sortable:a,rootEl:A,name:"filter",targetEl:b,fromEl:s,toEl:s}),Mt("filter",a,{evt:o}),!0}),L)){p&&o.cancelable&&o.preventDefault();return}c.handle&&!Jt(S,c.handle,s,!1)||this._prepareDragStart(o,v,b)}}},_prepareDragStart:function(o,a,s){var c=this,p=c.el,g=c.options,v=p.ownerDocument,b;if(s&&!Q&&s.parentNode===p){var S=Ze(s);if(Re=p,Q=s,qe=Q.parentNode,qn=Q.nextSibling,wo=s,mo=g.group,ce.dragged=Q,Un={target:Q,clientX:(a||o).clientX,clientY:(a||o).clientY},pf=Un.clientX-S.left,gf=Un.clientY-S.top,this._lastX=(a||o).clientX,this._lastY=(a||o).clientY,Q.style["will-change"]="all",b=function(){if(Mt("delayEnded",c,{evt:o}),ce.eventCanceled){c._onDrop();return}c._disableDelayedDragEvents(),!ff&&c.nativeDraggable&&(Q.draggable=!0),c._triggerDragStart(o,a),Ct({sortable:c,name:"choose",originalEvent:o}),Ft(Q,g.chosenClass,!0)},g.ignore.split(",").forEach(function(L){wf(Q,L.trim(),wl)}),Le(v,"dragover",Yn),Le(v,"mousemove",Yn),Le(v,"touchmove",Yn),Le(v,"mouseup",c._onDrop),Le(v,"touchend",c._onDrop),Le(v,"touchcancel",c._onDrop),ff&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Q.draggable=!0),Mt("delayStart",this,{evt:o}),g.delay&&(!g.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(yi||dn))){if(ce.eventCanceled){this._onDrop();return}Le(v,"mouseup",c._disableDelayedDrag),Le(v,"touchend",c._disableDelayedDrag),Le(v,"touchcancel",c._disableDelayedDrag),Le(v,"mousemove",c._delayedDragTouchMoveHandler),Le(v,"touchmove",c._delayedDragTouchMoveHandler),g.supportPointer&&Le(v,"pointermove",c._delayedDragTouchMoveHandler),c._dragStartTimer=setTimeout(b,g.delay)}else b()}},_delayedDragTouchMoveHandler:function(o){var a=o.touches?o.touches[0]:o;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Q&&wl(Q),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var o=this.el.ownerDocument;ke(o,"mouseup",this._disableDelayedDrag),ke(o,"touchend",this._disableDelayedDrag),ke(o,"touchcancel",this._disableDelayedDrag),ke(o,"mousemove",this._delayedDragTouchMoveHandler),ke(o,"touchmove",this._delayedDragTouchMoveHandler),ke(o,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(o,a){a=a||o.pointerType=="touch"&&o,!this.nativeDraggable||a?this.options.supportPointer?Le(document,"pointermove",this._onTouchMove):a?Le(document,"touchmove",this._onTouchMove):Le(document,"mousemove",this._onTouchMove):(Le(Q,"dragend",this),Le(Re,"dragstart",this._onDragStart));try{document.selection?Co(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(s){}},_dragStarted:function(o,a){if(wr=!1,Re&&Q){Mt("dragStarted",this,{evt:a}),this.nativeDraggable&&Le(document,"dragover",Uh);var s=this.options;!o&&Ft(Q,s.dragClass,!1),Ft(Q,s.ghostClass,!0),ce.active=this,o&&this._appendGhost(),Ct({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(qt){this._lastX=qt.clientX,this._lastY=qt.clientY,Mf();for(var o=document.elementFromPoint(qt.clientX,qt.clientY),a=o;o&&o.shadowRoot&&(o=o.shadowRoot.elementFromPoint(qt.clientX,qt.clientY),o!==a);)a=o;if(Q.parentNode[Pt]._isOutsideThisEl(o),a)do{if(a[Pt]){var s=void 0;if(s=a[Pt]._onDragOver({clientX:qt.clientX,clientY:qt.clientY,target:o,rootEl:a}),s&&!this.options.dragoverBubble)break}o=a}while(a=a.parentNode);Af()}},_onTouchMove:function(o){if(Un){var a=this.options,s=a.fallbackTolerance,c=a.fallbackOffset,p=o.touches?o.touches[0]:o,g=ve&&Cr(ve,!0),v=ve&&g&&g.a,b=ve&&g&&g.d,S=yo&&pt&&hf(pt),L=(p.clientX-Un.clientX+c.x)/(v||1)+(S?S[0]-bl[0]:0)/(v||1),A=(p.clientY-Un.clientY+c.y)/(b||1)+(S?S[1]-bl[1]:0)/(b||1);if(!ce.active&&!wr){if(s&&Math.max(Math.abs(p.clientX-this._lastX),Math.abs(p.clientY-this._lastY))=0&&(Ct({rootEl:qe,name:"add",toEl:qe,fromEl:Re,originalEvent:o}),Ct({sortable:this,name:"remove",toEl:qe,originalEvent:o}),Ct({rootEl:qe,name:"sort",toEl:qe,fromEl:Re,originalEvent:o}),Ct({sortable:this,name:"sort",toEl:qe,originalEvent:o})),ct&&ct.save()):Ht!==Sr&&Ht>=0&&(Ct({sortable:this,name:"update",toEl:qe,originalEvent:o}),Ct({sortable:this,name:"sort",toEl:qe,originalEvent:o})),ce.active&&((Ht==null||Ht===-1)&&(Ht=Sr,kn=gi),Ct({sortable:this,name:"end",toEl:qe,originalEvent:o}),this.save()))),this._nulling()},_nulling:function(){Mt("nulling",this),Re=Q=qe=ve=qn=Ge=wo=En=Un=qt=fi=Ht=kn=Sr=gi=br=mi=ct=mo=ce.dragged=ce.ghost=ce.clone=ce.active=null,To.forEach(function(o){o.checked=!0}),To.length=yl=xl=0},handleEvent:function(o){switch(o.type){case"drop":case"dragend":this._onDrop(o);break;case"dragenter":case"dragover":Q&&(this._onDragOver(o),Yh(o));break;case"selectstart":o.preventDefault();break}},toArray:function(){for(var o=[],a,s=this.el.children,c=0,p=s.length,g=this.options;cc.right+p||u.clientY>s.bottom&&u.clientX>s.left:u.clientY>c.bottom+p||u.clientX>s.right&&u.clientY>s.top}function Kh(u,o,a,s,c,p,g,v){var b=s?u.clientY:u.clientX,S=s?a.height:a.width,L=s?a.top:a.left,A=s?a.bottom:a.right,M=!1;if(!g){if(v&&SoL+S*p/2:bA-So)return-mi}else if(b>L+S*(1-c)/2&&bA-S*p/2)?b>L+S/2?1:-1:0}function $h(u){return Wt(Q)b(S)),Of.create(o,{handle:".sort-handle",forceFallback:!0});function c(S){let L=S.cloneNode(!0);g(L),b(L),S.nextSibling?S.parentNode.insertBefore(L,S.nextSibling):S.parentNode.appendChild(L)}function p(S){ee(".input-array-row",S.parentNode).length>1?S.parentNode.removeChild(S):g(S)}function g(S){if(a){let A=O(".input-array-key",S);A.value="",A.removeAttribute("value")}let L=O(".input-array-value",S);L.value="",L.removeAttribute("value"),L.name=`${s}[]`}function v(S){let L=O(".input-array-key",S),A=O(".input-array-value",S);A.name=`${s}[${L.value.trim()}]`}function b(S){let L=O(".input-array-add",S),A=O(".input-array-remove",S);if(L.addEventListener("click",c.bind(L,S)),A.addEventListener("click",p.bind(A,S)),a){let M=O(".input-array-key",S),I=O(".input-array-value",S);M.addEventListener("keyup",v.bind(M,S)),I.addEventListener("keyup",v.bind(I,S))}}}};var Ol=new Map;function Il(u,o){if(Ol.has(u)){o(Ol.get(u));return}let a=new XMLHttpRequest;a.onload=function(){let s=this.status===200?this.response:"";s!==""&&Ol.set(u,s),o(s)},a.open("GET",`${He.config.baseUri}assets/icons/svg/${u}.svg`),a.send()}function At(u,o,a="afterBegin"){Il(u,s=>o.insertAdjacentHTML(a,s))}var Er={};function Lr(u,o,a,s){let c;function p(){clearTimeout(c)}u.addEventListener("mousedown",function(g){let v=this;g.button!==0?p():(o.call(v,g),c=setTimeout(()=>c=setInterval(o.bind(v,g),s),a))}),u.addEventListener("mouseout",p),window.addEventListener("mouseup",p)}var Oo=class{constructor(o,a){a=Object.assign({},{weekStarts:0,format:"YYYY-MM-DD",time:!1,labels:{today:"Today",weekdays:{long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},months:{long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}}},a),Er[o.id]=new Date;let c=new v(O(".calendar"),Er[o.id]);a.onChange=N=>{let Y=g();Y!==null&&(Er[Y.id]=N,Y.value=V(N))},p();function p(){let N=o.value;o.readOnly=!0,o.size=a.format.length,A(N)&&(Er[o.id]=new Date(N),o.value=V(Er[o.id])),o.addEventListener("focus",()=>{c.gotoDate(Er[o.id]),c.show()}),o.addEventListener("blur",()=>{c.hide()}),o.addEventListener("keydown",Y=>{switch(Y.key){case"Backspace":o.value="",o.blur();break;case"Escape":o.blur();break;case"Tab":o.blur();return}Y.preventDefault()})}function g(){let N=document.activeElement;return N.matches(".input-date")?N:null}function v(N,Y){let re,P,H,$,B,oe;N=N||oa(),de(Y);function de(xe){re=xe.getFullYear(),P=xe.getMonth(),H=xe.getDate(),$=xe.getHours(),B=xe.getMinutes(),oe=xe.getSeconds()}function j(xe){de(xe),Pe()}function w(){return new Date(re,P,H,$,B,oe)}function R(){return N}function _(){de(new Date)}function ne(){_(),Pe()}function be(){re--}function Oe(){be(),Pe()}function gt(){re++}function k(){gt(),Pe()}function y(){H=I(P,re)}function ie(){y(),Pe()}function we(){P=S(P-1,12),P===11&&be(),H>I(P,re)&&y()}function ge(){we(),Pe()}function Je(){P=S(P+1,12),P===0&>(),H>I(P,re)&&y()}function st(){Je(),Pe()}function Ue(){H-=7,H<1&&(we(),H+=I(P,re))}function Ve(){Ue(),Pe()}function Ne(){H+=7,H>I(P,re)&&(H-=I(P,re),Je())}function Ie(){Ne(),Pe()}function ze(){H--,H<1&&(we(),y())}function at(){ze(),Pe()}function hn(){H++,H>I(P,re)&&(Je(),H=1)}function Nt(){hn(),Pe()}function Ot(){$=S($+1,24),$===0&&hn()}function Et(){Ot(),Pe()}function Rt(){$=S($-1,24),$===23&&ze()}function ye(){Rt(),Pe()}function Lt(){B=S(B+1,60),B===0&&Ot()}function zt(){Lt(),Pe()}function Tn(){B=S(B-1,60),B===59&&Rt()}function Nr(){Tn(),Pe()}function ra(){oe=S(oe+1,60),oe===0&&Lt()}function Or(){ra(),Pe()}function Kn(){oe=S(oe-1,60),oe===59&&Tn()}function Li(){Kn(),Pe()}function ia(){N.style.display="block",b()}function Mn(){N.style.display="none"}function Ir(){return N.style.display!=="none"}function Pe(){O(".calendar-table",N).innerHTML=xe(),Se(),a.time&&aa();function xe(){let mt=new Date(re,P,1).getDay(),pn=S(mt-a.weekStarts,7),ue=I(P,re),nn=1,Ce="";Ce+='',Ce+=`${a.labels.months.long[P]} ${re}`,Ce+="",Ce+="";for(let Me=0;Me<7;Me++)Ce+='',Ce+=a.labels.weekdays.short[S(Me+a.weekStarts,7)],Ce+="";Ce+="";for(let Me=0;Me<6;Me++){for(let Be=0;Be<7;Be++)nn<=ue&&(Me>0||Be>=pn)?(nn===H?Ce+='':Ce+='',Ce+=nn++):nn===1?(Ce+='',Ce+=I(S(P-1,12),re)-pn+Be+1):(Ce+='',Ce+=nn++-ue),Ce+="";Ce+=""}return Ce+="",Ce}function Se(){ee(".calendar-day",N).forEach(mt=>{mt.addEventListener("mousedown",pn=>{pn.stopPropagation(),pn.preventDefault()}),mt.addEventListener("click",()=>{H=parseInt(mt.textContent),Pe(),a.onChange(w())})})}function aa(){O(".calendar-hours",N).innerHTML=L(J(a.format)?S($,12)||12:$,2),O(".calendar-minutes",N).innerHTML=L(B,2),O(".calendar-meridiem",N).innerHTML=J(a.format)?$<12?"AM":"PM":""}}function oa(){let xe=document.createElement("div");return xe.className="calendar",xe.innerHTML=`
`,a.time&&(xe.innerHTML+='
:
',At("chevron-down",O(".prevHour",xe)),At("chevron-up",O(".nextHour",xe)),At("chevron-down",O(".prevMinute",xe)),At("chevron-up",O(".nextMinute",xe))),At("calendar-clock",O(".currentMonth",xe)),At("chevron-left",O(".prevMonth",xe)),At("chevron-right",O(".nextMonth",xe)),O(".currentMonth",xe).addEventListener("mousedown",Se=>{ne(),a.onChange(w()),Se.preventDefault()}),Lr(O(".prevMonth",xe),Se=>{ge(),a.onChange(w()),Se.preventDefault()},750,500),Lr(O(".nextMonth",xe),Se=>{st(),a.onChange(w()),Se.preventDefault()},750,500),a.time&&(Lr(O(".nextHour",xe),Se=>{Et(),a.onChange(w()),Se.preventDefault()},750,250),Lr(O(".prevHour",xe),Se=>{ye(),a.onChange(w()),Se.preventDefault()},750,250),Lr(O(".nextMinute",xe),Se=>{zt(),a.onChange(w()),Se.preventDefault()},750,250),Lr(O(".prevMinute",xe),Se=>{Nr(),a.onChange(w()),Se.preventDefault()},750,250)),window.addEventListener("resize",ho(b,100)),window.addEventListener("mousedown",Se=>{xe.style.display!=="none"&&Se.target.closest(".calendar")&&Se.preventDefault()}),window.addEventListener("keydown",Se=>{if(Ir()){switch(Se.key){case"Enter":O(".calendar-day.selected",xe).click(),Mn();break;case"Backspace":case"Escape":case"Tab":Mn();break;case"ArrowLeft":Se.ctrlKey||Se.metaKey?Se.shiftKey?Oe():ge():at(),a.onChange(w());break;case"ArrowUp":Ve(),a.onChange(w());break;case"ArrowRight":Se.ctrlKey||Se.metaKey?Se.shiftKey?k():st():Nt(),a.onChange(w());break;case"ArrowDown":Ie(),a.onChange(w());break;case"0":(Se.ctrlKey||Se.metaKey)&&ne(),a.onChange(w());break;default:return}Se.preventDefault()}}),document.body.appendChild(xe),xe}return{setDate:de,gotoDate:j,getDate:w,getElement:R,now:ne,prevYear:Oe,nextYear:k,lastDayOfMonth:ie,prevMonth:ge,nextMonth:st,prevWeek:Ve,nextWeek:Ie,prevDay:at,nextDay:Nt,nextHour:Et,prevHour:ye,nextMinute:zt,prevMinute:Nr,nextSecond:Or,prevSecond:Li,show:ia,hide:Mn,isVisible:Ir}}function b(){let N=g();if(!N||!c.isVisible())return;let Y=N.getBoundingClientRect(),re=Y.top+window.scrollY,P=Y.left+window.scrollX,H=c.getElement();H.style.top=`${re+N.offsetHeight}px`,H.style.left=`${P+N.offsetLeft}px`;let $=H.getBoundingClientRect(),B=$.top+window.scrollY,oe=$.left+window.scrollX,de=fo(H),j=co(H),w=document.documentElement.clientWidth,R=document.documentElement.clientHeight;oe+de>w&&(H.style.left=`${w-de}px`),(B=P.getTime()?Y+1:N.getTime()>=re.getTime()?Y:Y-1}function q(N){let Y=Y(N),re=P(new Date(Y,0,4),1),P=P(N,1);return Math.round((P.getTime()-re.getTime())/6048e5)+1}function J(N){let Y=N.match(/\[([^\]]*)\]|H{1,2}/);return Y!==null&&Y[0][0]==="H"}function V(N,Y=a.format){let re=/\[([^\]]*)\]|[YR]{4}|uuu|[YR]{2}|[MD]{1,4}|[WHhms]{1,2}|[AaZz]/g;function P(H){let $=H>0?"-":"+",B=Math.floor(Math.abs(H)/60),oe=Math.abs(H)%60;return[$+L(B,2),L(oe,2)]}return Y.replace(re,(H,$)=>{switch(H){case"YY":return N.getFullYear().toString().substr(-2);case"YYYY":return N.getFullYear();case"M":return N.getMonth()+1;case"MM":return L(N.getMonth()+1,2);case"MMM":return a.labels.months.short[N.getMonth()];case"MMMM":return a.labels.months.long[N.getMonth()];case"D":return N.getDate();case"DD":return L(N.getDate(),2);case"DDD":return a.labels.weekdays.short[S(N.getDay()+a.weekStarts,7)];case"DDDD":return a.labels.weekdays.long[S(N.getDay()+a.weekStarts,7)];case"W":return q(N);case"WW":return L(q(N),2);case"RR":return z(N).toString().substr(-2);case"RRRR":return z(N);case"H":return S(N.getHours(),12)||12;case"HH":return L(S(N.getHours(),12)||12,2);case"h":return N.getHours();case"hh":return L(N.getHours(),2);case"m":return N.getMinutes();case"mm":return L(N.getMinutes(),2);case"s":return N.getSeconds();case"ss":return L(N.getSeconds(),2);case"uuu":return L(N.getMilliseconds(),3);case"A":return N.getHours()<12?"AM":"PM";case"a":return N.getHours()<12?"am":"pm";case"Z":return P(N.getTimezoneOffset()).join(":");case"z":return P(N.getTimezoneOffset()).join("");default:return $||H}})}}};function If(u){let o=Number.MAX_SAFE_INTEGER,a=-o;return u>o?o:u1&&(N.step=V[Y]),o.disabled&&(N.disabled=!0),v[Y]=N,N.addEventListener("input",function(){for(;this.value.charAt(0)==="0"&&this.value.length>1&&!this.value.charAt(1).match(/[.,]/);)this.value=this.value.slice(1);for(;this.value>Number.MAX_SAFE_INTEGER;)this.value=this.value.slice(0,-1);I(),A(),E()}),N.addEventListener("blur",()=>{A(),M(),I(),E()}),N.addEventListener("focus",()=>p.classList.add("focused")),N.addEventListener("blur",()=>p.classList.remove("focused")),re.addEventListener("mousedown",function(H){let $=O("input",this);$&&H.target!==$&&($.focus(),H.preventDefault())});let P=document.createElement("label");P.innerHTML=a.labels[Y][parseInt(N.value)===1?0:1],b[Y]=P,re.appendChild(N),re.appendChild(P),p.appendChild(re)}return p.addEventListener("mousedown",function(Y){Y.target===this&&(N.focus(),Y.preventDefault())}),p}function q(){g=document.createElement("input"),g.className="input-duration-hidden",g.name=o.name,g.id=o.id,g.type="text",g.value=o.value,g.readOnly=!0,g.hidden=!0,o.min&&(g.min=o.min),o.max&&(g.max=o.max),o.step&&(g.step=o.step),o.required&&(g.required=!0),o.disabled&&(g.disabled=!0),"intervals"in o.dataset&&(a.intervals=o.dataset.intervals.split(", ")),"unit"in o.dataset&&(a.unit=o.dataset.unit);let J=o.value*c[a.unit],V=o.step*c[a.unit],N=z(S(J||0),S(V||1));o.parentNode.replaceChild(N,o),N.appendChild(g)}}};var Qf=lo(jn(),1);function Ff(u,o){if(u.length!==o.length)return!1;for(let a=0;a({extend:!1,addNew:!1})}),c=O(`.editor-toolbar[data-for=${o.id}]`),p=o.parentNode.classList.contains("editor-wrap")?o.parentNode:null,g=[];s.getWrapperElement().style.height=`${a}px`,O("[data-command=bold]",c).addEventListener("click",()=>{L("**")}),O("[data-command=italic]",c).addEventListener("click",()=>{L("_")}),O("[data-command=ul]",c).addEventListener("click",()=>{L(`${S()}- `,"")}),O("[data-command=ol]",c).addEventListener("click",()=>{let E=/^\d+\./.exec(v(s.getValue()));L(E?` ${parseInt(E)+1}. `:`${S()}1. `,"")}),O("[data-command=quote]",c).addEventListener("click",()=>{L(`${S()}> `,"")}),O("[data-command=link]",c).addEventListener("click",()=>{let E=s.getSelection();/^(https?:\/\/|mailto:)/i.test(E)?L("[",`](${E})`,!0):E!==""?L(`[${E}](http://`,")",!0):L("[","](http://)")}),O("[data-command=image]",c).addEventListener("click",()=>{He.modals.imagesModal.show(null,E=>{let z=O(".image-picker-thumbnail.selected",E);z&&z.classList.remove("selected");function q(){let J=O(".image-picker-thumbnail.selected",O("#imagesModal")).dataset.filename;J!==void 0?L(`${S()}![`,`](${J})`):L(`${S()}![](`,")"),this.removeEventListener("click",q)}O(".image-picker-confirm",E).addEventListener("click",q)})}),O("[data-command=undo]",c).addEventListener("click",()=>{s.undo(),s.focus()}),O("[data-command=redo]",c).addEventListener("click",()=>{s.redo(),s.focus()}),s.on("changes",yr(()=>{o.value=s.getValue(),s.historySize().undo<1?O("[data-command=undo]").disabled=!0:O("[data-command=undo]").disabled=!1,s.historySize().redo<1?O("[data-command=redo]").disabled=!0:O("[data-command=redo]").disabled=!1},500)),s.on("beforeSelectionChange",(E,z)=>{let q=A(z.ranges);E.operation(()=>{Ff(q,g)||(M(E,g),I(E,q),g=q)}),E.refresh()}),s.on("focus",()=>{p!==null&&p.classList.add("focused")}),s.on("blur",E=>{p!==null&&p.classList.remove("focused"),M(E,g),g=[]}),document.addEventListener("keydown",E=>{if(!E.altKey&&(E.ctrlKey||E.metaKey))switch(E.key){case"b":O("[data-command=bold]",c).click(),E.preventDefault();break;case"i":O("[data-command=italic]",c).click(),E.preventDefault();break;case"k":O("[data-command=link]",c).click(),E.preventDefault();break}});function v(E){let z=E.lastIndexOf(` `);return z===-1?E:E.substring(z+1)}function b(){let E=s.getLine(s.getCursor().line);return E.length===0?void 0:E.slice(-1)}function S(){switch(b()){case void 0:return"";case` `:return` diff --git a/panel/src/js/components/icons.js b/panel/src/js/components/icons.js index 7e0f091d..c07fa5bf 100644 --- a/panel/src/js/components/icons.js +++ b/panel/src/js/components/icons.js @@ -1,10 +1,10 @@ import { app } from "../app"; -const cache = {}; +const cache = new Map(); export function passIcon(icon, callback) { - if (icon in cache) { - callback(cache[icon]); + if (cache.has(icon)) { + callback(cache.get(icon)); return; } @@ -13,7 +13,7 @@ export function passIcon(icon, callback) { request.onload = function () { const data = this.status === 200 ? this.response : ""; if (data !== "") { - cache[icon] = data; + cache.set(icon, data); } callback(data); };