web-interface.assets.852f0ecd7b17e3bfd700a821ff438f7e.js Maven / Gradle / Ivy
(()=>{var G=(w,f)=>()=>(f||w((f={exports:{}}).exports,f),f.exports);var H=G((j,q)=>{ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator"],function(w,f,J){"use strict";var F=w("../token_iterator").TokenIterator;function s(m,y){return m.type.lastIndexOf(y+".xml")>-1}f.singletonTags=["area","base","br","col","command","embed","hr","html","img","input","keygen","link","meta","param","source","track","wbr"],f.blockTags=["article","aside","blockquote","body","div","dl","fieldset","footer","form","head","header","html","nav","ol","p","script","section","style","table","tbody","tfoot","thead","ul"],f.formatOptions={lineBreaksAfterCommasInCurlyBlock:!0},f.beautify=function(m){for(var y=new F(m,0,0),t=y.getCurrentToken(),K=m.getTabString(),V=f.singletonTags,L=f.blockTags,z=f.formatOptions||{},l,p=!1,n=!1,d=!1,a="",e="",A="",r=0,C=0,N=0,c=0,h=0,g=0,D=0,x,R=0,i=0,E=[],M=!1,o,$=!1,I=!1,O=!1,v=!1,_={0:0},b=[],S=!1,k=function(){l&&l.value&&l.type!=="string.regexp"&&(l.value=l.value.replace(/^\s*/,""))},T=function(){for(var B=a.length-1;!(B==0||a[B]!==" ");)B=B-1;a=a.slice(0,B+1)},u=function(){a=a.trimRight(),p=!1};t!==null;){if(R=y.getCurrentTokenRow(),E=y.$rowTokens,l=y.stepForward(),typeof t<"u"){if(e=t.value,h=0,O=A==="style"||m.$modeId==="ace/mode/css",s(t,"tag-open")?(I=!0,l&&(v=L.indexOf(l.value)!==-1),e===""&&(v&&!p&&i<1&&i++,O&&(i=1),h=1,v=!1)):s(t,"tag-close")?I=!1:s(t,"comment.start")?v=!0:s(t,"comment.end")&&(v=!1),!I&&!i&&t.type==="paren.rparen"&&t.value.substr(0,1)==="}"&&i++,R!==x&&(i=R,x&&(i-=x)),i){for(u();i>0;i--)a+=`
`;p=!0,!s(t,"comment")&&!t.type.match(/^(comment|string)$/)&&(e=e.trimLeft())}if(e){if(t.type==="keyword"&&e.match(/^(if|else|elseif|for|foreach|while|switch)$/)?(b[r]=e,k(),d=!0,e.match(/^(else|elseif)$/)&&a.match(/\}[\s]*$/)&&(u(),n=!0)):t.type==="paren.lparen"?(k(),e.substr(-1)==="{"&&(d=!0,$=!1,I||(i=1)),e.substr(0,1)==="{"&&(n=!0,a.substr(-1)!=="["&&a.trimRight().substr(-1)==="["?(u(),n=!1):a.trimRight().substr(-1)===")"?u():T())):t.type==="paren.rparen"?(h=1,e.substr(0,1)==="}"&&(b[r-1]==="case"&&h++,a.trimRight().substr(-1)==="{"?u():(n=!0,O&&(i+=2))),e.substr(0,1)==="]"&&a.substr(-1)!=="}"&&a.trimRight().substr(-1)==="}"&&(n=!1,c++,u()),e.substr(0,1)===")"&&a.substr(-1)!=="("&&a.trimRight().substr(-1)==="("&&(n=!1,c++,u()),T()):(t.type==="keyword.operator"||t.type==="keyword")&&e.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)?(u(),k(),n=!0,d=!0):t.type==="punctuation.operator"&&e===";"?(u(),k(),d=!0,O&&i++):t.type==="punctuation.operator"&&e.match(/^(:|,)$/)?(u(),k(),e.match(/^(,)$/)&&D>0&&g===0&&z.lineBreaksAfterCommasInCurlyBlock?i++:(d=!0,p=!1)):t.type==="support.php_tag"&&e==="?>"&&!p?(u(),n=!0):s(t,"attribute-name")&&a.substr(-1).match(/^\s$/)?n=!0:s(t,"attribute-equals")?(T(),k()):s(t,"tag-close")?(T(),e==="/>"&&(n=!0)):t.type==="keyword"&&e.match(/^(case|default)$/)&&S&&(h=1),p&&!(t.type.match(/^(comment)$/)&&!e.substr(0,1).match(/^[/#]$/))&&!(t.type.match(/^(string)$/)&&!e.substr(0,1).match(/^['"@]$/))){if(c=N,r>C)for(c++,o=r;o>C;o--)_[o]=c;else r")&&(v&&l&&l.value===""?i=-1:i=1),l&&V.indexOf(l.value)===-1&&(s(t,"tag-open")&&e===""?r--:s(t,"tag-open")&&e==="<"?r++:s(t,"tag-close")&&e==="/>"&&r--),s(t,"tag-name")&&(A=e),x=R}}t=l}a=a.trim(),m.doc.setValue(a)},f.commands=[{name:"beautify",description:"Format selection (Beautify)",exec:function(m){f.beautify(m.session)},bindKey:"Ctrl-Shift-B"}]});(function(){ace.require(["ace/ext/beautify"],function(w){typeof q=="object"&&typeof j=="object"&&q&&(q.exports=w)})})()});H();})();
//# sourceMappingURL=852f0ecd7b17e3bfd700a821ff438f7e.js.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy