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