diff --git a/resources/dist/_astro/App.e8f74b1b.js b/resources/dist/_astro/App.61b91960.js similarity index 99% rename from resources/dist/_astro/App.e8f74b1b.js rename to resources/dist/_astro/App.61b91960.js index 8e9c35c..576da45 100644 --- a/resources/dist/_astro/App.e8f74b1b.js +++ b/resources/dist/_astro/App.61b91960.js @@ -1 +1 @@ -import{r as se,c as De,g as fi,R as zt}from"./index.ba55fcf9.js";function je(e,t){void 0===t&&(t="");var n=se.useState((function(){return window.localStorage.getItem(e)||t})),i=n[0],r=n[1];se.useEffect((function(){var n=window.localStorage.getItem(e);i!==n&&r(n||t)}));var o=se.useCallback((function(n){n.key===e&&n.newValue!==i&&r(n.newValue||t)}),[i]);return se.useEffect((function(){return window.addEventListener("storage",o),function(){return window.removeEventListener("storage",o)}}),[o]),[i,function(t){r(t),window.localStorage.setItem(e,t)}]}const _n=se;function ec({title:e,titleId:t,...n},i){return _n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?_n.createElement("title",{id:t},e):null,_n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"}))}const tc=_n.forwardRef(ec);var nc=tc;const Rn=se;function ic({title:e,titleId:t,...n},i){return Rn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Rn.createElement("title",{id:t},e):null,Rn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"}))}const rc=Rn.forwardRef(ic);var sc=rc;const Mn=se;function oc({title:e,titleId:t,...n},i){return Mn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Mn.createElement("title",{id:t},e):null,Mn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25H12"}))}const ac=Mn.forwardRef(oc);var lc=ac;const Tn=se;function cc({title:e,titleId:t,...n},i){return Tn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Tn.createElement("title",{id:t},e):null,Tn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 011.037-.443 48.282 48.282 0 005.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"}))}const uc=Tn.forwardRef(cc);var hc=uc;const On=se;function fc({title:e,titleId:t,...n},i){return On.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?On.createElement("title",{id:t},e):null,On.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"}))}const dc=On.forwardRef(fc);var gc=dc;const Fn=se;function pc({title:e,titleId:t,...n},i){return Fn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Fn.createElement("title",{id:t},e):null,Fn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 5.25l-7.5 7.5-7.5-7.5m15 6l-7.5 7.5-7.5-7.5"}))}const mc=Fn.forwardRef(pc);var vc=mc;const In=se;function wc({title:e,titleId:t,...n},i){return In.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?In.createElement("title",{id:t},e):null,In.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"}))}const bc=In.forwardRef(wc);var yc=bc;const Pn=se;function xc({title:e,titleId:t,...n},i){return Pn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Pn.createElement("title",{id:t},e):null,Pn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"}))}const Sc=Pn.forwardRef(xc);var kc=Sc;const Dn=se;function Cc({title:e,titleId:t,...n},i){return Dn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Dn.createElement("title",{id:t},e):null,Dn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 6.75L22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3l-4.5 16.5"}))}const $c=Dn.forwardRef(Cc);var Ac=$c;const sn=se;function Ec({title:e,titleId:t,...n},i){return sn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?sn.createElement("title",{id:t},e):null,sn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"}),sn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))}const Lc=sn.forwardRef(Ec);var _c=Lc;const Nn=se;function Rc({title:e,titleId:t,...n},i){return Nn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Nn.createElement("title",{id:t},e):null,Nn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"}))}const Mc=Nn.forwardRef(Rc);var Tc=Mc;const Bn=se;function Oc({title:e,titleId:t,...n},i){return Bn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Bn.createElement("title",{id:t},e):null,Bn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.75a.75.75 0 110-1.5.75.75 0 010 1.5zM12 12.75a.75.75 0 110-1.5.75.75 0 010 1.5zM12 18.75a.75.75 0 110-1.5.75.75 0 010 1.5z"}))}const Fc=Bn.forwardRef(Oc);var Ic=Fc;const Hn=se;function Pc({title:e,titleId:t,...n},i){return Hn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Hn.createElement("title",{id:t},e):null,Hn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"}))}const Dc=Hn.forwardRef(Pc);var Nc=Dc;const Wn=se;function Bc({title:e,titleId:t,...n},i){return Wn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Wn.createElement("title",{id:t},e):null,Wn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"}))}const Hc=Wn.forwardRef(Bc);var Wc=Hc;const jn=se;function jc({title:e,titleId:t,...n},i){return jn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?jn.createElement("title",{id:t},e):null,jn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 01-.659 1.591l-5.432 5.432a2.25 2.25 0 00-.659 1.591v2.927a2.25 2.25 0 01-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 00-.659-1.591L3.659 7.409A2.25 2.25 0 013 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0112 3z"}))}const zc=jn.forwardRef(jc);var Uc=zc;const zn=se;function Vc({title:e,titleId:t,...n},i){return zn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?zn.createElement("title",{id:t},e):null,zn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"}))}const Gc=zn.forwardRef(Vc);var Kc=Gc;const Un=se;function Yc({title:e,titleId:t,...n},i){return Un.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Un.createElement("title",{id:t},e):null,Un.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"}))}const Xc=Un.forwardRef(Yc);var Qc=Xc;const Vn=se;function Jc({title:e,titleId:t,...n},i){return Vn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Vn.createElement("title",{id:t},e):null,Vn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 10.5V6.75a4.5 4.5 0 119 0v3.75M3.75 21.75h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H3.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"}))}const Zc=Vn.forwardRef(Jc);var qc=Zc;const Gn=se;function eu({title:e,titleId:t,...n},i){return Gn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Gn.createElement("title",{id:t},e):null,Gn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"}))}const tu=Gn.forwardRef(eu);var nu=tu;const Kn=se;function iu({title:e,titleId:t,...n},i){return Kn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Kn.createElement("title",{id:t},e):null,Kn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 12h-15"}))}const ru=Kn.forwardRef(iu);var su=ru;const Yn=se;function ou({title:e,titleId:t,...n},i){return Yn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Yn.createElement("title",{id:t},e):null,Yn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"}))}const au=Yn.forwardRef(ou);var lu=au;const Xn=se;function cu({title:e,titleId:t,...n},i){return Xn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Xn.createElement("title",{id:t},e):null,Xn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"}))}const uu=Xn.forwardRef(cu);var hu=uu;const Qn=se;function fu({title:e,titleId:t,...n},i){return Qn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Qn.createElement("title",{id:t},e):null,Qn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const du=Qn.forwardRef(fu);var gu=du;const Jn=se;function pu({title:e,titleId:t,...n},i){return Jn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Jn.createElement("title",{id:t},e):null,Jn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 9.75h4.875a2.625 2.625 0 010 5.25H12M8.25 9.75L10.5 7.5M8.25 9.75L10.5 12m9-7.243V21.75l-3.75-1.5-3.75 1.5-3.75-1.5-3.75 1.5V4.757c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0111.186 0c1.1.128 1.907 1.077 1.907 2.185z"}))}const mu=Jn.forwardRef(pu);var vu=mu;const Zn=se;function wu({title:e,titleId:t,...n},i){return Zn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Zn.createElement("title",{id:t},e):null,Zn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 01-1.125-1.125v-3.75zM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-8.25zM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-2.25z"}))}const bu=Zn.forwardRef(wu);var yu=bu;const qn=se;function xu({title:e,titleId:t,...n},i){return qn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?qn.createElement("title",{id:t},e):null,qn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"}))}const Su=qn.forwardRef(xu);var ku=Su;const ei=se;function Cu({title:e,titleId:t,...n},i){return ei.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?ei.createElement("title",{id:t},e):null,ei.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 01-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0112 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5"}))}const $u=ei.forwardRef(Cu);var Au=$u;const ti=se;function Eu({title:e,titleId:t,...n},i){return ti.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?ti.createElement("title",{id:t},e):null,ti.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const Lu=ti.forwardRef(Eu);var _u=Lu,ls=nc,Ru=sc,Mu=lc,Tu=hc,cs=gc,us=vc,di=yc,To=kc,Ou=Ac,hs=_c,Fu=Tc,Iu=Ic,Pu=Nc,Du=Wc,Nu=Uc,Bu=Kc,Hu=Qc,Wu=qc,ju=nu,fs=su,zu=lu,Oo=hu,ds=gu,Uu=vu,Vu=yu,Gu=ku,Ku=Au,Yu=_u,O={},Xu={get exports(){return O},set exports(e){O=e}},gi={},Qu=se,Ju=Symbol.for("react.element"),Zu=Symbol.for("react.fragment"),qu=Object.prototype.hasOwnProperty,eh=Qu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,th={key:!0,ref:!0,__self:!0,__source:!0};function Fo(e,t,n){var i,r={},o=null,s=null;for(i in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(s=t.ref),t)qu.call(t,i)&&!th.hasOwnProperty(i)&&(r[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===r[i]&&(r[i]=t[i]);return{$$typeof:Ju,type:e,key:o,ref:s,props:r,_owner:eh.current}}function nh(e){const{handleChangeSettings:t,handleSearch:n}=e,[i,r]=je("theme",""),[o,s]=je("sort","default"),[a,l]=je("groupby","default"),[c,h]=je("showGet","true"),[u,d]=je("showPost","true"),[f,g]=je("showDelete","true"),[p,m]=je("showPut","true"),[v,w]=je("showPatch","true"),[b,y]=je("showHead","true"),x=e=>{l(e.target.value),t(c,u,f,p,v,b,o,e.target.value)},k=e=>{s(e.target.value),t(c,u,f,p,v,b,e.target.value,a)};return se.useEffect((()=>{i?document.documentElement.setAttribute("data-theme",i):(document.documentElement.getAttribute("data-theme")||window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&document.documentElement.setAttribute("data-theme","dark"),document.documentElement.setAttribute("data-theme","light"))}),[]),O.jsx("header",{className:"relative bg-none",children:O.jsxs("div",{className:"navbar bg-base-200",children:[O.jsx("div",{className:"flex-1",children:O.jsx("div",{className:"normal-case text-xl",children:O.jsxs("span",{className:"pl-2",children:[O.jsx("span",{className:"title",children:"Laravel Request Docs"}),O.jsx("sup",{className:"pl-2",children:O.jsx("small",{children:O.jsxs("a",{className:"link link-info",href:"https://github.com/rakutentech/laravel-request-docs/releases/tag/v2.22",target:"_blank",rel:"noreferrer",children:["version ","v2.22"]})})})]})})}),O.jsxs("div",{className:"flex-none",children:[O.jsx("div",{className:"form-control",children:O.jsxs("label",{htmlFor:"search",className:"relative text-gray-400 focus-within:text-gray-600 block",children:[O.jsx(ju,{className:"pointer-events-none w-4 h-4 absolute top-1/2 transform -translate-y-1/2 left-3"}),O.jsx("input",{type:"text",placeholder:"Filter APIs",className:"input pl-10 input-sm input-bordered",onChange:e=>n(e.target.value)})]})}),O.jsx("div",{className:"menu menu-horizontal px-6 ",children:O.jsxs("label",{className:"swap swap-rotate",children:[O.jsx("input",{type:"checkbox",onChange:()=>{"dark"===document.documentElement.getAttribute("data-theme")?(r("light"),document.documentElement.setAttribute("data-theme","light")):(r("dark"),document.documentElement.setAttribute("data-theme","dark"))}}),"dark"===i?O.jsx(Gu,{className:"h-6 w-6"}):O.jsx(zu,{className:"h-6 w-6"})]})}),O.jsxs("div",{className:"ml-1",children:[O.jsx("a",{href:"#modal-settings",className:"btn btn-ghost btn-sm",children:O.jsx("span",{className:"pr-1",children:O.jsx(hs,{className:"h-6 w-6"})})}),O.jsx("div",{className:"modal",id:"modal-settings",children:O.jsxs("div",{className:"modal-box",children:[O.jsx("div",{className:"modal-action float-right",children:O.jsxs("a",{href:"#",className:"btn btn-sm btn-ghost",children:[O.jsx(Yu,{className:"h-6 w-6"})," Close"]})}),O.jsxs("h3",{className:"font-bold text-lg mt-7",children:[O.jsx(hs,{className:"inline-block h-6 w-6 mr-1"}),"Settings"]}),O.jsx("div",{className:"divider"}),O.jsxs("h4",{className:"font-bold mt-10",children:[O.jsx(Mu,{className:"inline-block h-6 w-6 mr-1"}),"Sort By"]}),O.jsx("div",{className:"divider"}),O.jsx("div",{className:"form-control",children:O.jsxs("label",{className:"label",children:[O.jsx("input",{type:"radio",onChange:k,value:"default",className:"radio",checked:"default"==o}),O.jsx("span",{className:"label-text",children:"Default"}),O.jsx("input",{type:"radio",onChange:k,value:"route_names",className:"radio",checked:"route_names"==o}),O.jsx("span",{className:"label-text",children:"Route Names"}),O.jsx("input",{type:"radio",onChange:k,value:"method_names",className:"radio",checked:"method_names"==o}),O.jsx("span",{className:"label-text",children:"HTTP Methods"})]})}),O.jsxs("h4",{className:"font-bold mt-10",children:[O.jsx(Vu,{className:"inline-block h-6 w-6 mr-1"}),"Group By"]}),O.jsx("div",{className:"divider"}),O.jsx("div",{className:"form-control",children:O.jsxs("label",{className:"label",children:[O.jsx("input",{type:"radio",onChange:x,value:"default",className:"radio",checked:"default"==a}),O.jsx("span",{className:"label-text",children:"Default"}),O.jsx("input",{type:"radio",onChange:x,value:"api_uri",className:"radio",checked:"api_uri"==a}),O.jsx("span",{className:"label-text",children:"API Name"}),O.jsx("input",{type:"radio",onChange:x,value:"controller_full_path",className:"radio",checked:"controller_full_path"==a}),O.jsx("span",{className:"label-text",children:"Controller Name"})]})}),O.jsxs("h4",{className:"font-bold mt-10",children:[O.jsx(Nu,{className:"inline-block h-6 w-6 mr-1"}),"Filter Settings"]}),O.jsx("div",{className:"divider"}),O.jsxs("div",{className:"form-control",children:[O.jsxs("label",{className:"label",children:[O.jsx("span",{className:"label-text",children:"GET"}),O.jsx("input",{type:"checkbox",onChange:e=>{h(e.target.checked),t(e.target.checked,u,f,p,v,b,o,a)},className:"toggle toggle-success",checked:"true"==c})]}),O.jsxs("label",{className:"label",children:[O.jsx("span",{className:"label-text",children:"POST"}),O.jsx("input",{type:"checkbox",onChange:e=>{d(e.target.checked),t(c,e.target.checked,f,p,v,b,o,a)},className:"toggle toggle-success",checked:"true"==u})]}),O.jsxs("label",{className:"label",children:[O.jsx("span",{className:"label-text",children:"DELETE"}),O.jsx("input",{type:"checkbox",onChange:e=>{g(e.target.checked),t(c,u,e.target.checked,p,v,b,o,a)},className:"toggle toggle-success",checked:"true"==f})]}),O.jsxs("label",{className:"label",children:[O.jsx("span",{className:"label-text",children:"PUT"}),O.jsx("input",{type:"checkbox",onChange:e=>{m(e.target.checked),t(c,u,f,e.target.checked,v,b,o,a)},className:"toggle toggle-success",checked:"true"==p})]}),O.jsxs("label",{className:"label",children:[O.jsx("span",{className:"label-text",children:"PATCH"}),O.jsx("input",{type:"checkbox",onChange:e=>{w(e.target.checked),t(c,u,f,p,e.target.checked,b,o,a)},className:"toggle toggle-success",checked:"true"==v})]}),O.jsxs("label",{className:"label",children:[O.jsx("span",{className:"label-text",children:"HEAD"}),O.jsx("input",{type:"checkbox",onChange:e=>{y(e.target.checked),t(c,u,f,p,v,e.target.checked,o,a)},className:"toggle toggle-success",checked:"true"==b})]})]}),O.jsxs("h4",{className:"font-bold mt-10",children:[O.jsx(To,{className:"inline-block h-6 w-6 mr-1"}),"Storage"]}),O.jsx("div",{className:"divider"}),O.jsx("div",{className:"form-control",children:O.jsxs("label",{className:"label",children:[O.jsxs("span",{className:"label-text",children:["Clear localstorage",O.jsx("p",{children:O.jsx("small",{children:"Delete localstorage data, request body and queries"})})]}),O.jsx("button",{className:"btn btn-sm btn-error",onClick:()=>{localStorage.clear(),window.location.reload()},children:"Clear"})]})})]})})]}),O.jsx("div",{className:"ml-1 ",children:O.jsxs("a",{className:"btn btn-ghost btn-sm",href:"/request-docs/api?openapi=true",target:"_blank",children:[O.jsx("span",{className:"pr-1",children:O.jsx(Ru,{className:"h-6 w-6"})}),"OpenAPI 3.0"]})}),O.jsx("div",{className:"ml-1 ",children:O.jsxs("a",{className:"btn btn-ghost btn-sm",href:"https://github.com/rakutentech/laravel-request-docs/issues/new",target:"_blank",rel:"noreferrer",children:[O.jsx("span",{className:"pr-1",children:O.jsx(Tu,{className:"h-6 w-6"})}),"Feature request"]})})]})]})})}gi.Fragment=Zu,gi.jsx=Fo,gi.jsxs=Fo,Xu.exports=gi;var rr={},ih={get exports(){return rr},set exports(e){rr=e}};!function(e,t){var n;typeof self<"u"&&self,ih.exports=(n=se,function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(1));function r(e){return e&&e.__esModule?e:{default:e}}t.default=i.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=function(e){function t(e){c(this,t);var n=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.smoothScroll=n.smoothScroll.bind(n),n}return u(t,e),r(t,[{key:"componentDidMount",value:function(){n(3).polyfill()}},{key:"smoothScroll",value:function(e){var t=this;e.preventDefault();var n=function(){return 0};typeof this.props.offset<"u"&&(n=this.props.offset&&this.props.offset.constructor&&this.props.offset.apply?this.props.offset:function(){return parseInt(t.props.offset)});var i=e.currentTarget.getAttribute("href").slice(1),r=document.getElementById(i).getBoundingClientRect().top+window.pageYOffset;window.scroll({top:r-n(),behavior:"smooth"}),this.props.onClick&&this.props.onClick(e)}},{key:"render",value:function(){var e=this.props;e.offset;var t=l(e,["offset"]);return s.default.createElement("a",i({},t,{onClick:this.smoothScroll}))}}]),t}(o.Component);t.default=d},function(e,t){e.exports=n},function(e,t,n){!function(){function t(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n=e.HTMLElement||e.Element,i=468,r={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||l,scrollIntoView:n.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=a(e.navigator.userAgent)?1:0;e.scroll=e.scrollTo=function(){if(void 0!==arguments[0]){if(!0===h(arguments[0]))return void r.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset);m.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(void 0!==arguments[0]){if(h(arguments[0]))return void r.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0);m.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0]){if(!0===h(arguments[0])){if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");return void r.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}var e=arguments[0].left,t=arguments[0].top;m.call(this,this,typeof e>"u"?this.scrollLeft:~~e,typeof t>"u"?this.scrollTop:~~t)}},n.prototype.scrollBy=function(){if(void 0!==arguments[0]){if(!0===h(arguments[0]))return void r.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},n.prototype.scrollIntoView=function(){if(!0!==h(arguments[0])){var n=g(this),i=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(m.call(this,n,n.scrollLeft+o.left-i.left,n.scrollTop+o.top-i.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else r.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function a(e){return new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(e)}function l(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){return.5*(1-Math.cos(Math.PI*e))}function h(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+s1?1:a),r=t.startX+(t.x-t.startX)*n,s=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,s),(r!==t.x||s!==t.y)&&e.requestAnimationFrame(p.bind(e,t))}function m(n,i,s){var a,c,h,u,d=o();n===t.body?(a=e,c=e.scrollX||e.pageXOffset,h=e.scrollY||e.pageYOffset,u=r.scroll):(a=n,c=n.scrollLeft,h=n.scrollTop,u=l),p({scrollable:a,method:u,startTime:d,startX:c,startY:h,x:i,y:s})}}e.exports={polyfill:t}}()}]))}();const rh=fi(rr);var sr={},sh={get exports(){return sr},set exports(e){sr=e}},or={},oh={get exports(){return or},set exports(e){or=e}},ni=1;function ah(){return(ni=(9301*ni+49297)%233280)/233280}function lh(e){ni=e}var $t,gs,on,ch={nextValue:ah,seed:lh},ar=ch,It="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function lr(){on=!1}function Io(e){if(e){if(e!==$t){if(e.length!==It.length)throw new Error("Custom alphabet for shortid must be "+It.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter((function(e,t,n){return t!==n.lastIndexOf(e)}));if(t.length)throw new Error("Custom alphabet for shortid must be "+It.length+" unique characters. These characters were not unique: "+t.join(", "));$t=e,lr()}}else $t!==It&&($t=It,lr())}function uh(e){return Io(e),$t}function hh(e){ar.seed(e),gs!==e&&(lr(),gs=e)}function fh(){$t||Io(It);for(var e,t=$t.split(""),n=[],i=ar.nextValue();t.length>0;)i=ar.nextValue(),e=Math.floor(i*t.length),n.push(t.splice(e,1)[0]);return n.join("")}function Po(){return on||(on=fh())}function dh(e){return Po()[e]}function gh(){return $t||It}var cr,_r={get:gh,characters:uh,seed:hh,lookup:dh,shuffled:Po},Bi="object"==typeof window&&(window.crypto||window.msCrypto),ph=cr=Bi&&Bi.getRandomValues?function(e){return Bi.getRandomValues(new Uint8Array(e))}:function(e){for(var t=[],n=0;n0&&(t+=Sn(kn)),t+=Sn(n)}var $h=Ch,Ah=_r;function Eh(e){return!(!e||"string"!=typeof e||e.length<6)&&!new RegExp("[^"+Ah.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(e)}var Lh=Eh;!function(e){var t=_r,n=$h,i=Lh,r=0;function o(){return n(r)}e.exports=o,e.exports.generate=o,e.exports.seed=function(n){return t.seed(n),e.exports},e.exports.worker=function(t){return r=t,e.exports},e.exports.characters=function(e){return void 0!==e&&t.characters(e),t.shuffled()},e.exports.isValid=i}(oh),sh.exports=or;const Te=fi(sr),ii=se;function _h({title:e,titleId:t,...n},i){return ii.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?ii.createElement("title",{id:t},e):null,ii.createElement("path",{fillRule:"evenodd",d:"M2.625 6.75a1.125 1.125 0 112.25 0 1.125 1.125 0 01-2.25 0zm4.875 0A.75.75 0 018.25 6h12a.75.75 0 010 1.5h-12a.75.75 0 01-.75-.75zM2.625 12a1.125 1.125 0 112.25 0 1.125 1.125 0 01-2.25 0zM7.5 12a.75.75 0 01.75-.75h12a.75.75 0 010 1.5h-12A.75.75 0 017.5 12zm-4.875 5.25a1.125 1.125 0 112.25 0 1.125 1.125 0 01-2.25 0zm4.875 0a.75.75 0 01.75-.75h12a.75.75 0 010 1.5h-12a.75.75 0 01-.75-.75z",clipRule:"evenodd"}))}const Rh=ii.forwardRef(_h);var Mh=Rh,Th=Mh;function Oh(e){const{lrdDocsJson:t}=e;return O.jsx(O.Fragment,{children:O.jsxs("aside",{children:[O.jsxs("h2",{className:"title pl-5 pt-2 mb-5",children:[O.jsx(Th,{className:"inline-block w-4 h-4 mr-1"}),"API List ",O.jsxs("span",{className:"text-slate-500 capitalize float-right mr-5",children:["Total ",t.length]})]}),O.jsxs("ul",{children:[t.map((e=>O.jsxs("div",{children:[null!=e.group&&""!=e.group&&0==e.group_index&&O.jsx("li",{className:"pt-5 text-slate-600",children:e.group.split("\\").pop()}),O.jsx("li",{children:O.jsxs(rh,{href:"#"+e.http_method+e.uri,offset:()=>120,onClick:()=>{window.history.pushState({},"","#"+e.http_method+e.uri)},className:"flex flex-row px-0 py-1",children:[O.jsx("span",{className:`method-${e.http_method} uppercase text-xs w-12 p-0 flex flex-row-reverse`,children:e.http_method}),O.jsx("span",{className:"flex-1 p-0 text-sm text-left break-all",children:e.uri})]})})]},Te.generate()))),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"})]})]})})}const Fh='{\n "Content-Type": "application/json",\n "Accept": "application/json"\n}',oi=(e,t,n)=>{let i="";const r=Math.floor(e.length/t);for(let o=0;o{let o="curl";o+=`\n -X ${n}`;try{const e=JSON.parse(r);for(const[t,n]of Object.entries(e))o+=`\n -H "${t}: ${n}"`}catch{o+='\n -H "Content-Type: application/json"'}return"GET"===n||"DELETE"===n||"HEAD"===n?(o+=`\n ${e}/${t}`,o+=`\n${i}`,o):"POST"===n||"PUT"===n||"PATCH"===n?(n=>(o+=`\n ${e}/${t}`,o+=`\n -d '${n}'`,o))(i):""};function ms(e){const{rules:t,mainRule:n}=e,i=e=>{const t=e.rule,n=t.split(":");if("url"==t)return O.jsxs("div",{className:"block",children:[O.jsx(Hu,{className:"inline-block w-4 h-4"})," ",t]});if("email"==t)return O.jsxs("div",{className:"block",children:[O.jsx(Pu,{className:"inline-block w-4 h-4"})," ",t]});if(n.length<2)return O.jsx("div",{className:"",dangerouslySetInnerHTML:{__html:oi(t,50,"
")}});const i=n[0],r=n.slice(1).join(" ");return"max"==i?O.jsx("div",{className:"block badge badge-primary badge-outline mt-1 mb-1 rounded-sm",children:`<= ${r}`}):"min"==i?O.jsx("div",{className:"block badge badge-primary badge-outline mt-1 mb-1 rounded-sm",children:`>= ${r}`}):"date_format"==i?O.jsx("div",{className:"block badge badge-info badge-outline mt-1 mb-1 rounded-sm",children:`Format: ${r}`}):"regex"==i?O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"inline-block badge badge-info badge-outline mt-1 mb-1 mr-2 rounded-sm",children:"Regexp"}),O.jsxs("code",{children:["$",r]})]}):O.jsx("div",{className:"",dangerouslySetInnerHTML:{__html:oi(t,50,"
")}})};return O.jsx(O.Fragment,{children:O.jsxs("tr",{children:[O.jsxs("th",{className:"param-cell",children:[O.jsx("span",{className:"text-blue-500 pr-1",children:"¬"}),O.jsxs("code",{className:"pl-1",children:[n,n.endsWith(".*")?O.jsx(di,{className:"inline-block w-4 h-4"},Te.generate()):O.jsx("span",{},Te.generate())]}),t.map((e=>e.split("|").map((e=>"file"==e||"image"==e?O.jsx("div",{className:"block badge badge-success badge-outline ml-4 mt-1 mb-1 rounded-sm title",children:e},Te.generate()):O.jsx("span",{},Te.generate()))))),t.map((e=>e.split("|").map((e=>"required"==e?O.jsx("div",{className:"block ml-6",children:O.jsx("code",{className:"text-error font-normal",children:e})},Te.generate()):O.jsx("span",{},Te.generate()))))),t.map((e=>e.split("|").map((e=>e.startsWith("required_if")?O.jsx("div",{className:"block ml-6",children:O.jsx("code",{className:"text-red-300 font-normal",children:"required_if"})},Te.generate()):O.jsx("span",{},Te.generate())))))]}),O.jsxs("td",{children:[t.map((e=>e.split("|").map((e=>"required"==e?O.jsx("span",{},Te.generate()):"integer"==e||"string"==e||"bool"==e||"date"==e||"file"==e||"image"==e||"array"==e||"nullable"==e?O.jsx("div",{className:"capitalize text-slate-500",children:e},Te.generate()):O.jsx("span",{},Te.generate()))))),t.map((e=>e.split("|").map((e=>O.jsx("span",{},Te.generate()))))),t.map((e=>e.split("|").map((e=>"required"==e||"integer"==e||"string"==e||"bool"==e||"date"==e||"file"==e||"image"==e||"array"==e||"nullable"==e?O.jsx("span",{},Te.generate()):O.jsx("span",{children:O.jsx(i,{rule:e})},Te.generate())))))]})]})})}function Ih(e){const{lrdDocsItem:t,method:n}=e,[i,r]=se.useState(!1);return se.useEffect((()=>{const e=[];for(const[n,i]of Object.entries(t.rules)){if(0==i.length)continue;const t=i[0].split("|");(t.includes("file")||t.includes("image"))&&e.push(n)}r(e.length>0)}),[]),O.jsxs(O.Fragment,{children:[O.jsxs("h2",{className:"text-lg",id:n+t.uri,children:[O.jsx("span",{className:`badge badge-ghost rounded-none method-${n}`,children:n}),O.jsx("span",{className:"pl-5",children:t.uri})]}),O.jsxs("h3",{className:"pt-4",children:[O.jsx("span",{className:"text-sm text-slate-500",children:"REQUEST SCHEMA"}),O.jsx("br",{}),O.jsx("code",{className:"text-xs",children:i?"multipart/form-data":"application/json"})]}),Object.keys(t.path_parameters).length>0&&O.jsxs(O.Fragment,{children:[O.jsx("h3",{className:"pt-4",children:O.jsx("span",{className:"text-sm text-slate-500",children:"PATH PARAMETERS"})}),O.jsx("div",{className:"pt-4",children:O.jsx("table",{className:"table table-fixed table-compact w-full",children:O.jsx("tbody",{children:Object.keys(t.path_parameters).map((e=>O.jsx(ms,{mainRule:e,rules:t.path_parameters[e]},Te.generate())))})})})]}),O.jsxs("h3",{className:"pt-4",children:[O.jsx("span",{className:"text-sm text-slate-500",children:"POST"==n||"PUT"==n||"PATCH"==n?"REQUEST BODY PARAMETERS":"QUERY PARAMETERS"}),t.rules&&0==Object.keys(t.rules).length&&O.jsx("div",{className:"text-sm text-slate-500",children:"No Rules Defined"})]}),O.jsx("div",{className:"pt-4",children:O.jsx("table",{className:"table table-fixed table-compact w-full",children:O.jsx("tbody",{children:t.rules&&Object.keys(t.rules).map((e=>O.jsx(ms,{mainRule:e,rules:t.rules[e]},Te.generate())))})})})]})}var Gt={},Ph={get exports(){return Gt},set exports(e){Gt=e}};!function(e,t){(function(){var e=function(){return this}();!e&&typeof window<"u"&&(e=window);var t=function(e,n,i){"string"==typeof e?(2==arguments.length&&(i=n),t.modules[e]||(t.payloads[e]=i,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n,i,r=function(e,t,n){if("string"==typeof t){var i=a(e,t);if(null!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],s=0,l=t.length;sn.length)&&(t=n.length),t-=e.length;var i=n.indexOf(e,t);return-1!==i&&i===t})),String.prototype.repeat||i(String.prototype,"repeat",(function(e){for(var t="",n=this;e>0;)1&e&&(t+=n),(e>>=1)&&(n+=n);return t})),String.prototype.includes||i(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n>>0,i=arguments[1]>>0,r=i<0?Math.max(n+i,0):Math.min(i,n),o=arguments[2],s=void 0===o?n:o>>0,a=s<0?Math.max(n+s,0):Math.min(s,n);r0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isAndroid=o.indexOf("Android")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){var i=e("./useragent");t.buildDom=function e(t,n,i){if("string"==typeof t&&t){var r=document.createTextNode(t);return n&&n.appendChild(r),r}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var o=[],s=0;s"u")){if(o)if(i)s();else if(!1===i)return o.push([e,n]);if(!r){var a=i;i&&i.getRootNode?(!(a=i.getRootNode())||a==i)&&(a=document):a=document;var l=a.ownerDocument||a;if(n&&t.hasCssString(n,a))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var c=t.createElement("style");c.appendChild(l.createTextNode(e)),n&&(c.id=n),a==l&&(a=t.getDocumentHead(l)),a.insertBefore(c,a.firstChild)}}}if(t.useStrictCSP=function(e){r=e,0==e?s():o||(o=[])},t.importCssString=a,t.importCssStylsheet=function(e,n){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(n))},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=t.createElement("ace_outer"),r=i.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",i.appendChild(n);var o=e&&e.documentElement||document&&document.documentElement;if(!o)return 0;o.appendChild(i);var s=n.offsetWidth;r.overflow="scroll";var a=n.offsetWidth;return s===a&&(a=i.clientWidth),o.removeChild(i),s-a},t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!i.isWin||typeof window<"u"&&window.devicePixelRatio>=1.5,i.isChromeOS&&(t.HI_DPI=!1),typeof document<"u"){var l=document.createElement("div");t.HI_DPI&&void 0!==l.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),!i.isEdge&&typeof l.style.animationName<"u"&&(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){var i=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=i.getDocumentHead(),r=document.createElement("script");r.src=e,n.appendChild(r),r.onload=r.onreadystatechange=function(e,n){(n||!r.readyState||"loaded"==r.readyState||"complete"==r.readyState)&&(r=r.onload=r.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,n){var i={},r=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],i=this._defaultHandlers[e];if(n.length||i){("object"!=typeof t||!t)&&(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=o),n=n.slice();for(var s=0;s1&&(r=n[n.length-2]);var s=a[t+"Path"];return null==s?s=a.basePath:"/"==i&&(t=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+i+r+this.get("suffix")},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t};var l=function(t,n){return"ace/theme/textmate"==t?n(null,e("./theme/textmate")):console.error("loader is not configured")};t.setLoader=function(e){l=e},t.$loading={},t.loadModule=function(n,i){var o,s;Array.isArray(n)&&(s=n[0],n=n[1]);try{o=e(n)}catch{}if(o&&!t.$loading[n])return i&&i(o);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(i),!(t.$loading[n].length>1)){var a=function(){l(n,(function(e,i){t._emit("load.module",{name:n,module:i});var r=t.$loading[n];t.$loading[n]=null,r.forEach((function(e){e&&e(i)}))}))};if(!t.get("packaged"))return a();r.loadScript(t.moduleUrl(n,s),a),c()}};var c=function(){!a.basePath&&!a.workerPath&&!a.modePath&&!a.themePath&&!Object.keys(a.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};t.version="1.15.2"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,n){e("./lib/fixoldbrowsers");var i=e("./config");i.setLoader((function(t,n){e([t],(function(e){n(null,e)}))}));var r=function(){return this||typeof window<"u"&&window}();function o(t){if(r&&r.document){i.set("packaged",t||e.packaged||n.packaged||r.define&&(void 0).packaged);for(var o={},a="",l=document.currentScript||document._currentScript,c=(l&&l.ownerDocument||document).getElementsByTagName("script"),h=0;h1?++u>4&&(u=1):u=1,o.isIE){var s=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-l)>5;(!c||s)&&(u=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[u-1]||600),1==u&&(a=e.clientX,l=e.clientY)}if(e._clicks=u,i[r]("mousedown",e),u>4)u=0;else if(u>1)return i[r](d[u],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){h(e,"mousedown",f,s)}))};var d=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function f(e,t,n){var i=d(t);if(!o.isMac&&s){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),s.altGr){if(3==(3&i))return;s.altGr=0}if(18===n||17===n){var l="location"in t?t.location:t.keyLocation;if(17===n&&1===l)1==s[n]&&(a=t.timeStamp);else if(18===n&&3===i&&2===l){t.timeStamp-a<50&&(s.altGr=!0)}}}if((n in r.MODIFIER_KEYS&&(n=-1),!i&&13===n)&&(3===(l="location"in t?t.location:t.keyLocation)&&(e(t,i,-n),t.defaultPrevented)))return;if(o.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&e(t,i,n)}function g(){s=Object.create(null)}if(t.getModifierString=function(e){return r.KEY_MODS[d(e)]},t.addCommandKeyListener=function(e,n,i){if(o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)){var r=null;h(e,"keydown",(function(e){r=e.keyCode}),i),h(e,"keypress",(function(e){return f(n,e,r)}),i)}else{var a=null;h(e,"keydown",(function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=f(n,e,e.keyCode);return a=e.defaultPrevented,t}),i),h(e,"keypress",(function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)}),i),h(e,"keyup",(function(e){s[e.keyCode]=null}),i),s||(g(),h(window,"focus",g))}},"object"==typeof window&&window.postMessage&&!o.isOldIE){var p=1;t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-"+p++,r=function(o){o.data==i&&(t.stopPropagation(o),u(n,"message",r),e())};h(n,"message",r),n.postMessage(i,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){var i=function(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&!(this.isEnd(e,t)||this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var r={row:t+1,column:0};else if(this.start.rowDate.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=e("../clipboard"),l=r.isChrome<18,c=r.isIE,h=r.isChrome>63,u=400,d=e("../lib/keys"),f=d.KEY_MODS,g=r.isIOS,p=g?/\s/:/\n/,m=r.isMobile;t.TextInput=function(e,t){var n=o.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var v=!1,w=!1,b=!1,y=!1,x="";m||(n.style.fontSize="1px");var k=!1,S=!1,C="",$=0,A=0,L=0;try{var _=document.activeElement===n}catch{}this.setAriaOptions=function(e){e.activeDescendant?(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-autocomplete","list"),n.setAttribute("aria-activedescendant",e.activeDescendant)):(n.setAttribute("aria-haspopup","false"),n.setAttribute("aria-autocomplete","both"),n.removeAttribute("aria-activedescendant")),e.role&&n.setAttribute("role",e.role)},this.setAriaOptions({role:"textbox"}),i.addListener(n,"blur",(function(e){S||(t.onBlur(e),_=!1)}),t),i.addListener(n,"focus",(function(e){if(!S){if(_=!0,r.isEdge)try{if(!document.hasFocus())return}catch{}t.onFocus(e),r.isEdge?setTimeout(E):E()}}),t),this.$focusScroll=!1,this.focus=function(){if(x||h||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch{return}var i=[];if(t)for(var r=n.parentElement;r&&1==r.nodeType;)i.push(r),r.setAttribute("ace_nocontext",!0),r=!r.parentElement&&r.getRootNode?r.getRootNode().host:r.parentElement;n.focus({preventScroll:!0}),t&&i.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return _},t.on("beforeEndOperation",(function(){var e=t.curOp,i=e&&e.command&&e.command.name;if("insertstring"!=i){var r=i&&(e.docChanged||e.selectionChanged);b&&r&&(C=n.value="",B()),E()}}));var E=g?function(e){if(_&&(!v||e)&&!y){e||(e="");var i="\n ab"+e+"cde fg\n";i!=n.value&&(n.value=C=i);var r=4+(e.length||(t.selection.isEmpty()?0:1));(4!=$||A!=r)&&n.setSelectionRange(4,r),$=4,A=r}}:function(){if(!b&&!y&&(_||R)){b=!0;var e=0,i=0,r="";if(t.session){var o=t.selection,s=o.getRange(),a=o.cursor.row;if(e=s.start.column,i=s.end.column,r=t.session.getLine(a),s.start.row!=a){var l=t.session.getLine(a-1);e=s.start.rowa+1?c.length:i,i+=r.length+1,r=r+"\n"+c}else m&&a>0&&(r="\n"+r,i+=1,e+=1);r.length>u&&(e0&&C[d]==e[d];)d++,a--;for(c=c.slice(d),d=1;l>0&&C.length-d>$-1&&C[C.length-d]==e[e.length-d];)d++,l--;h-=d-1,u-=d-1;var f=c.length-d+1;if(f<0&&(a=-f,f=0),c=c.slice(0,f),!(i||c||h||a||l||u))return"";y=!0;var g=!1;return r.isAndroid&&". "==c&&(c=" ",g=!0),c&&!a&&!l&&!h&&!u||k?t.onTextInput(c):t.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:h,restoreEnd:u}),y=!1,C=e,$=o,A=s,L=u,g?"\n":c},O=function(e){if(b)return j();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var i=n.value,r=T(i,!0);(i.length>500||p.test(r)||m&&$<1&&$==A)&&E()},F=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!l){var r=c||n?"Text":"text/plain";try{return t?!1!==i.setData(r,t):i.getData(r)}catch(e){if(!n)return F(e,t,!0)}}},I=function(e,r){var o=t.getCopyText();if(!o)return i.preventDefault(e);F(e,o)?(g&&(E(o),v=o,setTimeout((function(){v=!1}),10)),r?t.onCut():t.onCopy(),i.preventDefault(e)):(v=!0,n.value=o,n.select(),setTimeout((function(){v=!1,E(),r?t.onCut():t.onCopy()})))},N=function(e){I(e,!0)},D=function(e){I(e,!1)},P=function(e){var o=F(e);a.pasteCancelled()||("string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout(E),i.preventDefault(e)):(n.value="",w=!0))};i.addCommandKeyListener(n,t.onCommandKey.bind(t),t),i.addListener(n,"select",(function(e){b||(v?v=!1:function(e){return 0===e.selectionStart&&e.selectionEnd>=C.length&&e.value===C&&C&&e.selectionEnd!==A}(n)?(t.selectAll(),E()):m&&n.selectionStart!=$&&E())}),t),i.addListener(n,"input",O,t),i.addListener(n,"cut",N,t),i.addListener(n,"copy",D,t),i.addListener(n,"paste",P,t),(!("oncut"in n)||!("oncopy"in n)||!("onpaste"in n))&&i.addListener(e,"keydown",(function(e){if((!r.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:D(e);break;case 86:P(e);break;case 88:N(e)}}),t);var j=function(){if(b&&t.onCompositionUpdate&&!t.$readOnly){if(k)return H();if(b.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;T(e),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+A-b.selectionStart+L)}}},B=function(e){!t.onCompositionEnd||t.$readOnly||(b=!1,t.onCompositionEnd(),t.off("mousedown",H),e&&O())};function H(){S=!0,n.blur(),n.focus(),S=!1}var W,z=s.delayedCall(j,50).schedule.bind(null,null);function V(){clearTimeout(W),W=setTimeout((function(){x&&(n.style.cssText=x,x=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}i.addListener(n,"compositionstart",(function(e){if(!b&&t.onCompositionStart&&!t.$readOnly&&(b={},!k)){e.data&&(b.useTextareaForIME=!1),setTimeout(j,0),t._signal("compositionStart"),t.on("mousedown",H);var i=t.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,b.markerRange=i,b.selectionStart=$,t.onCompositionStart(b),b.useTextareaForIME?(C=n.value="",$=0,A=0):(n.msGetInputContext&&(b.context=n.msGetInputContext()),n.getInputContext&&(b.context=n.getInputContext()))}}),t),i.addListener(n,"compositionupdate",j,t),i.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.lengthA&&"\n"==C[o]?s=d.end:i<$&&" "==C[i-1]?(s=d.left,a=f.option):i<$||i==$&&A!=$&&i==o?s=d.left:o>A&&C.slice(0,o).split("\n").length>2?s=d.down:o>A&&" "==C[o-1]?(s=d.right,a=f.option):(o>A||o==A&&A!=$&&i==o)&&(s=d.right),i!==o&&(a|=f.shift),s){if(!t.onCommandKey({},a,s)&&t.commands){s=d.keyCodeToString(s);var l=t.commands.findKeyCommand(a,s);l&&t.execCommand(l)}$=i,A=o,E("")}}};document.addEventListener("selectionchange",o),t.on("destroy",(function(){document.removeEventListener("selectionchange",o)}))}(0,t,n),this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}},t.$setUserAgentForTests=function(e,t){m=e,g=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/useragent");function r(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function o(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,o=e.getButton();return 0!==o?((r.getSelectionRange().isEmpty()||1==o)&&r.selection.moveToPosition(n),void(2==o&&(r.textInput.onContextMenu(e.domEvent),i.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var r=o(this.$clickSelection,n);n=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[e](i.row,i.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==s&&a<=0)t=this.$clickSelection.end,(r.end.row!=i.row||r.end.column!=i.column)&&(i=r.start);else if(1==a&&s>=0)t=this.$clickSelection.start,(r.start.row!=i.row||r.start.column!=i.column)&&(i=r.end);else if(-1==s&&1==a)i=r.end,t=r.start;else{var l=o(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},this.focusWait=function(){var e=function(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>0||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=e.domEvent.timeStamp,r=i-n.t,o=r?e.wheelX/r:n.vx,s=r?e.wheelY/r:n.vy;r<550&&(o=(o+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(o/s),l=!1;if(a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l)n.allowed=i;else if(i-n.allowed<550){Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0}if(n.t=i,n.vx=o,n.vy=s,l)return t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}}}).call(r.prototype),t.DefaultHandlers=r})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){e("./lib/oop");var i=e("./lib/dom"),r="ace_tooltip";function o(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(o.prototype),t.Tooltip=o})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event"),s=e("../tooltip").Tooltip;function a(e){s.call(this,e)}r.inherits(a,s),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();(e+=15)+r>n&&(e-=e+r-n),(t+=15)+o>i&&(t-=20+o),s.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,n,r,s=e.editor,l=s.renderer.$gutterLayer,c=new a(s.container);function h(){t&&(t=clearTimeout(t)),r&&(c.hide(),r=null,s._signal("hideGutterTooltip",c),s.off("mousewheel",h))}function u(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(s.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,i=s.session.selection;if(t.getShiftKey())i.selectTo(n,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(o){var a=o.domEvent.target||o.domEvent.srcElement;if(i.hasCssClass(a,"ace_fold-widget"))return h();r&&e.$tooltipFollowsMouse&&u(o),n=o,!t&&(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,i=l.$annotations[t];if(!i)return h();if(t==s.session.getLength()){var o=s.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(o>s.session.documentToScreenRow(a.row,a.column))return h()}if(r!=i){r=i.text.join("
"),c.setHtml(r);var d=i.className;if(d&&c.setClassName(d.trim()),c.show(),s._signal("showGutterTooltip",c),s.on("mousewheel",h),e.$tooltipFollowsMouse)u(n);else{var f=n.domEvent.target.getBoundingClientRect(),g=c.getElement().style;g.left=f.right+"px",g.top=f.bottom+"px"}}}():h()}),50))})),o.addListener(s.renderer.$gutter,"mouseout",(function(e){n=null,r&&!t&&(t=setTimeout((function(){t=null,h()}),50))}),s),s.on("changeSession",h)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/dom"),r=e("../lib/event"),o=e("../lib/useragent");function s(e){var t=e.editor,n=i.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ";["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var s,l,c,h,u,d,f,g,p,m,v,w=t.container,b=0;function y(){var e=d;(function(e,n){var i=Date.now(),r=!n||e.row!=n.row,o=!n||e.column!=n.column;!m||r||o?(t.moveCursorToPosition(e),m=i,v={x:l,y:c}):a(v.x,v.y,l,c)>5?m=null:i-m>=200&&(t.renderer.scrollCursorIntoView(),m=null)})(d=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var i=Date.now(),r=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,s=t.renderer.scroller.getBoundingClientRect(),a={x:{left:l-s.left,right:s.right-l},y:{top:c-s.top,bottom:s.bottom-c}},h=Math.min(a.x.left,a.x.right),u=Math.min(a.y.top,a.y.bottom),d={row:e.row,column:e.column};h/o<=2&&(d.column+=a.x.left=200&&t.renderer.scrollCursorIntoView(d):p=i:p=null}(d,e)}function x(){u=t.selection.toOrientedRange(),s=t.session.addMarker(u,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(h),y(),h=setInterval(y,20),b=0,r.addListener(document,"mousemove",C)}function k(){clearInterval(h),t.session.removeMarker(s),s=null,t.selection.fromOrientedRange(u),t.isFocused()&&!g&&t.$resetCursorStyle(),u=null,d=null,b=0,p=null,m=null,r.removeListener(document,"mousemove",C)}this.onDragStart=function(e){if(this.cancelDrag||!w.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(e)}),0),e.preventDefault()}u=t.getSelectionRange();var r=e.dataTransfer;r.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),r.setDragImage&&r.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),r.clearData(),r.setData("Text",t.session.getTextRange()),g=!0,this.setState("drag")},this.onDragEnd=function(e){if(w.draggable=!1,g=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;!f&&"move"==n&&t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&$(e.dataTransfer))return l=e.clientX,c=e.clientY,s||x(),b++,e.dataTransfer.dropEffect=f=A(e),r.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&$(e.dataTransfer))return l=e.clientX,c=e.clientY,s||(x(),b++),null!==S&&(S=null),e.dataTransfer.dropEffect=f=A(e),r.preventDefault(e)},this.onDragLeave=function(e){if(--b<=0&&s)return k(),f=null,r.preventDefault(e)},this.onDrop=function(e){if(d){var n=e.dataTransfer;if(g)switch(f){case"move":u=u.contains(d.row,d.column)?{start:d,end:d}:t.moveText(u,d);break;case"copy":u=t.moveText(u,d,!0)}else{var i=n.getData("Text");u={start:d,end:t.session.insert(d,i)},t.focus(),f=null}return k(),r.preventDefault(e)}},r.addListener(w,"dragstart",this.onDragStart.bind(e),t),r.addListener(w,"dragend",this.onDragEnd.bind(e),t),r.addListener(w,"dragenter",this.onDragEnter.bind(e),t),r.addListener(w,"dragover",this.onDragOver.bind(e),t),r.addListener(w,"dragleave",this.onDragLeave.bind(e),t),r.addListener(w,"drop",this.onDrop.bind(e),t);var S=null;function C(){null==S&&(S=setTimeout((function(){null!=S&&s&&k()}),20))}function $(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function A(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch{}var r="none";return n&&t.indexOf(i)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?r="move":t.indexOf(i)>=0&&(r="copy"),r}}function a(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in r&&(r.unselectable="on"),t.getDragDelay()){if(o.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(s.prototype),t.DragdropHandler=s})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){var i=e("./mouse_event").MouseEvent,r=e("../lib/event"),o=e("../lib/dom");t.addTouchListeners=function(e,t){var n,s,a,l,c,h,u,d,f,g="scroll",p=0,m=0,v=0,w=0;function b(){var e=window.navigator&&window.navigator.clipboard,n=!1,i=function(i){var r=i.target.getAttribute("action");if("more"==r||!n)return n=!n,function(){var i=t.getCopyText(),r=t.session.getUndoManager().hasUndo();f.replaceChild(o.buildDom(n?["span",!i&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],i&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],i&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],r&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),f.firstChild)}();"paste"==r?e.readText().then((function(e){t.execCommand(r,e)})):r&&(("cut"==r||"copy"==r)&&(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(r)),f.firstChild.style.display="none",n=!1,"openCommandPallete"!=r&&t.focus()};f=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){g="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),i(e)},onclick:i},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function y(){f||b();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),i=t.renderer.textToScreenCoordinates(0,0).pageX,r=t.renderer.scrollLeft,o=t.container.getBoundingClientRect();f.style.top=n.pageY-o.top-3+"px",n.pageX-o.left1)return clearTimeout(c),c=null,a=-1,void(g="zoom");d=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,h=t.renderer.layerConfig.lineHeight,f=e.timeStamp;l=f;var b=r[0],y=b.clientX,x=b.clientY;Math.abs(n-y)+Math.abs(s-x)>o&&(a=-1),n=e.clientX=y,s=e.clientY=x,v=w=0;var S=new i(e,t);if(u=S.getDocumentPosition(),f-a<500&&1==r.length&&!p)m++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(u);var e=m>=2?t.selection.getLineRange(u.row):t.session.getBracketRange(u);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),g="wait"}();else{m=0;var C=t.selection.cursor,$=t.selection.isEmpty()?C:t.selection.anchor,A=t.renderer.$cursorLayer.getPixelPosition(C,!0),L=t.renderer.$cursorLayer.getPixelPosition($,!0),_=t.renderer.scroller.getBoundingClientRect(),E=t.renderer.layerConfig.offset,M=t.renderer.scrollLeft,R=function(e,t){return(e/=h)*e+(t=t/o-.75)*t};if(e.clientX<_.left)return void(g="zoom");var T=R(e.clientX-_.left-A.left+M,e.clientY-_.top-A.top+E),O=R(e.clientX-_.left-L.left+M,e.clientY-_.top-L.top+E);T<3.5&&O<3.5&&(g=T>O?"cursor":"anchor"),g=O<3.5?"anchor":T<3.5?"cursor":"scroll",c=setTimeout(k,450)}a=f}),t),r.addListener(e,"touchend",(function(e){d=t.$mouseHandler.isMousePressed=!1,h&&clearInterval(h),"zoom"==g?(g="",p=0):c?(t.selection.moveToPosition(u),p=0,y()):"scroll"==g?(p+=60,h=setInterval((function(){p--<=0&&(clearInterval(h),h=null),Math.abs(v)<.01&&(v=0),Math.abs(w)<.01&&(w=0),p<20&&(v*=.9),p<20&&(w*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*w),e==t.session.getScrollTop()&&(p=0)}),10),x()):y(),clearTimeout(c),c=null}),t),r.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var r=e.touches;if(!(r.length>1||"zoom"==g)){var o=r[0],a=n-o.clientX,h=s-o.clientY;if("wait"==g){if(!(a*a+h*h>4))return e.preventDefault();g="cursor"}n=o.clientX,s=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var u=e.timeStamp,d=u-l;if(l=u,"scroll"==g){var f=new i(e,t);f.speed=1,f.wheelX=a,f.wheelY=h,10*Math.abs(a)=e){for(o=u+1;o=e;)o++;for(a=u,l=o-1;a=t.length||(l=n[r-1])!=d&&l!=f||(c=t[r+1])!=d&&c!=f?g:(o&&(c=f),c==l?c:g);case y:return(l=r>0?n[r-1]:p)==d&&r+10&&n[r-1]==d)return d;if(o)return g;for(M=r+1,E=t.length;M=1425&&T<=2303||64286==T;if(l=t[M],O&&(l==u||l==v))return u}return r<1||(l=t[r-1])==p?g:n[r-1];case p:return o=!1,s=!0,i;case m:return a=!0,g;case S:case C:case A:case L:case $:o=!1;case _:return g}}function O(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?h:E[t]:5==n?/[\u0591-\u05f4]/.test(e)?u:h:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?k:/[\u0660-\u0669\u066b-\u066c]/.test(e)?f:1642==t?x:/[\u06f0-\u06f9]/.test(e)?d:v:32==n&&t<=8287?M[255&t]:254==n&&t>=65136?v:g}t.L=h,t.R=u,t.EN=d,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,n,h){if(e.length<2)return{};var d=e.split(""),b=new Array(d.length),y=new Array(d.length),x=[];i=h?1:0,function(e,t,n,h){var u=i?c:l,d=null,f=null,g=null,v=0,b=null,y=-1,x=null,k=null,S=[];if(!h)for(x=0,h=[];x0)if(16==b){for(x=y;x-1){for(x=y;x=0&&h[C]==w;C--)t[C]=i}}(d,x,d.length,n);for(var k=0;kv&&n[k]0&&"ل"===d[k-1]&&/\u0622|\u0623|\u0625|\u0627/.test(d[k])&&(x[k-1]=x[k]=t.R_H,k++);d[d.length-1]===t.DOT&&(x[d.length-1]=t.B),"‫"===d[0]&&(x[0]=t.RLE);for(k=0;k=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,r=i.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&o[r]%2!=0&&r++;for(var a=0;at&&o[r]%2==0&&(s+=this.charWidths[o[r]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},this.getSelections=function(e,t){var n,i=this.bidiMap,r=i.bidiLevels,o=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,h=!1,u=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,f=0;f=a&&dn+o/2;){if(n+=o,i===r.length-1){o=0;break}o=this.charWidths[r[++i]]}return i>0&&r[i-1]%2!=0&&r[i]%2==0?(e0&&r[i-1]%2==0&&r[i]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===r.length-1&&0===o&&r[i-1]%2==0||!this.isRtlDir&&0===i&&r[i]%2!=0?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&r[i-1]%2!=0&&0!==o&&i--,t=this.bidiMap.logicalFromVisual[i]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(s.prototype),t.BidiHandler=s})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),!t.$isEmpty&&!t.$silent&&t._emit("changeSelection"),!t.$keepDesiredColumnOnChange&&e.old.column!=e.value.column&&(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,!t.$isEmpty&&!t.$silent&&t._emit("changeSelection")}))};(function(){i.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.setSelectionAnchor=this.setAnchor,this.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionAnchor=this.getAnchor,this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(n.row,n.column,i.row,i.column)},this.$setSelection=function(e,t,n,i){if(!this.$silent){var r=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||o)&&this._emit("changeSelection")}},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(typeof t>"u"){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===t?new s(i,0,n,this.session.getLine(n).length):new s(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,r=e.column+t;return n<0&&(i=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,r).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,t,1);if(!r)return this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length?(this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(r.lastIndex=0;(t=e[n])&&!r.test(t);)if(r.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),s=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];e<0?e-=r.rowsAbove||0:e>0&&(e+=r.rowCount-(r.rowsAbove||0))}var o=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(r.charAt(t))&&r.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch{return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){var i=e("./config"),r=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],r=0,o=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l1?this.$applyToken:c.token),u>1&&(/\\\d/.test(c.regex)?h=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+r+1)})):(u=1,h=this.removeCapturingGroups(c.regex)),!c.splitRegex&&"string"!=typeof c.token&&a.push(c)),o[r]=l,r+=u,i.push(h),c.onMatch||(c.onMatch=null)}}i.length||(o[0]=0,i.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)}),this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){r=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var i=[],r=0,o=n.length;rh){var v=e.substring(h,m-p.length);d.type==f?d.value+=v:(d.type&&c.push(d),d={type:f,value:v})}for(var w=0;wr){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});h1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},this.reportError=i.reportError}).call(o.prototype),t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){var i=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],r=0;r=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)}}).call(r.prototype),t.TokenIterator=r})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){var i,r=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],h={},u={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,h.rangeCount!=e.multiSelect.rangeCount&&(h={rangeCount:e.multiSelect.rangeCount})),h[t])return i=h[t];i=h[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(e,t,n,i){var r=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}},g=function(e){this.add("braces","insertion",(function(t,n,r,o,s){var l=r.getCursorPosition(),c=o.doc.getLine(l.row);if("{"==s){d(r);var h=r.getSelectionRange(),u=o.doc.getTextRange(h);if(""!==u&&"{"!==u&&r.getWrapBehavioursEnabled())return f(h,u,"{","}");if(g.isSaneInsertion(r,o))return/[\]\}\)]/.test(c[l.column])||r.inMultiSelectMode||e&&e.braces?(g.recordAutoInsert(r,o,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(r,o,"{"),{text:"{",selection:[1,1]})}else if("}"==s){if(d(r),"}"==c.substring(l.column,l.column+1))if(null!==o.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&g.isAutoInsertedClosing(l,c,s))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==s||"\r\n"==s){d(r);var p="";if(g.isMaybeInsertedClosing(l,c)&&(p=a.stringRepeat("}",i.maybeInsertedBrackets),g.clearMaybeInsertedClosing()),"}"===c.substring(l.column,l.column+1)){var m=o.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!m)return null;var v=this.$getIndent(o.getLine(m.row))}else{if(!p)return void g.clearMaybeInsertedClosing();v=this.$getIndent(c)}var w=v+o.getTabString();return{text:"\n"+w+"\n"+v+p,selection:[1,w.length,1,w.length]}}g.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){if(d(n),"}"==r.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,n,i,r){if("("==r){d(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return f(o,s,"(",")");if(g.isSaneInsertion(n,i))return g.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==r){d(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if(")"==l.substring(a.column,a.column+1))if(null!==i.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&g.isAutoInsertedClosing(a,l,r))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o&&(d(n),")"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("brackets","insertion",(function(e,t,n,i,r){if("["==r){d(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return f(o,s,"[","]");if(g.isSaneInsertion(n,i))return g.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){d(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if("]"==l.substring(a.column,a.column+1))if(null!==i.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&g.isAutoInsertedClosing(a,l,r))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o&&(d(n),"]"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("string_dquotes","insertion",(function(e,t,n,i,r){var o=i.$mode.$quotes||u;if(1==r.length&&o[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;d(n);var s=r,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(""!==l&&(1!=l.length||!o[l])&&n.getWrapBehavioursEnabled())return f(a,l,s,s);if(!l){var c=n.getCursorPosition(),h=i.doc.getLine(c.row),g=h.substring(c.column-1,c.column),p=h.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==g&&m&&/escape/.test(m.type))return null;var w,b=m&&/string|escape/.test(m.type),y=!v||/string|escape/.test(v.type);if(p==s)(w=b!==y)&&/string\.end/.test(v.type)&&(w=!1);else{if(b&&!y||b&&y)return null;var x=i.$mode.tokenRe;x.lastIndex=0;var k=x.test(g);x.lastIndex=0;var S=x.test(g);if(k||S||p&&!/[\s;,.})\]\\]/.test(p))return null;var C=h[c.column-2];if(g==s&&(C==s||x.test(C)))return null;w=!0}return{text:w?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,i,r){var o=i.$mode.$quotes||u,s=i.doc.getTextRange(r);if(!r.isMultiLine()&&o.hasOwnProperty(s)&&(d(n),i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==s))return r.end.column++,r}))};g.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new s(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",l)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var r=new s(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",c)},g.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},g.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,o,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=r.row,i.autoInsertedLineEnd=n+o.substr(r.column),i.autoInsertedBrackets++},g.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,o)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=r.row,i.maybeInsertedLineStart=o.substr(0,r.column)+n,i.maybeInsertedLineEnd=o.substr(r.column),i.maybeInsertedBrackets++},g.isAutoInsertedClosing=function(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.column)==i.maybeInsertedLineStart},g.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(g,o),t.CstyleBehaviour=g})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],r=0,o=[],s=0;s2?i%c!=c-1:i%c==0}}else{if(!this.blockComment)return!1;d=this.blockComment.start;var w=this.blockComment.end,b=(u=new RegExp("^(\\s*)(?:"+l.escapeRegExp(d)+")"),new RegExp("(?:"+l.escapeRegExp(w)+")\\s*$"));p=function(e,t){m(e,t)||(!o||/\S/.test(e))&&(r.insertInLine({row:t,column:e.length},w),r.insertInLine({row:t,column:a},d))},f=function(e,t){var n;(n=e.match(b))&&r.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(u))&&r.removeInLine(t,n[1].length,n[0].length)},m=function(e,n){if(u.test(e))return!0;for(var i=t.getTokens(n),r=0;re.length&&(x=e.length)})),a==1/0&&(a=x,o=!1,s=!1),h&&a%c!=0&&(a=Math.floor(a/c)*c),y(s?f:p)},this.toggleBlockComment=function(e,t,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o=(p=new c(t,i.row,i.column)).getCurrentToken();t.selection;var s,a,l=t.selection.toOrientedRange();if(o&&/comment/.test(o.type)){for(var u,d;o&&/comment/.test(o.type);){if(-1!=(m=o.value.indexOf(r.start))){var f=p.getCurrentTokenRow(),g=p.getCurrentTokenColumn()+m;u=new h(f,g,f,g+r.start.length);break}o=p.stepBackward()}var p;for(o=(p=new c(t,i.row,i.column)).getCurrentToken();o&&/comment/.test(o.type);){var m;if(-1!=(m=o.value.indexOf(r.end))){f=p.getCurrentTokenRow(),g=p.getCurrentTokenColumn()+m;d=new h(f,g,f,g+r.end.length);break}o=p.stepForward()}d&&t.remove(d),u&&(t.remove(u),s=u.start.row,a=-r.start.length)}else a=r.start.length,s=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);l.start.row==s&&(l.start.column+=a),l.end.row==s&&(l.end.column+=a),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],r=n.prototype.$id,o=i.$modes[r];o||(i.$modes[r]=o=new n),i.$modes[t]||(i.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t"u"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var i=n?e.column<=t.column:e.columnthis.row)){var n=function(t,n,i){var r="insert"==t.action,o=(r?1:-1)*(t.end.row-t.start.row),s=(r?1:-1)*(t.end.column-t.start.column),a=t.start,l=r?a:t.end;return e(n,a,i)?{row:n.row,column:n.column}:e(l,n,!i)?{row:n.row+o,column:n.column+(n.row==l.row?s:0)}:{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:r,value:i})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(o.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){var i=e("./lib/oop"),r=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){i.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var i=this.getLine(e);return null==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,i=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(r(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),o<=i&&n.fireUpdateEvent(o,i)}}};(function(){i.implement(this,r),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens},this.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()}}).call(o.prototype),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){var i=e("./lib/lang");e("./lib/oop");var r=e("./range").Range,o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l={},c=s;c<=a;c++){var h=this.cache[c];null==h&&((h=i.getMatchOffsets(n.getLine(c),this.regExp)).length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map((function(e){return new r(c,e.offset,c,e.offset+e.length)})),this.cache[c]=h.length?h:"");for(var u=h.length;u--;){var d=h[u].toScreenRange(n),f=d.toString();l[f]||(l[f]=!0,t.drawSingleLineMarker(e,d,this.clazz,o))}}}}).call(o.prototype),t.SearchHighlight=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../range").Range;function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,r,o=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l0)){var l=i(e,s.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,r=(n=n.sort((function(e,t){return i(e.start,t.start)})))[0],o=1;o=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=i)break}if("insert"==e.action)for(var l=r-i,c=-t.column+n.column;si)break;if(h.start.row==i&&h.start.column>=t.column&&(h.start.column==t.column&&this.$bias<=0||(h.start.column+=c,h.start.row+=l)),h.end.row==i&&h.end.column>=t.column){if(h.end.column==t.column&&this.$bias<0)continue;h.end.column==t.column&&c>0&&sh.start.column&&h.end.column==o[s+1].start.column&&(h.end.column-=c),h.end.column+=c,h.end.row+=l}}else for(l=i-r,c=t.column-n.column;sr)break;h.end.rowt.column)&&(h.end.column=t.column,h.end.row=t.row):(h.end.column+=c,h.end.row+=l):h.end.row>r&&(h.end.row+=l),h.start.rowt.column)&&(h.start.column=t.column,h.start.row=t.row):(h.start.column+=c,h.start.row+=l):h.start.row>r&&(h.start.row+=l)}if(0!=l&&s=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,r=0;r=t){a=e?i-=t-a:i=0);break}s>=e&&(i-=a>=e?s-a:s-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,i=this.$foldData,s=!1;e instanceof o?n=e:(n=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,h=n.end.column,u=this.getFoldAt(a,l,1),d=this.getFoldAt(c,h,-1);if(u&&d==u)return u.addSubFold(n);u&&!u.range.isStart(a,l)&&this.removeFold(u),d&&!d.range.isEnd(c,h)&&this.removeFold(d);var f=this.getFoldsInRange(n.range);f.length>0&&(this.removeFolds(f),n.collapseChildren||f.forEach((function(e){n.addSubFold(e)})));for(var g=0;g0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,r;if(null==e)n=new i(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new i(e,0,e,this.getLine(e).length);else if("row"in e)n=i.fromPoints(e,e);else{if(Array.isArray(e))return r=[],e.forEach((function(e){r=r.concat(this.unfold(e))}),this),r;n=e}for(var o=r=this.getFoldsInRangeList(n);1==r.length&&i.comparePoints(r[0].start,n.start)<0&&i.comparePoints(r[0].end,n.end)>0;)this.expandFolds(r),r=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(r):this.expandFolds(r),o.length)return o},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,r){null==i&&(i=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,s="";return e.walk((function(e,t,n,a){if(!(th)break}while(o&&l.test(o.type)&&!/^comment.start/.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn(),/^comment.end/.test(o.type)||(c.end.column+=o.value.length-2),c}},this.foldAll=function(e,t,n,i){null==n&&(n=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength();for(var o=e=e||0;o=e&&(o=s.end.row,s.collapseChildren=n,this.addFold("...",s))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),i=0;i=0;){var o=n[r];if(null==o&&(o=n[r]=this.getFoldWidget(r)),"start"==o){var s=this.getFoldWidgetRange(r);if(i||(i=s),s&&s.end.row>=e)break}r--}return{range:-1!==r&&s,firstRange:i}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),r="end"===n?-1:1,o=this.getFoldAt(e,-1===r?0:i.length,r);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&((o=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(o.range)))return this.removeFold(o),o;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange){t=n.start.row;var r=this.getFoldAt(t,this.getLine(t).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){var i=e("../token_iterator").TokenIterator,r=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,o=n.charAt(e.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=r.fromPoints(e,a),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=r.fromPoints(a,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),i=/([\(\[\{])|([\)\]\}])/,o=!t&&n.charAt(e.column-1),s=o&&o.match(i);if(s||(o=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(i)),!s)return null;var a=new r(e.row,e.column-1,e.row,e.column),l=s[1]?this.$findClosingBracket(s[1],e):this.$findOpeningBracket(s[2],e);return l?[a,new r(l.row,l.column,l.row,l.column+1)]:[a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var h=c.charAt(l);if(h==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(o+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,h=c.length;l"===t.value?i=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,i=t.value,o=t.value,s=0,a=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(n=t,t=e.stepForward()){if(">"===t.value&&!c){var h=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(-1!==t.type.indexOf("tag-name")){if(o===(i=t.value))if("<"===n.value)s++;else if(""!==t.value)return;var f=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else if(o===i&&"/>"===t.value&&--s<0)f=d=u=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),h=new r(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(t&&s>=0);if(a&&h&&u&&f&&l&&d)return{openTag:new r(a.start.row,a.start.column,h.end.row,h.end.column),closeTag:new r(u.start.row,u.start.column,f.end.row,f.end.column),openTagName:l,closeTagName:d}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),i=t.value,o=0,s=e.getCurrentTokenRow(),a=e.getCurrentTokenColumn(),l=a+2,c=new r(s,a,s,l);e.stepForward();var h=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if((t=e.stepForward())&&">"===t.value){var u=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=n,s=e.getCurrentTokenRow(),l=(a=e.getCurrentTokenColumn())+t.value.length,n=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(i===t.value)if("<"===n.value){if(++o>0){var d=new r(s,a,s,l),f=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var g=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else""===t.value){for(var p=0,m=n;m;){if(-1!==m.type.indexOf("tag-name")&&m.value===i){o--;break}if("<"===m.value)break;m=e.stepBackward(),p++}for(var v=0;vn&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var r=n+i>>1,o=e[r];if(t>o)n=r+1;else{if(!(t=t);o++);return(n=i[o])?(n.index=o,n.start=r-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var r=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))r=/\s/;else r=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(r));o++}for(var s=t;se&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=t.length,l=0;ls){if((l=o.end.row+1)>=a)break;s=(o=this.$foldData[r++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(o.start.column+=c),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=c)),s&&o.start.row>=e.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,i),r.length){var a=e.start,l=o.start,c=(s=l.row-a.row,l.column-a.column);this.addFolds(r.map((function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=c),e.end.row==a.row&&(e.end.column+=c),e.start.row+=s,e.end.row+=s,e})))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new h(0,0,0,0),i=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var s=0;s0){var r;if((r=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=r-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var o=new h(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(o).map((function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e})),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,a),s.length&&this.addFolds(s),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)&&(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,r=e.end,o=i.row,s=r.row,a=s-o,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var h=0;if(p=this.getFoldLine(r.row)){p.addRemoveChars(r.row,r.column,i.column-r.column),p.shiftRow(-a);var u=this.getFoldLine(o);u&&u!==p&&(u.merge(p),p=u),h=c.indexOf(p)+1}for(;h=r.row&&p.shiftRow(-a)}s=o}else{var d=Array(a);d.unshift(o,0);var f=t?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,d);c=this.$foldData,h=0;if(p=this.getFoldLine(o)){var g=p.range.compareInside(i.row,i.column);0==g?(p=p.split(i.row,i.column))&&(p.shiftRow(a),p.addRemoveChars(s,0,r.column-i.column)):-1==g&&(p.addRemoveChars(o,0,r.column-i.column),p.shiftRow(a)),h=c.indexOf(p)+1}for(;h=o&&p.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(p=this.getFoldLine(o))&&p.addRemoveChars(o,i.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,s):this.$updateRowLengthCache(o,s),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,i){var r,o,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,h=n;for(i=Math.min(i,s.length-1);h<=i;)(o=this.getFoldLine(h,o))?(r=[],o.walk(function(n,i,o,a){var l;if(null!=n){(l=this.$getDisplayTokens(n,r.length))[0]=e;for(var c=1;c=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,i,r){if(0==n.length)return[];var o=[],s=n.length,a=0,l=0,c=this.$wrapAsCode,h=this.$indentedSoftWrap,u=i<=Math.max(2*r,8)||!1===h?0:Math.floor(i/2);function d(e){for(var t=e-a,i=a;ii-f;){var g=a+i-f;if(n[g-1]>=10&&n[g]>=10)d(g);else if(n[g]!=e&&n[g]!=t){for(var p=Math.max(g-(i-(i>>2)),a-1);g>p&&n[g]p&&n[g]p&&9==n[g];)g--}else for(;g>p&&n[g]<10;)g--;g>p?d(++g):(2==n[g=a+i]&&g--,d(g-f))}else{for(;g!=a-1&&n[g]!=e;g--);if(g>a){d(g);continue}for(g=a+i;g39&&s<48||s>57&&s<64?r.push(9):s>=4352&&n(s)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(e,t,i){if(0==t)return[0,0];var r,o;for(null==t&&(t=1/0),i=i||0,o=0;o=4352&&n(r)?i+=2:i+=1,!(i>t));o++);return[i,o]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){a=c[h],o=this.$docRowCache[h];var d=e>c[u-1]}else d=!u;for(var f=this.getLength()-1,g=this.getNextFoldLine(o),p=g?g.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(o))>e||o>=f);)a+=l,++o>p&&(o=g.end.row+1,p=(g=this.getNextFoldLine(o,g))?g.start.row:1/0),d&&(this.$docRowCache.push(o),this.$screenRowCache.push(a));if(g&&g.start.row<=o)i=this.getFoldDisplayLine(g),o=g.start.row;else{if(a+l<=e||o>f)return{row:f,column:this.getLine(f).length};i=this.getLine(o),g=null}var m=0,v=Math.floor(e-a);if(this.$useWrapMode){var w=this.$wrapData[o];w&&(r=w[v],v>0&&w.length&&(m=w.indent,s=w[v-1]||w[w.length-1],i=i.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,o,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,t-m)[1],this.$useWrapMode&&s>=r&&(s=r-1),g?g.idxToPosition(s):{row:o,column:s}},this.documentToScreenPosition=function(e,t){if(typeof t>"u")var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i,r=0,o=null;(i=this.getFoldAt(e,t,1))&&(e=i.start.row,t=i.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),h=l.length;if(h&&c>=0){a=l[c],r=this.$screenRowCache[c];var u=e>l[h-1]}else u=!h;for(var d=this.getNextFoldLine(a),f=d?d.start.row:1/0;a=f){if((s=d.end.row+1)>e)break;f=(d=this.getNextFoldLine(s,d))?d.start.row:1/0}else s=a+1;r+=this.getRowLength(a),a=s,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(r))}var g="";d&&a>=f?(g=this.getFoldDisplayLine(d,e,t),o=d.start.row):(g=this.getLine(e).substring(0,t),o=e);var p=0;if(this.$useWrapMode){var m=this.$wrapData[o];if(m){for(var v=0;g.length>=m[v];)r++,v++;g=g.substring(m[v-1]||0,g.length),p=v>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(r+=this.lineWidgets[a].rowsAbove),{row:r,column:p+this.$getStringScreenWidth(g)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=0,o=(t=this.$foldData[r++])?t.start.row:1/0;io&&(i=t.end.row+1,o=(t=this.$foldData[r++])?t.start.row:1/0)}else{e=this.getLength();var a=this.$foldData;for(r=0;rn);o++);return[i,o]})},this.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},this.isFullWidth=n}.call(g.prototype),e("./edit_session/folding").Folding.call(g.prototype),e("./edit_session/bracket_match").BracketMatch.call(g.prototype),s.defineOptions(g.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=g})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){var i=e("./lib/lang"),r=e("./lib/oop"),o=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach((function(e,n,r,s){return i=new o(e,n,r,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start))||(i=null,!1)})),i},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,r=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,h=r.length-c;e:for(var u=a.offset||0;u<=h;u++){for(var d=0;dp||(s.push(l=new o(u,p,u+c-1,m)),c>2&&(u=u+c-2))}}else for(var v=0;vx&&s[d].end.row==k;)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v=a;n--)if(u(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=l,a=s.row;n>=a;n--)if(u(n,Number.MAX_VALUE,e))return}};else c=function(e){var n=s.row;if(!u(n,s.column,e)){for(n+=1;n<=l;n++)if(u(n,0,e))return;if(0!=t.wrap)for(n=a,l=s.row;n<=l;n++)if(u(n,0,e))return}};if(t.$isMultiLine)var h=n.length,u=function(t,r,o){var s=i?t-h+1:t;if(!(s<0||s+h>e.getLength())){var a=e.getLine(s),l=a.search(n[0]);if(!(!i&&lr)&&o(s,l,s+h-1,u))return!0}}};else if(i)u=function(t,i,r){var o,s=e.getLine(t),a=[],l=0;for(n.lastIndex=0;o=n.exec(s);){var c=o[0].length;if(l=o.index,!c){if(l>=s.length)break;n.lastIndex=l+=1}if(o.index+c>i)break;a.push(o.index,c)}for(var h=a.length-1;h>=0;h-=2){var u=a[h-1];if(r(t,u,t,u+(c=a[h])))return!0}};else u=function(t,i,r){var o,s,a=e.getLine(t);for(n.lastIndex=i;s=n.exec(a);){var l=s[0].length;if(r(t,o=s.index,t,o+l))return!0;if(!l&&(n.lastIndex=o+=1,o>=a.length))return!1}};return{forEach:c}}}).call(s.prototype),t.Search=s})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/keys"),r=e("../lib/useragent"),o=i.KEY_MODS;function s(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function a(e,t){s.call(this,e,t),this.$singleCommand=!1}a.prototype=s.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var o=i[r];if(o==e)delete i[r];else if(Array.isArray(o)){var s=o.indexOf(e);-1!=s&&(o.splice(s,1),1==o.length&&(i[r]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(null==n&&(n=e.position),e=e[this.platform]),e){if("function"==typeof t)return this.addCommand({exec:t,bindKey:e,name:t.name||e});e.split("|").forEach((function(e){var i="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach((function(e){var t=this.parseKeys(e),n=o[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var s=this.parseKeys(e),a=o[s.hashId]+s.key;this._addCommandToBinding(i+a,t,n)}),this)}},this._addCommandToBinding=function(t,n,i){var r,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(r=o[t].indexOf(n))&&o[t].splice(r,1):o[t]=[o[t]],"number"!=typeof i&&(i=e(n));var s=o[t];for(r=0;ri)break}s.splice(r,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,s=t.length;s--;){var a=i.KEY_MODS[t[s]];if(null==a)return typeof console<"u"&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:n,hashId:o}},this.findKeyCommand=function(e,t){var n=o[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,i){if(!(i<0)){var r=o[t]+n,s=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,s=this.commandKeyBinding[e.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:s}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(s.prototype),t.HashHandler=s,t.MultiHashHandler=a})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,s=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)}))};i.inherits(s,r),function(){i.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e||t&&t.$readOnly&&!e.readOnly||0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var r={editor:t,command:e,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(s.prototype),t.CommandManager=s})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){var i=e("../lib/lang"),r=e("../config"),o=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(e){r.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){r.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(e,t){"number"==typeof t&&!isNaN(t)&&e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=r.row+1;c++){var h=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(c)));0!==h.length&&(h=" "+h),l+=h}r.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(s=e.session.doc.getLine(n.row).length>s?s+1:s,e.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,r=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;st[n].column&&n++,o.unshift(n,0),t.splice.apply(t,o),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},this.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=i.createElement("div"),e.el.textContent=e.text),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&i.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var r=this.session.lineWidgets;e.row!=n.end.row||r[n.start.row]?e.hidden=!0:r[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch{}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var r=1/0,o=0;o0&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=r;s<=o;s++){var a=i[s];if(a&&a.el){if(a.hidden){a.el.style.top=-100-(a.pixelHeight||0)+"px";continue}a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(r.prototype),t.LineWidgets=r})),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/clipboard"],(function(e,t,n){var i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=e("./lib/oop"),o=e("./lib/dom"),s=e("./lib/lang"),a=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,h=e("./mouse/fold_handler").FoldHandler,u=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,f=e("./search").Search,g=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,w=e("./config"),b=e("./token_iterator").TokenIterator,y=e("./line_widgets").LineWidgets,x=e("./clipboard"),k=function(e,t,n){this.$toDestroy=[];var i=e.getContainerElement();this.container=i,this.renderer=e,this.id="editor"+ ++k.$uid,this.commands=new m(a.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new l(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new h(this)),this.keyBinding=new u(this),this.$search=(new f).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(t||n&&n.session||new d("")),w.resetOptions(this),n&&this.setOptions(n),w._signal("editor",this)};k.$uid=0,function(){r.implement(this,p),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name||(this._signal("beforeEndOperation"),!this.curOp))return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),r=this.renderer.layerConfig;(i.start.row>=r.lastRow||i.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var o=this.selection.toJSON();this.curOp.selectionAfter=o,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(o),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;w.loadModule(["keybinding",e],(function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=e.getCursorPosition(),i=e.getKeyboardHandler(),r=i&&i.$getDirectionForHighlight&&i.$getDirectionForHighlight(e),o=t.getMatchingBracketRanges(n,r);if(!o){var s=new b(t,n.row,n.column).getCurrentToken();if(s&&/\b(?:tag-open|tag-name)/.test(s.type)){var a=t.getMatchingTags(n);a&&(o=[a.openTagName,a.closeTagName])}}if(!o&&t.$mode.getMatching&&(o=t.$mode.getMatching(e.session)),!o)return void(e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide());var l="ace_bracket";Array.isArray(o)?1==o.length&&(l="ace_error_bracket"):o=[o],2==o.length&&(0==g.comparePoints(o[0].end,o[1].start)?o=[g.fromPoints(o[0].start,o[1].end)]:0==g.comparePoints(o[0].start,o[1].end)&&(o=[g.fromPoints(o[1].start,o[0].end)])),t.$bracketHighlight={ranges:o,markerIds:o.map((function(e){return t.addMarker(e,l,"text")}))},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}}),50)}},this.focus=function(){this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&(("line"!=this.$selectionStyle||!this.selection.isMultiLine())&&(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),this.renderer.$maxLines&&1===this.session.getLength()&&!(this.renderer.$minLines>1)&&(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new g(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,i=t.end.column,r=e.getLine(t.start.row),o=r.substring(n,i);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),a=r.substring(n-1,i+1);if(s.test(a))return s}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),r=0;ra.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,h=n.getState(r.row),u=(a=n.getLine(r.row),i.checkOutdent(h,a,e));if(n.insert(r,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new g(r.row,c+o.selection[0],r.row,c+o.selection[1])):this.selection.setSelectionRange(new g(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var d=i.getNextLineIndent(h,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},d)}u&&i.autoOutdent(h,n,r.row)}},this.autoIndent=function(){var e,t,n=this.session,i=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var r=this.getSelectionRange();e=r.start.row,t=r.end.row}for(var o,s,a,l="",c="",h="",u=n.getTabString(),d=e;d<=t;d++)d>0&&(l=n.getState(d-1),c=n.getLine(d-1),h=i.getNextLineIndent(l,c,u)),o=n.getLine(d),h!==(s=i.$getIndent(o))&&(s.length>0&&(a=new g(d,0,d,s.length),n.remove(a)),h.length>0&&n.insert({row:d,column:0},h)),i.autoOutdent(l,n,d)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),!e&&!n.isEmpty()&&this.remove());((e||!this.selection.isEmpty())&&this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},this.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),r=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}r&&(t=r)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.setGhostText=function(e,t){this.session.widgetManager||(this.session.widgetManager=new y(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(e,t)},this.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,r=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var r=new g(0,0,0,0);for(i=e.first;i<=e.last;i++){var o=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new g(t,n-1,t,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(t,n);if(o){var s=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-s,l=parseFloat(o.value);l*=Math.pow(10,a),s!==o.end&&n=a&&o<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,a+i),c.selection.selectTo(e,l+i)),a=l}));for(var h,u=this.$toggleWordPairs,d=0;d=l&&s<=c&&d.match(/((?:https?|ftp):\/\/[\S]+)/)){a=d.replace(/[\s:.,'";}\]]+$/,"");break}l=c}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}return a},this.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),i=e.isBackwards();if(n.isEmpty()){var r=n.start.row;t.duplicateLines(r,r)}else{var o=i?n.start:n.end,s=t.insert(o,t.getTextRange(n),!1);n.start=o,n.end=s,e.setSelectionRange(n,i)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var n,i,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var o=r.toOrientedRange();n=this.$getSelectedRows(o),i=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(i=0),o.moveBy(i,0),r.fromOrientedRange(o)}else{var s=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,h=0;hf+1)break;f=g.last}for(h--,a=this.session.$moveLines(d,f,t?0:e),t&&-1==e&&(u=h+1);u<=h;)s[u].moveBy(a,0),u++;t||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,r=e*Math.floor(i.height/i.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(r,0)})):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new b(this.session,n.row,n.column),r=i.getCurrentToken(),o=0;r&&-1!==r.type.indexOf("tag-name")&&(r=i.stepBackward());var s=r||i.stepForward();if(s){var a,l,c=!1,h={},u=n.column-s.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;u1?h[s.value]++:"=0;--o)this.$tryReplace(n[o],e)&&i++;return this.selection.setSelectionRange(r),i},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var i=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(i)||this.$search.$options.needle)||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var r=this.$scrollAnchor;r.style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild);var o=this.on("changeSelection",(function(){i=!0})),s=this.renderer.on("beforeRender",(function(){i&&(t=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=o.top-s.offset;null!=(i=o.top>=0&&a+t.top<0||!(o.topwindow.innerHeight)&&null)&&(r.style.top=a+"px",r.style.left=o.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(i)),i=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var i=this;w.loadModule("ace/ext/prompt",(function(r){r.prompt(i,e,t,n)}))}}.call(k.prototype),w.defineOptions(k.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?S.attach(this):S.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?S.attach(this):S.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var S={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=k})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){var i=function(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!this.lastDeltas){this.lastDeltas=[];var i=this.$undoStack.length;i>this.$undoDepth-1&&this.$undoStack.splice(0,i-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}("remove"==e.action||"insert"==e.action)&&(this.$lastDelta=e),this.lastDeltas.push(e)}},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var r=n[i][0];if(r.id<=e)break;r.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?a(e):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)}}).call(i.prototype);var r=e("./range").Range,o=r.comparePoints;function s(e){return{row:e.row,column:e.column}}function a(e){if(e=e||this,Array.isArray(e))return e.map(a).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(o(t.start,e.end)>=0)d(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;d(e,t,1)}else if(n&&!i)if(o(t.start,e.end)>=0)d(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;d(e,t,-1)}else if(!n&&i)if(o(t.start,e.start)>=0)d(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;d(e,t,1)}else if(!n&&!i)if(o(t.start,e.start)>=0)d(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;d(e,t,-1)}return[t,e]}function h(e,t){for(var n=e.length;n--;)for(var i=0;i=0?d(e,t,-1):(o(e.start,t.start)<=0||d(e,r.fromPoints(t.start,e.start),-1),d(t,e,1));else if(!n&&i)o(t.start,e.end)>=0?d(t,e,-1):(o(t.start,e.start)<=0||d(t,r.fromPoints(e.start,t.start),-1),d(e,t,1));else if(!n&&!i)if(o(t.start,e.end)>=0)d(t,e,-1);else{var s,a;if(!(o(t.end,e.start)<=0))return o(e.start,t.start)<0&&(s=e,e=g(e,t.start)),o(e.end,t.end)>0&&(a=g(e,t.end)),f(t.end,e.start,e.end,-1),a&&!s&&(e.lines=a.lines,e.start=a.start,e.end=a.end,a=e),[t,s,a].filter(Boolean);d(e,t,-1)}return[t,e]}function d(e,t,n){f(e.start,t.start,t.end,n),f(e.end,t.start,t.end,n)}function f(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function g(e,t){var n=e.lines,i=e.end;e.end=s(t);var r=e.end.row-e.start.row,o=n.splice(r,n.length),a=r?t.column:t.column-e.start.column;return n.push(o[0].substring(0,a)),o[0]=o[0].substr(a),{start:s(t),end:i,lines:o,action:e.action}}function p(e,t){t=function(e){return{start:s(e.start),end:s(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var i=e[n],r=0;ro&&(l=r.end.row+1,o=(r=t.getNextFoldLine(l,r))?r.start.row:1/0),l>i){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(s=this.$lines.get(++a))?s.row=l:(s=this.$lines.createCell(l,e,this.session,c),this.$lines.push(s)),this.$renderCell(s,e,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(r=t.getLength()+i-1);var o=n?n.getWidth(t,r,e):r.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();(o+=s.left+s.right)!==this.gutterWidth&&!isNaN(o)&&(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&r&&r.start.row==t[n-1].row))break;i=t[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!t||i0;r--)this.$lines.shift();if(i>n)for(r=this.session.getFoldedRowCount(n+1,i);r>0;r--)this.$lines.pop();e.firstRowi&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var i=[],r=t,o=this.session.getNextFoldLine(r),s=o?o.start.row:1/0;r>s&&(r=o.end.row+1,s=(o=this.session.getNextFoldLine(r,o))?o.start.row:1/0),!(r>n);){var a=this.$lines.createCell(r,e,this.session,c);this.$renderCell(a,e,o,r),i.push(a),r++}return i},this.$renderCell=function(e,t,n,r){var o=e.element,s=this.session,a=o.childNodes[0],l=o.childNodes[1],c=s.$firstLineNumber,h=s.$breakpoints,u=s.$decorations,d=s.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&s.foldWidgets,g=n?n.start.row:Number.MAX_VALUE,p="ace_gutter-cell ";if(this.$highlightGutterLine&&(r==this.$cursorRow||n&&r=g&&this.$cursorRow<=n.end.row)&&(p+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),h[r]&&(p+=h[r]),u[r]&&(p+=u[r]),this.$annotations[r]&&(p+=this.$annotations[r].className),o.className!=p&&(o.className=p),f){var m=f[r];null==m&&(m=f[r]=s.getFoldWidget(r))}if(m){p="ace_fold-widget ace_"+m;"start"==m&&r==g&&rn.right-t.right?"foldWidgets":void 0}}).call(l.prototype),t.Gutter=l})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){var i=e("../range").Range,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function e(e,t,n,i){return(e?1:0)|(t?2:0)|(n?4:0)|(i?8:0)}this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var o=this.$getTop(r.start.row,e),s=this.$padding+r.start.column*e.characterWidth;i.renderer(t,r,s,o,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,r,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,r,i.clazz,e):r.isMultiLine()?"text"==i.type?this.drawTextMarker(t,r,i.clazz,e):this.drawMultiLineMarker(t,r,i.clazz,e):this.drawSingleLineMarker(t,r,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}if(-1!=this.i)for(;this.if,h==c),o,h==c?0:1,s)},this.drawMultiLineMarker=function(e,t,n,i,r){var o=this.$padding,s=i.lineHeight,a=this.$getTop(t.start.row,i),l=o+t.start.column*i.characterWidth;(r=r||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",i,null,r)):this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(r||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",i,null,r)}else{a=this.$getTop(t.end.row,i);var h=t.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+h+"px;top:"+a+"px;left:"+o+"px;"+(r||""))}if(!((s=(t.end.row-t.start.row-1)*i.lineHeight)<=0)){a=this.$getTop(t.start.row+1,i);var u=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(u?" ace_br"+u:""),"height:"+s+"px;right:0;top:"+a+"px;left:"+o+"px;"+(r||""))}},this.drawSingleLineMarker=function(e,t,n,i,r,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,i,r,o);var s=i.lineHeight,a=(t.end.column+(r||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),c=this.$padding+t.start.column*i.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(o||""))},this.drawBidiSingleLineMarker=function(e,t,n,i,r,o){var s=i.lineHeight,a=this.$getTop(t.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+s+"px;width:"+(e.width+(r||0))+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(o||""))}),this)},this.drawFullLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-o),this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))},this.drawScreenLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))}}).call(o.prototype),t.Marker=o})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=function(e){this.dom=r,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)};(function(){i.implement(this,a),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$highlightIndentGuides=!0,this.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;nh&&(a=l.end.row+1,h=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>r);){var u=o[s++];if(u){this.dom.removeChildren(u),this.$renderLine(u,a,a==h&&l),c&&(u.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var d=e.lineHeight*this.session.getRowLength(a)+"px";u.style.height!=d&&(c=!0,u.style.height=d)}a++}if(c)for(;s0;r--)this.$lines.shift();if(t.lastRow>e.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},this.$renderLinesFragment=function(e,t,n){for(var i=[],o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;o>a&&(o=s.end.row+1,a=(s=this.session.getNextFoldLine(o,s))?s.start.row:1/0),!(o>n);){var l=this.$lines.createCell(o,e,this.session),c=l.element;this.dom.removeChildren(c),r.setStyle(c.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),r.setStyle(c.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(c,o,o==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",i.push(l),o++}return i},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,i){for(var r,s=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,l=this.dom.createFragment(this.element),c=0;r=a.exec(i);){var h=r[1],u=r[2],d=r[3],f=r[4],g=r[5];if(s.showSpaces||!u){var p=c!=r.index?i.slice(c,r.index):"";if(c=r.index+r[0].length,p&&l.appendChild(this.dom.createTextNode(p,this.element)),h){var m=s.session.getScreenTabSize(t+r.index);l.appendChild(s.$tabStrings[m].cloneNode(!0)),t+=m-1}else if(u)if(s.showSpaces){(w=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",w.textContent=o.stringRepeat(s.SPACE_CHAR,u.length),l.appendChild(w)}else l.appendChild(this.com.createTextNode(u,this.element));else if(d){(w=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",w.textContent=o.stringRepeat(s.SPACE_CHAR,d.length),l.appendChild(w)}else if(f){t+=1,(w=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",w.className=s.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",w.textContent=s.showSpaces?s.SPACE_CHAR:f,l.appendChild(w)}else if(g){t+=1,(w=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",w.className="ace_cjk",w.textContent=g,l.appendChild(w)}}}if(l.appendChild(this.dom.createTextNode(c?i.slice(c):i,this.element)),this.$textToken[n.type])e.appendChild(l);else{var v="ace_"+n.type.replace(/\./g," ace_"),w=this.dom.createElement("span");"fold"==n.type&&(w.style.width=n.value.length*this.config.characterWidth+"px"),w.className=v,w.appendChild(l),e.appendChild(w)}return t+i.length},this.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);if(i<=0||i>=n)return t;if(" "==t[0]){for(var r=(i-=i%this.tabSize)/this.tabSize,o=0;or[o].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(o=t.row+1;o0)for(var i=0;i=this.$highlightIndentGuideMarker.start+1){if(i.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,t)}}else for(n=e.length-1;n>=0;n--){i=e[n];if(this.$highlightIndentGuideMarker.end&&i.row=s;)a=this.$renderToken(l,a,h,u.substring(0,s-i)),u=u.substring(s-i),i=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat(" ",n.indent),this.element)),a=0,s=n[++r]||Number.MAX_VALUE;0!=u.length&&(i+=u.length,a=this.$renderToken(l,a,h,u))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(e,t){for(var n=0,i=0;ithis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,r,o);n=this.$renderToken(e,n,r,o)}}},this.$renderOverflowMessage=function(e,t,n,i,r){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=r?"":"",e.appendChild(o)},this.$renderLine=function(e,t,n){if(!n&&0!=n&&(n=this.session.getFoldLine(t)),n)var i=this.$getFoldLineTokens(t,n);else i=this.session.getTokens(t);var r=e;if(i.length){var o=this.session.getRowSplitData(t);if(o&&o.length){this.$renderWrappedLine(e,i,o);r=e.lastChild}else{r=e;this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r)),this.$renderSimpleLine(r,i)}}else this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r));if(this.showEOL&&r){n&&(t=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(s)}},this.$getFoldLineTokens=function(e,t){var n=this.session,i=[];var r=n.getTokens(e);return t.walk((function(e,t,o,s,a){null!=e?i.push({type:"fold",value:e}):(a&&(r=n.getTokens(t)),r.length&&function(e,t,n){for(var r=0,o=0;o+e[r].value.lengthn-t&&(s=s.substring(0,n-t)),i.push({type:e[r].type,value:s}),o=t+s.length,r+=1);on?i.push({type:e[r].type,value:s.substring(0,n-o)}):i.push(e[r]),o+=s.length,r+=1}}(r,s,o))}),t.end.row,this.session.getLine(t.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(l.prototype),t.Text=l})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){var i=e("../lib/dom"),r=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)i.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||s.top<0)&&n>1)){var a=this.cursors[r++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,e,t[n],this.session):this.isCursorInView(s,e)?(i.setStyle(l,"display","block"),i.translate(a,s.left,s.top),i.setStyle(l,"width",Math.round(e.characterWidth)+"px"),i.setStyle(l,"height",e.lineHeight+"px")):i.setStyle(l,"display","none")}}for(;this.cursors.length>r;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=s,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(r.prototype),t.Cursor=r})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,a=32768,l=function(e){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){i.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(l.prototype);var c=function(e,t){l.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=r.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};i.inherits(c,l),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>a?(this.coeff=a/e,e=a):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(c.prototype);var h=function(e,t){l.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(h,l),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(h.prototype),t.ScrollBar=c,t.ScrollBarV=c,t.ScrollBarH=h,t.VScrollBar=c,t.HScrollBar=h})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter;r.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var a=function(e){this.element=r.createElement("div"),this.element.className="ace_sb"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")};(function(){i.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,this.parent=e,this.width=this.VScrollWidth,this.renderer=t,this.inner.style.width=this.element.style.width=(this.width||15)+"px",this.$minWidth=0};i.inherits(l,a),function(){this.classSuffix="-v",i.implement(this,s),this.onMouseDown=function(e,t){if("mousedown"===e&&0===o.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientY,r=t.clientY,s=this.thumbTop;o.capture(this.inner,(function(e){i=e.clientY}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollTopFromThumbTop(s+i-r);e!==n.scrollTop&&n._emit("scroll",{data:e})}}),20);return o.preventDefault(t)}var l=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(l)}),o.preventDefault(t)}},this.getHeight=function(){return this.height},this.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t>>=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},this.setInnerHeight=this.setScrollHeight=function(e,t){this.pageHeight===e&&!t||(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},this.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"}}.call(l.prototype);var c=function(e,t){a.call(this,e),this.scrollLeft=0,this.scrollWidth=0,this.height=this.HScrollHeight,this.inner.style.height=this.element.style.height=(this.height||12)+"px",this.renderer=t};i.inherits(c,a),function(){this.classSuffix="-h",i.implement(this,s),this.onMouseDown=function(e,t){if("mousedown"===e&&0===o.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientX,r=t.clientX,s=this.thumbLeft;o.capture(this.inner,(function(e){i=e.clientX}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollLeftFromThumbLeft(s+i-r);e!==n.scrollLeft&&n._emit("scroll",{data:e})}}),20);return o.preventDefault(t)}var l=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)}),o.preventDefault(t)}},this.getHeight=function(){return this.isVisible?this.height:0},this.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t>>=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},this.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},this.setInnerWidth=this.setScrollWidth=function(e,t){this.pageWidth===e&&!t||(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},this.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"}}.call(c.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){var i=e("./lib/event"),r=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(i.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(r.prototype),t.RenderLoop=r})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c=512,h="function"==typeof ResizeObserver,u=200,d=t.FontMetrics=function(e){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",c),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()};(function(){i.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=s.onIdle((function t(){e.checkForSizeChanges(),s.onIdle(t,500)}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/c};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.textContent=o.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=r.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},this.transformCoordinates=function(e,t){e&&(e=o(1/this.$getZoom(this.el),e));function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function r(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function s(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),l=s(this.els[1]),c=s(this.els[2]),h=s(this.els[3]),d=n(i(h,l),i(h,c),i(r(l,c),r(h,a))),f=o(1+d[0],i(l,a)),g=o(1+d[1],i(c,a));if(t){var p=t,m=d[0]*p[0]/u+d[1]*p[1]/u+1,v=r(o(p[0],f),o(p[1],g));return r(o(1/m/u,v),a)}var w=i(e,a),b=n(i(f,o(d[0],w)),i(g,o(d[1],w)),w);return o(u,b)}}).call(d.prototype)})),ace.define("ace/css/editor.css",["require","exports","module"],(function(e,t,n){n.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell.ace_error {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-position: 2px center;\n}\n.ace_dark .ace_gutter-cell.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n will-change: transform;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #FFF;\n background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n}\n\n.ace_folding-enabled > .ace_gutter-cell {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event_emitter").EventEmitter,s=function(e,t){this.canvas=i.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)};(function(){r.implement(this,o),this.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;e&&(this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,(e.lastRow+1)*this.lineHeightt.priority?1:0}));for(var o=this.renderer.session.$foldData,s=0;sthis.canvasHeight&&(d=this.canvasHeight-this.halfMinDecorationHeight),h=Math.round(d-this.halfMinDecorationHeight),u=Math.round(d+this.halfMinDecorationHeight)}n.fillStyle=t[i[s].type]||null,n.fillRect(0,c,this.canvasWidth,u-h)}}var f=this.renderer.session.selection.getCursor();if(f){l=this.compensateFoldRows(f.row,o),c=Math.round((f.row-l)*this.lineHeight*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,c,this.canvasWidth,2)}},this.compensateFoldRows=function(e,t){var n=0;if(t&&t.length>0)for(var i=0;it[i].start.row&&e=t[i].end.row&&(n+=t[i].end.row-t[i].start.row);return n}}).call(s.prototype),t.Decorator=s})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor.css","ace/layer/decorators","ace/lib/useragent"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./config"),s=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,c=e("./layer/cursor").Cursor,h=e("./scrollbar").HScrollBar,u=e("./scrollbar").VScrollBar,d=e("./scrollbar_custom").HScrollBar,f=e("./scrollbar_custom").VScrollBar,g=e("./renderloop").RenderLoop,p=e("./layer/font_metrics").FontMetrics,m=e("./lib/event_emitter").EventEmitter,v=e("./css/editor.css"),w=e("./layer/decorators").Decorator,b=e("./lib/useragent"),y=b.isIE;r.importCssString(v,"ace_editor.css",!1);var x=function(e,t){var n=this;this.container=e||r.createElement("div"),r.addCssClass(this.container,"ace_editor"),r.HI_DPI&&r.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==o.get("useStrictCSP")&&o.set("useStrictCSP",!1),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var i=this.$textLayer=new l(this.content);this.canvas=i.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new u(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new p(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!b.isIOS,this.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,i.implement(this,m),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),r.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(e,t,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},this.$updateCachedSize=function(e,t,n,i){i-=this.$extraHeight||0;var o=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(i&&(e||s.height!=i)&&(s.height=i,o|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(s.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(e||s.width!=n)){o|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,r.setStyle(this.scrollBarH.element.style,"left",t+"px"),r.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),r.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";r.setStyle(this.scrollBarH.element.style,"right",l),r.setStyle(this.scroller.style,"right",l),r.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(s.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return s.$dirty=!n||!i,o&&this._signal("resize",a),o},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},this.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(!this.$keepTextAreaAtCursor&&!t)return void r.translate(this.textarea,-100,0);var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var i=this.layerConfig,o=n.top,s=n.left;o-=i.offset;var a=t&&t.useTextareaForIME?this.lineHeight:y?0:1;if(o<0||o>i.height-a)return void r.translate(this.textarea,0,0);var l=1,c=this.$size.height-a;if(t)if(t.useTextareaForIME){var h=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(h)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;(s-=this.scrollLeft)>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,r.setStyle(e,"height",a+"px"),r.setStyle(e,"width",l+"px"),r.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(o,c))}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,i){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.setMargin=function(e,t,n,i){var r=this.margin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;i>0&&(this.scrollTop=i,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),r.translate(this.content,-this.scrollLeft,-n.offset);var o=n.width+2*this.$padding+"px",s=n.minHeight+"px";r.setStyle(this.content.style,"width",o),r.setStyle(this.content.style,"height",s)}return e&this.CHANGE_H_SCROLL&&(r.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e)):e&this.CHANGE_SCROLL?(this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e)):(e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),void this._signal("afterRender",e))}this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-r-2*this.$padding<0),s=this.$horizScroll!==o;s&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=c;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,i-t.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,r+2*this.$padding-t.scrollerWidth+h.right)));var u=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+c<0||this.scrollTop>h.top),d=a!==u;d&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var f,g,p=this.scrollTop%this.lineHeight,m=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-p)/this.lineHeight)),w=v+m,b=this.lineHeight;v=e.screenToDocumentRow(v,0);var y=e.getFoldLine(v);y&&(v=y.start.row),f=e.documentToScreenRow(v,0),g=e.getRowLength(v)*b,w=Math.min(e.screenToDocumentRow(w,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(w)*b+g,p=this.scrollTop-f*b;var x=0;return(this.layerConfig.width!=r||s)&&(x=this.CHANGE_H_SCROLL),(s||d)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:v,firstRowScreen:f,lastRow:w,lineHeight:b,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:p,gutterOffset:b?Math.max(0,Math.ceil((p+t.height-t.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),x},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),r=i.left,o=i.top,s=n&&n.top||0,a=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(t&&l+s>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a=1-this.scrollMargin.top||t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(o):Math.round(o);return{row:s,column:a,side:o-a>0?1:-1,offsetX:r}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=this.$blockCursor?Math.floor(o):Math.round(o),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),r)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),o=i.row*this.lineHeight;return{pageX:n.left+r-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),r.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.setGhostText=function(e,t){var n=this.session.selection.cursor,i=t||{row:n.row,column:n.column};this.removeGhostText();var r=e.split("\n");this.addToken(r[0],"ghost_text",i.row,i.column),this.$ghostText={text:e,position:{row:i.row,column:i.column}},r.length>1&&(this.$ghostTextWidget={text:r.slice(1).join("\n"),row:i.row,column:i.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},this.removeGhostText=function(){if(this.$ghostText){var e=this.$ghostText.position;this.removeExtraToken(e.row,e.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},this.addToken=function(e,t,n,i){var r=this.session;r.bgTokenizer.lines[n]=null;var o={type:t,value:e},s=r.getTokens(n);if(null==i)s.push(o);else for(var a=0,l=0;l"u")return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+r.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch{var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)}var l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,o),this.$createWorkerFromOldConfig=function(t,n,i,r,o){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)r=r||s.moduleUrl(n,"worker");else{var l=this.$normalizePath;r=r||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=a(r),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:i}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return r.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,t.push(i)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype);t.UIWorkerClient=function(e,t,n){var i=null,r=!1,a=Object.create(o),c=[],h=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),i&&(r?setTimeout(u):u())}});h.setEmitSync=function(e){r=e};var u=function(){var e=c.shift();e.command?i[e.command].apply(i,e.args):e.event&&a._signal(e.event,e.data)};return a.postMessage=function(e){h.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],(function(e){for(i=new e[n](a);c.length;)u()})),h},t.WorkerClient=l,t.createWorker=a})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){var i=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),s=function(e,t,n,i,r,o){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout((function(){s.onCursorChange()}))},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,r),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+o};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+o};this.doc.remove(new i(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var i=e("./range_list").RangeList,r=e("./range").Range,o=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var h=new(0,e("./search").Search);var u=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(i,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],o=e.column0;)v--;if(v>0)for(var w=0;i[w].isEmpty();)w++;for(var b=v;b>=w;b--)i[b].isEmpty()&&i.splice(b,1)}return i}}.call(o.prototype);var d=e("./editor").Editor;function f(e,t){return e.row==t.row&&e.column==t.column}function g(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(c.defaultCommands),function(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;function i(t){n&&(e.renderer.setMouseCursor(""),n=!1)}a.addListener(t,"keydown",(function(t){var r=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&r?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),e),a.addListener(t,"keyup",i,e),a.addListener(t,"blur",i,e)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var r=t.indexOf(i);-1!=r&&t.splice(r,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,h=(r?l:c).ranges;if(!h.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=l._eventRegistry;l._eventRegistry={};var d=new o(a);this.inVirtualSelectionMode=!0;for(var f=h.length;f--;){if(s)for(;f>0&&h[f].start.row==h[f-1].end.row;)f--;d.fromOrientedRange(h[f]),d.index=f,this.selection=a.selection=d;var g=e.exec?e.exec(this,t||{}):e(this,t||{});!i&&void 0!==g&&(i=g),d.toOrientedRange(h[f])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var p=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),p&&p.from==p.to&&this.renderer.animateScrolling(p.from),i}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;is&&(s=n.column),ih?e.insert(i,l.stringRepeat(" ",o-h)):e.remove(new r(i.row,i.column,i.row,i.column-o+h)),t.start.column=t.end.column=s,t.start.row=t.end.row=i.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var h=this.selection.getRange(),u=h.start.row,d=h.end.row,f=u==d;if(f){var g,p=this.session.getLength();do{g=this.session.getLine(d)}while(/[=:]/.test(g)&&++d0);u<0&&(u=0),d>=p&&(d=p-1)}var m=this.session.removeFullLines(u,d);m=this.$reAlignText(m,f),this.session.insert({row:u,column:0},m.join("\n")+"\n"),f||(h.start.column=0,h.end.column=m[m.length-1].length),this.selection.setRange(h)}},this.$reAlignText=function(e,t){var n,i,r,o=!0,s=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,i=t[2].length,r=t[3].length,t):(n+i+r!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),it[3].length&&(r=t[3].length),t):[e]})).map(t?c:o?s?function(e){return e[2]?a(n+i-e[2].length)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?a(n)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(n)+e[2]+a(i-e[2].length+r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=g,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){g(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var r=/\S/,o=e.getLine(t),s=o.search(r);if(-1!=s){for(var a=n||o.length,l=e.getLength(),c=t,h=t;++tc){var f=e.getLine(h).length;return new i(c,a,h,f)}}},this.openingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r+1},a=e.$findClosingBracket(t,s,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,i.fromPoints(a,s)}}).call(r.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){var i=e("../line_widgets").LineWidgets,r=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),a=s.row,l=n.widgetManager.getWidgetsAtRow(a).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():a-=t;var c,h=function(e,t,n){var i=e.getAnnotations().sort(o.comparePoints);if(i.length){var r=function(e,t,n){for(var i=0,r=e.length-1;i<=r;){var o=i+r>>1,s=n(t,e[o]);if(s>0)i=o+1;else{if(!(s<0))return o;r=o-1}}return-(i+1)}(i,{row:t,column:-1},o.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var s=i[r];if(s&&n){if(s.row===t){do{s=i[r+=n]}while(s&&s.row===t);if(!s)return i.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=i[r+=n]}while(s&&s.row==t);return a.length&&a}}}(n,a,t);if(h){var u=h[0];s.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,s.row=u.row,c=e.renderer.$gutterLayer.$annotations[s.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var d={row:s.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},f=d.el.appendChild(r.createElement("div")),g=d.el.appendChild(r.createElement("div"));g.className="error_widget_arrow "+c.className;var p=e.renderer.$cursorLayer.getPixelPosition(s).left;g.style.left=p+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",f.className="error_widget "+c.className,f.innerHTML=c.text.join("
"),f.appendChild(r.createElement("div"));var m=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},r.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],(function(e,t,n){e("./loader_build")(t);var i=e("./lib/dom"),r=e("./lib/event"),o=e("./range").Range,s=e("./editor").Editor,a=e("./edit_session").EditSession,l=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if("string"==typeof e){var o=e;if(!(e=document.getElementById(o)))throw new Error("ace.edit can't find div #"+o)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var l=e;a=l.value,e=i.createElement("pre"),l.parentNode.replaceChild(e,l)}else e&&(a=e.textContent,e.innerHTML="");var h=t.createEditSession(a),u=new s(new c(e),h,n),d={document:h,editor:u,onResize:u.resize.bind(u,null)};return l&&(d.textarea=l),r.addListener(window,"resize",d.onResize),u.on("destroy",(function(){r.removeListener(window,"resize",d.onResize),d.editor.container.env=null})),u.container.env=u.env=d,u},t.createEditSession=function(e,t){var n=new a(e,t);return n.setUndoManager(new l),n},t.Range=o,t.Editor=s,t.EditSession=a,t.UndoManager=l,t.VirtualRenderer=c,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){for(var n in t&&(t.config.init(!0),t.define=ace.define),window.ace||(window.ace=t),t)t.hasOwnProperty(n)&&(window.ace[n]=t[n]);window.ace.default=window.ace,e&&(e.exports=window.ace)}))}(Ph);const fn="/request-docs/_astro/worker-json.bba8ee7e.js";var Kt={},Rr={},pe={},Dh={get exports(){return pe},set exports(e){pe=e}},Nh="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Bh=Nh,Hh=Bh;function Do(){}function No(){}No.resetWarningCache=Do;var Wh=function(){function e(e,t,n,i,r,o){if(o!==Hh){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:No,resetWarningCache:Do};return n.PropTypes=n,n};Dh.exports=Wh();var cn={},jh={get exports(){return cn},set exports(e){cn=e}};!function(e,t){var n="__lodash_hash_undefined__",i=1,r=2,o=9007199254740991,s="[object Arguments]",a="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",h="[object Date]",u="[object Error]",d="[object Function]",f="[object GeneratorFunction]",g="[object Map]",p="[object Number]",m="[object Null]",v="[object Object]",w="[object Promise]",b="[object Proxy]",y="[object RegExp]",x="[object Set]",k="[object String]",S="[object Symbol]",C="[object Undefined]",$="[object WeakMap]",A="[object ArrayBuffer]",L="[object DataView]",_=/^\[object .+?Constructor\]$/,E=/^(?:0|[1-9]\d*)$/,M={};M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M[s]=M[a]=M[A]=M[c]=M[L]=M[h]=M[u]=M[d]=M[g]=M[p]=M[v]=M[y]=M[x]=M[k]=M[$]=!1;var R="object"==typeof De&&De&&De.Object===Object&&De,T="object"==typeof self&&self&&self.Object===Object&&self,O=R||T||Function("return this")(),F=t&&!t.nodeType&&t,I=F&&e&&!e.nodeType&&e,N=I&&I.exports===F,D=N&&R.process,P=function(){try{return D&&D.binding&&D.binding("util")}catch{}}(),j=P&&P.isTypedArray;function B(e,t){for(var n=-1,i=null==e?0:e.length;++nc))return!1;var u=a.get(e);if(u&&a.get(t))return u==t;var d=-1,f=!0,g=n&r?new $e:void 0;for(a.set(e,t),a.set(t,e);++d-1},Se.prototype.set=function(e,t){var n=this.__data__,i=_e(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},Ce.prototype.clear=function(){this.size=0,this.__data__={hash:new ke,map:new(he||Se),string:new ke}},Ce.prototype.delete=function(e){var t=Ne(this,e).delete(e);return this.size-=t?1:0,t},Ce.prototype.get=function(e){return Ne(this,e).get(e)},Ce.prototype.has=function(e){return Ne(this,e).has(e)},Ce.prototype.set=function(e,t){var n=Ne(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},$e.prototype.add=$e.prototype.push=function(e){return this.__data__.set(e,n),this},$e.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.clear=function(){this.__data__=new Se,this.size=0},Ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Se){var i=n.__data__;if(!he||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ce(i)}return n.set(e,t),this.size=n.size,this};var je=se?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=o}function Ye(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Xe(e){return null!=e&&"object"==typeof e}var Qe=j?function(e){return function(t){return e(t)}}(j):function(e){return Xe(e)&&qe(e.length)&&!!M[Ee(e)]};function Je(e){return function(e){return null!=e&&qe(e.length)&&!Ke(e)}(e)?Le(e):Oe(e)}e.exports=function(e,t){return Re(e,t)}}(jh,cn);var ct={};Object.defineProperty(ct,"__esModule",{value:!0}),ct.getAceInstance=ct.debounce=ct.editorEvents=ct.editorOptions=void 0;var zh=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];ct.editorOptions=zh;var Uh=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];ct.editorEvents=Uh;var Vh=function(){var e;return typeof window>"u"?(De.window={},e=Gt,delete De.window):window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=Gt,e};ct.getAceInstance=Vh;var Gh=function(e,t){var n=null;return function(){var i=this,r=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(i,r)}),t)}};ct.debounce=Gh;var Kh=De&&De.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ur=De&&De.__assign||function(){return ur=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&this.handleMarkers(y);var C=this.editor.$options;jt.editorOptions.forEach((function(t){C.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option ".concat(t," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))})),this.handleOptions(this.props),Array.isArray(w)&&w.forEach((function(t){"string"==typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)})),m&&this.editor.setKeyboardHandler("ace/keyboard/"+m),n&&(this.refEditor.className+=" "+n),v&&v(this.editor),this.editor.resize(),s&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,i=0;i 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splitse;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;return n=null==t?this.$cEditor:this.$editors[t],this.$editors.some((function(t){return t.session===e}))&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var i=t/this.$splits,r=0;r-1}function Ef(e,t){var n=this.__data__,i=mi(n,e);return i<0?n.push([e,t]):n[i][1]=t,this}function Bt(e){var t=-1,n=e?e.length:0;for(this.clear();++t0&&e.handleMarkers(x,t);for(i=0;i"u"&&(r=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=r;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];typeof i>"u"&&(i=!0);var s=i,a=this.diff_commonPrefix(e,n),l=e.substring(0,a);e=e.substring(a),n=n.substring(a),a=this.diff_commonSuffix(e,n);var c=e.substring(e.length-a);e=e.substring(0,e.length-a),n=n.substring(0,n.length-a);var h=this.diff_compute_(e,n,s,o);return l&&h.unshift(new t.Diff(0,l)),c&&h.push(new t.Diff(0,c)),this.diff_cleanupMerge(h),h},t.prototype.diff_compute_=function(e,i,r,o){var s;if(!e)return[new t.Diff(1,i)];if(!i)return[new t.Diff(n,e)];var a=e.length>i.length?e:i,l=e.length>i.length?i:e,c=a.indexOf(l);if(-1!=c)return s=[new t.Diff(1,a.substring(0,c)),new t.Diff(0,l),new t.Diff(1,a.substring(c+l.length))],e.length>i.length&&(s[0][0]=s[2][0]=n),s;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,i)];var h=this.diff_halfMatch_(e,i);if(h){var u=h[0],d=h[1],f=h[2],g=h[3],p=h[4],m=this.diff_main(u,f,r,o),v=this.diff_main(d,g,r,o);return m.concat([new t.Diff(0,p)],v)}return r&&e.length>100&&i.length>100?this.diff_lineMode_(e,i,o):this.diff_bisect_(e,i,o)},t.prototype.diff_lineMode_=function(e,i,r){var o=this.diff_linesToChars_(e,i);e=o.chars1,i=o.chars2;var s=o.lineArray,a=this.diff_main(e,i,!1,r);this.diff_charsToLines_(a,s),this.diff_cleanupSemantic(a),a.push(new t.Diff(0,""));for(var l=0,c=0,h=0,u="",d="";l=1&&h>=1){a.splice(l-c-h,c+h),l=l-c-h;for(var f=this.diff_main(u,d,!1,r),g=f.length-1;g>=0;g--)a.splice(l,0,f[g]);l+=f.length}h=0,c=0,u="",d=""}l++}return a.pop(),a},t.prototype.diff_bisect_=function(e,i,r){for(var o=e.length,s=i.length,a=Math.ceil((o+s)/2),l=a,c=2*a,h=new Array(c),u=new Array(c),d=0;dr);b++){for(var y=-b+p;y<=b-m;y+=2){for(var x=l+y,k=(L=y==-b||y!=b&&h[x-1]o)m+=2;else if(k>s)p+=2;else if(g){if(($=l+f-y)>=0&&$=(C=o-u[$]))return this.diff_bisectSplit_(e,i,L,k,r)}}for(var S=-b+v;S<=b-w;S+=2){for(var C,$=l+S,A=(C=S==-b||S!=b&&u[$-1]o)w+=2;else if(A>s)v+=2;else if(!g){if((x=l+f-S)>=0&&x=(C=o-C))return this.diff_bisectSplit_(e,i,L,k,r)}}}}return[new t.Diff(n,e),new t.Diff(1,i)]},t.prototype.diff_bisectSplit_=function(e,t,n,i,r){var o=e.substring(0,n),s=t.substring(0,i),a=e.substring(n),l=t.substring(i),c=this.diff_main(o,s,!1,r),h=this.diff_main(a,l,!1,r);return c.concat(h)},t.prototype.diff_linesToChars_=function(e,t){var n=[],i={};function r(e){for(var t="",r=0,s=-1,a=n.length;si?e=e.substring(n-i):nt.length?e:t,i=e.length>t.length?t:e;if(n.length<4||2*i.length=e.length?[i,o,s,a,h]:null}var s,a,l,c,h,u=o(n,i,Math.ceil(n.length/4)),d=o(n,i,Math.ceil(n.length/2));return u||d?(s=d?u&&u[4].length>d[4].length?u:d:u,e.length>t.length?(a=s[0],l=s[1],c=s[2],h=s[3]):(c=s[0],h=s[1],a=s[2],l=s[3]),[a,l,c,h,s[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var i=!1,r=[],o=0,s=null,a=0,l=0,c=0,h=0,u=0;a0?r[o-1]:-1,l=0,c=0,h=0,u=0,s=null,i=!0)),a++;for(i&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a=p?(g>=d.length/2||g>=f.length/2)&&(e.splice(a,0,new t.Diff(0,f.substring(0,g))),e[a-1][1]=d.substring(0,d.length-g),e[a+1][1]=f.substring(g),a++):(p>=d.length/2||p>=f.length/2)&&(e.splice(a,0,new t.Diff(0,d.substring(0,p))),e[a-1][0]=1,e[a-1][1]=f.substring(0,f.length-p),e[a+1][0]=n,e[a+1][1]=d.substring(p),a++),a++}a++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var i=e.charAt(e.length-1),r=n.charAt(0),o=i.match(t.nonAlphaNumericRegex_),s=r.match(t.nonAlphaNumericRegex_),a=o&&i.match(t.whitespaceRegex_),l=s&&r.match(t.whitespaceRegex_),c=a&&i.match(t.linebreakRegex_),h=l&&r.match(t.linebreakRegex_),u=c&&e.match(t.blanklineEndRegex_),d=h&&n.match(t.blanklineStartRegex_);return u||d?5:c||h?4:o&&!a&&l?3:a||l?2:o||s?1:0}for(var i=1;i=d&&(d=f,c=r,h=o,u=s)}e[i-1][1]!=c&&(c?e[i-1][1]=c:(e.splice(i-1,1),i--),e[i][1]=h,u?e[i+1][1]=u:(e.splice(i+1,1),i--))}i++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var i=!1,r=[],o=0,s=null,a=0,l=!1,c=!1,h=!1,u=!1;a0?r[o-1]:-1,h=u=!1),i=!0)),a++;i&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var i,r=0,o=0,s=0,a="",l="";r1?(0!==o&&0!==s&&(0!==(i=this.diff_commonPrefix(l,a))&&(r-o-s>0&&0==e[r-o-s-1][0]?e[r-o-s-1][1]+=l.substring(0,i):(e.splice(0,0,new t.Diff(0,l.substring(0,i))),r++),l=l.substring(i),a=a.substring(i)),0!==(i=this.diff_commonSuffix(l,a))&&(e[r][1]=l.substring(l.length-i)+e[r][1],l=l.substring(0,l.length-i),a=a.substring(0,a.length-i))),r-=o+s,e.splice(r,o+s),a.length&&(e.splice(r,0,new t.Diff(n,a)),r++),l.length&&(e.splice(r,0,new t.Diff(1,l)),r++),r++):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,s=0,o=0,a="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(r=1;rt));i++)s=r,a=o;return e.length!=i&&e[i][0]===n?a:a+(t-s)},t.prototype.diff_prettyHtml=function(e){for(var t=[],i=/&/g,r=//g,s=/\n/g,a=0;a");switch(l){case 1:t[a]=''+c+"";break;case n:t[a]=''+c+"";break;case 0:t[a]=""+c+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(t),r=this;function o(e,i){var o=e/t.length,s=Math.abs(n-i);return r.Match_Distance?o+s/r.Match_Distance:s?1:o}var s=this.Match_Threshold,a=e.indexOf(t,n);-1!=a&&(s=Math.min(o(0,a),s),-1!=(a=e.lastIndexOf(t,n+t.length))&&(s=Math.min(o(0,a),s)));var l=1<=g;v--){var w=i[e.charAt(v-1)];if(m[v]=0===f?(m[v+1]<<1|1)&w:(m[v+1]<<1|1)&w|(u[v+1]|u[v])<<1|1|u[v+1],m[v]&l){var b=o(f,v-1);if(b<=s){if(s=b,!((a=v-1)>n))break;g=Math.max(1,2*n-a)}}}if(o(f+1,n)>s)break;u=m}return a},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n"u")o=e,(s=this.diff_main(o,i,!0)).length>2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(e&&"object"==typeof e&&typeof i>"u"&&typeof r>"u")s=e,o=this.diff_text1(s);else if("string"==typeof e&&i&&"object"==typeof i&&typeof r>"u")o=e,s=i;else{if("string"!=typeof e||"string"!=typeof i||!r||"object"!=typeof r)throw new Error("Unknown call format to patch_make.");o=e,s=r}if(0===s.length)return[];for(var a=[],l=new t.patch_obj,c=0,h=0,u=0,d=o,f=o,g=0;g=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,d),a.push(l),l=new t.patch_obj,c=0,d=f,h=u)}1!==p&&(h+=m.length),p!==n&&(u+=m.length)}return c&&(this.patch_addContext_(l,d),a.push(l)),a},t.prototype.patch_deepCopy=function(e){for(var n=[],i=0;ithis.Match_MaxBits?-1!=(a=this.match_main(t,h.substring(0,this.Match_MaxBits),c))&&((-1==(u=this.match_main(t,h.substring(h.length-this.Match_MaxBits),c+h.length-this.Match_MaxBits))||a>=u)&&(a=-1)):a=this.match_main(t,h,c),-1==a)o[s]=!1,r-=e[s].length2-e[s].length1;else if(o[s]=!0,r=a-c,h==(l=-1==u?t.substring(a,a+h.length):t.substring(a,u+this.Match_MaxBits)))t=t.substring(0,a)+this.diff_text2(e[s].diffs)+t.substring(a+h.length);else{var d=this.diff_main(h,l,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(d)/h.length>this.Patch_DeleteThreshold)o[s]=!1;else{this.diff_cleanupSemanticLossless(d);for(var f,g=0,p=0;ps[0][1].length){var a=n-s[0][1].length;s[0][1]=i.substring(s[0][1].length)+s[0][1],o.start1-=a,o.start2-=a,o.length1+=a,o.length2+=a}if(0==(s=(o=e[e.length-1]).diffs).length||0!=s[s.length-1][0])s.push(new t.Diff(0,i)),o.length1+=n,o.length2+=n;else if(n>s[s.length-1][1].length){a=n-s[s.length-1][1].length;s[s.length-1][1]+=i.substring(0,a),o.length1+=a,o.length2+=a}return i},t.prototype.patch_splitMax=function(e){for(var i=this.Match_MaxBits,r=0;r2*i?(c.length1+=d.length,s+=d.length,h=!1,c.diffs.push(new t.Diff(u,d)),o.diffs.shift()):(d=d.substring(0,i-c.length1-this.Patch_Margin),c.length1+=d.length,s+=d.length,0===u?(c.length2+=d.length,a+=d.length):h=!1,c.diffs.push(new t.Diff(u,d)),d==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(d.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var f=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==f&&(c.length1+=f.length,c.length2+=f.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=f:c.diffs.push(new t.Diff(0,f))),h||e.splice(++r,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;nc)break;var h=this.getFoldWidgetRange(e,"all",t);if(h){if(h.start.row<=o)break;if(h.isMultiLine())t=h.end.row;else if(i==c)break}a=t}}return new r(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ns)return new r(s,i,n,t.length)}}.call(s.prototype)})),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],(function(e,t,n){var i=e("../lib/oop"),r=e("./text").Mode,o=e("./json_highlight_rules").JsonHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=e("../worker/worker_client").WorkerClient,h=function(){this.HighlightRules=o,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new l};i.inherits(h,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t);"start"==e&&(t.match(/^.*[\{\(\[]\s*$/)&&(i+=n));return i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/json"}.call(h.prototype),t.Mode=h})),ace.require(["ace/mode/json"],(function(t){e&&(e.exports=t)}))}(ad);var As={},ld={get exports(){return As},set exports(e){As=e}};!function(e,t){ace.define("ace/theme/one_dark.css",["require","exports","module"],(function(e,t,n){n.exports='.ace-one-dark .ace_gutter {\n background: #282c34;\n color: #6a6f7a\n}\n\n.ace-one-dark .ace_print-margin {\n width: 1px;\n background: #e8e8e8\n}\n\n.ace-one-dark {\n background-color: #282c34;\n color: #abb2bf\n}\n\n.ace-one-dark .ace_cursor {\n color: #528bff\n}\n\n.ace-one-dark .ace_marker-layer .ace_selection {\n background: #3d4350\n}\n\n.ace-one-dark.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0 #282c34;\n border-radius: 2px\n}\n\n.ace-one-dark .ace_marker-layer .ace_step {\n background: #c6dbae\n}\n\n.ace-one-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #747369\n}\n\n.ace-one-dark .ace_marker-layer .ace_active-line {\n background: rgba(76, 87, 103, .19)\n}\n\n.ace-one-dark .ace_gutter-active-line {\n background-color: rgba(76, 87, 103, .19)\n}\n\n.ace-one-dark .ace_marker-layer .ace_selected-word {\n border: 1px solid #3d4350\n}\n\n.ace-one-dark .ace_fold {\n background-color: #61afef;\n border-color: #abb2bf\n}\n\n.ace-one-dark .ace_keyword {\n color: #c678dd\n}\n\n.ace-one-dark .ace_keyword.ace_operator {\n color: #c678dd\n}\n\n.ace-one-dark .ace_keyword.ace_other.ace_unit {\n color: #d19a66\n}\n\n.ace-one-dark .ace_constant.ace_language {\n color: #d19a66\n}\n\n.ace-one-dark .ace_constant.ace_numeric {\n color: #d19a66\n}\n\n.ace-one-dark .ace_constant.ace_character {\n color: #56b6c2\n}\n\n.ace-one-dark .ace_constant.ace_other {\n color: #56b6c2\n}\n\n.ace-one-dark .ace_support.ace_function {\n color: #61afef\n}\n\n.ace-one-dark .ace_support.ace_constant {\n color: #d19a66\n}\n\n.ace-one-dark .ace_support.ace_class {\n color: #e5c07b\n}\n\n.ace-one-dark .ace_support.ace_type {\n color: #e5c07b\n}\n\n.ace-one-dark .ace_storage {\n color: #c678dd\n}\n\n.ace-one-dark .ace_storage.ace_type {\n color: #c678dd\n}\n\n.ace-one-dark .ace_invalid {\n color: #fff;\n background-color: #f2777a\n}\n\n.ace-one-dark .ace_invalid.ace_deprecated {\n color: #272b33;\n background-color: #d27b53\n}\n\n.ace-one-dark .ace_string {\n color: #98c379\n}\n\n.ace-one-dark .ace_string.ace_regexp {\n color: #e06c75\n}\n\n.ace-one-dark .ace_comment {\n font-style: italic;\n color: #5c6370\n}\n\n.ace-one-dark .ace_variable {\n color: #e06c75\n}\n\n.ace-one-dark .ace_variable.ace_parameter {\n color: #d19a66\n}\n\n.ace-one-dark .ace_meta.ace_tag {\n color: #e06c75\n}\n\n.ace-one-dark .ace_entity.ace_other.ace_attribute-name {\n color: #e06c75\n}\n\n.ace-one-dark .ace_entity.ace_name.ace_function {\n color: #61afef\n}\n\n.ace-one-dark .ace_entity.ace_name.ace_tag {\n color: #e06c75\n}\n\n.ace-one-dark .ace_markup.ace_heading {\n color: #98c379\n}\n\n.ace-one-dark .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ09NrYAgMjP4PAAtGAwchHMyAAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-one-dark .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'})),ace.define("ace/theme/one_dark",["require","exports","module","ace/theme/one_dark.css","ace/lib/dom"],(function(e,t,n){t.isDark=!0,t.cssClass="ace-one-dark",t.cssText=e("./one_dark.css"),e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.require(["ace/theme/one_dark"],(function(t){e&&(e.exports=t)}))}(ld);var Es={},cd={get exports(){return Es},set exports(e){Es=e}};function ud(e){const{responseHeaders:t,responseData:n,timeTaken:i,responseStatus:r,serverMemory:o}=e;return O.jsxs(O.Fragment,{children:[t&&O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"collapse collapse-arrow",children:[O.jsx("input",{type:"checkbox"}),O.jsx("div",{className:"collapse-title text-sm text-slate-500 pl-0",children:"Show Response Headers"}),O.jsx("div",{className:"collapse-content p-0",children:O.jsx(At,{maxLines:35,readOnly:!0,width:"100%",mode:"json",wrapEnabled:!0,value:t,theme:"one_dark",onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1)},editorProps:{$blockScrolling:!0}})})]}),O.jsx("br",{})]}),!n&&O.jsx("div",{className:"text-center text-sm text-slate-500",children:"No Response Data"}),n&&O.jsxs("div",{className:"mockup-code",children:[O.jsx("span",{className:"pl-5 text-sm text-slate-500",children:"RESPONSE"}),O.jsx("br",{}),O.jsxs("span",{className:"pl-5 text-sm",children:["Time taken: ",O.jsxs("b",{children:[i,"ms"]}),", Status Code: ",O.jsx("b",{children:r}),", Server memory: ",O.jsx("b",{children:o})]}),O.jsx(At,{maxLines:50,width:"100%",mode:"json",wrapEnabled:!0,readOnly:!0,value:n,theme:"one_dark",onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1)},editorProps:{$blockScrolling:!0}})]})]})}!function(e,t){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(e,t,n){var i=e("./lib/dom"),r=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),a=e("./range").Range,l=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,h=e("./tokenizer").Tokenizer,u=e("./clipboard"),d={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var i=e.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):i},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return u.getText&&u.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:f.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:f.bind(null,{year:"2-digit"}),CURRENT_MONTH:f.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:f.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:f.bind(null,{month:"short"}),CURRENT_DATE:f.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:f.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:f.bind(null,{weekday:"short"}),CURRENT_HOUR:f.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:f.bind(null,{minute:"2-digit"}),CURRENT_SECOND:f.bind(null,{second:"2-digit"})};function f(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}d.SELECTED_TEXT=d.SELECTION;var g=function(){this.snippetMap={},this.snippetNameMap={}};(function(){r.implement(this,o),this.getTokenizer=function(){return g.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function e(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var n={regex:"/("+t("/")+"+)/",onMatch:function(e,t,n){var i=n[0];return i.fmtString=!0,i.guard=e.slice(1,-1),i.flag="",""},next:"formatString"};return g.$tokenizer=new h({start:[{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return("}"==i&&n.length||-1!="`$\\".indexOf(i))&&(e=i),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,i){var r=e(t.substr(1));return i.unshift(r[0]),r},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){var i=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0").map((function(e){return{value:e}}));return n[0].choices=i,[i[0]]},next:"start"},n,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length||-1!="`$\\".indexOf(i)?e=i:"n"==i?e="\n":"t"==i?e="\t":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:i>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var i=n.shift();return i&&(i.flag=e.slice(1,-1)),this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var i={text:e.slice(2)};return n.unshift(i),[i]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var i=n.shift();return this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},n,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){"+"==e[1]&&(n[0].ifEnd=n[0]),"?"==e[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]})},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},this.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var i=this.variables[t];return"function"==typeof i&&(i=this.variables[t](e,t,n)),i??""},this.variables=d,this.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var i=t.flag||"",r=t.guard;r=new RegExp(r,i.replace(/[^gim]/g,""));var o="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,s=this,a=e.replace(r,(function(){var e=s.variables.__;s.variables.__=[].slice.call(arguments);for(var t=s.resolveVariables(o,n),i="E",r=0;r1?(w=t[t.length-1].length,v+=t.length-1):w+=e.length,b+=e}else e&&(e.start?e.end={row:v,column:w}:e.start={row:v,column:w})}));var y=e.getSelectionRange(),x=e.session.replace(y,b),k=new p(e),S=e.inVirtualSelectionMode&&e.selection.index;k.addTabstops(a,y.start,x,S)},this.insertSnippet=function(e,t){var n=this;if(e.inVirtualSelectionMode)return n.insertSnippetForSelection(e,t);e.forEachSelection((function(){n.insertSnippetForSelection(e,t)}),null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";if("html"===(t=t.split("/").pop())||"php"===t){"php"===t&&!e.session.$mode.inlinePhp&&(t="html");var n=e.getCursorPosition(),i=e.session.getState(n.row);"object"==typeof i&&(i=i[0]),i.substring&&("js-"==i.substring(0,3)?t="javascript":"css-"==i.substring(0,4)?t="css":"php-"==i.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],i=this.snippetMap;return i[t]&&i[t].includeScopes&&n.push.apply(n,i[t].includeScopes),n.push("_"),n},this.expandWithTab=function(e,t){var n=this,i=e.forEachSelection((function(){return n.expandSnippetForSelection(e,t)}),null,{keepOrder:!0});return i&&e.tabstopManager&&e.tabstopManager.tabNext(),i},this.expandSnippetForSelection=function(e,t){var n,i=e.getCursorPosition(),r=e.session.getLine(i.row),o=r.substring(0,i.column),s=r.substr(i.column),a=this.snippetMap;return this.getActiveScopes(e).some((function(e){var t=a[e];return t&&(n=this.findMatchingSnippet(t,o,s)),!!n}),this),!!n&&(t&&t.dryRun||(e.session.doc.removeInLine(i.row,i.column-n.replaceBefore.length,i.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(e,n.content),this.variables.M__=this.variables.T__=null),!0)},this.findMatchingSnippet=function(e,t,n){for(var i=e.length;i--;){var r=e[i];if((!r.startRe||r.startRe.test(t))&&(!r.endRe||r.endRe.test(n))&&(r.startRe||r.endRe))return r.matchBefore=r.startRe?r.startRe.exec(t):[""],r.matchAfter=r.endRe?r.endRe.exec(n):[""],r.replaceBefore=r.triggerRe?r.triggerRe.exec(t)[0]:"",r.replaceAfter=r.endTriggerRe?r.endTriggerRe.exec(n)[0]:"",r}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){var n=this.snippetMap,i=this.snippetNameMap,r=this;function o(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function a(e,t,n){return e=o(e),t=o(t),n?(e=t+e)&&"$"!=e[e.length-1]&&(e+="$"):(e+=t)&&"^"!=e[0]&&(e="^"+e),new RegExp(e)}function l(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],i[t]={});var o=i[t];if(e.name){var l=o[e.name];l&&r.unregister(l),o[e.name]=e}n[t].push(e),e.prefix&&(e.tabTrigger=e.prefix),!e.content&&e.body&&(e.content=Array.isArray(e.body)?e.body.join("\n"):e.body),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=s.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=a(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger),e.endRe=a(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger))}e||(e=[]),Array.isArray(e)?e.forEach(l):Object.keys(e).forEach((function(t){l(e[t])})),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){var n=this.snippetMap,i=this.snippetNameMap;function r(e){var r=i[e.scope||t];if(r&&r[e.name]){delete r[e.name];var o=n[e.scope||t],s=o&&o.indexOf(e);s>=0&&o.splice(s,1)}}e.content?r(e):Array.isArray(e)&&e.forEach(r)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],i={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=r.exec(e);){if(t[1])try{i=JSON.parse(t[1]),n.push(i)}catch{}if(t[4])i.content=t[4].replace(/^\t/gm,""),n.push(i),i={};else{var o=t[2],s=t[3];if("regex"==o){var a=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=a.exec(s)[1],i.trigger=a.exec(s)[1],i.endTrigger=a.exec(s)[1],i.endGuard=a.exec(s)[1]}else"snippet"==o?(i.tabTrigger=s.match(/^\S*/)[0],i.name||(i.name=s)):o&&(i[o]=s)}}return n},this.getSnippetByName=function(e,t){var n,i=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var r=i[t];return r&&(n=r[e]),!!n}),this),n}}).call(g.prototype);var p=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop||{},i=n.parents||{},r=(this.tabstops||[]).slice(),o=0;o2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},this.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new c,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}})}).call(p.prototype);var m=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},v=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};i.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new g;var w=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(w.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],(function(e,t,n){var i=e("../virtual_renderer").VirtualRenderer,r=e("../editor").Editor,o=e("../range").Range,s=e("../lib/event"),a=e("../lib/lang"),l=e("../lib/dom"),c=function(e){return"suggest-aria-id:".concat(e)},h=function(e){var t=new i(e);t.$maxLines=4;var n=new r(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n};l.importCssString("\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin: 0.9em;\n}\n.ace_completion-message {\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}","autocompletion.css",!1),t.AcePopup=function(e){var t=l.createElement("div"),n=new h(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.renderer.container.setAttribute("role","listbox"),n.renderer.container.setAttribute("aria-label","Autocomplete suggestions"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var i=function(){};n.focus=i,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=i,n.renderer.$cursorLayer.element.style.opacity=0,n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",(function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),d.start.row=d.end.row=t.row,e.stop()}));var r,u=new o(-1,0,-1,1/0),d=new o(-1,0,-1,1/0);d.id=n.session.addMarker(d,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?u.id&&(n.session.removeMarker(u.id),u.id=null):u.id=n.session.addMarker(u,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",(function(e){if(r){if(r.x!=e.x||r.y!=e.y){(r=e).scrollTop=n.renderer.scrollTop;var t=r.getDocumentPosition().row;u.start.row!=t&&(u.id||n.setRow(t),g(t))}}else r=e})),n.renderer.on("beforeRender",(function(){if(r&&-1!=u.start.row){r.$pos=null;var e=r.getDocumentPosition().row;u.id||n.setRow(e),g(e,!0)}})),n.renderer.on("afterRender",(function(){var e=n.getRow(),t=n.renderer.$textLayer,i=t.element.childNodes[e-t.config.firstRow],r=document.activeElement;if(i!==t.selectedNode&&t.selectedNode&&(l.removeCssClass(t.selectedNode,"ace_selected"),r.removeAttribute("aria-activedescendant"),t.selectedNode.removeAttribute("id")),t.selectedNode=i,i){l.addCssClass(i,"ace_selected");var o=c(e);i.id=o,n.renderer.container.setAttribute("aria-activedescendant",o),r.setAttribute("aria-activedescendant",o),i.setAttribute("role","option"),i.setAttribute("aria-label",n.getData(e).value),i.setAttribute("aria-setsize",n.data.length),i.setAttribute("aria-posinset",e)}}));var f=function(){g(-1)},g=function(e,t){e!==u.start.row&&(u.start.row=u.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return u.start.row},s.addListener(n.container,"mouseout",f),n.on("hide",f),n.on("changeSelection",f),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var p=n.session.bgTokenizer;return p.$tokenizeRow=function(e){var t=n.data[e],i=[];if(!t)return i;"string"==typeof t&&(t={value:t});var r=t.caption||t.value||t.name;function o(e,n){e&&i.push({type:(t.className||"")+(n||""),value:e})}for(var s=r.toLowerCase(),a=(n.filterText||"").toLowerCase(),l=0,c=0,h=0;h<=a.length;h++)if(h!=c&&(t.matchMask&1<s/2&&!i&&h+t+c>s?(l.$maxPixelHeight=h-2*this.$borderSize,o.style.top="",o.style.bottom=s-h+"px",n.isTopdown=!1):(h+=t,l.$maxPixelHeight=s-h-.2*t,o.style.top=h+"px",o.style.bottom="",n.isTopdown=!0),o.style.display="";var u=e.left;u+o.offsetWidth>a&&(u=a-o.offsetWidth),o.style.left=u+"px",this._signal("show"),r=null,n.isOpen=!0},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n},t.$singleLineEditor=h,t.getAriaId=c})),ace.define("ace/autocomplete/util",["require","exports","module"],(function(e,t,n){t.parForEach=function(e,t,n){var i=0,r=e.length;0===r&&n();for(var o=0;o=0&&n.test(e[o]);o--)r.push(e[o]);return r.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||i;for(var r=[],o=t;othis.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var n=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)})),this.filtered=t},this.filterCompletions=function(e,t){var n=[],i=t.toUpperCase(),r=t.toLowerCase();e:for(var o,s=0;o=e[s];s++){var a=o.caption||o.value||o.snippet;if(a){var l,c,h=-1,u=0,d=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else{var f=a.toLowerCase().indexOf(r);if(f>-1)d=f;else for(var g=0;g=0&&(m<0||p0&&(-1===h&&(d+=10),d+=c,u|=1<",s.escapeHTML(e.caption),"","
",s.escapeHTML(h(e.snippet))].join(""))}},d=[u,l,c];t.setCompleters=function(e){d.length=0,e&&d.push.apply(d,e)},t.addCompleter=function(e){d.push(e)},t.textCompleter=l,t.keyWordCompleter=c,t.snippetCompleter=u;var f={name:"expandSnippet",exec:function(e){return i.expandWithTab(e)},bindKey:"Tab"},g=function(e,t){p(t.session.$mode)},p=function(e){"string"==typeof e&&(e=o.$modes[e]),e&&(i.files||(i.files={}),m(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(p))},m=function(e,t){!t||!e||i.files[e]||(i.files[e]={},o.loadModule(t,(function(t){t&&(i.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=i.parseSnippetFile(t.snippetText)),i.register(t.snippets||[],t.scope),t.includeScopes&&(i.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){p("ace/mode/"+e)}))))})))},v=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!a.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name){if(a.getCompletionPrefix(t)&&!n){var i=r.for(t);i.autoInsert=!1,i.showPopup(t)}}},w=e("../editor").Editor;e("../config").defineOptions(w.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:d),this.commands.addCommand(r.startCommand)):this.commands.removeCommand(r.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:d),this.commands.on("afterExec",v)):this.commands.removeListener("afterExec",v)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(f),this.on("changeMode",g),g(0,this)):(this.commands.removeCommand(f),this.off("changeMode",g))},value:!1}})})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))}(cd),ace.config.setModuleUrl("ace/mode/json_worker",fn);var gr={},hd={get exports(){return gr},set exports(e){gr=e}};!function(e,t){var n;n=e=>(()=>{var t={703:(e,t,n)=>{var i=n(414);function r(){}function o(){}o.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,o,s){if(s!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},639:t=>{t.exports=e}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{i.r(r),i.d(r,{default:()=>p});var e=i(639),t=i.n(e),n=i(697),o=i.n(n);const s=function(e){var t=e.name.split(".");return t.length>1?t[t.length-1]:"none"};function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n1&&(n=[n[0]]);for(var i=[],o=0;o=1e9?Math.ceil(t/1e9)+"GB":t>=1e6?Math.ceil(t/1e6)+"MB":t>=1e3?Math.ceil(t/1e3)+"KB":Math.ceil(t)+"B",a.type&&"image"===a.type.split("/")[0]?a.preview={type:"image",url:window.URL.createObjectURL(a)}:a.preview={type:"file"},i.length>=p){M({code:4,message:"maximum file count reached"},a);break}if(a.size>m){M({code:2,message:"".concat(a.name," is too large")},a);break}if(a.size{const e=[];for(const[n,i]of Object.entries(t.rules)){if(0==i.length)continue;const t=i[0].split("|");(t.includes("file")||t.includes("image"))&&e.push(n)}p(e)}),[]),O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"form-control",children:[O.jsxs("label",{className:"input-group input-group-sm",children:[O.jsx("span",{className:`method-${i}`,children:i}),O.jsx("input",{type:"text",defaultValue:n,onChange:e=>l(e.target.value),placeholder:"Type here",className:"focus:outline-none input w-full input-bordered input-sm"}),O.jsxs("button",{className:"btn btn-sm btn-success",onClick:c,children:["GO ",O.jsx(Oo,{className:"inline-block w-4 h-4 ml-1"})]}),O.jsx("br",{})]}),r&&O.jsx("progress",{className:"progress progress-success w-full"})]}),O.jsx("br",{}),O.jsxs("div",{className:"collapse collapse-arrow",children:[O.jsx("input",{type:"checkbox"}),O.jsx("div",{className:"collapse-title text-sm text-slate-500 pl-0",children:"Set Global Headers"}),0!=g.length&&("POST"==i||"PUT"==i||"DELETE"==i)&&O.jsxs("div",{className:"text-sm text-slate-500 p-0",children:[O.jsx(Du,{className:"inline-block w-4 h-4 ml-1 text-yellow-500"}),"  This request requires a file upload. ",O.jsx("br",{}),O.jsx(Wu,{className:"inline-block w-4 h-4 ml-1 text-slate-500"}),"  Global headers will be overridden as ",O.jsx("code",{children:"application/json"})," ⇢ ",O.jsx("code",{children:"multipart/form-data"}),O.jsx("br",{})]}),O.jsx("div",{className:"collapse-content p-0",children:O.jsx(At,{height:"200px",width:"100%",mode:"json",value:o,onChange:h,theme:"one_dark",onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1),e.setFontSize(14)},editorProps:{$blockScrolling:!0}})})]}),O.jsx("br",{}),("GET"==i||"HEAD"==i||"DELETE"==i)&&O.jsxs("div",{className:"mockup-code",children:[O.jsxs("span",{className:"pl-5 text-sm text-slate-500",children:["Query Params. Example ",O.jsx("code",{children:"?abc=123&def=456"})]}),O.jsx(At,{height:"200px",width:"100%",mode:"sql",wrapEnabled:!0,value:a,onChange:f,theme:"one_dark",onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1),e.setFontSize(14)},editorProps:{$blockScrolling:!0}})]}),("POST"==i||"PUT"==i||"PATCH"==i)&&O.jsxs("div",{className:"mockup-code",children:[O.jsx("span",{className:"pl-5 text-sm text-slate-500",children:"REQUEST BODY"}),g.map((e=>O.jsx("div",{children:O.jsxs(fd,{className:"p-5 bg-gray-800 border border-gray-500 border-double hover:bg-gray-700 hover:border-dashed hover:cursor-pointer",onChange:t=>((e,t)=>{const n={...m};n[t]=e,v(n),u(e,t)})(t,e),multiple:e.includes(".*"),maxFileSize:1e7,minFileSize:0,clickable:!0,children:[m[e]&&m[e].length>0&&O.jsx("div",{className:"text-sm text-gray-300",children:m[e].map(((e,t)=>O.jsxs("div",{children:[t+1,") ",e.name," - ",e.size," bytes"]},e.id)))}),O.jsxs("span",{className:"text-slate-500",children:[O.jsx("code",{children:O.jsx("small",{children:e})}),e.includes(".*")&&O.jsx(di,{className:"inline-block w-4 h-4 ml-1"}),O.jsx("br",{}),e.includes(".*")?"Drop or click to upload multiple files":"Drop or click to upload single file"]})]})},Te.generate()))),O.jsx(At,{height:"200px",width:"100%",mode:"json",wrapEnabled:!0,value:s,onChange:d,theme:"one_dark",onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1),e.setFontSize(14)},editorProps:{$blockScrolling:!0}})]})]})}function gd(e){const{activeTab:t,responseStatus:n,sqlQueriesCount:i,logsData:r,modelsData:o,setActiveTab:s}=e;return O.jsxs("div",{className:"tabs tabs-boxed",children:[O.jsxs("a",{className:"tab "+("info"==t?"tab-active":""),onClick:()=>s("info"),children:[O.jsx(Bu,{className:"inline-block w-5 h-5"})," Info"]}),O.jsx("a",{className:"tab "+("request"==t?"tab-active":""),onClick:()=>s("request"),children:O.jsxs("span",{className:"text-success font-bold",children:[O.jsx(Oo,{className:"inline-block w-5 h-5"})," Send"]})}),O.jsx("span",{className:"pr-1 mb-1",children:O.jsx(Iu,{className:"inline-block w-5 h-5"})}),O.jsxs("a",{className:"pl-0 tab "+("response"==t?"tab-active":""),onClick:()=>s("response"),children:[O.jsx(Uu,{className:"inline-block w-5 h-5"})," Response",0!=n&&O.jsx("div",{className:`ml-1 badge badge-sm badge-${n} badge-info`,children:n})]}),O.jsxs("a",{className:"pl-0 pr-3 tab "+("sql"==t?"tab-active":""),onClick:()=>s("sql"),children:[O.jsx(To,{className:"inline-block w-5 h-5 mr-1"})," SQL",0!=n&&O.jsx("div",{className:"ml-1 badge badge-xs badge-warning",children:i})]}),O.jsxs("a",{className:"pl-0 pr-3 tab "+("logs"==t?"tab-active":""),onClick:()=>s("logs"),children:[O.jsx(Fu,{className:"inline-block w-5 h-5 mr-1"})," Logs",0!=n&&O.jsx("div",{className:"ml-1 badge badge-xs badge-warning",children:r.split("\n").length-1})]}),O.jsxs("a",{className:"pl-0 pr-1 tab "+("events"==t?"tab-active":""),onClick:()=>s("events"),children:[O.jsx(Ku,{className:"inline-block w-5 h-5 mr-1"})," Events",0!=n&&O.jsx("div",{className:"ml-1 badge badge-xs badge-warning",children:o&&o.modelsSummary?Object.keys(o.modelsSummary).length:0})]})]})}ace.config.setModuleUrl("ace/mode/json_worker",fn);const pd={200:"OK",201:"Created",202:"Accepted",204:"No Content",400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",422:"Unprocessable Entity",429:"Too Many Requests",500:"Internal Server Error",503:"Service Unavailable"},Ls=["http","https","mailto","tel"];function md(e){const t=(e||"").trim(),n=t.charAt(0);if("#"===n||"/"===n)return t;const i=t.indexOf(":");if(-1===i)return t;let r=-1;for(;++rr||(r=t.indexOf("#"),-1!==r&&i>r)?t:"javascript:void(0)"}var Ko=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)};function an(e){return e&&"object"==typeof e?"position"in e||"type"in e?_s(e.position):"start"in e||"end"in e?_s(e):"line"in e||"column"in e?pr(e):"":""}function pr(e){return Rs(e&&e.line)+":"+Rs(e&&e.column)}function _s(e){return pr(e&&e.start)+"-"+pr(e&&e.end)}function Rs(e){return e&&"number"==typeof e?e:1}class st extends Error{constructor(e,t,n){const i=[null,null];let r={start:{line:null,column:null},end:{line:null,column:null}};if(super(),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n){const e=n.indexOf(":");-1===e?i[1]=n:(i[0]=n.slice(0,e),i[1]=n.slice(e+1))}t&&("type"in t||"position"in t?t.position&&(r=t.position):"start"in t||"end"in t?r=t:("line"in t||"column"in t)&&(r.start=t)),this.name=an(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="","object"==typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=r.start.line,this.column=r.start.column,this.position=r,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}st.prototype.file="",st.prototype.name="",st.prototype.reason="",st.prototype.message="",st.prototype.stack="",st.prototype.fatal=null,st.prototype.column=null,st.prototype.line=null,st.prototype.source=null,st.prototype.ruleId=null,st.prototype.position=null;const ft={basename:vd,dirname:wd,extname:bd,join:yd,sep:"/"};function vd(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');dn(e);let n,i=0,r=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.charCodeAt(o)){if(n){i=o+1;break}}else r<0&&(n=!0,r=o+1);return r<0?"":e.slice(i,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;o--;)if(47===e.charCodeAt(o)){if(n){i=o+1;break}}else s<0&&(n=!0,s=o+1),a>-1&&(e.charCodeAt(o)===t.charCodeAt(a--)?a<0&&(r=o):(a=-1,r=s));return i===r?r=s:r<0&&(r=e.length),e.slice(i,r)}function wd(e){if(dn(e),0===e.length)return".";let t,n=-1,i=e.length;for(;--i;)if(47===e.charCodeAt(i)){if(t){n=i;break}}else t||(t=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)}function bd(e){dn(e);let t,n=e.length,i=-1,r=0,o=-1,s=0;for(;n--;){const a=e.charCodeAt(n);if(47!==a)i<0&&(t=!0,i=n+1),46===a?o<0?o=n:1!==s&&(s=1):o>-1&&(s=-1);else if(t){r=n+1;break}}return o<0||i<0||0===s||1===s&&o===i-1&&o===r+1?"":e.slice(o,i)}function yd(...e){let t,n=-1;for(;++n0&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}function Sd(e,t){let n,i,r="",o=0,s=-1,a=0,l=-1;for(;++l<=e.length;){if(l2){if(i=r.lastIndexOf("/"),i!==r.length-1){i<0?(r="",o=0):(r=r.slice(0,i),o=r.length-1-r.lastIndexOf("/")),s=l,a=0;continue}}else if(r.length>0){r="",o=0,s=l,a=0;continue}t&&(r=r.length>0?r+"/..":"..",o=2)}else r.length>0?r+="/"+e.slice(s+1,l):r=e.slice(s+1,l),o=l-s-1;s=l,a=0}else 46===n&&a>-1?a++:a=-1}return r}function dn(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const kd={cwd:Cd};function Cd(){return"/"}function mr(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}function $d(e){if("string"==typeof e)e=new URL(e);else if(!mr(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return Ad(e)}function Ad(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n"u"||ri.call(e,t)},Ds=function(e,t){Os&&"__proto__"===t.name?Os(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ns=function(e,t){if("__proto__"===t){if(!ri.call(e,t))return;if(Fs)return Fs(e,t).value}return e[t]},Bs=function e(){var t,n,i,r,o,s,a=arguments[0],l=1,c=arguments.length,h=!1;for("boolean"==typeof a&&(h=a,a=arguments[1]||{},l=2),(null==a||"object"!=typeof a&&"function"!=typeof a)&&(a={});lt.length;let s;o&&t.push(i);try{s=e.apply(this,t)}catch(e){if(o&&n)throw e;return i(e)}o||(s instanceof Promise?s.then(r,i):s instanceof Error?i(s):r(s))};function i(e,...i){n||(n=!0,t(e,...i))}function r(e){i(null,e)}}const Rd=Jo().freeze(),Qo={}.hasOwnProperty;function Jo(){const e=Ld(),t=[];let n,i={},r=-1;return o.data=function(e,t){return"string"==typeof e?2===arguments.length?(Yi("data",n),i[e]=t,o):Qo.call(i,e)&&i[e]||null:e?(Yi("data",n),i=e,o):i},o.Parser=void 0,o.Compiler=void 0,o.freeze=function(){if(n)return o;for(;++r{if(!e&&t&&n){const i=o.stringify(t,n);null==i||(Od(i)?n.value=i:n.result=i),s(e,n)}else s(e)}))}n(null,t)},o.processSync=function(e){let t;o.freeze(),Gi("processSync",o.Parser),Ki("processSync",o.Compiler);const n=rn(e);return o.process(n,(function(e){t=!0,Ts(e)})),js("processSync","process",t),n},o;function o(){const e=Jo();let n=-1;for(;++nr?0:r+t:t>r?r:t,n=n>0?n:0,i.length<1e4)o=Array.from(i),o.unshift(t,n),[].splice.apply(e,o);else for(n&&[].splice.apply(e,[t,n]);s0?(qe(e,e.length,0,t),e):t}const Us={}.hasOwnProperty;function qo(e){const t={};let n=-1;for(;++no))return;const n=t.events.length;let r,a,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(r){a=t.events[l][1].end;break}r=!0}for(v(s),e=n;ei;){const i=n[r];t.containerState=i[1],i[0].exit.call(t,e)}n.length=i}function w(){i.write([null]),r=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Vd(e,t,n){return $e(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function li(e){return null===e||He(e)||wi(e)?1:bi(e)?2:void 0}function yi(e,t,n){const i=[];let r=-1;for(;++r1&&e[h][1].end.offset-e[h][1].start.offset>1?2:1;const u=Object.assign({},e[n][1].end),d=Object.assign({},e[h][1].start);Ks(u,-a),Ks(d,a),o={type:a>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},e[n][1].end)},s={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[h][1].start),end:d},r={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[h][1].start)},i={type:a>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},o.start),e[h][1].start=Object.assign({},s.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=it(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=it(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",r,t]]),l=it(l,yi(t.parser.constructs.insideSpan.null,e.slice(n+1,h),t)),l=it(l,[["exit",r,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[h][1].end.offset-e[h][1].start.offset?(c=2,l=it(l,[["enter",e[h][1],t],["exit",e[h][1],t]])):c=0,qe(e,n-1,h-n+3,l),h=n+l.length-c-2;break}for(h=-1;++h=4?o(e):n(e)}function o(t){return null===t?a(t):ue(t)?e.attempt(ig,o,a)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||ue(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),s)}function a(n){return e.exit("codeIndented"),t(n)}}function sg(e,t,n){const i=this;return r;function r(t){return i.parser.lazy[i.now().line]?n(t):ue(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r):$e(e,o,"linePrefix",5)(t)}function o(e){const o=i.events[i.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):ue(e)?r(e):n(e)}}const og={name:"codeText",tokenize:cg,resolve:ag,previous:lg};function ag(e){let t,n,i=e.length-4,r=3;if(!("lineEnding"!==e[r][1].type&&"space"!==e[r][1].type||"lineEnding"!==e[i][1].type&&"space"!==e[i][1].type))for(t=r;++t=4?t(r):e.interrupt(i.parser.constructs.flow,n,t)(r)}}function ra(e,t,n,i,r,o,s,a,l){const c=l||Number.POSITIVE_INFINITY;let h=0;return function(t){return 60===t?(e.enter(i),e.enter(r),e.enter(o),e.consume(t),e.exit(o),u):null===t||41===t||hn(t)?n(t):(e.enter(i),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),g(t))};function u(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),e.exit(i),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(a),u(t)):null===t||60===t||ue(t)?n(t):(e.consume(t),92===t?f:d)}function f(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function g(r){return 40===r?++h>c?n(r):(e.consume(r),g):41===r?h--?(e.consume(r),g):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(i),t(r)):null===r||He(r)?h?n(r):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(i),t(r)):hn(r)?n(r):(e.consume(r),92===r?p:g)}function p(t){return 40===t||41===t||92===t?(e.consume(t),g):g(t)}}function sa(e,t,n,i,r,o){const s=this;let a,l=0;return function(t){return e.enter(i),e.enter(r),e.consume(t),e.exit(r),e.enter(o),c};function c(u){return null===u||91===u||93===u&&!a||94===u&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs||l>999?n(u):93===u?(e.exit(o),e.enter(r),e.consume(u),e.exit(r),e.exit(i),t):ue(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),h(u))}function h(t){return null===t||91===t||93===t||ue(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),a=a||!_e(t),92===t?u:h)}function u(t){return 91===t||92===t||93===t?(e.consume(t),l++,h):h(t)}}function oa(e,t,n,i,r,o){let s;return function(t){return e.enter(i),e.enter(r),e.consume(t),e.exit(r),s=40===t?41:t,a};function a(n){return n===s?(e.enter(r),e.consume(n),e.exit(r),e.exit(i),t):(e.enter(o),l(n))}function l(t){return t===s?(e.exit(o),a(s)):null===t?n(t):ue(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),$e(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===s||null===t||ue(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?h:c)}function h(t){return t===s||92===t?(e.consume(t),c):c(t)}}function ln(e,t){let n;return function i(r){return ue(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n=!0,i):_e(r)?$e(e,i,n?"linePrefix":"lineSuffix")(r):t(r)}}function ut(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const mg={name:"definition",tokenize:wg},vg={tokenize:bg,partial:!0};function wg(e,t,n){const i=this;let r;return function(t){return e.enter("definition"),sa.call(i,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function o(t){return r=ut(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),ln(e,ra(e,e.attempt(vg,$e(e,s,"whitespace"),$e(e,s,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(t)}function s(o){return null===o||ue(o)?(e.exit("definition"),i.parser.defined.includes(r)||i.parser.defined.push(r),t(o)):n(o)}}function bg(e,t,n){return function(t){return He(t)?ln(e,i)(t):n(t)};function i(t){return 34===t||39===t||40===t?oa(e,$e(e,r,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):n(t)}function r(e){return null===e||ue(e)?t(e):n(e)}}const yg={name:"hardBreakEscape",tokenize:xg};function xg(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),i};function i(i){return ue(i)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(i)):n(i)}}const Sg={name:"headingAtx",tokenize:Cg,resolve:kg};function kg(e,t){let n,i,r=e.length-2,o=3;return"whitespace"===e[o][1].type&&(o+=2),r-2>o&&"whitespace"===e[r][1].type&&(r-=2),"atxHeadingSequence"===e[r][1].type&&(o===r-1||r-4>o&&"whitespace"===e[r-2][1].type)&&(r-=o+1===r?2:4),r>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[r][1].end},i={type:"chunkText",start:e[o][1].start,end:e[r][1].end,contentType:"text"},qe(e,o,r-o+1,[["enter",n,t],["enter",i,t],["exit",i,t],["exit",n,t]])),e}function Cg(e,t,n){const i=this;let r=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),o(t)};function o(a){return 35===a&&r++<6?(e.consume(a),o):null===a||He(a)?(e.exit("atxHeadingSequence"),i.interrupt?t(a):s(a)):n(a)}function s(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||ue(n)?(e.exit("atxHeading"),t(n)):_e(n)?$e(e,s,"whitespace")(n):(e.enter("atxHeadingText"),l(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),s(t))}function l(t){return null===t||35===t||He(t)?(e.exit("atxHeadingText"),s(t)):(e.consume(t),l)}}const $g=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Qs=["pre","script","style","textarea"],Ag={name:"htmlFlow",tokenize:_g,resolveTo:Lg,concrete:!0},Eg={tokenize:Rg,partial:!0};function Lg(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function _g(e,t,n){const i=this;let r,o,s,a,l;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c};function c(a){return 33===a?(e.consume(a),h):47===a?(e.consume(a),f):63===a?(e.consume(a),r=3,i.interrupt?t:F):rt(a)?(e.consume(a),s=String.fromCharCode(a),o=!0,g):n(a)}function h(o){return 45===o?(e.consume(o),r=2,u):91===o?(e.consume(o),r=5,s="CDATA[",a=0,d):rt(o)?(e.consume(o),r=4,i.interrupt?t:F):n(o)}function u(r){return 45===r?(e.consume(r),i.interrupt?t:F):n(r)}function d(r){return r===s.charCodeAt(a++)?(e.consume(r),a===s.length?i.interrupt?t:A:d):n(r)}function f(t){return rt(t)?(e.consume(t),s=String.fromCharCode(t),g):n(t)}function g(a){return null===a||47===a||62===a||He(a)?47!==a&&o&&Qs.includes(s.toLowerCase())?(r=1,i.interrupt?t(a):A(a)):$g.includes(s.toLowerCase())?(r=6,47===a?(e.consume(a),p):i.interrupt?t(a):A(a)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(a):o?v(a):m(a)):45===a||Ke(a)?(e.consume(a),s+=String.fromCharCode(a),g):n(a)}function p(r){return 62===r?(e.consume(r),i.interrupt?t:A):n(r)}function m(t){return _e(t)?(e.consume(t),m):C(t)}function v(t){return 47===t?(e.consume(t),C):58===t||95===t||rt(t)?(e.consume(t),w):_e(t)?(e.consume(t),v):C(t)}function w(t){return 45===t||46===t||58===t||95===t||Ke(t)?(e.consume(t),w):b(t)}function b(t){return 61===t?(e.consume(t),y):_e(t)?(e.consume(t),b):v(t)}function y(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):_e(t)?(e.consume(t),y):(l=null,k(t))}function x(t){return null===t||ue(t)?n(t):t===l?(e.consume(t),S):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||He(t)?b(t):(e.consume(t),k)}function S(e){return 47===e||62===e||_e(e)?v(e):n(e)}function C(t){return 62===t?(e.consume(t),$):n(t)}function $(t){return _e(t)?(e.consume(t),$):null===t||ue(t)?A(t):n(t)}function A(t){return 45===t&&2===r?(e.consume(t),M):60===t&&1===r?(e.consume(t),R):62===t&&4===r?(e.consume(t),I):63===t&&3===r?(e.consume(t),F):93===t&&5===r?(e.consume(t),O):!ue(t)||6!==r&&7!==r?null===t||ue(t)?L(t):(e.consume(t),A):e.check(Eg,I,L)(t)}function L(t){return e.exit("htmlFlowData"),_(t)}function _(t){return null===t?N(t):ue(t)?e.attempt({tokenize:E,partial:!0},_,N)(t):(e.enter("htmlFlowData"),A(t))}function E(e,t,n){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r};function r(e){return i.parser.lazy[i.now().line]?n(e):t(e)}}function M(t){return 45===t?(e.consume(t),F):A(t)}function R(t){return 47===t?(e.consume(t),s="",T):A(t)}function T(t){return 62===t&&Qs.includes(s.toLowerCase())?(e.consume(t),I):rt(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),T):A(t)}function O(t){return 93===t?(e.consume(t),F):A(t)}function F(t){return 62===t?(e.consume(t),I):45===t&&2===r?(e.consume(t),F):A(t)}function I(t){return null===t||ue(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),I)}function N(n){return e.exit("htmlFlow"),t(n)}}function Rg(e,t,n){return function(i){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),e.attempt(gn,t,n)}}const Mg={name:"htmlText",tokenize:Tg};function Tg(e,t,n){const i=this;let r,o,s,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),c):47===t?(e.consume(t),k):63===t?(e.consume(t),y):rt(t)?(e.consume(t),$):n(t)}function c(t){return 45===t?(e.consume(t),h):91===t?(e.consume(t),o="CDATA[",s=0,p):rt(t)?(e.consume(t),b):n(t)}function h(t){return 45===t?(e.consume(t),u):n(t)}function u(t){return null===t||62===t?n(t):45===t?(e.consume(t),d):f(t)}function d(e){return null===e||62===e?n(e):f(e)}function f(t){return null===t?n(t):45===t?(e.consume(t),g):ue(t)?(a=f,O(t)):(e.consume(t),f)}function g(t){return 45===t?(e.consume(t),I):f(t)}function p(t){return t===o.charCodeAt(s++)?(e.consume(t),s===o.length?m:p):n(t)}function m(t){return null===t?n(t):93===t?(e.consume(t),v):ue(t)?(a=m,O(t)):(e.consume(t),m)}function v(t){return 93===t?(e.consume(t),w):m(t)}function w(t){return 62===t?I(t):93===t?(e.consume(t),w):m(t)}function b(t){return null===t||62===t?I(t):ue(t)?(a=b,O(t)):(e.consume(t),b)}function y(t){return null===t?n(t):63===t?(e.consume(t),x):ue(t)?(a=y,O(t)):(e.consume(t),y)}function x(e){return 62===e?I(e):y(e)}function k(t){return rt(t)?(e.consume(t),S):n(t)}function S(t){return 45===t||Ke(t)?(e.consume(t),S):C(t)}function C(t){return ue(t)?(a=C,O(t)):_e(t)?(e.consume(t),C):I(t)}function $(t){return 45===t||Ke(t)?(e.consume(t),$):47===t||62===t||He(t)?A(t):n(t)}function A(t){return 47===t?(e.consume(t),I):58===t||95===t||rt(t)?(e.consume(t),L):ue(t)?(a=A,O(t)):_e(t)?(e.consume(t),A):I(t)}function L(t){return 45===t||46===t||58===t||95===t||Ke(t)?(e.consume(t),L):_(t)}function _(t){return 61===t?(e.consume(t),E):ue(t)?(a=_,O(t)):_e(t)?(e.consume(t),_):A(t)}function E(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,M):ue(t)?(a=E,O(t)):_e(t)?(e.consume(t),E):(e.consume(t),r=void 0,T)}function M(t){return t===r?(e.consume(t),R):null===t?n(t):ue(t)?(a=M,O(t)):(e.consume(t),M)}function R(e){return 62===e||47===e||He(e)?A(e):n(e)}function T(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):62===t||He(t)?A(t):(e.consume(t),T)}function O(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),$e(e,F,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function F(t){return e.enter("htmlTextData"),a(t)}function I(i){return 62===i?(e.consume(i),e.exit("htmlTextData"),e.exit("htmlText"),t):n(i)}}const Dr={name:"labelEnd",tokenize:Ng,resolveTo:Dg,resolveAll:Pg},Og={tokenize:Bg},Fg={tokenize:Hg},Ig={tokenize:Wg};function Pg(e){let t,n=-1;for(;++n-1&&(s[0]=s[0].slice(i)),o>0&&s.push(e[r].slice(0,o))),s}function hp(e,t){let n=-1;const i=[];let r;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535==(65535&n)||65534==(65535&n)||n>1114111?"�":String.fromCharCode(n)}const $p=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ua(e){return e.replace($p,Ap)}function Ap(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return ca(n.slice(t?2:1),t?16:10)}return Pr(n)||e}const ha={}.hasOwnProperty,Ep=function(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),Lp(n)(Cp(Sp(n).document().write(kp()(e,t,!0))))};function Lp(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(y),autolinkProtocol:d,autolinkEmail:d,atxHeading:s(v),blockQuote:s((function(){return{type:"blockquote",children:[]}})),characterEscape:d,characterReference:d,codeFenced:s(m),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(m,a),codeText:s((function(){return{type:"inlineCode",value:""}}),a),codeTextData:d,data:d,codeFlowValue:d,definition:s((function(){return{type:"definition",identifier:"",label:null,title:null,url:""}})),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s((function(){return{type:"emphasis",children:[]}})),hardBreakEscape:s(w),hardBreakTrailing:s(w),htmlFlow:s(b,a),htmlFlowData:d,htmlText:s(b,a),htmlTextData:d,image:s((function(){return{type:"image",title:null,url:"",alt:null}})),label:a,link:s(y),listItem:s((function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}})),listItemValue:function(e){if(o("expectingFirstListItemValue")){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),r("expectingFirstListItemValue")}},listOrdered:s(x,(function(){r("expectingFirstListItemValue",!0)})),listUnordered:s(x),paragraph:s((function(){return{type:"paragraph",children:[]}})),reference:function(){r("referenceType","collapsed")},referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(v),strong:s((function(){return{type:"strong",children:[]}})),thematicBreak:s((function(){return{type:"thematicBreak"}}))},exit:{atxHeading:c(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}},autolink:c(),autolinkEmail:function(e){f.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){f.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:c(),characterEscapeValue:f,characterReferenceMarkerHexadecimal:p,characterReferenceMarkerNumeric:p,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=o("characterReferenceType");let i;n?(i=ca(t,"characterReferenceMarkerNumeric"===n?10:16),r("characterReferenceType")):i=Pr(t);const s=this.stack.pop();s.value+=i,s.position.end=Ct(e.end)},codeFenced:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),r("flowCodeInside")})),codeFencedFence:function(){o("flowCodeInside")||(this.buffer(),r("flowCodeInside",!0))},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:f,codeIndented:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")})),codeText:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),codeTextData:f,data:f,definition:c(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ut(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:c(),hardBreakEscape:c(g),hardBreakTrailing:c(g),htmlFlow:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlFlowData:f,htmlText:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlTextData:f,image:c((function(){const e=this.stack[this.stack.length-1];if(o("inReference")){const t=o("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;r("referenceType")})),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(r("inReference",!0),"link"===n.type){const t=e.children;n.children=t}else n.alt=t},labelText:function(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=ua(t),n.identifier=ut(t).toLowerCase()},lineEnding:function(e){const n=this.stack[this.stack.length-1];if(o("atHardBreak")){return n.children[n.children.length-1].position.end=Ct(e.end),void r("atHardBreak")}!o("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(n.type)&&(d.call(this,e),f.call(this,e))},link:c((function(){const e=this.stack[this.stack.length-1];if(o("inReference")){const t=o("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;r("referenceType")})),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ut(this.sliceSerialize(e)).toLowerCase(),r("referenceType","full")},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){r("inReference")},setextHeading:c((function(){r("setextHeadingSlurpLineEnding")})),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2},setextHeadingText:function(){r("setextHeadingSlurpLineEnding",!0)},strong:c(),thematicBreak:c()}};fa(t,(e||{}).mdastExtensions||[]);const n={};return function(e){let n={type:"root",children:[]};const s={stack:[n],tokenStack:[],config:t,enter:l,exit:h,buffer:a,resume:u,setData:r,getData:o},c=[];let d=-1;for(;++d0){const e=s.tokenStack[s.tokenStack.length-1];(e[1]||qs).call(s,void 0,e[0])}for(n.position={start:Ct(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ct(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d{const n=this.data("settings");return Ep(t,Object.assign({},n,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function Mp(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Tp(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]}function Op(e,t){const n=t.value?t.value+"\n":"",i=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,r={};i&&(r.className=["language-"+i]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Fp(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ip(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xt(e){const t=[];let n=-1,i=0,r=0;for(;++n55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(s=String.fromCharCode(o,t),r=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(i,n),encodeURIComponent(s)),i=n+r+1,s=""),r&&(n+=r,r=0)}return t.join("")+e.slice(i)}function da(e,t){const n=String(t.identifier).toUpperCase(),i=Xt(n.toLowerCase()),r=e.footnoteOrder.indexOf(n);let o;-1===r?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=r+1);const s=e.footnoteCounts[n],a={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+i,id:e.clobberPrefix+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,a);const l={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,l),e.applyData(t,l)}function Pp(e,t){const n=e.footnoteById;let i=1;for(;i in n;)i++;const r=String(i);return n[r]={type:"footnoteDefinition",identifier:r,children:[{type:"paragraph",children:t.children}],position:t.position},da(e,{type:"footnoteReference",identifier:r,position:t.position})}function Dp(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Np(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null}function ga(e,t){const n=t.referenceType;let i="]";if("collapsed"===n?i+="[]":"full"===n&&(i+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return{type:"text",value:"!["+t.alt+i};const r=e.all(t),o=r[0];o&&"text"===o.type?o.value="["+o.value:r.unshift({type:"text",value:"["});const s=r[r.length-1];return s&&"text"===s.type?s.value+=i:r.push({type:"text",value:i}),r}function Bp(e,t){const n=e.definition(t.identifier);if(!n)return ga(e,t);const i={src:Xt(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(i.title=n.title);const r={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,r),e.applyData(t,r)}function Hp(e,t){const n={src:Xt(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function Wp(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function jp(e,t){const n=e.definition(t.identifier);if(!n)return ga(e,t);const i={href:Xt(n.url||"")};null!==n.title&&void 0!==n.title&&(i.title=n.title);const r={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function zp(e,t){const n={href:Xt(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Up(e,t,n){const i=e.all(t),r=n?Vp(n):pa(t),o={},s=[];if("boolean"==typeof t.checked){const e=i[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},i.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a1}function Gp(e,t){const n={},i=e.all(t);let r=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++r-1?n.offset:null}}}function Jp(e,t){const n=e.all(t),i=n.shift(),r=[];if(i){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],n),r.push(n)}if(n.length>0){const i={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Nr(t.children[1]),s=Br(t.children[t.children.length-1]);o.line&&s.line&&(i.position={start:o,end:s}),r.push(i)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function Zp(e,t,n){const i=n?n.children:void 0,r=0===(i?i.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,s=o?o.length:t.children.length;let a=-1;const l=[];for(;++a0,!0),i[0]),r=i.index+i[0].length,i=n.exec(t);return o.push(no(t.slice(r),r>0,!1)),o.join("")}function no(e,t,n){let i=0,r=e.length;if(t){let t=e.codePointAt(i);for(;t===eo||t===to;)i++,t=e.codePointAt(i)}if(n){let t=e.codePointAt(r-1);for(;t===eo||t===to;)r--,t=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function tm(e,t){const n={type:"text",value:em(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function nm(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const im={blockquote:Mp,break:Tp,code:Op,delete:Fp,emphasis:Ip,footnoteReference:da,footnote:Pp,heading:Dp,html:Np,imageReference:Bp,image:Hp,inlineCode:Wp,linkReference:jp,link:zp,listItem:Up,list:Gp,paragraph:Kp,root:Yp,strong:Xp,table:Jp,tableCell:qp,tableRow:Zp,text:tm,thematicBreak:nm,toml:An,yaml:An,definition:An,footnoteDefinition:An};function An(){return null}const Hr=function(e){if(null==e)return am;if("string"==typeof e)return om(e);if("object"==typeof e)return Array.isArray(e)?rm(e):sm(e);if("function"==typeof e)return xi(e);throw new Error("Expected function, string, or object as test")};function rm(e){const t=[];let n=-1;for(;++n":"")+")"})}return h;function h(){let c,h,u,d=[];if((!t||r(s,a,l[l.length-1]||null))&&(d=um(n(s,l)),d[0]===io))return d;if(s.children&&d[0]!==cm)for(h=(i?s.children.length:-1)+o,u=l.concat(s);h>-1&&h{const n=so(e.identifier);n&&!ro.call(t,n)&&(t[n]=e)})),function(e){const n=so(e);return n&&ro.call(t,n)?t[n]:null}}function so(e){return String(e||"").toUpperCase()}const ci={}.hasOwnProperty;function dm(e,t){const n=t||{},i=n.allowDangerousHtml||!1,r={};return s.dangerous=i,s.clobberPrefix=void 0===n.clobberPrefix||null===n.clobberPrefix?"user-content-":n.clobberPrefix,s.footnoteLabel=n.footnoteLabel||"Footnotes",s.footnoteLabelTagName=n.footnoteLabelTagName||"h2",s.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},s.footnoteBackLabel=n.footnoteBackLabel||"Back to content",s.unknownHandler=n.unknownHandler,s.passThrough=n.passThrough,s.handlers={...im,...n.handlers},s.definition=fm(e),s.footnoteById=r,s.footnoteOrder=[],s.footnoteCounts={},s.patch=gm,s.applyData=pm,s.one=function(e,t){return wa(s,e,t)},s.all=function(e){return jr(s,e)},s.wrap=vm,s.augment=o,Wr(e,"footnoteDefinition",(e=>{const t=String(e.identifier).toUpperCase();ci.call(r,t)||(r[t]=e)})),s;function o(e,t){if(e&&"data"in e&&e.data){const n=e.data;n.hName&&("element"!==t.type&&(t={type:"element",tagName:"",properties:{},children:[]}),t.tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties={...t.properties,...n.hProperties}),"children"in t&&t.children&&n.hChildren&&(t.children=n.hChildren)}if(e){const n="type"in e?e:{position:e};hm(n)||(t.position={start:Nr(n),end:Br(n)})}return t}function s(e,t,n,i){return Array.isArray(n)&&(i=n,n={}),o(e,{type:"element",tagName:t,properties:n||{},children:i||[]})}}function gm(e,t){e.position&&(t.position=Qp(e))}function pm(e,t){let n=t;if(e&&e.data){const t=e.data.hName,i=e.data.hChildren,r=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:[]}),"element"===n.type&&r&&(n.properties={...n.properties,...r}),"children"in n&&n.children&&null!=i&&(n.children=i)}return n}function wa(e,t,n){const i=t&&t.type;if(!i)throw new Error("Expected node, got `"+t+"`");return ci.call(e.handlers,i)?e.handlers[i](e,t,n):e.passThrough&&e.passThrough.includes(i)?"children"in t?{...t,children:jr(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):mm(e,t)}function jr(e,t){const n=[];if("children"in t){const i=t.children;let r=-1;for(;++r0&&n.push({type:"text",value:"\n"}),n}function wm(e){const t=[];let n=-1;for(;++n1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&t.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(t)}const c=r[r.length-1];if(c&&"element"===c.type&&"p"===c.tagName){const e=c.children[c.children.length-1];e&&"text"===e.type?e.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...l)}else r.push(...l);const h={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+s},children:e.wrap(r,!0)};e.patch(i,h),t.push(h)}if(0!==t.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:"\n"}]}}function ba(e,t){const n=dm(e,t),i=n.one(e,null),r=wm(n);return r&&i.children.push({type:"text",value:"\n"},r),Array.isArray(i)?{type:"root",children:i}:i}const bm=function(e,t){return e&&"run"in e?xm(e,t):Sm(e||t)},ym=bm;function xm(e,t){return(n,i,r)=>{e.run(ba(n,t),i,(e=>{r(e)}))}}function Sm(e){return t=>ba(t,e)}class pn{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function ya(e,t){const n={},i={};let r=-1;for(;++r"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),ka=Qt({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Ca(e,t){return t in e?e[t]:t}function $a(e,t){return Ca(e,t.toLowerCase())}const Aa=Qt({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:$a,properties:{xmlns:null,xmlnsXLink:null}}),Ea=Qt({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Be,ariaAutoComplete:null,ariaBusy:Be,ariaChecked:Be,ariaColCount:ee,ariaColIndex:ee,ariaColSpan:ee,ariaControls:Oe,ariaCurrent:null,ariaDescribedBy:Oe,ariaDetails:null,ariaDisabled:Be,ariaDropEffect:Oe,ariaErrorMessage:null,ariaExpanded:Be,ariaFlowTo:Oe,ariaGrabbed:Be,ariaHasPopup:null,ariaHidden:Be,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Oe,ariaLevel:ee,ariaLive:null,ariaModal:Be,ariaMultiLine:Be,ariaMultiSelectable:Be,ariaOrientation:null,ariaOwns:Oe,ariaPlaceholder:null,ariaPosInSet:ee,ariaPressed:Be,ariaReadOnly:Be,ariaRelevant:null,ariaRequired:Be,ariaRoleDescription:Oe,ariaRowCount:ee,ariaRowIndex:ee,ariaRowSpan:ee,ariaSelected:Be,ariaSetSize:ee,ariaSort:null,ariaValueMax:ee,ariaValueMin:ee,ariaValueNow:ee,ariaValueText:null,role:null}}),$m=Qt({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:$a,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ut,acceptCharset:Oe,accessKey:Oe,action:null,allow:null,allowFullScreen:xe,allowPaymentRequest:xe,allowUserMedia:xe,alt:null,as:null,async:xe,autoCapitalize:null,autoComplete:Oe,autoFocus:xe,autoPlay:xe,capture:xe,charSet:null,checked:xe,cite:null,className:Oe,cols:ee,colSpan:null,content:null,contentEditable:Be,controls:xe,controlsList:Oe,coords:ee|Ut,crossOrigin:null,data:null,dateTime:null,decoding:null,default:xe,defer:xe,dir:null,dirName:null,disabled:xe,download:xa,draggable:Be,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:xe,formTarget:null,headers:Oe,height:ee,hidden:xe,high:ee,href:null,hrefLang:null,htmlFor:Oe,httpEquiv:Oe,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:xe,itemId:null,itemProp:Oe,itemRef:Oe,itemScope:xe,itemType:Oe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:xe,low:ee,manifest:null,max:null,maxLength:ee,media:null,method:null,min:null,minLength:ee,multiple:xe,muted:xe,name:null,nonce:null,noModule:xe,noValidate:xe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:xe,optimum:ee,pattern:null,ping:Oe,placeholder:null,playsInline:xe,poster:null,preload:null,readOnly:xe,referrerPolicy:null,rel:Oe,required:xe,reversed:xe,rows:ee,rowSpan:ee,sandbox:Oe,scope:null,scoped:xe,seamless:xe,selected:xe,shape:null,size:ee,sizes:null,slot:null,span:ee,spellCheck:Be,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ee,step:null,style:null,tabIndex:ee,target:null,title:null,translate:null,type:null,typeMustMatch:xe,useMap:null,value:Be,width:ee,wrap:null,align:null,aLink:null,archive:Oe,axis:null,background:null,bgColor:null,border:ee,borderColor:null,bottomMargin:ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:xe,declare:xe,event:null,face:null,frame:null,frameBorder:null,hSpace:ee,leftMargin:ee,link:null,longDesc:null,lowSrc:null,marginHeight:ee,marginWidth:ee,noResize:xe,noHref:xe,noShade:xe,noWrap:xe,object:null,profile:null,prompt:null,rev:null,rightMargin:ee,rules:null,scheme:null,scrolling:Be,standby:null,summary:null,text:null,topMargin:ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:xe,disableRemotePlayback:xe,prefix:null,property:null,results:ee,security:null,unselectable:null}}),Am=Qt({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Ca,properties:{about:Je,accentHeight:ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ee,amplitude:ee,arabicForm:null,ascent:ee,attributeName:null,attributeType:null,azimuth:ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ee,by:null,calcMode:null,capHeight:ee,className:Oe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ee,diffuseConstant:ee,direction:null,display:null,dur:null,divisor:ee,dominantBaseline:null,download:xe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ee,enableBackground:null,end:null,event:null,exponent:ee,externalResourcesRequired:null,fill:null,fillOpacity:ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ut,g2:Ut,glyphName:Ut,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ee,horizOriginX:ee,horizOriginY:ee,id:null,ideographic:ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ee,k:ee,k1:ee,k2:ee,k3:ee,k4:ee,kernelMatrix:Je,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ee,overlineThickness:ee,paintOrder:null,panose1:null,path:null,pathLength:ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Oe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ee,pointsAtY:ee,pointsAtZ:ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Je,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Je,rev:Je,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Je,requiredFeatures:Je,requiredFonts:Je,requiredFormats:Je,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ee,specularExponent:ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ee,strikethroughThickness:ee,string:null,stroke:null,strokeDashArray:Je,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ee,strokeOpacity:ee,strokeWidth:null,style:null,surfaceScale:ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Je,tabIndex:ee,tableValues:null,target:null,targetX:ee,targetY:ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Je,to:null,transform:null,u1:null,u2:null,underlinePosition:ee,underlineThickness:ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ee,values:null,vAlphabetic:ee,vMathematical:ee,vectorEffect:null,vHanging:ee,vIdeographic:ee,version:null,vertAdvY:ee,vertOriginX:ee,vertOriginY:ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Em=/^data[-\w.:]+$/i,ao=/-[a-z]/g,Lm=/[A-Z]/g;function _m(e,t){const n=br(t);let i=t,r=ot;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Em.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(ao,Mm);i="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!ao.test(e)){let n=e.replace(Lm,Rm);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}r=zr}return new r(i,t)}function Rm(e){return"-"+e.toLowerCase()}function Mm(e){return e.charAt(1).toUpperCase()}const lo={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Tm=ya([ka,Sa,Aa,Ea,$m],"html"),Om=ya([ka,Sa,Aa,Ea,Am],"svg");function Fm(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{Wr(t,"element",((t,n,i)=>{const r=i;let o;if(e.allowedElements?o=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(o=e.disallowedElements.includes(t.tagName)),!o&&e.allowElement&&"number"==typeof n&&(o=!e.allowElement(t,n,r)),o&&"number"==typeof n)return e.unwrapDisallowed&&t.children?r.children.splice(n,1,...t.children):r.children.splice(n,1),n}))}}var La,xr={},Im={get exports(){return xr},set exports(e){xr=e}},Le={},Ur=Symbol.for("react.element"),Vr=Symbol.for("react.portal"),Si=Symbol.for("react.fragment"),ki=Symbol.for("react.strict_mode"),Ci=Symbol.for("react.profiler"),$i=Symbol.for("react.provider"),Ai=Symbol.for("react.context"),Pm=Symbol.for("react.server_context"),Ei=Symbol.for("react.forward_ref"),Li=Symbol.for("react.suspense"),_i=Symbol.for("react.suspense_list"),Ri=Symbol.for("react.memo"),Mi=Symbol.for("react.lazy"),Dm=Symbol.for("react.offscreen");function at(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Ur:switch(e=e.type){case Si:case Ci:case ki:case Li:case _i:return e;default:switch(e=e&&e.$$typeof){case Pm:case Ai:case Ei:case Mi:case Ri:case $i:return e;default:return t}}case Vr:return t}}}La=Symbol.for("react.module.reference"),Le.ContextConsumer=Ai,Le.ContextProvider=$i,Le.Element=Ur,Le.ForwardRef=Ei,Le.Fragment=Si,Le.Lazy=Mi,Le.Memo=Ri,Le.Portal=Vr,Le.Profiler=Ci,Le.StrictMode=ki,Le.Suspense=Li,Le.SuspenseList=_i,Le.isAsyncMode=function(){return!1},Le.isConcurrentMode=function(){return!1},Le.isContextConsumer=function(e){return at(e)===Ai},Le.isContextProvider=function(e){return at(e)===$i},Le.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Ur},Le.isForwardRef=function(e){return at(e)===Ei},Le.isFragment=function(e){return at(e)===Si},Le.isLazy=function(e){return at(e)===Mi},Le.isMemo=function(e){return at(e)===Ri},Le.isPortal=function(e){return at(e)===Vr},Le.isProfiler=function(e){return at(e)===Ci},Le.isStrictMode=function(e){return at(e)===ki},Le.isSuspense=function(e){return at(e)===Li},Le.isSuspenseList=function(e){return at(e)===_i},Le.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===Si||e===Ci||e===ki||e===Li||e===_i||e===Dm||"object"==typeof e&&null!==e&&(e.$$typeof===Mi||e.$$typeof===Ri||e.$$typeof===$i||e.$$typeof===Ai||e.$$typeof===Ei||e.$$typeof===La||void 0!==e.getModuleId)},Le.typeOf=at,Im.exports=Le;const Nm=fi(xr);function Bm(e){const t=e&&"object"==typeof e&&"text"===e.type?e.value||"":e;return"string"==typeof t&&""===t.replace(/[ \t\n\f\r]/g,"")}function Hm(e){return e.join(" ").trim()}function Wm(e,t){const n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}var ui={},jm={get exports(){return ui},set exports(e){ui=e}},co=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,zm=/\n/g,Um=/^\s*/,Vm=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Gm=/^:\s*/,Km=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ym=/^[;\s]*/,Xm=/^\s+|\s+$/g,Qm="\n",uo="/",ho="*",Pt="",Jm="comment",Zm="declaration",qm=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,i=1;function r(e){var t=e.match(zm);t&&(n+=t.length);var r=e.lastIndexOf(Qm);i=~r?e.length-r:i+e.length}function o(){var e={line:n,column:i};return function(t){return t.position=new s(e),c(),t}}function s(e){this.start=e,this.end={line:n,column:i},this.source=t.source}function a(r){var o=new Error(t.source+":"+n+":"+i+": "+r);if(o.reason=r,o.filename=t.source,o.line=n,o.column=i,o.source=e,!t.silent)throw o}function l(t){var n=t.exec(e);if(n){var i=n[0];return r(i),e=e.slice(i.length),n}}function c(){l(Um)}function h(e){var t;for(e=e||[];t=u();)!1!==t&&e.push(t);return e}function u(){var t=o();if(uo==e.charAt(0)&&ho==e.charAt(1)){for(var n=2;Pt!=e.charAt(n)&&(ho!=e.charAt(n)||uo!=e.charAt(n+1));)++n;if(n+=2,Pt===e.charAt(n-1))return a("End of comment missing");var s=e.slice(2,n-2);return i+=2,r(s),e=e.slice(n),i+=2,t({type:Jm,comment:s})}}function d(){var e=o(),t=l(Vm);if(t){if(u(),!l(Gm))return a("property missing ':'");var n=l(Km),i=e({type:Zm,property:fo(t[0].replace(co,Pt)),value:n?fo(n[0].replace(co,Pt)):Pt});return l(Ym),i}}return s.prototype.content=e,c(),function(){var e,t=[];for(h(t);e=d();)!1!==e&&(t.push(e),h(t));return t}()};function fo(e){return e?e.replace(Xm,Pt):Pt}var ev=qm;function _a(e,t){var n=null;if(!e||"string"!=typeof e)return n;for(var i,r,o,s=ev(e),a="function"==typeof t,l=0,c=s.length;l0?zt.createElement(f,l,u):zt.createElement(f,l)}function rv(e){let t=-1;for(;++t for more info)`),delete En[t]}const t=Rd().use(Rp).use(e.remarkPlugins||[]).use(ym,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(Fm,e),n=new Yo;"string"==typeof e.children?n.value=e.children:void 0!==e.children&&null!==e.children&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const i=t.runSync(t.parse(n),n);if("root"!==i.type)throw new TypeError("Expected a `root` node");let r=zt.createElement(zt.Fragment,{},Ra({options:e,schema:Tm,listDepth:0},i));return e.className&&(r=zt.createElement("div",{className:e.className},r)),r}Ma.propTypes={children:pe.string,className:pe.string,allowElement:pe.func,allowedElements:pe.arrayOf(pe.string),disallowedElements:pe.arrayOf(pe.string),unwrapDisallowed:pe.bool,remarkPlugins:pe.arrayOf(pe.oneOfType([pe.object,pe.func,pe.arrayOf(pe.oneOfType([pe.bool,pe.string,pe.object,pe.func,pe.arrayOf(pe.any)]))])),rehypePlugins:pe.arrayOf(pe.oneOfType([pe.object,pe.func,pe.arrayOf(pe.oneOfType([pe.bool,pe.string,pe.object,pe.func,pe.arrayOf(pe.any)]))])),sourcePos:pe.bool,rawSourcePos:pe.bool,skipHtml:pe.bool,includeElementIndex:pe.bool,transformLinkUri:pe.oneOfType([pe.func,pe.bool]),linkTarget:pe.oneOfType([pe.func,pe.string]),transformImageUri:pe.func,components:pe.object};const uv={tokenize:pv,partial:!0},Ta={tokenize:mv,partial:!0},Oa={tokenize:vv,partial:!0},Vt={tokenize:bv,partial:!0},Fa={tokenize:wv,partial:!0},Ia={tokenize:dv,previous:Na},Pa={tokenize:gv,previous:Kr},bt={tokenize:fv,previous:Ba},gt={},hv={text:gt};let Ot=48;for(;Ot<123;)gt[Ot]=bt,Ot++,58===Ot?Ot=65:91===Ot&&(Ot=97);function fv(e,t,n){const i=this;let r,o;return function(t){return po(t)&&Ba(i.previous)&&!Yr(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(t)):n(t)};function s(t){return po(t)?(e.consume(t),s):64===t?(e.consume(t),a):n(t)}function a(t){return 46===t?e.check(Vt,u,l)(t):45===t||95===t?e.check(Vt,n,c)(t):Ke(t)?(!o&&ai(t)&&(o=!0),e.consume(t),a):u(t)}function l(t){return e.consume(t),r=!0,o=void 0,a}function c(t){return e.consume(t),h}function h(t){return 46===t?e.check(Vt,n,l)(t):a(t)}function u(i){return r&&!o?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}}function dv(e,t,n){const i=this;return function(t){return 87!==t&&119!==t||!Na(i.previous)||Yr(i.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(uv,e.attempt(Ta,e.attempt(Oa,r),n),n)(t))};function r(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}}function gv(e,t,n){const i=this;return function(t){return 72!==t&&104!==t||!Kr(i.previous)||Yr(i.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(t),r)};function r(t){return 84===t||116===t?(e.consume(t),o):n(t)}function o(t){return 84===t||116===t?(e.consume(t),s):n(t)}function s(t){return 80===t||112===t?(e.consume(t),a):n(t)}function a(t){return 83===t||115===t?(e.consume(t),l):l(t)}function l(t){return 58===t?(e.consume(t),c):n(t)}function c(t){return 47===t?(e.consume(t),h):n(t)}function h(t){return 47===t?(e.consume(t),u):n(t)}function u(t){return null===t||hn(t)||wi(t)||bi(t)?n(t):e.attempt(Ta,e.attempt(Oa,d),n)(t)}function d(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}}function pv(e,t,n){return function(t){return e.consume(t),i};function i(t){return 87===t||119===t?(e.consume(t),r):n(t)}function r(t){return 87===t||119===t?(e.consume(t),o):n(t)}function o(t){return 46===t?(e.consume(t),s):n(t)}function s(e){return null===e||ue(e)?n(e):t(e)}}function mv(e,t,n){let i,r;return o;function o(t){return 38===t?e.check(Fa,a,s)(t):46===t||95===t?e.check(Vt,a,s)(t):null===t||hn(t)||wi(t)||45!==t&&bi(t)?a(t):(e.consume(t),o)}function s(t){return 46===t?(r=i,i=void 0,e.consume(t),o):(95===t&&(i=!0),e.consume(t),o)}function a(e){return r||i?n(e):t(e)}}function vv(e,t){let n=0;return i;function i(s){return 38===s?e.check(Fa,t,r)(s):(40===s&&n++,41===s?e.check(Vt,o,r)(s):Gr(s)?t(s):Da(s)?e.check(Vt,t,r)(s):(e.consume(s),i))}function r(t){return e.consume(t),i}function o(e){return n--,n<0?t(e):r(e)}}function wv(e,t,n){return function(t){return e.consume(t),i};function i(t){return rt(t)?(e.consume(t),i):59===t?(e.consume(t),r):n(t)}function r(e){return Gr(e)?t(e):n(e)}}function bv(e,t,n){return function(t){return e.consume(t),i};function i(r){return Da(r)?(e.consume(r),i):Gr(r)?t(r):n(r)}}function Da(e){return 33===e||34===e||39===e||41===e||42===e||44===e||46===e||58===e||59===e||60===e||63===e||95===e||126===e}function Gr(e){return null===e||60===e||He(e)}function po(e){return 43===e||45===e||46===e||95===e||Ke(e)}function Na(e){return null===e||40===e||42===e||95===e||126===e||He(e)}function Kr(e){return null===e||!rt(e)}function Ba(e){return 47!==e&&Kr(e)}function Yr(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if(("labelLink"===i.type||"labelImage"===i.type)&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}gt[43]=bt,gt[45]=bt,gt[46]=bt,gt[95]=bt,gt[72]=[bt,Pa],gt[104]=[bt,Pa],gt[87]=[bt,Ia],gt[119]=[bt,Ia];const yv={tokenize:Lv,partial:!0};function xv(){return{document:{91:{tokenize:$v,continuation:{tokenize:Av},exit:Ev}},text:{91:{tokenize:Cv},93:{add:"after",tokenize:Sv,resolveTo:kv}}}}function Sv(e,t,n){const i=this;let r=i.events.length;const o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s;for(;r--;){const e=i.events[r][1];if("labelImage"===e.type){s=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(r){if(!s||!s._balanced)return n(r);const a=ut(i.sliceSerialize({start:s.end,end:i.now()}));return 94===a.charCodeAt(0)&&o.includes(a.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(r),e.exit("gfmFootnoteCallLabelMarker"),t(r)):n(r)}}function kv(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",r,t],["exit",r,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...a),e}function Cv(e,t,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,s=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(a){let h;return null===a||91===a||s++>999?n(a):93===a?o?(e.exit("chunkString"),h=e.exit("gfmFootnoteCallString"),r.includes(ut(i.sliceSerialize(h)))?function(n){return e.enter("gfmFootnoteCallLabelMarker"),e.consume(n),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t}(a):n(a)):n(a):(e.consume(a),He(a)||(o=!0),92===a?c:l)}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}}function $v(e,t,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,s,a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),c):n(t)}function c(t){let r;return null===t||91===t||a>999?n(t):93===t?s?(r=e.exit("gfmFootnoteDefinitionLabelString"),o=ut(i.sliceSerialize(r)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d):n(t):ue(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a++,c):(e.enter("chunkString").contentType="string",h(t))}function h(t){return null===t||ue(t)||91===t||93===t||a>999?(e.exit("chunkString"),c(t)):(He(t)||(s=!0),a++,e.consume(t),92===t?u:h)}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,h):h(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),$e(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return r.includes(o)||r.push(o),t(e)}}function Av(e,t,n){return e.check(gn,t,e.attempt(yv,t,n))}function Ev(e){e.exit("gfmFootnoteDefinition")}function Lv(e,t,n){const i=this;return $e(e,(function(e){const r=i.events[i.events.length-1];return r&&"gfmFootnoteDefinitionIndent"===r[1].type&&4===r[2].sliceSerialize(r[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)}function _v(e={}){let t=e.singleTilde;const n={tokenize:function(e,n,i){const r=this.previous,o=this.events;let s=0;return function(t){return 126===r&&"characterEscape"!==o[o.length-1][1].type?i(t):(e.enter("strikethroughSequenceTemporary"),a(t))};function a(o){const l=li(r);if(126===o)return s>1?i(o):(e.consume(o),s++,a);if(s<2&&!t)return i(o);const c=e.exit("strikethroughSequenceTemporary"),h=li(o);return c._open=!h||2===h&&Boolean(l),c._close=!l||2===l&&Boolean(h),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n=4?n(r):(i._gfmTableDynamicInterruptHack=!0,e.check(i.parser.constructs.flow,(function(e){return i._gfmTableDynamicInterruptHack=!1,n(e)}),(function(e){return i._gfmTableDynamicInterruptHack=!1,t(e)}))(r))}}}function Ov(e,t,n){let i=0;return function(t){return e.enter("check"),e.consume(t),r};function r(o){return-1===o||32===o?(e.consume(o),i++,4===i?t:r):null===o||He(o)?t(o):n(o)}}const Fv={tokenize:Pv},Iv={text:{91:Fv}};function Pv(e,t,n){const i=this;return function(t){return null===i.previous&&i._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),r):n(t)};function r(t){return He(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(i){return 93===i?(e.enter("taskListCheckMarker"),e.consume(i),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:Dv},t,n)):n(i)}}function Dv(e,t,n){const i=this;return $e(e,(function(e){const r=i.events[i.events.length-1];return(r&&"whitespace"===r[1].type||ue(e))&&null!==e?t(e):n(e)}),"whitespace")}function Nv(e){return qo([hv,xv(),_v(e),Rv,Iv])}function vo(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let i=0,r=n.indexOf(t);for(;-1!==r;)i++,r=n.indexOf(t,r+t.length);return i}function Bv(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Hv={}.hasOwnProperty,Wv=function(e,t,n,i){let r,o;"string"==typeof t||t instanceof RegExp?(o=[[t,n]],r=i):(o=t,r=n),r||(r={});const s=Hr(r.ignore||[]),a=jv(o);let l=-1;for(;++l0?{type:"text",value:a}:void 0),!1!==a&&(o!==n&&h.push({type:"text",value:e.value.slice(o,n)}),Array.isArray(a)?h.push(...a):a&&h.push(a),o=n+u[0].length,c=!0),!i.global)break;u=i.exec(e.value)}return c?(oe}const qi="phrasing",er=["autolink","link","image","label"],zv={transforms:[Qv],enter:{literalAutolink:Vv,literalAutolinkEmail:tr,literalAutolinkHttp:tr,literalAutolinkWww:tr},exit:{literalAutolink:Xv,literalAutolinkEmail:Yv,literalAutolinkHttp:Gv,literalAutolinkWww:Kv}},Uv={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:qi,notInConstruct:er},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:qi,notInConstruct:er},{character:":",before:"[ps]",after:"\\/",inConstruct:qi,notInConstruct:er}]};function Vv(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function tr(e){this.config.enter.autolinkProtocol.call(this,e)}function Gv(e){this.config.exit.autolinkProtocol.call(this,e)}function Kv(e){this.config.exit.data.call(this,e);this.stack[this.stack.length-1].url="http://"+this.sliceSerialize(e)}function Yv(e){this.config.exit.autolinkEmail.call(this,e)}function Xv(e){this.exit(e)}function Qv(e){Wv(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Jv],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Zv]],{ignore:["link","linkReference"]})}function Jv(e,t,n,i,r){let o="";if(!Ha(r)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!qv(n)))return!1;const s=ew(n+i);if(!s[0])return!1;const a={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function Zv(e,t,n,i){return!(!Ha(i,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function qv(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ew(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const r=vo(e,"(");let o=vo(e,")");for(;-1!==i&&r>o;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),o++;return[e,n]}function Ha(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||wi(n)||bi(n))&&(!t||47!==n)}function Wa(e){return e.label||!e.identifier?e.label||"":ua(e.identifier)}function tw(e,t,n){const i=t.indexStack,r=e.children||[],o=t.createTracker(n),s=[];let a=-1;for(i.push(-1);++a=c||e+10?" ":"")),r.shift(4),o+=r.move(rw(tw(e,n,r.current()),bw)),s(),o}function bw(e,t,n){return 0===t?e:(n?"":" ")+e}function Va(e,t,n){const i=t.indexStack,r=e.children||[],o=[];let s=-1,a=n.before;i.push(-1);let l=t.createTracker(n);for(;++s0&&("\r"===a||"\n"===a)&&"html"===c.type&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=t.createTracker(n),l.move(o.join(""))),o.push(l.move(t.handle(c,e,t,{...l.current(),before:a,after:h}))),a=o[o.length-1].slice(-1)}return i.pop(),o.join("")}Ua.peek=vw;const yw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ga.peek=$w;const xw={canContainEols:["delete"],enter:{strikethrough:kw},exit:{strikethrough:Cw}},Sw={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:yw}],handlers:{delete:Ga}};function kw(e){this.enter({type:"delete",children:[]},e)}function Cw(e){this.exit(e)}function Ga(e,t,n,i){const r=Ti(i),o=n.enter("strikethrough");let s=r.move("~~");return s+=Va(e,n,{...r.current(),before:s,after:"~"}),s+=r.move("~~"),o(),s}function $w(){return"~"}function Ka(e,t,n){let i=e.value||"",r="`",o=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++ol&&(l=e[c].length);++ha[h])&&(a[h]=e)}n.push(o)}o[c]=n,s[c]=r}let h=-1;if("object"==typeof n&&"length"in n)for(;++ha[h]&&(a[h]=o),d[h]=o),u[h]=s}o.splice(1,0,u),s.splice(1,0,d),c=-1;const f=[];for(;++c"none"===e?null:e)),children:[]},e),this.setData("inTable",!0)}function Tw(e){this.exit(e),this.setData("inTable")}function Ow(e){this.enter({type:"tableRow",children:[]},e)}function nr(e){this.exit(e)}function ko(e){this.enter({type:"tableCell",children:[]},e)}function Fw(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,Iw));this.stack[this.stack.length-1].value=t,this.exit(e)}function Iw(e,t){return"|"===t?t:e}function Pw(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,r=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,n,i){return a(function(e,t,n){const i=e.children;let r=-1;const o=[],s=t.enter("table");for(;++r-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let s=o.length+1;("tab"===r||"mixed"===r&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));const a=n.createTracker(i);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),(function(e,t,n){return t?(n?"":" ".repeat(s))+e:(n?o:o+" ".repeat(s-o.length))+e}));return l(),c}const Hw={exit:{taskListCheckValueChecked:Co,taskListCheckValueUnchecked:Co,paragraph:jw}},Ww={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:zw}};function Co(e){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===e.type}function jw(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1],n=e.children[0];if(n&&"text"===n.type){const i=t.children;let r,o=-1;for(;++oi(!n),children:["Show curl command",O.jsx(di,{className:"inline-block w-4 h-4 ml-1"})]}),n&&O.jsx(O.Fragment,{children:O.jsx("div",{className:"rounded mt-2",children:O.jsx(At,{maxLines:50,mode:"sh",value:t,theme:"one_dark",wrapEnabled:!1,onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1)},editorProps:{$blockScrolling:!0}})})})]})}function Xw(e){const{lrdDocsItem:t,curlCommand:n}=e;return O.jsx("div",{className:"mockup-window border",children:O.jsxs("div",{className:"p-5",children:[t.doc_block&&O.jsx("div",{className:"text-sm mb-10 text-slate-500",children:O.jsx(Ma,{children:t.doc_block,remarkPlugins:[Gw]})}),O.jsx("table",{className:"table table-fixed table-compact",children:O.jsxs("tbody",{children:[O.jsxs("tr",{children:[O.jsx("th",{children:"Method"}),O.jsx("td",{children:O.jsx("span",{className:`method-${t.http_method} uppercase`,children:t.http_method})})]}),t.controller&&O.jsxs("tr",{children:[O.jsx("th",{children:"Controller"}),O.jsx("td",{children:t.controller})]}),t.method&&O.jsxs("tr",{children:[O.jsx("th",{children:"Function"}),O.jsx("td",{children:t.method})]}),0!=t.middlewares.length&&O.jsxs("tr",{children:[O.jsx("th",{children:"Middlewares"}),O.jsx("td",{children:t.middlewares.map((e=>O.jsxs("div",{children:[O.jsx("span",{className:"badge badge-ghost badge-md mb-1 rounded-sm",children:e}),O.jsx("br",{})]},Te.generate())))})]}),O.jsxs("tr",{children:[O.jsx("th",{children:"Status Codes"}),O.jsx("td",{children:O.jsxs("div",{className:"collapse",children:[O.jsx("input",{type:"checkbox"}),O.jsxs("div",{className:"collapse-title text-sm text-slate-500 pl-0 mt-2",children:["Show Response codes for this request",O.jsx(di,{className:"inline-block w-4 h-4 ml-1"})]}),O.jsx("div",{className:"collapse-content p-0",children:t.responses&&t.responses.map((e=>O.jsx("div",{children:O.jsxs("div",{className:`response response-${e}`,children:["- ",e,"   ",pd[e]]})},Te.generate())))})]})})]}),O.jsxs("tr",{children:[O.jsxs("th",{children:[O.jsx(Ou,{className:"inline-block w-4 h-4 mr-1"}),"Curl"]}),O.jsx("td",{children:O.jsx(Yw,{curlCommand:n})})]})]})})]})})}!function(e,t){ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=t.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",s=t.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",a=function(){var e=this.createKeywordMapper({keyword:o,"support.function.builtin":s,"invalid.deprecated":"debugger"},"identifier"),t="(?:\\d+)",n="(?:(?:"+t+"?(?:\\.\\d+))|(?:"+t+"\\.))",i="(?:"+("(?:(?:"+n+"|"+t+"))")+"|"+n+")",r="(?:&"+t+")",a="[a-zA-Z_][a-zA-Z0-9_]*",l="(?:"+a+"(?==))",c="(?:"+a+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(e,t,n){var i="-"==e[2]?"indentedHeredoc":"heredoc",r=e.split(this.splitRegex);return n.push(i,r[4]),[{type:"constant",value:r[1]},{type:"text",value:r[2]},{type:"string",value:r[3]},{type:"support.class",value:r[4]},{type:"string",value:r[5]}]},rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^\t+"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return"heredoc"===t[0]||"indentedHeredoc"===t[0]?t[0]:e}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:"(?:\\$(?:SHLVL|\\$|\\!|\\?))"},{token:"variable",regex:l},{include:"variables"},{token:"support.function",regex:c},{token:"support.function",regex:r},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:i},{token:"constant.numeric",regex:"(?:(?:[1-9]\\d*)|(?:0))\\b"},{token:e,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};i.inherits(a,r),t.ShHighlightRules=a})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){var i=e("../../lib/oop"),r=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};i.inherits(s,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(i)?"start":r},this.getFoldWidgetRange=function(e,t,n,i){var r,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(r=o.match(this.foldingStartMarker)){var s=r.index;if(r[1])return this.openingBracketBlock(e,r[1],n,s);var a=e.getCommentFoldRange(n,s+r[0].length,1);return a&&!a.isMultiLine()&&(i?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(r=o.match(this.foldingStopMarker))){s=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],n,s):e.getCommentFoldRange(n,s,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),i=n.search(/\S/),o=t,s=n.length,a=t+=1,l=e.getLength();++tc)break;var h=this.getFoldWidgetRange(e,"all",t);if(h){if(h.start.row<=o)break;if(h.isMultiLine())t=h.end.row;else if(i==c)break}a=t}}return new r(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ns)return new r(s,i,n,t.length)}}.call(s.prototype)})),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"],(function(e,t,n){var i=e("../lib/oop"),r=e("./text").Mode,o=e("./sh_highlight_rules").ShHighlightRules,s=e("../range").Range,a=e("./folding/cstyle").FoldMode,l=e("./behaviour/cstyle").CstyleBehaviour,c=function(){this.HighlightRules=o,this.foldingRules=new a,this.$behaviour=new l};i.inherits(c,r),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return i;"start"==e&&(t.match(/^.*[\{\(\[:]\s*$/)&&(i+=n));return i};var e={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(t,n,i){if("\r\n"!==i&&"\r"!==i&&"\n"!==i)return!1;var r=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!r)return!1;do{var o=r.pop()}while(o&&("comment"==o.type||"text"==o.type&&o.value.match(/^\s+$/)));return!!o&&("keyword"==o.type&&e[o.value])},this.autoOutdent=function(e,t,n){n+=1;var i=this.$getIndent(t.getLine(n)),r=t.getTabString();i.slice(-r.length)==r&&t.remove(new s(n,i.length-r.length,n,i.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}.call(c.prototype),t.Mode=c})),ace.require(["ace/mode/sh"],(function(t){e&&(e.exports=t)}))}(Kw),ace.config.setModuleUrl("ace/mode/json_worker",fn);var Ao={},Qw={get exports(){return Ao},set exports(e){Ao=e}};function Jw(e){const{sqlData:t}=e;return O.jsxs(O.Fragment,{children:[!t&&O.jsx("div",{className:"text-center text-sm text-slate-500",children:"No SQL queries recorded"}),t&&O.jsxs(O.Fragment,{children:[O.jsx("p",{children:"SQL queries"}),O.jsx("div",{className:"rounded",children:O.jsx(At,{maxLines:50,width:"100%",readOnly:!0,mode:"sql",wrapEnabled:!0,value:t,theme:"one_dark",onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1)},editorProps:{$blockScrolling:!0}})})]})]})}function Zw(e){const{logsData:t}=e;return O.jsxs(O.Fragment,{children:[!t&&O.jsx("div",{className:"text-center text-sm text-slate-500",children:"No Laravel logs"}),t&&O.jsxs(O.Fragment,{children:[O.jsx("p",{children:"Laravel logs"}),O.jsx("div",{className:"rounded",children:O.jsx(At,{maxLines:50,width:"100%",mode:"sh",readOnly:!0,value:t,theme:"one_dark",wrapEnabled:!0,onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1)},editorProps:{$blockScrolling:!0}})})]})]})}function qw(e){const{modelsData:t}=e,{modelsSummary:n,modelsTimeline:i}=t;return O.jsxs(O.Fragment,{children:[!Object.keys(n).length&&O.jsx("div",{className:"text-center text-sm text-slate-500",children:"No Models Data"}),0!=Object.keys(n).length&&O.jsxs(O.Fragment,{children:[O.jsx("h3",{className:"title",children:"Model events Summary"}),O.jsx("div",{className:"divider"}),Object.keys(n).map((e=>O.jsx("table",{className:"table table-compact table-fixed table-zebra w-full mb-10",children:O.jsx("tbody",{children:Object.keys(n[e]).map(((t,i)=>O.jsxs("tr",{children:[0==i&&O.jsxs("td",{rowSpan:Object.keys(n[e]).length,children:[O.jsx("span",{className:"font-bold text-slate-500",children:"Model"}),O.jsx("br",{}),O.jsx("div",{className:"",dangerouslySetInnerHTML:{__html:oi(e.split("\\")[e.split("\\").length-1],30,"
")}})]}),O.jsxs("td",{className:"capitalize",children:["created"==t&&O.jsx(ds,{className:"inline-block w-3 h-3 mr-1"}),"saved"==t&&O.jsx(cs,{className:"inline-block w-3 h-3 mr-1"}),"retrieved"==t&&O.jsx(us,{className:"inline-block w-3 h-3 text-white mr-1"}),"updated"==t&&O.jsx(ls,{className:"inline-block w-3 h-3 mr-1"}),"deleted"==t&&O.jsx(fs,{className:"inline-block w-3 h-3 mr-1"}),t]}),O.jsxs("td",{children:[O.jsx("span",{className:"font-bold",children:n[e][t]}),O.jsxs("span",{className:"text-slate-400 pl-1",children:["Time",n[e][t]>1?"s":""]})]})]},Te.generate())))})},Te.generate())))]}),0!=Object.keys(i).length&&O.jsxs(O.Fragment,{children:[O.jsx("h3",{className:"title",children:"Model Events Timeline"}),O.jsx("small",{className:"text-slate-500",children:"Events are in the order of occurrences"}),O.jsx("div",{className:"divider"}),O.jsx("div",{className:"flex flex-col md:grid grid-cols-12",children:Object.keys(i).map((e=>O.jsxs("div",{className:"flex md:contents",children:[O.jsxs("div",{className:"col-start-2 col-end-4 mr-10 md:mx-auto relative",children:[O.jsx("div",{className:"h-full w-3 flex items-center justify-center",children:O.jsx("div",{className:`h-full w-1 bg-${i[e].event} pointer-events-none`})}),O.jsxs("div",{className:`w-3 h-3 absolute top-1/2 rounded-full bg-${i[e].event} shadow text-center`,children:["created"==i[e].event&&O.jsx(ds,{className:"w-3 h-3 text-black mx-auto"}),"saved"==i[e].event&&O.jsx(cs,{className:"w-3 h-3 text-black mx-auto"}),"retrieved"==i[e].event&&O.jsx(us,{className:"w-3 h-3 text-white mx-auto"}),"updated"==i[e].event&&O.jsx(ls,{className:"w-3 h-3 text-black mx-auto"}),"deleted"==i[e].event&&O.jsx(fs,{className:"w-3 h-3 text-black mx-auto"})]})]}),O.jsxs("div",{className:"col-start-4 col-end-12 rounded-md my-3 mr-auto w-full break-all",children:[O.jsx("h3",{className:"mb-1",children:O.jsx("div",{className:"",dangerouslySetInnerHTML:{__html:oi(i[e].model.split("\\")[i[e].model.split("\\").length-1],30,"
")}})}),O.jsx("p",{className:"title text-justify w-full",children:O.jsx("span",{className:`badge badge-${i[e].event} rounded-sm`,children:i[e].event})})]})]},Te.generate())))})]})]})}!function(e,t){ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){var e=this.createKeywordMapper({"support.function":"avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl",keyword:"select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|then|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|foreign|not|references|default|null|inner|cross|natural|database|drop|grant|distinct","constant.language":"true|false","storage.type":"int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|money|real|number|integer"},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"string",regex:"`.*?`"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};i.inherits(o,r),t.SqlHighlightRules=o})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){var i=e("../../lib/oop"),r=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};i.inherits(s,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(i)?"start":r},this.getFoldWidgetRange=function(e,t,n,i){var r,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(r=o.match(this.foldingStartMarker)){var s=r.index;if(r[1])return this.openingBracketBlock(e,r[1],n,s);var a=e.getCommentFoldRange(n,s+r[0].length,1);return a&&!a.isMultiLine()&&(i?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(r=o.match(this.foldingStopMarker))){s=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],n,s):e.getCommentFoldRange(n,s,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),i=n.search(/\S/),o=t,s=n.length,a=t+=1,l=e.getLength();++tc)break;var h=this.getFoldWidgetRange(e,"all",t);if(h){if(h.start.row<=o)break;if(h.isMultiLine())t=h.end.row;else if(i==c)break}a=t}}return new r(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ns)return new r(s,i,n,t.length)}}.call(s.prototype)})),ace.define("ace/mode/folding/sql",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle"],(function(e,t,n){var i=e("../../lib/oop"),r=e("./cstyle").FoldMode,o=t.FoldMode=function(){};i.inherits(o,r),function(){}.call(o.prototype)})),ace.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/mode/folding/sql"],(function(e,t,n){var i=e("../lib/oop"),r=e("./text").Mode,o=e("./sql_highlight_rules").SqlHighlightRules,s=e("./folding/sql").FoldMode,a=function(){this.HighlightRules=o,this.foldingRules=new s,this.$behaviour=this.$defaultBehaviour};i.inherits(a,r),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/sql",this.snippetFileId="ace/snippets/sql"}.call(a.prototype),t.Mode=a})),ace.require(["ace/mode/sql"],(function(t){e&&(e.exports=t)}))}(Qw),ace.config.setModuleUrl("ace/mode/json_worker",fn),ace.config.setModuleUrl("ace/mode/json_worker",fn);const Ya=(e,t,n)=>{t=t||new FormData;for(const i in e){if(void 0===e[i])continue;const r=n?`${n}[${i}]`:i;if(e[i]instanceof FileList)for(let n=0;n{const e=JSON.parse(s);let r="";if(e[n+"-"+t.uri]&&(r=e[n+"-"+t.uri]),"GET"==n||"HEAD"==n||"DELETE"==n){if(r&&""!=r.trim())return b(r),void u(Cn(i,t.uri,n,r,l));let e="",o=0;for(const[n]of Object.entries(t.rules)){o++;const t=n.split(".").reduce(((e,t)=>e?`${e}[${"*"!==t?t:0}]`:t),"");e+=1==o?`?${t}=\n`:`&${t}=\n`}b(e),u(Cn(i,t.uri,n,e,l))}if("POST"==n||"PUT"==n||"PATCH"==n){if(r&&(""!=r.trim()||"{}"!=r.trim()))return x(r),void u(Cn(i,t.uri,n,r,l));const e=Object.entries(t.rules).reduce(((e,[t,n])=>{if(0==n.length)return e;const i=n[0].split("|");if(i.includes("file")||i.includes("image"))return e;const r=t.split(".");return r.reduce(((e,t,n)=>{if(t="*"===t?"0":t,n===r.length-1){if(!isNaN(Number(t)))return e=Array.isArray(e)?e:[];e[t]=i.includes("array")?[]:""}else i.includes("array")||"*"===r[n+1]||!isNaN(Number(r[n+1]))?e[t]=e[t]||[]:e[t]=e[t]||{};return e[t]}),e),e}),{}),o=JSON.stringify(e,null,2);x(o),u(Cn(i,t.uri,n,o,l))}}),[]);return O.jsxs(O.Fragment,{children:[O.jsx(gd,{activeTab:H,responseStatus:D,sqlQueriesCount:A,logsData:T,modelsData:M,setActiveTab:W}),O.jsxs("div",{className:"mt-5",children:[r&&O.jsx("div",{className:"alert alert-error mt-2 mb-2",children:r}),"info"==H&&O.jsx(Xw,{lrdDocsItem:t,curlCommand:h}),"request"==H&&O.jsx(dd,{lrdDocsItem:t,requestUri:d,method:n,sendingRequest:m,requestHeaders:l,bodyParams:y,queryParams:w,setRequestUri:f,handleSendRequest:()=>{(()=>{const e=JSON.parse(s);("GET"==n||"HEAD"==n||"DELETE"==n)&&(e[n+"-"+t.uri]=w),("POST"==n||"PUT"==n||"PATCH"==n)&&(e[n+"-"+t.uri]=y),a(JSON.stringify(e))})();try{JSON.parse(l)}catch(e){return void o("Global Request Headers are incorrect: "+e.message)}const e=JSON.parse(l);e["X-Request-LRD"]=!0,k&&(delete e["Content-Type"],e.Accept="multipart/form-data");const r={credentials:"include",method:n,headers:e};if("POST"==n||"PUT"==n||"PATCH"==n){try{null!=k&&Ya(JSON.parse(y),k)}catch(e){return void o("Request body incorrect: "+e.message)}r.body=null!=k?k:y}const c=performance.now();v(!0),E(""),F(""),N(""),$(""),o(null),fetch(`${i}/${d}${w}`,r).then((e=>{let t=performance.now()-c;return t=Math.round(1e3*(t+Number.EPSILON))/1e3,p(t),P(e.status),B(JSON.stringify(Object.fromEntries(e.headers),null,2)),v(!1),e.text()})).then((e=>{let t,n=!0;try{t=JSON.parse(e)}catch{n=!1}const i=t&&t._lrd;if(t&&t._lrd&&t._lrd.queries){const e=t._lrd.queries.map((e=>"Connection: "+e.connection_name+" Time taken: "+e.time+"ms: \n"+e.sql+"\n")).join("\n");E(e),L(t._lrd.queries.length)}if(t&&t._lrd&&t._lrd.logs){let e="";for(const n of t._lrd.logs)e+=n.level+": "+n.message+"\n";F(e)}t&&t._lrd&&t._lrd.memory&&N(t._lrd.memory),t&&t._lrd&&t._lrd.models&&t._lrd.modelsTimeline&&R({modelsSummary:t._lrd.models,modelsTimeline:t._lrd.modelsTimeline}),$(n?i&&t?.data?JSON.stringify(t?.data,null,2):JSON.stringify(t,null,2):e),W("response")})).catch((e=>{o("Response error: "+e),P(500),v(!1),W("response")}))},handleChangeRequestHeaders:e=>{c(e);try{o(null),JSON.parse(e)}catch(e){o("Global Request Headers are incorrect: "+e.message)}},handleFileChange:(e,t)=>{const n=k||new FormData,i=t.split("."),r=t.split(".").reduce(((e,t,n)=>n!==i.length-1||"*"!==t&&isNaN(Number(t))?e?`${e}[${t}]`:t:e),"");if(t.includes(".*"))for(let t=0;t`Invalid value for key ${e}`,lb=e=>`Pattern length exceeds max of ${e}.`,cb=e=>`Missing ${e} property in key`,ub=e=>`Property 'weight' in key '${e}' must be a positive integer`,Eo=Object.prototype.hasOwnProperty;class hb{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let n=Za(e);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Za(e){let t=null,n=null,i=null,r=1,o=null;if(dt(e)||wt(e))i=e,t=Lo(e),n=kr(e);else{if(!Eo.call(e,"name"))throw new Error(cb("name"));const s=e.name;if(i=s,Eo.call(e,"weight")&&(r=e.weight,r<=0))throw new Error(ub(s));t=Lo(s),n=kr(s),o=e.getFn}return{path:t,id:n,weight:r,src:i,getFn:o}}function Lo(e){return wt(e)?e:e.split(".")}function kr(e){return wt(e)?e.join("."):e}function fb(e,t){let n=[],i=!1;const r=(e,t,o)=>{if(Ze(e))if(t[o]){const s=e[t[o]];if(!Ze(s))return;if(o===t.length-1&&(dt(s)||Xa(s)||rb(s)))n.push(ib(s));else if(wt(s)){i=!0;for(let e=0,n=s.length;ee.score===t.score?e.idx{this._keysMap[e.id]=t}))}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,dt(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();dt(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t{let r=t.getFn?t.getFn(e):this.getFn(e,t.path);if(Ze(r))if(wt(r)){let e=[];const t=[{nestedArrIndex:-1,value:r}];for(;t.length;){const{nestedArrIndex:n,value:i}=t.pop();if(Ze(i))if(dt(i)&&!ir(i)){let t={v:i,i:n,n:this.norm.get(i)};e.push(t)}else wt(i)&&i.forEach(((e,n)=>{t.push({nestedArrIndex:n,value:e})}))}n.$[i]=e}else if(dt(r)&&!ir(r)){let e={v:r,n:this.norm.get(r)};n.$[i]=e}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function qa(e,t,{getFn:n=ve.getFn,fieldNormWeight:i=ve.fieldNormWeight}={}){const r=new Xr({getFn:n,fieldNormWeight:i});return r.setKeys(e.map(Za)),r.setSources(t),r.create(),r}function bb(e,{getFn:t=ve.getFn,fieldNormWeight:n=ve.fieldNormWeight}={}){const{keys:i,records:r}=e,o=new Xr({getFn:t,fieldNormWeight:n});return o.setKeys(i),o.setIndexRecords(r),o}function Ln(e,{errors:t=0,currentLocation:n=0,expectedLocation:i=0,distance:r=ve.distance,ignoreLocation:o=ve.ignoreLocation}={}){const s=t/e.length;if(o)return s;const a=Math.abs(i-n);return r?s+a/r:a?1:s}function yb(e=[],t=ve.minMatchCharLength){let n=[],i=-1,r=-1,o=0;for(let s=e.length;o=t&&n.push([i,r]),i=-1)}return e[o-1]&&o-i>=t&&n.push([i,o-1]),n}const Dt=32;function xb(e,t,n,{location:i=ve.location,distance:r=ve.distance,threshold:o=ve.threshold,findAllMatches:s=ve.findAllMatches,minMatchCharLength:a=ve.minMatchCharLength,includeMatches:l=ve.includeMatches,ignoreLocation:c=ve.ignoreLocation}={}){if(t.length>32)throw new Error(lb(32));const h=t.length,u=e.length,d=Math.max(0,Math.min(i,u));let f=o,g=d;const p=a>1||l,m=p?Array(u):[];let v;for(;(v=e.indexOf(t,g))>-1;){let e=Ln(t,{currentLocation:v,expectedLocation:d,distance:r,ignoreLocation:c});if(f=Math.min(e,f),g=v+h,p){let e=0;for(;e=l;o-=1){let s=o-1,a=n[e.charAt(s)];if(p&&(m[s]=+!!a),k[o]=(k[o+1]<<1|1)&a,i&&(k[o]|=(w[o+1]|w[o])<<1|1|w[o+1]),k[o]&x&&(b=Ln(t,{errors:i,currentLocation:s,expectedLocation:d,distance:r,ignoreLocation:c}),b<=f)){if(f=b,g=s,g<=d)break;l=Math.max(1,2*d-g)}}if(Ln(t,{errors:i+1,currentLocation:d,expectedLocation:d,distance:r,ignoreLocation:c})>f)break;w=k}const k={isMatch:g>=0,score:Math.max(.001,b)};if(p){const e=yb(m,a);e.length?l&&(k.indices=e):k.isMatch=!1}return k}function Sb(e){let t={};for(let n=0,i=e.length;n{this.chunks.push({pattern:e,alphabet:Sb(e),startIndex:t})},h=this.pattern.length;if(h>32){let e=0;const t=h%32,n=h-t;for(;e{const{isMatch:g,score:p,indices:m}=xb(e,t,d,{location:i+f,distance:r,threshold:o,findAllMatches:s,minMatchCharLength:a,includeMatches:n,ignoreLocation:l});g&&(u=!0),h+=p,g&&m&&(c=[...c,...m])}));let d={isMatch:u,score:u?h/this.chunks.length:1};return u&&n&&(d.indices=c),d}}class Lt{constructor(e){this.pattern=e}static isMultiMatch(e){return _o(e,this.multiRegex)}static isSingleMatch(e){return _o(e,this.singleRegex)}search(){}}function _o(e,t){const n=e.match(t);return n?n[1]:null}class kb extends Lt{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class Cb extends Lt{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class $b extends Lt{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class Ab extends Lt{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class Eb extends Lt{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class Lb extends Lt{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class tl extends Lt{constructor(e,{location:t=ve.location,threshold:n=ve.threshold,distance:i=ve.distance,includeMatches:r=ve.includeMatches,findAllMatches:o=ve.findAllMatches,minMatchCharLength:s=ve.minMatchCharLength,isCaseSensitive:a=ve.isCaseSensitive,ignoreLocation:l=ve.ignoreLocation}={}){super(e),this._bitapSearch=new el(e,{location:t,threshold:n,distance:i,includeMatches:r,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:a,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class nl extends Lt{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,n=0;const i=[],r=this.pattern.length;for(;(t=e.indexOf(this.pattern,n))>-1;)n=t+r,i.push([t,n-1]);const o=!!i.length;return{isMatch:o,score:o?0:1,indices:i}}}const Cr=[kb,nl,$b,Ab,Lb,Eb,Cb,tl],Ro=Cr.length,_b=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Rb="|";function Mb(e,t={}){return e.split(Rb).map((e=>{let n=e.trim().split(_b).filter((e=>e&&!!e.trim())),i=[];for(let e=0,r=n.length;e!(!e[hi.AND]&&!e[hi.OR]),Ib=e=>!!e[Er.PATH],Pb=e=>!wt(e)&&Qa(e)&&!Lr(e),Mo=e=>({[hi.AND]:Object.keys(e).map((t=>({[t]:e[t]})))});function il(e,t,{auto:n=!0}={}){const i=e=>{let r=Object.keys(e);const o=Ib(e);if(!o&&r.length>1&&!Lr(e))return i(Mo(e));if(Pb(e)){const i=o?e[Er.PATH]:r[0],s=o?e[Er.PATTERN]:e[i];if(!dt(s))throw new Error(ab(i));const a={keyId:kr(i),pattern:s};return n&&(a.searcher=Ar(s,t)),a}let s={children:[],operator:r[0]};return r.forEach((t=>{const n=e[t];wt(n)&&n.forEach((e=>{s.children.push(i(e))}))})),s};return Lr(e)||(e=Mo(e)),i(e)}function Db(e,{ignoreFieldNorm:t=ve.ignoreFieldNorm}){e.forEach((e=>{let n=1;e.matches.forEach((({key:e,norm:i,score:r})=>{const o=e?e.weight:null;n*=Math.pow(0===r&&o?Number.EPSILON:r,(o||1)*(t?1:i))})),e.score=n}))}function Nb(e,t){const n=e.matches;t.matches=[],Ze(n)&&n.forEach((e=>{if(!Ze(e.indices)||!e.indices.length)return;const{indices:n,value:i}=e;let r={indices:n,value:i};e.key&&(r.key=e.key.src),e.idx>-1&&(r.refIndex=e.idx),t.matches.push(r)}))}function Bb(e,t){t.score=e.score}function Hb(e,t,{includeMatches:n=ve.includeMatches,includeScore:i=ve.includeScore}={}){const r=[];return n&&r.push(Nb),i&&r.push(Bb),e.map((e=>{const{idx:n}=e,i={item:t[n],refIndex:n};return r.length&&r.forEach((t=>{t(e,i)})),i}))}class Jt{constructor(e,t={},n){this.options={...ve,...t},this.options.useExtendedSearch,this._keyStore=new hb(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Xr))throw new Error(ob);this._myIndex=t||qa(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Ze(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let n=0,i=this._docs.length;n-1&&(a=a.slice(0,t)),Hb(a,this._docs,{includeMatches:n,includeScore:i})}_searchStringList(e){const t=Ar(e,this.options),{records:n}=this._myIndex,i=[];return n.forEach((({v:e,i:n,n:r})=>{if(!Ze(e))return;const{isMatch:o,score:s,indices:a}=t.searchIn(e);o&&i.push({item:e,idx:n,matches:[{score:s,value:e,norm:r,indices:a}]})})),i}_searchLogical(e){const t=il(e,this.options),n=(e,t,i)=>{if(!e.children){const{keyId:n,searcher:r}=e,o=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:r});return o&&o.length?[{idx:i,item:t,matches:o}]:[]}const r=[];for(let o=0,s=e.children.length;o{if(Ze(e)){let s=n(t,e,i);s.length&&(r[i]||(r[i]={idx:i,item:e,matches:[]},o.push(r[i])),s.forEach((({matches:e})=>{r[i].matches.push(...e)})))}})),o}_searchObjectList(e){const t=Ar(e,this.options),{keys:n,records:i}=this._myIndex,r=[];return i.forEach((({$:e,i:i})=>{if(!Ze(e))return;let o=[];n.forEach(((n,i)=>{o.push(...this._findMatches({key:n,value:e[i],searcher:t}))})),o.length&&r.push({idx:i,item:e,matches:o})})),r}_findMatches({key:e,value:t,searcher:n}){if(!Ze(t))return[];let i=[];if(wt(t))t.forEach((({v:t,i:r,n:o})=>{if(!Ze(t))return;const{isMatch:s,score:a,indices:l}=n.searchIn(t);s&&i.push({score:a,key:e,value:t,idx:r,norm:o,indices:l})}));else{const{v:r,n:o}=t,{isMatch:s,score:a,indices:l}=n.searchIn(r);s&&i.push({score:a,key:e,value:r,norm:o,indices:l})}return i}}function jb(){const[e,t]=se.useState([]),[n,i]=se.useState([]),[r,o]=se.useState(""),[s,a]=se.useState(""),[l,c]=se.useState(!1),[h,u]=se.useState(null),[d]=je("groupby","default"),[f]=je("sort","default"),[g]=je("showGet","true"),[p]=je("showPost","true"),[m]=je("showDelete","true"),[v]=je("showPut","true"),[w]=je("showPatch","true"),[b]=je("showHead","true"),y={keys:["uri","doc_block"],threshold:.3},x=(e,t,n,i,r,o,s,a,l)=>`${e}?json=true&showGet=${t}&showPost=${n}&showDelete=${i}&showPut=${r}&showPatch=${o}&showHead=${s}&sort=${a}&groupby=${l}`;se.useEffect((()=>{let e=new URLSearchParams(window.location.search).get("api");if(!e){const t=location.protocol+"//"+location.host;a(t),e=t+"/request-docs/api"}if(e){const t=e?.split("/").slice(0,3).join("/");a(t)}o(e);const t=x(e,g,p,m,v,w,b,f,d);k(t)}),[]);const k=e=>{c(!0),fetch(e).then((e=>e.json())).then((e=>{if(!Array.isArray(e))return u("Invalid response"),void c(!1);u(null),t(e),i(e),c(!1),setTimeout((()=>{(()=>{const e=window.location.hash;if(e){const t=e.replace("#",""),n=document.getElementById(t);n&&n.scrollIntoView()}})()}),10)})).catch((e=>{u(e.message),c(!1)}))};return O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"sticky top-0 z-50 bg-gray-400",children:[O.jsx(nh,{handleChangeSettings:(e,t,n,i,o,s,a,l)=>{const c=x(r,e,t,n,i,o,s,a,l);k(c)},handleSearch:i=>{if(!(i=i.trim()))return void t(n);const r=new Jt(e,y).search(i),o=[];for(let e=0;eO.jsxs("div",{children:[O.jsx("div",{className:"min-h-screen",children:O.jsxs("div",{className:"main-grid grid grid-cols-10 gap-2",children:[O.jsx("div",{className:"col-span-4 ml-5",children:O.jsx(Ih,{lrdDocsItem:e,method:e.http_method})}),O.jsx("div",{className:"col-span-5 ml-5",children:O.jsx(eb,{lrdDocsItem:e,method:e.http_method,host:s})})]})}),O.jsx("div",{className:"divider"})]},Te.generate())))})]})]})}Jt.version="6.6.2",Jt.createIndex=qa,Jt.parseIndex=bb,Jt.config=ve,Jt.parseQuery=il,Fb(Ob);export{jb as default}; \ No newline at end of file +import{r as se,c as De,g as fi,R as zt}from"./index.ba55fcf9.js";function je(e,t){void 0===t&&(t="");var n=se.useState((function(){return window.localStorage.getItem(e)||t})),i=n[0],r=n[1];se.useEffect((function(){var n=window.localStorage.getItem(e);i!==n&&r(n||t)}));var o=se.useCallback((function(n){n.key===e&&n.newValue!==i&&r(n.newValue||t)}),[i]);return se.useEffect((function(){return window.addEventListener("storage",o),function(){return window.removeEventListener("storage",o)}}),[o]),[i,function(t){r(t),window.localStorage.setItem(e,t)}]}const _n=se;function ec({title:e,titleId:t,...n},i){return _n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?_n.createElement("title",{id:t},e):null,_n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"}))}const tc=_n.forwardRef(ec);var nc=tc;const Rn=se;function ic({title:e,titleId:t,...n},i){return Rn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Rn.createElement("title",{id:t},e):null,Rn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"}))}const rc=Rn.forwardRef(ic);var sc=rc;const Mn=se;function oc({title:e,titleId:t,...n},i){return Mn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Mn.createElement("title",{id:t},e):null,Mn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25H12"}))}const ac=Mn.forwardRef(oc);var lc=ac;const Tn=se;function cc({title:e,titleId:t,...n},i){return Tn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Tn.createElement("title",{id:t},e):null,Tn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 011.037-.443 48.282 48.282 0 005.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"}))}const uc=Tn.forwardRef(cc);var hc=uc;const On=se;function fc({title:e,titleId:t,...n},i){return On.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?On.createElement("title",{id:t},e):null,On.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"}))}const dc=On.forwardRef(fc);var gc=dc;const Fn=se;function pc({title:e,titleId:t,...n},i){return Fn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Fn.createElement("title",{id:t},e):null,Fn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 5.25l-7.5 7.5-7.5-7.5m15 6l-7.5 7.5-7.5-7.5"}))}const mc=Fn.forwardRef(pc);var vc=mc;const In=se;function wc({title:e,titleId:t,...n},i){return In.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?In.createElement("title",{id:t},e):null,In.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"}))}const bc=In.forwardRef(wc);var yc=bc;const Pn=se;function xc({title:e,titleId:t,...n},i){return Pn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Pn.createElement("title",{id:t},e):null,Pn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"}))}const Sc=Pn.forwardRef(xc);var kc=Sc;const Dn=se;function Cc({title:e,titleId:t,...n},i){return Dn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Dn.createElement("title",{id:t},e):null,Dn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 6.75L22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3l-4.5 16.5"}))}const $c=Dn.forwardRef(Cc);var Ac=$c;const sn=se;function Ec({title:e,titleId:t,...n},i){return sn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?sn.createElement("title",{id:t},e):null,sn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"}),sn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))}const Lc=sn.forwardRef(Ec);var _c=Lc;const Nn=se;function Rc({title:e,titleId:t,...n},i){return Nn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Nn.createElement("title",{id:t},e):null,Nn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"}))}const Mc=Nn.forwardRef(Rc);var Tc=Mc;const Bn=se;function Oc({title:e,titleId:t,...n},i){return Bn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Bn.createElement("title",{id:t},e):null,Bn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.75a.75.75 0 110-1.5.75.75 0 010 1.5zM12 12.75a.75.75 0 110-1.5.75.75 0 010 1.5zM12 18.75a.75.75 0 110-1.5.75.75 0 010 1.5z"}))}const Fc=Bn.forwardRef(Oc);var Ic=Fc;const Hn=se;function Pc({title:e,titleId:t,...n},i){return Hn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Hn.createElement("title",{id:t},e):null,Hn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"}))}const Dc=Hn.forwardRef(Pc);var Nc=Dc;const Wn=se;function Bc({title:e,titleId:t,...n},i){return Wn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Wn.createElement("title",{id:t},e):null,Wn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"}))}const Hc=Wn.forwardRef(Bc);var Wc=Hc;const jn=se;function jc({title:e,titleId:t,...n},i){return jn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?jn.createElement("title",{id:t},e):null,jn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 01-.659 1.591l-5.432 5.432a2.25 2.25 0 00-.659 1.591v2.927a2.25 2.25 0 01-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 00-.659-1.591L3.659 7.409A2.25 2.25 0 013 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0112 3z"}))}const zc=jn.forwardRef(jc);var Uc=zc;const zn=se;function Vc({title:e,titleId:t,...n},i){return zn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?zn.createElement("title",{id:t},e):null,zn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"}))}const Gc=zn.forwardRef(Vc);var Kc=Gc;const Un=se;function Yc({title:e,titleId:t,...n},i){return Un.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Un.createElement("title",{id:t},e):null,Un.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"}))}const Xc=Un.forwardRef(Yc);var Qc=Xc;const Vn=se;function Jc({title:e,titleId:t,...n},i){return Vn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Vn.createElement("title",{id:t},e):null,Vn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 10.5V6.75a4.5 4.5 0 119 0v3.75M3.75 21.75h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H3.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"}))}const Zc=Vn.forwardRef(Jc);var qc=Zc;const Gn=se;function eu({title:e,titleId:t,...n},i){return Gn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Gn.createElement("title",{id:t},e):null,Gn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"}))}const tu=Gn.forwardRef(eu);var nu=tu;const Kn=se;function iu({title:e,titleId:t,...n},i){return Kn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Kn.createElement("title",{id:t},e):null,Kn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 12h-15"}))}const ru=Kn.forwardRef(iu);var su=ru;const Yn=se;function ou({title:e,titleId:t,...n},i){return Yn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Yn.createElement("title",{id:t},e):null,Yn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"}))}const au=Yn.forwardRef(ou);var lu=au;const Xn=se;function cu({title:e,titleId:t,...n},i){return Xn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Xn.createElement("title",{id:t},e):null,Xn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"}))}const uu=Xn.forwardRef(cu);var hu=uu;const Qn=se;function fu({title:e,titleId:t,...n},i){return Qn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Qn.createElement("title",{id:t},e):null,Qn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const du=Qn.forwardRef(fu);var gu=du;const Jn=se;function pu({title:e,titleId:t,...n},i){return Jn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Jn.createElement("title",{id:t},e):null,Jn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 9.75h4.875a2.625 2.625 0 010 5.25H12M8.25 9.75L10.5 7.5M8.25 9.75L10.5 12m9-7.243V21.75l-3.75-1.5-3.75 1.5-3.75-1.5-3.75 1.5V4.757c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0111.186 0c1.1.128 1.907 1.077 1.907 2.185z"}))}const mu=Jn.forwardRef(pu);var vu=mu;const Zn=se;function wu({title:e,titleId:t,...n},i){return Zn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?Zn.createElement("title",{id:t},e):null,Zn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 01-1.125-1.125v-3.75zM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-8.25zM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-2.25z"}))}const bu=Zn.forwardRef(wu);var yu=bu;const qn=se;function xu({title:e,titleId:t,...n},i){return qn.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?qn.createElement("title",{id:t},e):null,qn.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"}))}const Su=qn.forwardRef(xu);var ku=Su;const ei=se;function Cu({title:e,titleId:t,...n},i){return ei.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?ei.createElement("title",{id:t},e):null,ei.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 01-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0112 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5"}))}const $u=ei.forwardRef(Cu);var Au=$u;const ti=se;function Eu({title:e,titleId:t,...n},i){return ti.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?ti.createElement("title",{id:t},e):null,ti.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const Lu=ti.forwardRef(Eu);var _u=Lu,ls=nc,Ru=sc,Mu=lc,Tu=hc,cs=gc,us=vc,di=yc,To=kc,Ou=Ac,hs=_c,Fu=Tc,Iu=Ic,Pu=Nc,Du=Wc,Nu=Uc,Bu=Kc,Hu=Qc,Wu=qc,ju=nu,fs=su,zu=lu,Oo=hu,ds=gu,Uu=vu,Vu=yu,Gu=ku,Ku=Au,Yu=_u,O={},Xu={get exports(){return O},set exports(e){O=e}},gi={},Qu=se,Ju=Symbol.for("react.element"),Zu=Symbol.for("react.fragment"),qu=Object.prototype.hasOwnProperty,eh=Qu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,th={key:!0,ref:!0,__self:!0,__source:!0};function Fo(e,t,n){var i,r={},o=null,s=null;for(i in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(s=t.ref),t)qu.call(t,i)&&!th.hasOwnProperty(i)&&(r[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===r[i]&&(r[i]=t[i]);return{$$typeof:Ju,type:e,key:o,ref:s,props:r,_owner:eh.current}}function nh(e){const{handleChangeSettings:t,handleSearch:n}=e,[i,r]=je("theme",""),[o,s]=je("sort","default"),[a,l]=je("groupby","default"),[c,h]=je("showGet","true"),[u,d]=je("showPost","true"),[f,g]=je("showDelete","true"),[p,m]=je("showPut","true"),[v,w]=je("showPatch","true"),[b,y]=je("showHead","true"),x=e=>{l(e.target.value),t(c,u,f,p,v,b,o,e.target.value)},k=e=>{s(e.target.value),t(c,u,f,p,v,b,e.target.value,a)};return se.useEffect((()=>{i?document.documentElement.setAttribute("data-theme",i):(document.documentElement.getAttribute("data-theme")||window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&document.documentElement.setAttribute("data-theme","dark"),document.documentElement.setAttribute("data-theme","light"))}),[]),O.jsx("header",{className:"relative bg-none",children:O.jsxs("div",{className:"navbar bg-base-200",children:[O.jsx("div",{className:"flex-1",children:O.jsx("div",{className:"normal-case text-xl",children:O.jsxs("span",{className:"pl-2",children:[O.jsx("span",{className:"title",children:"Laravel Request Docs"}),O.jsx("sup",{className:"pl-2",children:O.jsx("small",{children:O.jsxs("a",{className:"link link-info",href:"https://github.com/rakutentech/laravel-request-docs/releases/tag/v2.23",target:"_blank",rel:"noreferrer",children:["version ","v2.23"]})})})]})})}),O.jsxs("div",{className:"flex-none",children:[O.jsx("div",{className:"form-control",children:O.jsxs("label",{htmlFor:"search",className:"relative text-gray-400 focus-within:text-gray-600 block",children:[O.jsx(ju,{className:"pointer-events-none w-4 h-4 absolute top-1/2 transform -translate-y-1/2 left-3"}),O.jsx("input",{type:"text",placeholder:"Filter APIs",className:"input pl-10 input-sm input-bordered",onChange:e=>n(e.target.value)})]})}),O.jsx("div",{className:"menu menu-horizontal px-6 ",children:O.jsxs("label",{className:"swap swap-rotate",children:[O.jsx("input",{type:"checkbox",onChange:()=>{"dark"===document.documentElement.getAttribute("data-theme")?(r("light"),document.documentElement.setAttribute("data-theme","light")):(r("dark"),document.documentElement.setAttribute("data-theme","dark"))}}),"dark"===i?O.jsx(Gu,{className:"h-6 w-6"}):O.jsx(zu,{className:"h-6 w-6"})]})}),O.jsxs("div",{className:"ml-1",children:[O.jsx("a",{href:"#modal-settings",className:"btn btn-ghost btn-sm",children:O.jsx("span",{className:"pr-1",children:O.jsx(hs,{className:"h-6 w-6"})})}),O.jsx("div",{className:"modal",id:"modal-settings",children:O.jsxs("div",{className:"modal-box",children:[O.jsx("div",{className:"modal-action float-right",children:O.jsxs("a",{href:"#",className:"btn btn-sm btn-ghost",children:[O.jsx(Yu,{className:"h-6 w-6"})," Close"]})}),O.jsxs("h3",{className:"font-bold text-lg mt-7",children:[O.jsx(hs,{className:"inline-block h-6 w-6 mr-1"}),"Settings"]}),O.jsx("div",{className:"divider"}),O.jsxs("h4",{className:"font-bold mt-10",children:[O.jsx(Mu,{className:"inline-block h-6 w-6 mr-1"}),"Sort By"]}),O.jsx("div",{className:"divider"}),O.jsx("div",{className:"form-control",children:O.jsxs("label",{className:"label",children:[O.jsx("input",{type:"radio",onChange:k,value:"default",className:"radio",checked:"default"==o}),O.jsx("span",{className:"label-text",children:"Default"}),O.jsx("input",{type:"radio",onChange:k,value:"route_names",className:"radio",checked:"route_names"==o}),O.jsx("span",{className:"label-text",children:"Route Names"}),O.jsx("input",{type:"radio",onChange:k,value:"method_names",className:"radio",checked:"method_names"==o}),O.jsx("span",{className:"label-text",children:"HTTP Methods"})]})}),O.jsxs("h4",{className:"font-bold mt-10",children:[O.jsx(Vu,{className:"inline-block h-6 w-6 mr-1"}),"Group By"]}),O.jsx("div",{className:"divider"}),O.jsx("div",{className:"form-control",children:O.jsxs("label",{className:"label",children:[O.jsx("input",{type:"radio",onChange:x,value:"default",className:"radio",checked:"default"==a}),O.jsx("span",{className:"label-text",children:"Default"}),O.jsx("input",{type:"radio",onChange:x,value:"api_uri",className:"radio",checked:"api_uri"==a}),O.jsx("span",{className:"label-text",children:"API Name"}),O.jsx("input",{type:"radio",onChange:x,value:"controller_full_path",className:"radio",checked:"controller_full_path"==a}),O.jsx("span",{className:"label-text",children:"Controller Name"})]})}),O.jsxs("h4",{className:"font-bold mt-10",children:[O.jsx(Nu,{className:"inline-block h-6 w-6 mr-1"}),"Filter Settings"]}),O.jsx("div",{className:"divider"}),O.jsxs("div",{className:"form-control",children:[O.jsxs("label",{className:"label",children:[O.jsx("span",{className:"label-text",children:"GET"}),O.jsx("input",{type:"checkbox",onChange:e=>{h(e.target.checked),t(e.target.checked,u,f,p,v,b,o,a)},className:"toggle toggle-success",checked:"true"==c})]}),O.jsxs("label",{className:"label",children:[O.jsx("span",{className:"label-text",children:"POST"}),O.jsx("input",{type:"checkbox",onChange:e=>{d(e.target.checked),t(c,e.target.checked,f,p,v,b,o,a)},className:"toggle toggle-success",checked:"true"==u})]}),O.jsxs("label",{className:"label",children:[O.jsx("span",{className:"label-text",children:"DELETE"}),O.jsx("input",{type:"checkbox",onChange:e=>{g(e.target.checked),t(c,u,e.target.checked,p,v,b,o,a)},className:"toggle toggle-success",checked:"true"==f})]}),O.jsxs("label",{className:"label",children:[O.jsx("span",{className:"label-text",children:"PUT"}),O.jsx("input",{type:"checkbox",onChange:e=>{m(e.target.checked),t(c,u,f,e.target.checked,v,b,o,a)},className:"toggle toggle-success",checked:"true"==p})]}),O.jsxs("label",{className:"label",children:[O.jsx("span",{className:"label-text",children:"PATCH"}),O.jsx("input",{type:"checkbox",onChange:e=>{w(e.target.checked),t(c,u,f,p,e.target.checked,b,o,a)},className:"toggle toggle-success",checked:"true"==v})]}),O.jsxs("label",{className:"label",children:[O.jsx("span",{className:"label-text",children:"HEAD"}),O.jsx("input",{type:"checkbox",onChange:e=>{y(e.target.checked),t(c,u,f,p,v,e.target.checked,o,a)},className:"toggle toggle-success",checked:"true"==b})]})]}),O.jsxs("h4",{className:"font-bold mt-10",children:[O.jsx(To,{className:"inline-block h-6 w-6 mr-1"}),"Storage"]}),O.jsx("div",{className:"divider"}),O.jsx("div",{className:"form-control",children:O.jsxs("label",{className:"label",children:[O.jsxs("span",{className:"label-text",children:["Clear localstorage",O.jsx("p",{children:O.jsx("small",{children:"Delete localstorage data, request body and queries"})})]}),O.jsx("button",{className:"btn btn-sm btn-error",onClick:()=>{localStorage.clear(),window.location.reload()},children:"Clear"})]})})]})})]}),O.jsx("div",{className:"ml-1 ",children:O.jsxs("a",{className:"btn btn-ghost btn-sm",href:"/request-docs/api?openapi=true",target:"_blank",children:[O.jsx("span",{className:"pr-1",children:O.jsx(Ru,{className:"h-6 w-6"})}),"OpenAPI 3.0"]})}),O.jsx("div",{className:"ml-1 ",children:O.jsxs("a",{className:"btn btn-ghost btn-sm",href:"https://github.com/rakutentech/laravel-request-docs/issues/new",target:"_blank",rel:"noreferrer",children:[O.jsx("span",{className:"pr-1",children:O.jsx(Tu,{className:"h-6 w-6"})}),"Feature request"]})})]})]})})}gi.Fragment=Zu,gi.jsx=Fo,gi.jsxs=Fo,Xu.exports=gi;var rr={},ih={get exports(){return rr},set exports(e){rr=e}};!function(e,t){var n;typeof self<"u"&&self,ih.exports=(n=se,function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(1));function r(e){return e&&e.__esModule?e:{default:e}}t.default=i.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=function(e){function t(e){c(this,t);var n=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.smoothScroll=n.smoothScroll.bind(n),n}return u(t,e),r(t,[{key:"componentDidMount",value:function(){n(3).polyfill()}},{key:"smoothScroll",value:function(e){var t=this;e.preventDefault();var n=function(){return 0};typeof this.props.offset<"u"&&(n=this.props.offset&&this.props.offset.constructor&&this.props.offset.apply?this.props.offset:function(){return parseInt(t.props.offset)});var i=e.currentTarget.getAttribute("href").slice(1),r=document.getElementById(i).getBoundingClientRect().top+window.pageYOffset;window.scroll({top:r-n(),behavior:"smooth"}),this.props.onClick&&this.props.onClick(e)}},{key:"render",value:function(){var e=this.props;e.offset;var t=l(e,["offset"]);return s.default.createElement("a",i({},t,{onClick:this.smoothScroll}))}}]),t}(o.Component);t.default=d},function(e,t){e.exports=n},function(e,t,n){!function(){function t(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n=e.HTMLElement||e.Element,i=468,r={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||l,scrollIntoView:n.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=a(e.navigator.userAgent)?1:0;e.scroll=e.scrollTo=function(){if(void 0!==arguments[0]){if(!0===h(arguments[0]))return void r.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset);m.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(void 0!==arguments[0]){if(h(arguments[0]))return void r.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0);m.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0]){if(!0===h(arguments[0])){if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");return void r.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}var e=arguments[0].left,t=arguments[0].top;m.call(this,this,typeof e>"u"?this.scrollLeft:~~e,typeof t>"u"?this.scrollTop:~~t)}},n.prototype.scrollBy=function(){if(void 0!==arguments[0]){if(!0===h(arguments[0]))return void r.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},n.prototype.scrollIntoView=function(){if(!0!==h(arguments[0])){var n=g(this),i=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(m.call(this,n,n.scrollLeft+o.left-i.left,n.scrollTop+o.top-i.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else r.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function a(e){return new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(e)}function l(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){return.5*(1-Math.cos(Math.PI*e))}function h(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+s1?1:a),r=t.startX+(t.x-t.startX)*n,s=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,s),(r!==t.x||s!==t.y)&&e.requestAnimationFrame(p.bind(e,t))}function m(n,i,s){var a,c,h,u,d=o();n===t.body?(a=e,c=e.scrollX||e.pageXOffset,h=e.scrollY||e.pageYOffset,u=r.scroll):(a=n,c=n.scrollLeft,h=n.scrollTop,u=l),p({scrollable:a,method:u,startTime:d,startX:c,startY:h,x:i,y:s})}}e.exports={polyfill:t}}()}]))}();const rh=fi(rr);var sr={},sh={get exports(){return sr},set exports(e){sr=e}},or={},oh={get exports(){return or},set exports(e){or=e}},ni=1;function ah(){return(ni=(9301*ni+49297)%233280)/233280}function lh(e){ni=e}var $t,gs,on,ch={nextValue:ah,seed:lh},ar=ch,It="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function lr(){on=!1}function Io(e){if(e){if(e!==$t){if(e.length!==It.length)throw new Error("Custom alphabet for shortid must be "+It.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter((function(e,t,n){return t!==n.lastIndexOf(e)}));if(t.length)throw new Error("Custom alphabet for shortid must be "+It.length+" unique characters. These characters were not unique: "+t.join(", "));$t=e,lr()}}else $t!==It&&($t=It,lr())}function uh(e){return Io(e),$t}function hh(e){ar.seed(e),gs!==e&&(lr(),gs=e)}function fh(){$t||Io(It);for(var e,t=$t.split(""),n=[],i=ar.nextValue();t.length>0;)i=ar.nextValue(),e=Math.floor(i*t.length),n.push(t.splice(e,1)[0]);return n.join("")}function Po(){return on||(on=fh())}function dh(e){return Po()[e]}function gh(){return $t||It}var cr,_r={get:gh,characters:uh,seed:hh,lookup:dh,shuffled:Po},Bi="object"==typeof window&&(window.crypto||window.msCrypto),ph=cr=Bi&&Bi.getRandomValues?function(e){return Bi.getRandomValues(new Uint8Array(e))}:function(e){for(var t=[],n=0;n0&&(t+=Sn(kn)),t+=Sn(n)}var $h=Ch,Ah=_r;function Eh(e){return!(!e||"string"!=typeof e||e.length<6)&&!new RegExp("[^"+Ah.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(e)}var Lh=Eh;!function(e){var t=_r,n=$h,i=Lh,r=0;function o(){return n(r)}e.exports=o,e.exports.generate=o,e.exports.seed=function(n){return t.seed(n),e.exports},e.exports.worker=function(t){return r=t,e.exports},e.exports.characters=function(e){return void 0!==e&&t.characters(e),t.shuffled()},e.exports.isValid=i}(oh),sh.exports=or;const Te=fi(sr),ii=se;function _h({title:e,titleId:t,...n},i){return ii.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":t},n),e?ii.createElement("title",{id:t},e):null,ii.createElement("path",{fillRule:"evenodd",d:"M2.625 6.75a1.125 1.125 0 112.25 0 1.125 1.125 0 01-2.25 0zm4.875 0A.75.75 0 018.25 6h12a.75.75 0 010 1.5h-12a.75.75 0 01-.75-.75zM2.625 12a1.125 1.125 0 112.25 0 1.125 1.125 0 01-2.25 0zM7.5 12a.75.75 0 01.75-.75h12a.75.75 0 010 1.5h-12A.75.75 0 017.5 12zm-4.875 5.25a1.125 1.125 0 112.25 0 1.125 1.125 0 01-2.25 0zm4.875 0a.75.75 0 01.75-.75h12a.75.75 0 010 1.5h-12a.75.75 0 01-.75-.75z",clipRule:"evenodd"}))}const Rh=ii.forwardRef(_h);var Mh=Rh,Th=Mh;function Oh(e){const{lrdDocsJson:t}=e;return O.jsx(O.Fragment,{children:O.jsxs("aside",{children:[O.jsxs("h2",{className:"title pl-5 pt-2 mb-5",children:[O.jsx(Th,{className:"inline-block w-4 h-4 mr-1"}),"API List ",O.jsxs("span",{className:"text-slate-500 capitalize float-right mr-5",children:["Total ",t.length]})]}),O.jsxs("ul",{children:[t.map((e=>O.jsxs("div",{children:[null!=e.group&&""!=e.group&&0==e.group_index&&O.jsx("li",{className:"pt-5 text-slate-600",children:e.group.split("\\").pop()}),O.jsx("li",{children:O.jsxs(rh,{href:"#"+e.http_method+e.uri,offset:()=>120,onClick:()=>{window.history.pushState({},"","#"+e.http_method+e.uri)},className:"flex flex-row px-0 py-1",children:[O.jsx("span",{className:`method-${e.http_method} uppercase text-xs w-12 p-0 flex flex-row-reverse`,children:e.http_method}),O.jsx("span",{className:"flex-1 p-0 text-sm text-left break-all",children:e.uri})]})})]},Te.generate()))),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"}),O.jsx("li",{className:"bg-transparent"})]})]})})}const Fh='{\n "Content-Type": "application/json",\n "Accept": "application/json"\n}',oi=(e,t,n)=>{let i="";const r=Math.floor(e.length/t);for(let o=0;o{let o="curl";o+=`\n -X ${n}`;try{const e=JSON.parse(r);for(const[t,n]of Object.entries(e))o+=`\n -H "${t}: ${n}"`}catch{o+='\n -H "Content-Type: application/json"'}return"GET"===n||"DELETE"===n||"HEAD"===n?(o+=`\n ${e}/${t}`,o+=`\n${i}`,o):"POST"===n||"PUT"===n||"PATCH"===n?(n=>(o+=`\n ${e}/${t}`,o+=`\n -d '${n}'`,o))(i):""};function ms(e){const{rules:t,mainRule:n}=e,i=e=>{const t=e.rule,n=t.split(":");if("url"==t)return O.jsxs("div",{className:"block",children:[O.jsx(Hu,{className:"inline-block w-4 h-4"})," ",t]});if("email"==t)return O.jsxs("div",{className:"block",children:[O.jsx(Pu,{className:"inline-block w-4 h-4"})," ",t]});if(n.length<2)return O.jsx("div",{className:"",dangerouslySetInnerHTML:{__html:oi(t,50,"
")}});const i=n[0],r=n.slice(1).join(" ");return"max"==i?O.jsx("div",{className:"block badge badge-primary badge-outline mt-1 mb-1 rounded-sm",children:`<= ${r}`}):"min"==i?O.jsx("div",{className:"block badge badge-primary badge-outline mt-1 mb-1 rounded-sm",children:`>= ${r}`}):"date_format"==i?O.jsx("div",{className:"block badge badge-info badge-outline mt-1 mb-1 rounded-sm",children:`Format: ${r}`}):"regex"==i?O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"inline-block badge badge-info badge-outline mt-1 mb-1 mr-2 rounded-sm",children:"Regexp"}),O.jsxs("code",{children:["$",r]})]}):O.jsx("div",{className:"",dangerouslySetInnerHTML:{__html:oi(t,50,"
")}})};return O.jsx(O.Fragment,{children:O.jsxs("tr",{children:[O.jsxs("th",{className:"param-cell",children:[O.jsx("span",{className:"text-blue-500 pr-1",children:"¬"}),O.jsxs("code",{className:"pl-1",children:[n,n.endsWith(".*")?O.jsx(di,{className:"inline-block w-4 h-4"},Te.generate()):O.jsx("span",{},Te.generate())]}),t.map((e=>e.split("|").map((e=>"file"==e||"image"==e?O.jsx("div",{className:"block badge badge-success badge-outline ml-4 mt-1 mb-1 rounded-sm title",children:e},Te.generate()):O.jsx("span",{},Te.generate()))))),t.map((e=>e.split("|").map((e=>"required"==e?O.jsx("div",{className:"block ml-6",children:O.jsx("code",{className:"text-error font-normal",children:e})},Te.generate()):O.jsx("span",{},Te.generate()))))),t.map((e=>e.split("|").map((e=>e.startsWith("required_if")?O.jsx("div",{className:"block ml-6",children:O.jsx("code",{className:"text-red-300 font-normal",children:"required_if"})},Te.generate()):O.jsx("span",{},Te.generate())))))]}),O.jsxs("td",{children:[t.map((e=>e.split("|").map((e=>"required"==e?O.jsx("span",{},Te.generate()):"integer"==e||"string"==e||"bool"==e||"date"==e||"file"==e||"image"==e||"array"==e||"nullable"==e?O.jsx("div",{className:"capitalize text-slate-500",children:e},Te.generate()):O.jsx("span",{},Te.generate()))))),t.map((e=>e.split("|").map((e=>O.jsx("span",{},Te.generate()))))),t.map((e=>e.split("|").map((e=>"required"==e||"integer"==e||"string"==e||"bool"==e||"date"==e||"file"==e||"image"==e||"array"==e||"nullable"==e?O.jsx("span",{},Te.generate()):O.jsx("span",{children:O.jsx(i,{rule:e})},Te.generate())))))]})]})})}function Ih(e){const{lrdDocsItem:t,method:n}=e,[i,r]=se.useState(!1);return se.useEffect((()=>{const e=[];for(const[n,i]of Object.entries(t.rules)){if(0==i.length)continue;const t=i[0].split("|");(t.includes("file")||t.includes("image"))&&e.push(n)}r(e.length>0)}),[]),O.jsxs(O.Fragment,{children:[O.jsxs("h2",{className:"text-lg",id:n+t.uri,children:[O.jsx("span",{className:`badge badge-ghost rounded-none method-${n}`,children:n}),O.jsx("span",{className:"pl-5",children:t.uri})]}),O.jsxs("h3",{className:"pt-4",children:[O.jsx("span",{className:"text-sm text-slate-500",children:"REQUEST SCHEMA"}),O.jsx("br",{}),O.jsx("code",{className:"text-xs",children:i?"multipart/form-data":"application/json"})]}),Object.keys(t.path_parameters).length>0&&O.jsxs(O.Fragment,{children:[O.jsx("h3",{className:"pt-4",children:O.jsx("span",{className:"text-sm text-slate-500",children:"PATH PARAMETERS"})}),O.jsx("div",{className:"pt-4",children:O.jsx("table",{className:"table table-fixed table-compact w-full",children:O.jsx("tbody",{children:Object.keys(t.path_parameters).map((e=>O.jsx(ms,{mainRule:e,rules:t.path_parameters[e]},Te.generate())))})})})]}),O.jsxs("h3",{className:"pt-4",children:[O.jsx("span",{className:"text-sm text-slate-500",children:"POST"==n||"PUT"==n||"PATCH"==n?"REQUEST BODY PARAMETERS":"QUERY PARAMETERS"}),t.rules&&0==Object.keys(t.rules).length&&O.jsx("div",{className:"text-sm text-slate-500",children:"No Rules Defined"})]}),O.jsx("div",{className:"pt-4",children:O.jsx("table",{className:"table table-fixed table-compact w-full",children:O.jsx("tbody",{children:t.rules&&Object.keys(t.rules).map((e=>O.jsx(ms,{mainRule:e,rules:t.rules[e]},Te.generate())))})})})]})}var Gt={},Ph={get exports(){return Gt},set exports(e){Gt=e}};!function(e,t){(function(){var e=function(){return this}();!e&&typeof window<"u"&&(e=window);var t=function(e,n,i){"string"==typeof e?(2==arguments.length&&(i=n),t.modules[e]||(t.payloads[e]=i,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n,i,r=function(e,t,n){if("string"==typeof t){var i=a(e,t);if(null!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],s=0,l=t.length;sn.length)&&(t=n.length),t-=e.length;var i=n.indexOf(e,t);return-1!==i&&i===t})),String.prototype.repeat||i(String.prototype,"repeat",(function(e){for(var t="",n=this;e>0;)1&e&&(t+=n),(e>>=1)&&(n+=n);return t})),String.prototype.includes||i(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n>>0,i=arguments[1]>>0,r=i<0?Math.max(n+i,0):Math.min(i,n),o=arguments[2],s=void 0===o?n:o>>0,a=s<0?Math.max(n+s,0):Math.min(s,n);r0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isAndroid=o.indexOf("Android")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){var i=e("./useragent");t.buildDom=function e(t,n,i){if("string"==typeof t&&t){var r=document.createTextNode(t);return n&&n.appendChild(r),r}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var o=[],s=0;s"u")){if(o)if(i)s();else if(!1===i)return o.push([e,n]);if(!r){var a=i;i&&i.getRootNode?(!(a=i.getRootNode())||a==i)&&(a=document):a=document;var l=a.ownerDocument||a;if(n&&t.hasCssString(n,a))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var c=t.createElement("style");c.appendChild(l.createTextNode(e)),n&&(c.id=n),a==l&&(a=t.getDocumentHead(l)),a.insertBefore(c,a.firstChild)}}}if(t.useStrictCSP=function(e){r=e,0==e?s():o||(o=[])},t.importCssString=a,t.importCssStylsheet=function(e,n){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(n))},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=t.createElement("ace_outer"),r=i.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",i.appendChild(n);var o=e&&e.documentElement||document&&document.documentElement;if(!o)return 0;o.appendChild(i);var s=n.offsetWidth;r.overflow="scroll";var a=n.offsetWidth;return s===a&&(a=i.clientWidth),o.removeChild(i),s-a},t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!i.isWin||typeof window<"u"&&window.devicePixelRatio>=1.5,i.isChromeOS&&(t.HI_DPI=!1),typeof document<"u"){var l=document.createElement("div");t.HI_DPI&&void 0!==l.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),!i.isEdge&&typeof l.style.animationName<"u"&&(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){var i=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=i.getDocumentHead(),r=document.createElement("script");r.src=e,n.appendChild(r),r.onload=r.onreadystatechange=function(e,n){(n||!r.readyState||"loaded"==r.readyState||"complete"==r.readyState)&&(r=r.onload=r.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,n){var i={},r=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],i=this._defaultHandlers[e];if(n.length||i){("object"!=typeof t||!t)&&(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=o),n=n.slice();for(var s=0;s1&&(r=n[n.length-2]);var s=a[t+"Path"];return null==s?s=a.basePath:"/"==i&&(t=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+i+r+this.get("suffix")},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t};var l=function(t,n){return"ace/theme/textmate"==t?n(null,e("./theme/textmate")):console.error("loader is not configured")};t.setLoader=function(e){l=e},t.$loading={},t.loadModule=function(n,i){var o,s;Array.isArray(n)&&(s=n[0],n=n[1]);try{o=e(n)}catch{}if(o&&!t.$loading[n])return i&&i(o);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(i),!(t.$loading[n].length>1)){var a=function(){l(n,(function(e,i){t._emit("load.module",{name:n,module:i});var r=t.$loading[n];t.$loading[n]=null,r.forEach((function(e){e&&e(i)}))}))};if(!t.get("packaged"))return a();r.loadScript(t.moduleUrl(n,s),a),c()}};var c=function(){!a.basePath&&!a.workerPath&&!a.modePath&&!a.themePath&&!Object.keys(a.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};t.version="1.15.2"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,n){e("./lib/fixoldbrowsers");var i=e("./config");i.setLoader((function(t,n){e([t],(function(e){n(null,e)}))}));var r=function(){return this||typeof window<"u"&&window}();function o(t){if(r&&r.document){i.set("packaged",t||e.packaged||n.packaged||r.define&&(void 0).packaged);for(var o={},a="",l=document.currentScript||document._currentScript,c=(l&&l.ownerDocument||document).getElementsByTagName("script"),h=0;h1?++u>4&&(u=1):u=1,o.isIE){var s=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-l)>5;(!c||s)&&(u=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[u-1]||600),1==u&&(a=e.clientX,l=e.clientY)}if(e._clicks=u,i[r]("mousedown",e),u>4)u=0;else if(u>1)return i[r](d[u],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){h(e,"mousedown",f,s)}))};var d=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function f(e,t,n){var i=d(t);if(!o.isMac&&s){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),s.altGr){if(3==(3&i))return;s.altGr=0}if(18===n||17===n){var l="location"in t?t.location:t.keyLocation;if(17===n&&1===l)1==s[n]&&(a=t.timeStamp);else if(18===n&&3===i&&2===l){t.timeStamp-a<50&&(s.altGr=!0)}}}if((n in r.MODIFIER_KEYS&&(n=-1),!i&&13===n)&&(3===(l="location"in t?t.location:t.keyLocation)&&(e(t,i,-n),t.defaultPrevented)))return;if(o.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&e(t,i,n)}function g(){s=Object.create(null)}if(t.getModifierString=function(e){return r.KEY_MODS[d(e)]},t.addCommandKeyListener=function(e,n,i){if(o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)){var r=null;h(e,"keydown",(function(e){r=e.keyCode}),i),h(e,"keypress",(function(e){return f(n,e,r)}),i)}else{var a=null;h(e,"keydown",(function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=f(n,e,e.keyCode);return a=e.defaultPrevented,t}),i),h(e,"keypress",(function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)}),i),h(e,"keyup",(function(e){s[e.keyCode]=null}),i),s||(g(),h(window,"focus",g))}},"object"==typeof window&&window.postMessage&&!o.isOldIE){var p=1;t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-"+p++,r=function(o){o.data==i&&(t.stopPropagation(o),u(n,"message",r),e())};h(n,"message",r),n.postMessage(i,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){var i=function(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&!(this.isEnd(e,t)||this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var r={row:t+1,column:0};else if(this.start.rowDate.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=e("../clipboard"),l=r.isChrome<18,c=r.isIE,h=r.isChrome>63,u=400,d=e("../lib/keys"),f=d.KEY_MODS,g=r.isIOS,p=g?/\s/:/\n/,m=r.isMobile;t.TextInput=function(e,t){var n=o.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var v=!1,w=!1,b=!1,y=!1,x="";m||(n.style.fontSize="1px");var k=!1,S=!1,C="",$=0,A=0,L=0;try{var _=document.activeElement===n}catch{}this.setAriaOptions=function(e){e.activeDescendant?(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-autocomplete","list"),n.setAttribute("aria-activedescendant",e.activeDescendant)):(n.setAttribute("aria-haspopup","false"),n.setAttribute("aria-autocomplete","both"),n.removeAttribute("aria-activedescendant")),e.role&&n.setAttribute("role",e.role)},this.setAriaOptions({role:"textbox"}),i.addListener(n,"blur",(function(e){S||(t.onBlur(e),_=!1)}),t),i.addListener(n,"focus",(function(e){if(!S){if(_=!0,r.isEdge)try{if(!document.hasFocus())return}catch{}t.onFocus(e),r.isEdge?setTimeout(E):E()}}),t),this.$focusScroll=!1,this.focus=function(){if(x||h||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch{return}var i=[];if(t)for(var r=n.parentElement;r&&1==r.nodeType;)i.push(r),r.setAttribute("ace_nocontext",!0),r=!r.parentElement&&r.getRootNode?r.getRootNode().host:r.parentElement;n.focus({preventScroll:!0}),t&&i.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return _},t.on("beforeEndOperation",(function(){var e=t.curOp,i=e&&e.command&&e.command.name;if("insertstring"!=i){var r=i&&(e.docChanged||e.selectionChanged);b&&r&&(C=n.value="",B()),E()}}));var E=g?function(e){if(_&&(!v||e)&&!y){e||(e="");var i="\n ab"+e+"cde fg\n";i!=n.value&&(n.value=C=i);var r=4+(e.length||(t.selection.isEmpty()?0:1));(4!=$||A!=r)&&n.setSelectionRange(4,r),$=4,A=r}}:function(){if(!b&&!y&&(_||R)){b=!0;var e=0,i=0,r="";if(t.session){var o=t.selection,s=o.getRange(),a=o.cursor.row;if(e=s.start.column,i=s.end.column,r=t.session.getLine(a),s.start.row!=a){var l=t.session.getLine(a-1);e=s.start.rowa+1?c.length:i,i+=r.length+1,r=r+"\n"+c}else m&&a>0&&(r="\n"+r,i+=1,e+=1);r.length>u&&(e0&&C[d]==e[d];)d++,a--;for(c=c.slice(d),d=1;l>0&&C.length-d>$-1&&C[C.length-d]==e[e.length-d];)d++,l--;h-=d-1,u-=d-1;var f=c.length-d+1;if(f<0&&(a=-f,f=0),c=c.slice(0,f),!(i||c||h||a||l||u))return"";y=!0;var g=!1;return r.isAndroid&&". "==c&&(c=" ",g=!0),c&&!a&&!l&&!h&&!u||k?t.onTextInput(c):t.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:h,restoreEnd:u}),y=!1,C=e,$=o,A=s,L=u,g?"\n":c},O=function(e){if(b)return j();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var i=n.value,r=T(i,!0);(i.length>500||p.test(r)||m&&$<1&&$==A)&&E()},F=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!l){var r=c||n?"Text":"text/plain";try{return t?!1!==i.setData(r,t):i.getData(r)}catch(e){if(!n)return F(e,t,!0)}}},I=function(e,r){var o=t.getCopyText();if(!o)return i.preventDefault(e);F(e,o)?(g&&(E(o),v=o,setTimeout((function(){v=!1}),10)),r?t.onCut():t.onCopy(),i.preventDefault(e)):(v=!0,n.value=o,n.select(),setTimeout((function(){v=!1,E(),r?t.onCut():t.onCopy()})))},N=function(e){I(e,!0)},D=function(e){I(e,!1)},P=function(e){var o=F(e);a.pasteCancelled()||("string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout(E),i.preventDefault(e)):(n.value="",w=!0))};i.addCommandKeyListener(n,t.onCommandKey.bind(t),t),i.addListener(n,"select",(function(e){b||(v?v=!1:function(e){return 0===e.selectionStart&&e.selectionEnd>=C.length&&e.value===C&&C&&e.selectionEnd!==A}(n)?(t.selectAll(),E()):m&&n.selectionStart!=$&&E())}),t),i.addListener(n,"input",O,t),i.addListener(n,"cut",N,t),i.addListener(n,"copy",D,t),i.addListener(n,"paste",P,t),(!("oncut"in n)||!("oncopy"in n)||!("onpaste"in n))&&i.addListener(e,"keydown",(function(e){if((!r.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:D(e);break;case 86:P(e);break;case 88:N(e)}}),t);var j=function(){if(b&&t.onCompositionUpdate&&!t.$readOnly){if(k)return H();if(b.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;T(e),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+A-b.selectionStart+L)}}},B=function(e){!t.onCompositionEnd||t.$readOnly||(b=!1,t.onCompositionEnd(),t.off("mousedown",H),e&&O())};function H(){S=!0,n.blur(),n.focus(),S=!1}var W,z=s.delayedCall(j,50).schedule.bind(null,null);function V(){clearTimeout(W),W=setTimeout((function(){x&&(n.style.cssText=x,x=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}i.addListener(n,"compositionstart",(function(e){if(!b&&t.onCompositionStart&&!t.$readOnly&&(b={},!k)){e.data&&(b.useTextareaForIME=!1),setTimeout(j,0),t._signal("compositionStart"),t.on("mousedown",H);var i=t.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,b.markerRange=i,b.selectionStart=$,t.onCompositionStart(b),b.useTextareaForIME?(C=n.value="",$=0,A=0):(n.msGetInputContext&&(b.context=n.msGetInputContext()),n.getInputContext&&(b.context=n.getInputContext()))}}),t),i.addListener(n,"compositionupdate",j,t),i.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.lengthA&&"\n"==C[o]?s=d.end:i<$&&" "==C[i-1]?(s=d.left,a=f.option):i<$||i==$&&A!=$&&i==o?s=d.left:o>A&&C.slice(0,o).split("\n").length>2?s=d.down:o>A&&" "==C[o-1]?(s=d.right,a=f.option):(o>A||o==A&&A!=$&&i==o)&&(s=d.right),i!==o&&(a|=f.shift),s){if(!t.onCommandKey({},a,s)&&t.commands){s=d.keyCodeToString(s);var l=t.commands.findKeyCommand(a,s);l&&t.execCommand(l)}$=i,A=o,E("")}}};document.addEventListener("selectionchange",o),t.on("destroy",(function(){document.removeEventListener("selectionchange",o)}))}(0,t,n),this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}},t.$setUserAgentForTests=function(e,t){m=e,g=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/useragent");function r(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function o(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,o=e.getButton();return 0!==o?((r.getSelectionRange().isEmpty()||1==o)&&r.selection.moveToPosition(n),void(2==o&&(r.textInput.onContextMenu(e.domEvent),i.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var r=o(this.$clickSelection,n);n=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[e](i.row,i.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==s&&a<=0)t=this.$clickSelection.end,(r.end.row!=i.row||r.end.column!=i.column)&&(i=r.start);else if(1==a&&s>=0)t=this.$clickSelection.start,(r.start.row!=i.row||r.start.column!=i.column)&&(i=r.end);else if(-1==s&&1==a)i=r.end,t=r.start;else{var l=o(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},this.focusWait=function(){var e=function(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>0||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=e.domEvent.timeStamp,r=i-n.t,o=r?e.wheelX/r:n.vx,s=r?e.wheelY/r:n.vy;r<550&&(o=(o+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(o/s),l=!1;if(a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l)n.allowed=i;else if(i-n.allowed<550){Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0}if(n.t=i,n.vx=o,n.vy=s,l)return t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}}}).call(r.prototype),t.DefaultHandlers=r})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){e("./lib/oop");var i=e("./lib/dom"),r="ace_tooltip";function o(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(o.prototype),t.Tooltip=o})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event"),s=e("../tooltip").Tooltip;function a(e){s.call(this,e)}r.inherits(a,s),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();(e+=15)+r>n&&(e-=e+r-n),(t+=15)+o>i&&(t-=20+o),s.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,n,r,s=e.editor,l=s.renderer.$gutterLayer,c=new a(s.container);function h(){t&&(t=clearTimeout(t)),r&&(c.hide(),r=null,s._signal("hideGutterTooltip",c),s.off("mousewheel",h))}function u(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(s.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,i=s.session.selection;if(t.getShiftKey())i.selectTo(n,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(o){var a=o.domEvent.target||o.domEvent.srcElement;if(i.hasCssClass(a,"ace_fold-widget"))return h();r&&e.$tooltipFollowsMouse&&u(o),n=o,!t&&(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,i=l.$annotations[t];if(!i)return h();if(t==s.session.getLength()){var o=s.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(o>s.session.documentToScreenRow(a.row,a.column))return h()}if(r!=i){r=i.text.join("
"),c.setHtml(r);var d=i.className;if(d&&c.setClassName(d.trim()),c.show(),s._signal("showGutterTooltip",c),s.on("mousewheel",h),e.$tooltipFollowsMouse)u(n);else{var f=n.domEvent.target.getBoundingClientRect(),g=c.getElement().style;g.left=f.right+"px",g.top=f.bottom+"px"}}}():h()}),50))})),o.addListener(s.renderer.$gutter,"mouseout",(function(e){n=null,r&&!t&&(t=setTimeout((function(){t=null,h()}),50))}),s),s.on("changeSession",h)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/dom"),r=e("../lib/event"),o=e("../lib/useragent");function s(e){var t=e.editor,n=i.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ";["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var s,l,c,h,u,d,f,g,p,m,v,w=t.container,b=0;function y(){var e=d;(function(e,n){var i=Date.now(),r=!n||e.row!=n.row,o=!n||e.column!=n.column;!m||r||o?(t.moveCursorToPosition(e),m=i,v={x:l,y:c}):a(v.x,v.y,l,c)>5?m=null:i-m>=200&&(t.renderer.scrollCursorIntoView(),m=null)})(d=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var i=Date.now(),r=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,s=t.renderer.scroller.getBoundingClientRect(),a={x:{left:l-s.left,right:s.right-l},y:{top:c-s.top,bottom:s.bottom-c}},h=Math.min(a.x.left,a.x.right),u=Math.min(a.y.top,a.y.bottom),d={row:e.row,column:e.column};h/o<=2&&(d.column+=a.x.left=200&&t.renderer.scrollCursorIntoView(d):p=i:p=null}(d,e)}function x(){u=t.selection.toOrientedRange(),s=t.session.addMarker(u,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(h),y(),h=setInterval(y,20),b=0,r.addListener(document,"mousemove",C)}function k(){clearInterval(h),t.session.removeMarker(s),s=null,t.selection.fromOrientedRange(u),t.isFocused()&&!g&&t.$resetCursorStyle(),u=null,d=null,b=0,p=null,m=null,r.removeListener(document,"mousemove",C)}this.onDragStart=function(e){if(this.cancelDrag||!w.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(e)}),0),e.preventDefault()}u=t.getSelectionRange();var r=e.dataTransfer;r.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),r.setDragImage&&r.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),r.clearData(),r.setData("Text",t.session.getTextRange()),g=!0,this.setState("drag")},this.onDragEnd=function(e){if(w.draggable=!1,g=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;!f&&"move"==n&&t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&$(e.dataTransfer))return l=e.clientX,c=e.clientY,s||x(),b++,e.dataTransfer.dropEffect=f=A(e),r.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&$(e.dataTransfer))return l=e.clientX,c=e.clientY,s||(x(),b++),null!==S&&(S=null),e.dataTransfer.dropEffect=f=A(e),r.preventDefault(e)},this.onDragLeave=function(e){if(--b<=0&&s)return k(),f=null,r.preventDefault(e)},this.onDrop=function(e){if(d){var n=e.dataTransfer;if(g)switch(f){case"move":u=u.contains(d.row,d.column)?{start:d,end:d}:t.moveText(u,d);break;case"copy":u=t.moveText(u,d,!0)}else{var i=n.getData("Text");u={start:d,end:t.session.insert(d,i)},t.focus(),f=null}return k(),r.preventDefault(e)}},r.addListener(w,"dragstart",this.onDragStart.bind(e),t),r.addListener(w,"dragend",this.onDragEnd.bind(e),t),r.addListener(w,"dragenter",this.onDragEnter.bind(e),t),r.addListener(w,"dragover",this.onDragOver.bind(e),t),r.addListener(w,"dragleave",this.onDragLeave.bind(e),t),r.addListener(w,"drop",this.onDrop.bind(e),t);var S=null;function C(){null==S&&(S=setTimeout((function(){null!=S&&s&&k()}),20))}function $(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function A(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch{}var r="none";return n&&t.indexOf(i)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?r="move":t.indexOf(i)>=0&&(r="copy"),r}}function a(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in r&&(r.unselectable="on"),t.getDragDelay()){if(o.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(s.prototype),t.DragdropHandler=s})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){var i=e("./mouse_event").MouseEvent,r=e("../lib/event"),o=e("../lib/dom");t.addTouchListeners=function(e,t){var n,s,a,l,c,h,u,d,f,g="scroll",p=0,m=0,v=0,w=0;function b(){var e=window.navigator&&window.navigator.clipboard,n=!1,i=function(i){var r=i.target.getAttribute("action");if("more"==r||!n)return n=!n,function(){var i=t.getCopyText(),r=t.session.getUndoManager().hasUndo();f.replaceChild(o.buildDom(n?["span",!i&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],i&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],i&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],r&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),f.firstChild)}();"paste"==r?e.readText().then((function(e){t.execCommand(r,e)})):r&&(("cut"==r||"copy"==r)&&(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(r)),f.firstChild.style.display="none",n=!1,"openCommandPallete"!=r&&t.focus()};f=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){g="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),i(e)},onclick:i},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function y(){f||b();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),i=t.renderer.textToScreenCoordinates(0,0).pageX,r=t.renderer.scrollLeft,o=t.container.getBoundingClientRect();f.style.top=n.pageY-o.top-3+"px",n.pageX-o.left1)return clearTimeout(c),c=null,a=-1,void(g="zoom");d=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,h=t.renderer.layerConfig.lineHeight,f=e.timeStamp;l=f;var b=r[0],y=b.clientX,x=b.clientY;Math.abs(n-y)+Math.abs(s-x)>o&&(a=-1),n=e.clientX=y,s=e.clientY=x,v=w=0;var S=new i(e,t);if(u=S.getDocumentPosition(),f-a<500&&1==r.length&&!p)m++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(u);var e=m>=2?t.selection.getLineRange(u.row):t.session.getBracketRange(u);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),g="wait"}();else{m=0;var C=t.selection.cursor,$=t.selection.isEmpty()?C:t.selection.anchor,A=t.renderer.$cursorLayer.getPixelPosition(C,!0),L=t.renderer.$cursorLayer.getPixelPosition($,!0),_=t.renderer.scroller.getBoundingClientRect(),E=t.renderer.layerConfig.offset,M=t.renderer.scrollLeft,R=function(e,t){return(e/=h)*e+(t=t/o-.75)*t};if(e.clientX<_.left)return void(g="zoom");var T=R(e.clientX-_.left-A.left+M,e.clientY-_.top-A.top+E),O=R(e.clientX-_.left-L.left+M,e.clientY-_.top-L.top+E);T<3.5&&O<3.5&&(g=T>O?"cursor":"anchor"),g=O<3.5?"anchor":T<3.5?"cursor":"scroll",c=setTimeout(k,450)}a=f}),t),r.addListener(e,"touchend",(function(e){d=t.$mouseHandler.isMousePressed=!1,h&&clearInterval(h),"zoom"==g?(g="",p=0):c?(t.selection.moveToPosition(u),p=0,y()):"scroll"==g?(p+=60,h=setInterval((function(){p--<=0&&(clearInterval(h),h=null),Math.abs(v)<.01&&(v=0),Math.abs(w)<.01&&(w=0),p<20&&(v*=.9),p<20&&(w*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*w),e==t.session.getScrollTop()&&(p=0)}),10),x()):y(),clearTimeout(c),c=null}),t),r.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var r=e.touches;if(!(r.length>1||"zoom"==g)){var o=r[0],a=n-o.clientX,h=s-o.clientY;if("wait"==g){if(!(a*a+h*h>4))return e.preventDefault();g="cursor"}n=o.clientX,s=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var u=e.timeStamp,d=u-l;if(l=u,"scroll"==g){var f=new i(e,t);f.speed=1,f.wheelX=a,f.wheelY=h,10*Math.abs(a)=e){for(o=u+1;o=e;)o++;for(a=u,l=o-1;a=t.length||(l=n[r-1])!=d&&l!=f||(c=t[r+1])!=d&&c!=f?g:(o&&(c=f),c==l?c:g);case y:return(l=r>0?n[r-1]:p)==d&&r+10&&n[r-1]==d)return d;if(o)return g;for(M=r+1,E=t.length;M=1425&&T<=2303||64286==T;if(l=t[M],O&&(l==u||l==v))return u}return r<1||(l=t[r-1])==p?g:n[r-1];case p:return o=!1,s=!0,i;case m:return a=!0,g;case S:case C:case A:case L:case $:o=!1;case _:return g}}function O(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?h:E[t]:5==n?/[\u0591-\u05f4]/.test(e)?u:h:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?k:/[\u0660-\u0669\u066b-\u066c]/.test(e)?f:1642==t?x:/[\u06f0-\u06f9]/.test(e)?d:v:32==n&&t<=8287?M[255&t]:254==n&&t>=65136?v:g}t.L=h,t.R=u,t.EN=d,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,n,h){if(e.length<2)return{};var d=e.split(""),b=new Array(d.length),y=new Array(d.length),x=[];i=h?1:0,function(e,t,n,h){var u=i?c:l,d=null,f=null,g=null,v=0,b=null,y=-1,x=null,k=null,S=[];if(!h)for(x=0,h=[];x0)if(16==b){for(x=y;x-1){for(x=y;x=0&&h[C]==w;C--)t[C]=i}}(d,x,d.length,n);for(var k=0;kv&&n[k]0&&"ل"===d[k-1]&&/\u0622|\u0623|\u0625|\u0627/.test(d[k])&&(x[k-1]=x[k]=t.R_H,k++);d[d.length-1]===t.DOT&&(x[d.length-1]=t.B),"‫"===d[0]&&(x[0]=t.RLE);for(k=0;k=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,r=i.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&o[r]%2!=0&&r++;for(var a=0;at&&o[r]%2==0&&(s+=this.charWidths[o[r]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},this.getSelections=function(e,t){var n,i=this.bidiMap,r=i.bidiLevels,o=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,h=!1,u=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,f=0;f=a&&dn+o/2;){if(n+=o,i===r.length-1){o=0;break}o=this.charWidths[r[++i]]}return i>0&&r[i-1]%2!=0&&r[i]%2==0?(e0&&r[i-1]%2==0&&r[i]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===r.length-1&&0===o&&r[i-1]%2==0||!this.isRtlDir&&0===i&&r[i]%2!=0?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&r[i-1]%2!=0&&0!==o&&i--,t=this.bidiMap.logicalFromVisual[i]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(s.prototype),t.BidiHandler=s})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),!t.$isEmpty&&!t.$silent&&t._emit("changeSelection"),!t.$keepDesiredColumnOnChange&&e.old.column!=e.value.column&&(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,!t.$isEmpty&&!t.$silent&&t._emit("changeSelection")}))};(function(){i.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.setSelectionAnchor=this.setAnchor,this.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionAnchor=this.getAnchor,this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(n.row,n.column,i.row,i.column)},this.$setSelection=function(e,t,n,i){if(!this.$silent){var r=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||o)&&this._emit("changeSelection")}},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(typeof t>"u"){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===t?new s(i,0,n,this.session.getLine(n).length):new s(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,r=e.column+t;return n<0&&(i=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,r).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,t,1);if(!r)return this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length?(this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(r.lastIndex=0;(t=e[n])&&!r.test(t);)if(r.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),s=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];e<0?e-=r.rowsAbove||0:e>0&&(e+=r.rowCount-(r.rowsAbove||0))}var o=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(r.charAt(t))&&r.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch{return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){var i=e("./config"),r=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],r=0,o=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l1?this.$applyToken:c.token),u>1&&(/\\\d/.test(c.regex)?h=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+r+1)})):(u=1,h=this.removeCapturingGroups(c.regex)),!c.splitRegex&&"string"!=typeof c.token&&a.push(c)),o[r]=l,r+=u,i.push(h),c.onMatch||(c.onMatch=null)}}i.length||(o[0]=0,i.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)}),this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){r=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var i=[],r=0,o=n.length;rh){var v=e.substring(h,m-p.length);d.type==f?d.value+=v:(d.type&&c.push(d),d={type:f,value:v})}for(var w=0;wr){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});h1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},this.reportError=i.reportError}).call(o.prototype),t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){var i=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],r=0;r=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)}}).call(r.prototype),t.TokenIterator=r})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){var i,r=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],h={},u={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,h.rangeCount!=e.multiSelect.rangeCount&&(h={rangeCount:e.multiSelect.rangeCount})),h[t])return i=h[t];i=h[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(e,t,n,i){var r=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}},g=function(e){this.add("braces","insertion",(function(t,n,r,o,s){var l=r.getCursorPosition(),c=o.doc.getLine(l.row);if("{"==s){d(r);var h=r.getSelectionRange(),u=o.doc.getTextRange(h);if(""!==u&&"{"!==u&&r.getWrapBehavioursEnabled())return f(h,u,"{","}");if(g.isSaneInsertion(r,o))return/[\]\}\)]/.test(c[l.column])||r.inMultiSelectMode||e&&e.braces?(g.recordAutoInsert(r,o,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(r,o,"{"),{text:"{",selection:[1,1]})}else if("}"==s){if(d(r),"}"==c.substring(l.column,l.column+1))if(null!==o.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&g.isAutoInsertedClosing(l,c,s))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==s||"\r\n"==s){d(r);var p="";if(g.isMaybeInsertedClosing(l,c)&&(p=a.stringRepeat("}",i.maybeInsertedBrackets),g.clearMaybeInsertedClosing()),"}"===c.substring(l.column,l.column+1)){var m=o.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!m)return null;var v=this.$getIndent(o.getLine(m.row))}else{if(!p)return void g.clearMaybeInsertedClosing();v=this.$getIndent(c)}var w=v+o.getTabString();return{text:"\n"+w+"\n"+v+p,selection:[1,w.length,1,w.length]}}g.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){if(d(n),"}"==r.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,n,i,r){if("("==r){d(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return f(o,s,"(",")");if(g.isSaneInsertion(n,i))return g.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==r){d(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if(")"==l.substring(a.column,a.column+1))if(null!==i.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&g.isAutoInsertedClosing(a,l,r))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o&&(d(n),")"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("brackets","insertion",(function(e,t,n,i,r){if("["==r){d(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return f(o,s,"[","]");if(g.isSaneInsertion(n,i))return g.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){d(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if("]"==l.substring(a.column,a.column+1))if(null!==i.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&g.isAutoInsertedClosing(a,l,r))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o&&(d(n),"]"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("string_dquotes","insertion",(function(e,t,n,i,r){var o=i.$mode.$quotes||u;if(1==r.length&&o[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;d(n);var s=r,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(""!==l&&(1!=l.length||!o[l])&&n.getWrapBehavioursEnabled())return f(a,l,s,s);if(!l){var c=n.getCursorPosition(),h=i.doc.getLine(c.row),g=h.substring(c.column-1,c.column),p=h.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==g&&m&&/escape/.test(m.type))return null;var w,b=m&&/string|escape/.test(m.type),y=!v||/string|escape/.test(v.type);if(p==s)(w=b!==y)&&/string\.end/.test(v.type)&&(w=!1);else{if(b&&!y||b&&y)return null;var x=i.$mode.tokenRe;x.lastIndex=0;var k=x.test(g);x.lastIndex=0;var S=x.test(g);if(k||S||p&&!/[\s;,.})\]\\]/.test(p))return null;var C=h[c.column-2];if(g==s&&(C==s||x.test(C)))return null;w=!0}return{text:w?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,i,r){var o=i.$mode.$quotes||u,s=i.doc.getTextRange(r);if(!r.isMultiLine()&&o.hasOwnProperty(s)&&(d(n),i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==s))return r.end.column++,r}))};g.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new s(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",l)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var r=new s(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",c)},g.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},g.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,o,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=r.row,i.autoInsertedLineEnd=n+o.substr(r.column),i.autoInsertedBrackets++},g.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,o)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=r.row,i.maybeInsertedLineStart=o.substr(0,r.column)+n,i.maybeInsertedLineEnd=o.substr(r.column),i.maybeInsertedBrackets++},g.isAutoInsertedClosing=function(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.column)==i.maybeInsertedLineStart},g.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(g,o),t.CstyleBehaviour=g})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],r=0,o=[],s=0;s2?i%c!=c-1:i%c==0}}else{if(!this.blockComment)return!1;d=this.blockComment.start;var w=this.blockComment.end,b=(u=new RegExp("^(\\s*)(?:"+l.escapeRegExp(d)+")"),new RegExp("(?:"+l.escapeRegExp(w)+")\\s*$"));p=function(e,t){m(e,t)||(!o||/\S/.test(e))&&(r.insertInLine({row:t,column:e.length},w),r.insertInLine({row:t,column:a},d))},f=function(e,t){var n;(n=e.match(b))&&r.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(u))&&r.removeInLine(t,n[1].length,n[0].length)},m=function(e,n){if(u.test(e))return!0;for(var i=t.getTokens(n),r=0;re.length&&(x=e.length)})),a==1/0&&(a=x,o=!1,s=!1),h&&a%c!=0&&(a=Math.floor(a/c)*c),y(s?f:p)},this.toggleBlockComment=function(e,t,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o=(p=new c(t,i.row,i.column)).getCurrentToken();t.selection;var s,a,l=t.selection.toOrientedRange();if(o&&/comment/.test(o.type)){for(var u,d;o&&/comment/.test(o.type);){if(-1!=(m=o.value.indexOf(r.start))){var f=p.getCurrentTokenRow(),g=p.getCurrentTokenColumn()+m;u=new h(f,g,f,g+r.start.length);break}o=p.stepBackward()}var p;for(o=(p=new c(t,i.row,i.column)).getCurrentToken();o&&/comment/.test(o.type);){var m;if(-1!=(m=o.value.indexOf(r.end))){f=p.getCurrentTokenRow(),g=p.getCurrentTokenColumn()+m;d=new h(f,g,f,g+r.end.length);break}o=p.stepForward()}d&&t.remove(d),u&&(t.remove(u),s=u.start.row,a=-r.start.length)}else a=r.start.length,s=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);l.start.row==s&&(l.start.column+=a),l.end.row==s&&(l.end.column+=a),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],r=n.prototype.$id,o=i.$modes[r];o||(i.$modes[r]=o=new n),i.$modes[t]||(i.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t"u"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var i=n?e.column<=t.column:e.columnthis.row)){var n=function(t,n,i){var r="insert"==t.action,o=(r?1:-1)*(t.end.row-t.start.row),s=(r?1:-1)*(t.end.column-t.start.column),a=t.start,l=r?a:t.end;return e(n,a,i)?{row:n.row,column:n.column}:e(l,n,!i)?{row:n.row+o,column:n.column+(n.row==l.row?s:0)}:{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:r,value:i})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(o.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){var i=e("./lib/oop"),r=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){i.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var i=this.getLine(e);return null==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,i=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(r(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),o<=i&&n.fireUpdateEvent(o,i)}}};(function(){i.implement(this,r),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens},this.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()}}).call(o.prototype),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){var i=e("./lib/lang");e("./lib/oop");var r=e("./range").Range,o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l={},c=s;c<=a;c++){var h=this.cache[c];null==h&&((h=i.getMatchOffsets(n.getLine(c),this.regExp)).length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map((function(e){return new r(c,e.offset,c,e.offset+e.length)})),this.cache[c]=h.length?h:"");for(var u=h.length;u--;){var d=h[u].toScreenRange(n),f=d.toString();l[f]||(l[f]=!0,t.drawSingleLineMarker(e,d,this.clazz,o))}}}}).call(o.prototype),t.SearchHighlight=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../range").Range;function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,r,o=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l0)){var l=i(e,s.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,r=(n=n.sort((function(e,t){return i(e.start,t.start)})))[0],o=1;o=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=i)break}if("insert"==e.action)for(var l=r-i,c=-t.column+n.column;si)break;if(h.start.row==i&&h.start.column>=t.column&&(h.start.column==t.column&&this.$bias<=0||(h.start.column+=c,h.start.row+=l)),h.end.row==i&&h.end.column>=t.column){if(h.end.column==t.column&&this.$bias<0)continue;h.end.column==t.column&&c>0&&sh.start.column&&h.end.column==o[s+1].start.column&&(h.end.column-=c),h.end.column+=c,h.end.row+=l}}else for(l=i-r,c=t.column-n.column;sr)break;h.end.rowt.column)&&(h.end.column=t.column,h.end.row=t.row):(h.end.column+=c,h.end.row+=l):h.end.row>r&&(h.end.row+=l),h.start.rowt.column)&&(h.start.column=t.column,h.start.row=t.row):(h.start.column+=c,h.start.row+=l):h.start.row>r&&(h.start.row+=l)}if(0!=l&&s=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,r=0;r=t){a=e?i-=t-a:i=0);break}s>=e&&(i-=a>=e?s-a:s-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,i=this.$foldData,s=!1;e instanceof o?n=e:(n=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,h=n.end.column,u=this.getFoldAt(a,l,1),d=this.getFoldAt(c,h,-1);if(u&&d==u)return u.addSubFold(n);u&&!u.range.isStart(a,l)&&this.removeFold(u),d&&!d.range.isEnd(c,h)&&this.removeFold(d);var f=this.getFoldsInRange(n.range);f.length>0&&(this.removeFolds(f),n.collapseChildren||f.forEach((function(e){n.addSubFold(e)})));for(var g=0;g0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,r;if(null==e)n=new i(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new i(e,0,e,this.getLine(e).length);else if("row"in e)n=i.fromPoints(e,e);else{if(Array.isArray(e))return r=[],e.forEach((function(e){r=r.concat(this.unfold(e))}),this),r;n=e}for(var o=r=this.getFoldsInRangeList(n);1==r.length&&i.comparePoints(r[0].start,n.start)<0&&i.comparePoints(r[0].end,n.end)>0;)this.expandFolds(r),r=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(r):this.expandFolds(r),o.length)return o},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,r){null==i&&(i=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,s="";return e.walk((function(e,t,n,a){if(!(th)break}while(o&&l.test(o.type)&&!/^comment.start/.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn(),/^comment.end/.test(o.type)||(c.end.column+=o.value.length-2),c}},this.foldAll=function(e,t,n,i){null==n&&(n=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength();for(var o=e=e||0;o=e&&(o=s.end.row,s.collapseChildren=n,this.addFold("...",s))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),i=0;i=0;){var o=n[r];if(null==o&&(o=n[r]=this.getFoldWidget(r)),"start"==o){var s=this.getFoldWidgetRange(r);if(i||(i=s),s&&s.end.row>=e)break}r--}return{range:-1!==r&&s,firstRange:i}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),r="end"===n?-1:1,o=this.getFoldAt(e,-1===r?0:i.length,r);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&((o=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(o.range)))return this.removeFold(o),o;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange){t=n.start.row;var r=this.getFoldAt(t,this.getLine(t).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){var i=e("../token_iterator").TokenIterator,r=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,o=n.charAt(e.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=r.fromPoints(e,a),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=r.fromPoints(a,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),i=/([\(\[\{])|([\)\]\}])/,o=!t&&n.charAt(e.column-1),s=o&&o.match(i);if(s||(o=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(i)),!s)return null;var a=new r(e.row,e.column-1,e.row,e.column),l=s[1]?this.$findClosingBracket(s[1],e):this.$findOpeningBracket(s[2],e);return l?[a,new r(l.row,l.column,l.row,l.column+1)]:[a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var h=c.charAt(l);if(h==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(o+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,h=c.length;l"===t.value?i=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,i=t.value,o=t.value,s=0,a=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(n=t,t=e.stepForward()){if(">"===t.value&&!c){var h=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(-1!==t.type.indexOf("tag-name")){if(o===(i=t.value))if("<"===n.value)s++;else if(""!==t.value)return;var f=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else if(o===i&&"/>"===t.value&&--s<0)f=d=u=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),h=new r(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(t&&s>=0);if(a&&h&&u&&f&&l&&d)return{openTag:new r(a.start.row,a.start.column,h.end.row,h.end.column),closeTag:new r(u.start.row,u.start.column,f.end.row,f.end.column),openTagName:l,closeTagName:d}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),i=t.value,o=0,s=e.getCurrentTokenRow(),a=e.getCurrentTokenColumn(),l=a+2,c=new r(s,a,s,l);e.stepForward();var h=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if((t=e.stepForward())&&">"===t.value){var u=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=n,s=e.getCurrentTokenRow(),l=(a=e.getCurrentTokenColumn())+t.value.length,n=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(i===t.value)if("<"===n.value){if(++o>0){var d=new r(s,a,s,l),f=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var g=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else""===t.value){for(var p=0,m=n;m;){if(-1!==m.type.indexOf("tag-name")&&m.value===i){o--;break}if("<"===m.value)break;m=e.stepBackward(),p++}for(var v=0;vn&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var r=n+i>>1,o=e[r];if(t>o)n=r+1;else{if(!(t=t);o++);return(n=i[o])?(n.index=o,n.start=r-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var r=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))r=/\s/;else r=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(r));o++}for(var s=t;se&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=t.length,l=0;ls){if((l=o.end.row+1)>=a)break;s=(o=this.$foldData[r++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(o.start.column+=c),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=c)),s&&o.start.row>=e.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,i),r.length){var a=e.start,l=o.start,c=(s=l.row-a.row,l.column-a.column);this.addFolds(r.map((function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=c),e.end.row==a.row&&(e.end.column+=c),e.start.row+=s,e.end.row+=s,e})))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new h(0,0,0,0),i=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var s=0;s0){var r;if((r=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=r-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var o=new h(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(o).map((function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e})),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,a),s.length&&this.addFolds(s),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)&&(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,r=e.end,o=i.row,s=r.row,a=s-o,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var h=0;if(p=this.getFoldLine(r.row)){p.addRemoveChars(r.row,r.column,i.column-r.column),p.shiftRow(-a);var u=this.getFoldLine(o);u&&u!==p&&(u.merge(p),p=u),h=c.indexOf(p)+1}for(;h=r.row&&p.shiftRow(-a)}s=o}else{var d=Array(a);d.unshift(o,0);var f=t?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,d);c=this.$foldData,h=0;if(p=this.getFoldLine(o)){var g=p.range.compareInside(i.row,i.column);0==g?(p=p.split(i.row,i.column))&&(p.shiftRow(a),p.addRemoveChars(s,0,r.column-i.column)):-1==g&&(p.addRemoveChars(o,0,r.column-i.column),p.shiftRow(a)),h=c.indexOf(p)+1}for(;h=o&&p.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(p=this.getFoldLine(o))&&p.addRemoveChars(o,i.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,s):this.$updateRowLengthCache(o,s),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,i){var r,o,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,h=n;for(i=Math.min(i,s.length-1);h<=i;)(o=this.getFoldLine(h,o))?(r=[],o.walk(function(n,i,o,a){var l;if(null!=n){(l=this.$getDisplayTokens(n,r.length))[0]=e;for(var c=1;c=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,i,r){if(0==n.length)return[];var o=[],s=n.length,a=0,l=0,c=this.$wrapAsCode,h=this.$indentedSoftWrap,u=i<=Math.max(2*r,8)||!1===h?0:Math.floor(i/2);function d(e){for(var t=e-a,i=a;ii-f;){var g=a+i-f;if(n[g-1]>=10&&n[g]>=10)d(g);else if(n[g]!=e&&n[g]!=t){for(var p=Math.max(g-(i-(i>>2)),a-1);g>p&&n[g]p&&n[g]p&&9==n[g];)g--}else for(;g>p&&n[g]<10;)g--;g>p?d(++g):(2==n[g=a+i]&&g--,d(g-f))}else{for(;g!=a-1&&n[g]!=e;g--);if(g>a){d(g);continue}for(g=a+i;g39&&s<48||s>57&&s<64?r.push(9):s>=4352&&n(s)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(e,t,i){if(0==t)return[0,0];var r,o;for(null==t&&(t=1/0),i=i||0,o=0;o=4352&&n(r)?i+=2:i+=1,!(i>t));o++);return[i,o]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){a=c[h],o=this.$docRowCache[h];var d=e>c[u-1]}else d=!u;for(var f=this.getLength()-1,g=this.getNextFoldLine(o),p=g?g.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(o))>e||o>=f);)a+=l,++o>p&&(o=g.end.row+1,p=(g=this.getNextFoldLine(o,g))?g.start.row:1/0),d&&(this.$docRowCache.push(o),this.$screenRowCache.push(a));if(g&&g.start.row<=o)i=this.getFoldDisplayLine(g),o=g.start.row;else{if(a+l<=e||o>f)return{row:f,column:this.getLine(f).length};i=this.getLine(o),g=null}var m=0,v=Math.floor(e-a);if(this.$useWrapMode){var w=this.$wrapData[o];w&&(r=w[v],v>0&&w.length&&(m=w.indent,s=w[v-1]||w[w.length-1],i=i.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,o,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,t-m)[1],this.$useWrapMode&&s>=r&&(s=r-1),g?g.idxToPosition(s):{row:o,column:s}},this.documentToScreenPosition=function(e,t){if(typeof t>"u")var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i,r=0,o=null;(i=this.getFoldAt(e,t,1))&&(e=i.start.row,t=i.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),h=l.length;if(h&&c>=0){a=l[c],r=this.$screenRowCache[c];var u=e>l[h-1]}else u=!h;for(var d=this.getNextFoldLine(a),f=d?d.start.row:1/0;a=f){if((s=d.end.row+1)>e)break;f=(d=this.getNextFoldLine(s,d))?d.start.row:1/0}else s=a+1;r+=this.getRowLength(a),a=s,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(r))}var g="";d&&a>=f?(g=this.getFoldDisplayLine(d,e,t),o=d.start.row):(g=this.getLine(e).substring(0,t),o=e);var p=0;if(this.$useWrapMode){var m=this.$wrapData[o];if(m){for(var v=0;g.length>=m[v];)r++,v++;g=g.substring(m[v-1]||0,g.length),p=v>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(r+=this.lineWidgets[a].rowsAbove),{row:r,column:p+this.$getStringScreenWidth(g)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=0,o=(t=this.$foldData[r++])?t.start.row:1/0;io&&(i=t.end.row+1,o=(t=this.$foldData[r++])?t.start.row:1/0)}else{e=this.getLength();var a=this.$foldData;for(r=0;rn);o++);return[i,o]})},this.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},this.isFullWidth=n}.call(g.prototype),e("./edit_session/folding").Folding.call(g.prototype),e("./edit_session/bracket_match").BracketMatch.call(g.prototype),s.defineOptions(g.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=g})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){var i=e("./lib/lang"),r=e("./lib/oop"),o=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach((function(e,n,r,s){return i=new o(e,n,r,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start))||(i=null,!1)})),i},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,r=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,h=r.length-c;e:for(var u=a.offset||0;u<=h;u++){for(var d=0;dp||(s.push(l=new o(u,p,u+c-1,m)),c>2&&(u=u+c-2))}}else for(var v=0;vx&&s[d].end.row==k;)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v=a;n--)if(u(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=l,a=s.row;n>=a;n--)if(u(n,Number.MAX_VALUE,e))return}};else c=function(e){var n=s.row;if(!u(n,s.column,e)){for(n+=1;n<=l;n++)if(u(n,0,e))return;if(0!=t.wrap)for(n=a,l=s.row;n<=l;n++)if(u(n,0,e))return}};if(t.$isMultiLine)var h=n.length,u=function(t,r,o){var s=i?t-h+1:t;if(!(s<0||s+h>e.getLength())){var a=e.getLine(s),l=a.search(n[0]);if(!(!i&&lr)&&o(s,l,s+h-1,u))return!0}}};else if(i)u=function(t,i,r){var o,s=e.getLine(t),a=[],l=0;for(n.lastIndex=0;o=n.exec(s);){var c=o[0].length;if(l=o.index,!c){if(l>=s.length)break;n.lastIndex=l+=1}if(o.index+c>i)break;a.push(o.index,c)}for(var h=a.length-1;h>=0;h-=2){var u=a[h-1];if(r(t,u,t,u+(c=a[h])))return!0}};else u=function(t,i,r){var o,s,a=e.getLine(t);for(n.lastIndex=i;s=n.exec(a);){var l=s[0].length;if(r(t,o=s.index,t,o+l))return!0;if(!l&&(n.lastIndex=o+=1,o>=a.length))return!1}};return{forEach:c}}}).call(s.prototype),t.Search=s})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/keys"),r=e("../lib/useragent"),o=i.KEY_MODS;function s(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function a(e,t){s.call(this,e,t),this.$singleCommand=!1}a.prototype=s.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var o=i[r];if(o==e)delete i[r];else if(Array.isArray(o)){var s=o.indexOf(e);-1!=s&&(o.splice(s,1),1==o.length&&(i[r]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(null==n&&(n=e.position),e=e[this.platform]),e){if("function"==typeof t)return this.addCommand({exec:t,bindKey:e,name:t.name||e});e.split("|").forEach((function(e){var i="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach((function(e){var t=this.parseKeys(e),n=o[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var s=this.parseKeys(e),a=o[s.hashId]+s.key;this._addCommandToBinding(i+a,t,n)}),this)}},this._addCommandToBinding=function(t,n,i){var r,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(r=o[t].indexOf(n))&&o[t].splice(r,1):o[t]=[o[t]],"number"!=typeof i&&(i=e(n));var s=o[t];for(r=0;ri)break}s.splice(r,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,s=t.length;s--;){var a=i.KEY_MODS[t[s]];if(null==a)return typeof console<"u"&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:n,hashId:o}},this.findKeyCommand=function(e,t){var n=o[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,i){if(!(i<0)){var r=o[t]+n,s=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,s=this.commandKeyBinding[e.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:s}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(s.prototype),t.HashHandler=s,t.MultiHashHandler=a})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,s=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)}))};i.inherits(s,r),function(){i.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e||t&&t.$readOnly&&!e.readOnly||0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var r={editor:t,command:e,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(s.prototype),t.CommandManager=s})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){var i=e("../lib/lang"),r=e("../config"),o=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(e){r.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){r.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(e,t){"number"==typeof t&&!isNaN(t)&&e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=r.row+1;c++){var h=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(c)));0!==h.length&&(h=" "+h),l+=h}r.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(s=e.session.doc.getLine(n.row).length>s?s+1:s,e.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,r=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;st[n].column&&n++,o.unshift(n,0),t.splice.apply(t,o),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},this.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=i.createElement("div"),e.el.textContent=e.text),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&i.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var r=this.session.lineWidgets;e.row!=n.end.row||r[n.start.row]?e.hidden=!0:r[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch{}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var r=1/0,o=0;o0&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=r;s<=o;s++){var a=i[s];if(a&&a.el){if(a.hidden){a.el.style.top=-100-(a.pixelHeight||0)+"px";continue}a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(r.prototype),t.LineWidgets=r})),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/clipboard"],(function(e,t,n){var i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=e("./lib/oop"),o=e("./lib/dom"),s=e("./lib/lang"),a=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,h=e("./mouse/fold_handler").FoldHandler,u=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,f=e("./search").Search,g=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,w=e("./config"),b=e("./token_iterator").TokenIterator,y=e("./line_widgets").LineWidgets,x=e("./clipboard"),k=function(e,t,n){this.$toDestroy=[];var i=e.getContainerElement();this.container=i,this.renderer=e,this.id="editor"+ ++k.$uid,this.commands=new m(a.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new l(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new h(this)),this.keyBinding=new u(this),this.$search=(new f).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(t||n&&n.session||new d("")),w.resetOptions(this),n&&this.setOptions(n),w._signal("editor",this)};k.$uid=0,function(){r.implement(this,p),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name||(this._signal("beforeEndOperation"),!this.curOp))return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),r=this.renderer.layerConfig;(i.start.row>=r.lastRow||i.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var o=this.selection.toJSON();this.curOp.selectionAfter=o,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(o),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;w.loadModule(["keybinding",e],(function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=e.getCursorPosition(),i=e.getKeyboardHandler(),r=i&&i.$getDirectionForHighlight&&i.$getDirectionForHighlight(e),o=t.getMatchingBracketRanges(n,r);if(!o){var s=new b(t,n.row,n.column).getCurrentToken();if(s&&/\b(?:tag-open|tag-name)/.test(s.type)){var a=t.getMatchingTags(n);a&&(o=[a.openTagName,a.closeTagName])}}if(!o&&t.$mode.getMatching&&(o=t.$mode.getMatching(e.session)),!o)return void(e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide());var l="ace_bracket";Array.isArray(o)?1==o.length&&(l="ace_error_bracket"):o=[o],2==o.length&&(0==g.comparePoints(o[0].end,o[1].start)?o=[g.fromPoints(o[0].start,o[1].end)]:0==g.comparePoints(o[0].start,o[1].end)&&(o=[g.fromPoints(o[1].start,o[0].end)])),t.$bracketHighlight={ranges:o,markerIds:o.map((function(e){return t.addMarker(e,l,"text")}))},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}}),50)}},this.focus=function(){this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&(("line"!=this.$selectionStyle||!this.selection.isMultiLine())&&(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),this.renderer.$maxLines&&1===this.session.getLength()&&!(this.renderer.$minLines>1)&&(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new g(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,i=t.end.column,r=e.getLine(t.start.row),o=r.substring(n,i);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),a=r.substring(n-1,i+1);if(s.test(a))return s}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),r=0;ra.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,h=n.getState(r.row),u=(a=n.getLine(r.row),i.checkOutdent(h,a,e));if(n.insert(r,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new g(r.row,c+o.selection[0],r.row,c+o.selection[1])):this.selection.setSelectionRange(new g(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var d=i.getNextLineIndent(h,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},d)}u&&i.autoOutdent(h,n,r.row)}},this.autoIndent=function(){var e,t,n=this.session,i=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var r=this.getSelectionRange();e=r.start.row,t=r.end.row}for(var o,s,a,l="",c="",h="",u=n.getTabString(),d=e;d<=t;d++)d>0&&(l=n.getState(d-1),c=n.getLine(d-1),h=i.getNextLineIndent(l,c,u)),o=n.getLine(d),h!==(s=i.$getIndent(o))&&(s.length>0&&(a=new g(d,0,d,s.length),n.remove(a)),h.length>0&&n.insert({row:d,column:0},h)),i.autoOutdent(l,n,d)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),!e&&!n.isEmpty()&&this.remove());((e||!this.selection.isEmpty())&&this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},this.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),r=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}r&&(t=r)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.setGhostText=function(e,t){this.session.widgetManager||(this.session.widgetManager=new y(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(e,t)},this.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,r=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var r=new g(0,0,0,0);for(i=e.first;i<=e.last;i++){var o=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new g(t,n-1,t,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(t,n);if(o){var s=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-s,l=parseFloat(o.value);l*=Math.pow(10,a),s!==o.end&&n=a&&o<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,a+i),c.selection.selectTo(e,l+i)),a=l}));for(var h,u=this.$toggleWordPairs,d=0;d=l&&s<=c&&d.match(/((?:https?|ftp):\/\/[\S]+)/)){a=d.replace(/[\s:.,'";}\]]+$/,"");break}l=c}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}return a},this.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),i=e.isBackwards();if(n.isEmpty()){var r=n.start.row;t.duplicateLines(r,r)}else{var o=i?n.start:n.end,s=t.insert(o,t.getTextRange(n),!1);n.start=o,n.end=s,e.setSelectionRange(n,i)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var n,i,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var o=r.toOrientedRange();n=this.$getSelectedRows(o),i=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(i=0),o.moveBy(i,0),r.fromOrientedRange(o)}else{var s=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,h=0;hf+1)break;f=g.last}for(h--,a=this.session.$moveLines(d,f,t?0:e),t&&-1==e&&(u=h+1);u<=h;)s[u].moveBy(a,0),u++;t||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,r=e*Math.floor(i.height/i.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(r,0)})):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new b(this.session,n.row,n.column),r=i.getCurrentToken(),o=0;r&&-1!==r.type.indexOf("tag-name")&&(r=i.stepBackward());var s=r||i.stepForward();if(s){var a,l,c=!1,h={},u=n.column-s.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;u1?h[s.value]++:"=0;--o)this.$tryReplace(n[o],e)&&i++;return this.selection.setSelectionRange(r),i},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var i=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(i)||this.$search.$options.needle)||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var r=this.$scrollAnchor;r.style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild);var o=this.on("changeSelection",(function(){i=!0})),s=this.renderer.on("beforeRender",(function(){i&&(t=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=o.top-s.offset;null!=(i=o.top>=0&&a+t.top<0||!(o.topwindow.innerHeight)&&null)&&(r.style.top=a+"px",r.style.left=o.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(i)),i=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var i=this;w.loadModule("ace/ext/prompt",(function(r){r.prompt(i,e,t,n)}))}}.call(k.prototype),w.defineOptions(k.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?S.attach(this):S.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?S.attach(this):S.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var S={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=k})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){var i=function(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!this.lastDeltas){this.lastDeltas=[];var i=this.$undoStack.length;i>this.$undoDepth-1&&this.$undoStack.splice(0,i-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}("remove"==e.action||"insert"==e.action)&&(this.$lastDelta=e),this.lastDeltas.push(e)}},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var r=n[i][0];if(r.id<=e)break;r.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?a(e):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)}}).call(i.prototype);var r=e("./range").Range,o=r.comparePoints;function s(e){return{row:e.row,column:e.column}}function a(e){if(e=e||this,Array.isArray(e))return e.map(a).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(o(t.start,e.end)>=0)d(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;d(e,t,1)}else if(n&&!i)if(o(t.start,e.end)>=0)d(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;d(e,t,-1)}else if(!n&&i)if(o(t.start,e.start)>=0)d(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;d(e,t,1)}else if(!n&&!i)if(o(t.start,e.start)>=0)d(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;d(e,t,-1)}return[t,e]}function h(e,t){for(var n=e.length;n--;)for(var i=0;i=0?d(e,t,-1):(o(e.start,t.start)<=0||d(e,r.fromPoints(t.start,e.start),-1),d(t,e,1));else if(!n&&i)o(t.start,e.end)>=0?d(t,e,-1):(o(t.start,e.start)<=0||d(t,r.fromPoints(e.start,t.start),-1),d(e,t,1));else if(!n&&!i)if(o(t.start,e.end)>=0)d(t,e,-1);else{var s,a;if(!(o(t.end,e.start)<=0))return o(e.start,t.start)<0&&(s=e,e=g(e,t.start)),o(e.end,t.end)>0&&(a=g(e,t.end)),f(t.end,e.start,e.end,-1),a&&!s&&(e.lines=a.lines,e.start=a.start,e.end=a.end,a=e),[t,s,a].filter(Boolean);d(e,t,-1)}return[t,e]}function d(e,t,n){f(e.start,t.start,t.end,n),f(e.end,t.start,t.end,n)}function f(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function g(e,t){var n=e.lines,i=e.end;e.end=s(t);var r=e.end.row-e.start.row,o=n.splice(r,n.length),a=r?t.column:t.column-e.start.column;return n.push(o[0].substring(0,a)),o[0]=o[0].substr(a),{start:s(t),end:i,lines:o,action:e.action}}function p(e,t){t=function(e){return{start:s(e.start),end:s(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var i=e[n],r=0;ro&&(l=r.end.row+1,o=(r=t.getNextFoldLine(l,r))?r.start.row:1/0),l>i){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(s=this.$lines.get(++a))?s.row=l:(s=this.$lines.createCell(l,e,this.session,c),this.$lines.push(s)),this.$renderCell(s,e,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(r=t.getLength()+i-1);var o=n?n.getWidth(t,r,e):r.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();(o+=s.left+s.right)!==this.gutterWidth&&!isNaN(o)&&(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&r&&r.start.row==t[n-1].row))break;i=t[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!t||i0;r--)this.$lines.shift();if(i>n)for(r=this.session.getFoldedRowCount(n+1,i);r>0;r--)this.$lines.pop();e.firstRowi&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var i=[],r=t,o=this.session.getNextFoldLine(r),s=o?o.start.row:1/0;r>s&&(r=o.end.row+1,s=(o=this.session.getNextFoldLine(r,o))?o.start.row:1/0),!(r>n);){var a=this.$lines.createCell(r,e,this.session,c);this.$renderCell(a,e,o,r),i.push(a),r++}return i},this.$renderCell=function(e,t,n,r){var o=e.element,s=this.session,a=o.childNodes[0],l=o.childNodes[1],c=s.$firstLineNumber,h=s.$breakpoints,u=s.$decorations,d=s.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&s.foldWidgets,g=n?n.start.row:Number.MAX_VALUE,p="ace_gutter-cell ";if(this.$highlightGutterLine&&(r==this.$cursorRow||n&&r=g&&this.$cursorRow<=n.end.row)&&(p+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),h[r]&&(p+=h[r]),u[r]&&(p+=u[r]),this.$annotations[r]&&(p+=this.$annotations[r].className),o.className!=p&&(o.className=p),f){var m=f[r];null==m&&(m=f[r]=s.getFoldWidget(r))}if(m){p="ace_fold-widget ace_"+m;"start"==m&&r==g&&rn.right-t.right?"foldWidgets":void 0}}).call(l.prototype),t.Gutter=l})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){var i=e("../range").Range,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function e(e,t,n,i){return(e?1:0)|(t?2:0)|(n?4:0)|(i?8:0)}this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var o=this.$getTop(r.start.row,e),s=this.$padding+r.start.column*e.characterWidth;i.renderer(t,r,s,o,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,r,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,r,i.clazz,e):r.isMultiLine()?"text"==i.type?this.drawTextMarker(t,r,i.clazz,e):this.drawMultiLineMarker(t,r,i.clazz,e):this.drawSingleLineMarker(t,r,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}if(-1!=this.i)for(;this.if,h==c),o,h==c?0:1,s)},this.drawMultiLineMarker=function(e,t,n,i,r){var o=this.$padding,s=i.lineHeight,a=this.$getTop(t.start.row,i),l=o+t.start.column*i.characterWidth;(r=r||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",i,null,r)):this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(r||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",i,null,r)}else{a=this.$getTop(t.end.row,i);var h=t.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+h+"px;top:"+a+"px;left:"+o+"px;"+(r||""))}if(!((s=(t.end.row-t.start.row-1)*i.lineHeight)<=0)){a=this.$getTop(t.start.row+1,i);var u=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(u?" ace_br"+u:""),"height:"+s+"px;right:0;top:"+a+"px;left:"+o+"px;"+(r||""))}},this.drawSingleLineMarker=function(e,t,n,i,r,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,i,r,o);var s=i.lineHeight,a=(t.end.column+(r||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),c=this.$padding+t.start.column*i.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(o||""))},this.drawBidiSingleLineMarker=function(e,t,n,i,r,o){var s=i.lineHeight,a=this.$getTop(t.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+s+"px;width:"+(e.width+(r||0))+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(o||""))}),this)},this.drawFullLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-o),this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))},this.drawScreenLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))}}).call(o.prototype),t.Marker=o})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=function(e){this.dom=r,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)};(function(){i.implement(this,a),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$highlightIndentGuides=!0,this.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;nh&&(a=l.end.row+1,h=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>r);){var u=o[s++];if(u){this.dom.removeChildren(u),this.$renderLine(u,a,a==h&&l),c&&(u.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var d=e.lineHeight*this.session.getRowLength(a)+"px";u.style.height!=d&&(c=!0,u.style.height=d)}a++}if(c)for(;s0;r--)this.$lines.shift();if(t.lastRow>e.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},this.$renderLinesFragment=function(e,t,n){for(var i=[],o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;o>a&&(o=s.end.row+1,a=(s=this.session.getNextFoldLine(o,s))?s.start.row:1/0),!(o>n);){var l=this.$lines.createCell(o,e,this.session),c=l.element;this.dom.removeChildren(c),r.setStyle(c.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),r.setStyle(c.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(c,o,o==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",i.push(l),o++}return i},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,i){for(var r,s=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,l=this.dom.createFragment(this.element),c=0;r=a.exec(i);){var h=r[1],u=r[2],d=r[3],f=r[4],g=r[5];if(s.showSpaces||!u){var p=c!=r.index?i.slice(c,r.index):"";if(c=r.index+r[0].length,p&&l.appendChild(this.dom.createTextNode(p,this.element)),h){var m=s.session.getScreenTabSize(t+r.index);l.appendChild(s.$tabStrings[m].cloneNode(!0)),t+=m-1}else if(u)if(s.showSpaces){(w=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",w.textContent=o.stringRepeat(s.SPACE_CHAR,u.length),l.appendChild(w)}else l.appendChild(this.com.createTextNode(u,this.element));else if(d){(w=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",w.textContent=o.stringRepeat(s.SPACE_CHAR,d.length),l.appendChild(w)}else if(f){t+=1,(w=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",w.className=s.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",w.textContent=s.showSpaces?s.SPACE_CHAR:f,l.appendChild(w)}else if(g){t+=1,(w=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",w.className="ace_cjk",w.textContent=g,l.appendChild(w)}}}if(l.appendChild(this.dom.createTextNode(c?i.slice(c):i,this.element)),this.$textToken[n.type])e.appendChild(l);else{var v="ace_"+n.type.replace(/\./g," ace_"),w=this.dom.createElement("span");"fold"==n.type&&(w.style.width=n.value.length*this.config.characterWidth+"px"),w.className=v,w.appendChild(l),e.appendChild(w)}return t+i.length},this.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);if(i<=0||i>=n)return t;if(" "==t[0]){for(var r=(i-=i%this.tabSize)/this.tabSize,o=0;or[o].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(o=t.row+1;o0)for(var i=0;i=this.$highlightIndentGuideMarker.start+1){if(i.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,t)}}else for(n=e.length-1;n>=0;n--){i=e[n];if(this.$highlightIndentGuideMarker.end&&i.row=s;)a=this.$renderToken(l,a,h,u.substring(0,s-i)),u=u.substring(s-i),i=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat(" ",n.indent),this.element)),a=0,s=n[++r]||Number.MAX_VALUE;0!=u.length&&(i+=u.length,a=this.$renderToken(l,a,h,u))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(e,t){for(var n=0,i=0;ithis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,r,o);n=this.$renderToken(e,n,r,o)}}},this.$renderOverflowMessage=function(e,t,n,i,r){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=r?"":"",e.appendChild(o)},this.$renderLine=function(e,t,n){if(!n&&0!=n&&(n=this.session.getFoldLine(t)),n)var i=this.$getFoldLineTokens(t,n);else i=this.session.getTokens(t);var r=e;if(i.length){var o=this.session.getRowSplitData(t);if(o&&o.length){this.$renderWrappedLine(e,i,o);r=e.lastChild}else{r=e;this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r)),this.$renderSimpleLine(r,i)}}else this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r));if(this.showEOL&&r){n&&(t=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(s)}},this.$getFoldLineTokens=function(e,t){var n=this.session,i=[];var r=n.getTokens(e);return t.walk((function(e,t,o,s,a){null!=e?i.push({type:"fold",value:e}):(a&&(r=n.getTokens(t)),r.length&&function(e,t,n){for(var r=0,o=0;o+e[r].value.lengthn-t&&(s=s.substring(0,n-t)),i.push({type:e[r].type,value:s}),o=t+s.length,r+=1);on?i.push({type:e[r].type,value:s.substring(0,n-o)}):i.push(e[r]),o+=s.length,r+=1}}(r,s,o))}),t.end.row,this.session.getLine(t.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(l.prototype),t.Text=l})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){var i=e("../lib/dom"),r=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)i.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||s.top<0)&&n>1)){var a=this.cursors[r++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,e,t[n],this.session):this.isCursorInView(s,e)?(i.setStyle(l,"display","block"),i.translate(a,s.left,s.top),i.setStyle(l,"width",Math.round(e.characterWidth)+"px"),i.setStyle(l,"height",e.lineHeight+"px")):i.setStyle(l,"display","none")}}for(;this.cursors.length>r;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=s,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(r.prototype),t.Cursor=r})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,a=32768,l=function(e){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){i.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(l.prototype);var c=function(e,t){l.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=r.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};i.inherits(c,l),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>a?(this.coeff=a/e,e=a):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(c.prototype);var h=function(e,t){l.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(h,l),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(h.prototype),t.ScrollBar=c,t.ScrollBarV=c,t.ScrollBarH=h,t.VScrollBar=c,t.HScrollBar=h})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter;r.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var a=function(e){this.element=r.createElement("div"),this.element.className="ace_sb"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")};(function(){i.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,this.parent=e,this.width=this.VScrollWidth,this.renderer=t,this.inner.style.width=this.element.style.width=(this.width||15)+"px",this.$minWidth=0};i.inherits(l,a),function(){this.classSuffix="-v",i.implement(this,s),this.onMouseDown=function(e,t){if("mousedown"===e&&0===o.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientY,r=t.clientY,s=this.thumbTop;o.capture(this.inner,(function(e){i=e.clientY}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollTopFromThumbTop(s+i-r);e!==n.scrollTop&&n._emit("scroll",{data:e})}}),20);return o.preventDefault(t)}var l=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(l)}),o.preventDefault(t)}},this.getHeight=function(){return this.height},this.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t>>=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},this.setInnerHeight=this.setScrollHeight=function(e,t){this.pageHeight===e&&!t||(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},this.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"}}.call(l.prototype);var c=function(e,t){a.call(this,e),this.scrollLeft=0,this.scrollWidth=0,this.height=this.HScrollHeight,this.inner.style.height=this.element.style.height=(this.height||12)+"px",this.renderer=t};i.inherits(c,a),function(){this.classSuffix="-h",i.implement(this,s),this.onMouseDown=function(e,t){if("mousedown"===e&&0===o.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientX,r=t.clientX,s=this.thumbLeft;o.capture(this.inner,(function(e){i=e.clientX}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollLeftFromThumbLeft(s+i-r);e!==n.scrollLeft&&n._emit("scroll",{data:e})}}),20);return o.preventDefault(t)}var l=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)}),o.preventDefault(t)}},this.getHeight=function(){return this.isVisible?this.height:0},this.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t>>=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},this.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},this.setInnerWidth=this.setScrollWidth=function(e,t){this.pageWidth===e&&!t||(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},this.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"}}.call(c.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){var i=e("./lib/event"),r=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(i.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(r.prototype),t.RenderLoop=r})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c=512,h="function"==typeof ResizeObserver,u=200,d=t.FontMetrics=function(e){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",c),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()};(function(){i.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=s.onIdle((function t(){e.checkForSizeChanges(),s.onIdle(t,500)}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/c};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.textContent=o.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=r.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},this.transformCoordinates=function(e,t){e&&(e=o(1/this.$getZoom(this.el),e));function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function r(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function s(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),l=s(this.els[1]),c=s(this.els[2]),h=s(this.els[3]),d=n(i(h,l),i(h,c),i(r(l,c),r(h,a))),f=o(1+d[0],i(l,a)),g=o(1+d[1],i(c,a));if(t){var p=t,m=d[0]*p[0]/u+d[1]*p[1]/u+1,v=r(o(p[0],f),o(p[1],g));return r(o(1/m/u,v),a)}var w=i(e,a),b=n(i(f,o(d[0],w)),i(g,o(d[1],w)),w);return o(u,b)}}).call(d.prototype)})),ace.define("ace/css/editor.css",["require","exports","module"],(function(e,t,n){n.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell.ace_error {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-position: 2px center;\n}\n.ace_dark .ace_gutter-cell.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n will-change: transform;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #FFF;\n background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n}\n\n.ace_folding-enabled > .ace_gutter-cell {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event_emitter").EventEmitter,s=function(e,t){this.canvas=i.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)};(function(){r.implement(this,o),this.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;e&&(this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,(e.lastRow+1)*this.lineHeightt.priority?1:0}));for(var o=this.renderer.session.$foldData,s=0;sthis.canvasHeight&&(d=this.canvasHeight-this.halfMinDecorationHeight),h=Math.round(d-this.halfMinDecorationHeight),u=Math.round(d+this.halfMinDecorationHeight)}n.fillStyle=t[i[s].type]||null,n.fillRect(0,c,this.canvasWidth,u-h)}}var f=this.renderer.session.selection.getCursor();if(f){l=this.compensateFoldRows(f.row,o),c=Math.round((f.row-l)*this.lineHeight*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,c,this.canvasWidth,2)}},this.compensateFoldRows=function(e,t){var n=0;if(t&&t.length>0)for(var i=0;it[i].start.row&&e=t[i].end.row&&(n+=t[i].end.row-t[i].start.row);return n}}).call(s.prototype),t.Decorator=s})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor.css","ace/layer/decorators","ace/lib/useragent"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./config"),s=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,c=e("./layer/cursor").Cursor,h=e("./scrollbar").HScrollBar,u=e("./scrollbar").VScrollBar,d=e("./scrollbar_custom").HScrollBar,f=e("./scrollbar_custom").VScrollBar,g=e("./renderloop").RenderLoop,p=e("./layer/font_metrics").FontMetrics,m=e("./lib/event_emitter").EventEmitter,v=e("./css/editor.css"),w=e("./layer/decorators").Decorator,b=e("./lib/useragent"),y=b.isIE;r.importCssString(v,"ace_editor.css",!1);var x=function(e,t){var n=this;this.container=e||r.createElement("div"),r.addCssClass(this.container,"ace_editor"),r.HI_DPI&&r.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==o.get("useStrictCSP")&&o.set("useStrictCSP",!1),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var i=this.$textLayer=new l(this.content);this.canvas=i.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new u(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new p(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!b.isIOS,this.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,i.implement(this,m),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),r.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(e,t,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},this.$updateCachedSize=function(e,t,n,i){i-=this.$extraHeight||0;var o=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(i&&(e||s.height!=i)&&(s.height=i,o|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(s.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(e||s.width!=n)){o|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,r.setStyle(this.scrollBarH.element.style,"left",t+"px"),r.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),r.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";r.setStyle(this.scrollBarH.element.style,"right",l),r.setStyle(this.scroller.style,"right",l),r.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(s.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return s.$dirty=!n||!i,o&&this._signal("resize",a),o},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},this.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(!this.$keepTextAreaAtCursor&&!t)return void r.translate(this.textarea,-100,0);var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var i=this.layerConfig,o=n.top,s=n.left;o-=i.offset;var a=t&&t.useTextareaForIME?this.lineHeight:y?0:1;if(o<0||o>i.height-a)return void r.translate(this.textarea,0,0);var l=1,c=this.$size.height-a;if(t)if(t.useTextareaForIME){var h=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(h)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;(s-=this.scrollLeft)>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,r.setStyle(e,"height",a+"px"),r.setStyle(e,"width",l+"px"),r.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(o,c))}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,i){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.setMargin=function(e,t,n,i){var r=this.margin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;i>0&&(this.scrollTop=i,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),r.translate(this.content,-this.scrollLeft,-n.offset);var o=n.width+2*this.$padding+"px",s=n.minHeight+"px";r.setStyle(this.content.style,"width",o),r.setStyle(this.content.style,"height",s)}return e&this.CHANGE_H_SCROLL&&(r.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e)):e&this.CHANGE_SCROLL?(this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e)):(e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),void this._signal("afterRender",e))}this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-r-2*this.$padding<0),s=this.$horizScroll!==o;s&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=c;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,i-t.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,r+2*this.$padding-t.scrollerWidth+h.right)));var u=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+c<0||this.scrollTop>h.top),d=a!==u;d&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var f,g,p=this.scrollTop%this.lineHeight,m=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-p)/this.lineHeight)),w=v+m,b=this.lineHeight;v=e.screenToDocumentRow(v,0);var y=e.getFoldLine(v);y&&(v=y.start.row),f=e.documentToScreenRow(v,0),g=e.getRowLength(v)*b,w=Math.min(e.screenToDocumentRow(w,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(w)*b+g,p=this.scrollTop-f*b;var x=0;return(this.layerConfig.width!=r||s)&&(x=this.CHANGE_H_SCROLL),(s||d)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:v,firstRowScreen:f,lastRow:w,lineHeight:b,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:p,gutterOffset:b?Math.max(0,Math.ceil((p+t.height-t.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),x},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),r=i.left,o=i.top,s=n&&n.top||0,a=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(t&&l+s>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a=1-this.scrollMargin.top||t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(o):Math.round(o);return{row:s,column:a,side:o-a>0?1:-1,offsetX:r}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=this.$blockCursor?Math.floor(o):Math.round(o),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),r)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),o=i.row*this.lineHeight;return{pageX:n.left+r-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),r.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.setGhostText=function(e,t){var n=this.session.selection.cursor,i=t||{row:n.row,column:n.column};this.removeGhostText();var r=e.split("\n");this.addToken(r[0],"ghost_text",i.row,i.column),this.$ghostText={text:e,position:{row:i.row,column:i.column}},r.length>1&&(this.$ghostTextWidget={text:r.slice(1).join("\n"),row:i.row,column:i.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},this.removeGhostText=function(){if(this.$ghostText){var e=this.$ghostText.position;this.removeExtraToken(e.row,e.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},this.addToken=function(e,t,n,i){var r=this.session;r.bgTokenizer.lines[n]=null;var o={type:t,value:e},s=r.getTokens(n);if(null==i)s.push(o);else for(var a=0,l=0;l"u")return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+r.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch{var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)}var l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,o),this.$createWorkerFromOldConfig=function(t,n,i,r,o){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)r=r||s.moduleUrl(n,"worker");else{var l=this.$normalizePath;r=r||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=a(r),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:i}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return r.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,t.push(i)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype);t.UIWorkerClient=function(e,t,n){var i=null,r=!1,a=Object.create(o),c=[],h=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),i&&(r?setTimeout(u):u())}});h.setEmitSync=function(e){r=e};var u=function(){var e=c.shift();e.command?i[e.command].apply(i,e.args):e.event&&a._signal(e.event,e.data)};return a.postMessage=function(e){h.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],(function(e){for(i=new e[n](a);c.length;)u()})),h},t.WorkerClient=l,t.createWorker=a})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){var i=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),s=function(e,t,n,i,r,o){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout((function(){s.onCursorChange()}))},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,r),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+o};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+o};this.doc.remove(new i(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var i=e("./range_list").RangeList,r=e("./range").Range,o=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var h=new(0,e("./search").Search);var u=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(i,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],o=e.column0;)v--;if(v>0)for(var w=0;i[w].isEmpty();)w++;for(var b=v;b>=w;b--)i[b].isEmpty()&&i.splice(b,1)}return i}}.call(o.prototype);var d=e("./editor").Editor;function f(e,t){return e.row==t.row&&e.column==t.column}function g(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(c.defaultCommands),function(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;function i(t){n&&(e.renderer.setMouseCursor(""),n=!1)}a.addListener(t,"keydown",(function(t){var r=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&r?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),e),a.addListener(t,"keyup",i,e),a.addListener(t,"blur",i,e)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var r=t.indexOf(i);-1!=r&&t.splice(r,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,h=(r?l:c).ranges;if(!h.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=l._eventRegistry;l._eventRegistry={};var d=new o(a);this.inVirtualSelectionMode=!0;for(var f=h.length;f--;){if(s)for(;f>0&&h[f].start.row==h[f-1].end.row;)f--;d.fromOrientedRange(h[f]),d.index=f,this.selection=a.selection=d;var g=e.exec?e.exec(this,t||{}):e(this,t||{});!i&&void 0!==g&&(i=g),d.toOrientedRange(h[f])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var p=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),p&&p.from==p.to&&this.renderer.animateScrolling(p.from),i}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;is&&(s=n.column),ih?e.insert(i,l.stringRepeat(" ",o-h)):e.remove(new r(i.row,i.column,i.row,i.column-o+h)),t.start.column=t.end.column=s,t.start.row=t.end.row=i.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var h=this.selection.getRange(),u=h.start.row,d=h.end.row,f=u==d;if(f){var g,p=this.session.getLength();do{g=this.session.getLine(d)}while(/[=:]/.test(g)&&++d0);u<0&&(u=0),d>=p&&(d=p-1)}var m=this.session.removeFullLines(u,d);m=this.$reAlignText(m,f),this.session.insert({row:u,column:0},m.join("\n")+"\n"),f||(h.start.column=0,h.end.column=m[m.length-1].length),this.selection.setRange(h)}},this.$reAlignText=function(e,t){var n,i,r,o=!0,s=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,i=t[2].length,r=t[3].length,t):(n+i+r!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),it[3].length&&(r=t[3].length),t):[e]})).map(t?c:o?s?function(e){return e[2]?a(n+i-e[2].length)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?a(n)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(n)+e[2]+a(i-e[2].length+r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=g,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){g(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var r=/\S/,o=e.getLine(t),s=o.search(r);if(-1!=s){for(var a=n||o.length,l=e.getLength(),c=t,h=t;++tc){var f=e.getLine(h).length;return new i(c,a,h,f)}}},this.openingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r+1},a=e.$findClosingBracket(t,s,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,i.fromPoints(a,s)}}).call(r.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){var i=e("../line_widgets").LineWidgets,r=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),a=s.row,l=n.widgetManager.getWidgetsAtRow(a).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():a-=t;var c,h=function(e,t,n){var i=e.getAnnotations().sort(o.comparePoints);if(i.length){var r=function(e,t,n){for(var i=0,r=e.length-1;i<=r;){var o=i+r>>1,s=n(t,e[o]);if(s>0)i=o+1;else{if(!(s<0))return o;r=o-1}}return-(i+1)}(i,{row:t,column:-1},o.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var s=i[r];if(s&&n){if(s.row===t){do{s=i[r+=n]}while(s&&s.row===t);if(!s)return i.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=i[r+=n]}while(s&&s.row==t);return a.length&&a}}}(n,a,t);if(h){var u=h[0];s.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,s.row=u.row,c=e.renderer.$gutterLayer.$annotations[s.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var d={row:s.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},f=d.el.appendChild(r.createElement("div")),g=d.el.appendChild(r.createElement("div"));g.className="error_widget_arrow "+c.className;var p=e.renderer.$cursorLayer.getPixelPosition(s).left;g.style.left=p+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",f.className="error_widget "+c.className,f.innerHTML=c.text.join("
"),f.appendChild(r.createElement("div"));var m=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},r.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],(function(e,t,n){e("./loader_build")(t);var i=e("./lib/dom"),r=e("./lib/event"),o=e("./range").Range,s=e("./editor").Editor,a=e("./edit_session").EditSession,l=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if("string"==typeof e){var o=e;if(!(e=document.getElementById(o)))throw new Error("ace.edit can't find div #"+o)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var l=e;a=l.value,e=i.createElement("pre"),l.parentNode.replaceChild(e,l)}else e&&(a=e.textContent,e.innerHTML="");var h=t.createEditSession(a),u=new s(new c(e),h,n),d={document:h,editor:u,onResize:u.resize.bind(u,null)};return l&&(d.textarea=l),r.addListener(window,"resize",d.onResize),u.on("destroy",(function(){r.removeListener(window,"resize",d.onResize),d.editor.container.env=null})),u.container.env=u.env=d,u},t.createEditSession=function(e,t){var n=new a(e,t);return n.setUndoManager(new l),n},t.Range=o,t.Editor=s,t.EditSession=a,t.UndoManager=l,t.VirtualRenderer=c,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){for(var n in t&&(t.config.init(!0),t.define=ace.define),window.ace||(window.ace=t),t)t.hasOwnProperty(n)&&(window.ace[n]=t[n]);window.ace.default=window.ace,e&&(e.exports=window.ace)}))}(Ph);const fn="/request-docs/_astro/worker-json.bba8ee7e.js";var Kt={},Rr={},pe={},Dh={get exports(){return pe},set exports(e){pe=e}},Nh="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Bh=Nh,Hh=Bh;function Do(){}function No(){}No.resetWarningCache=Do;var Wh=function(){function e(e,t,n,i,r,o){if(o!==Hh){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:No,resetWarningCache:Do};return n.PropTypes=n,n};Dh.exports=Wh();var cn={},jh={get exports(){return cn},set exports(e){cn=e}};!function(e,t){var n="__lodash_hash_undefined__",i=1,r=2,o=9007199254740991,s="[object Arguments]",a="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",h="[object Date]",u="[object Error]",d="[object Function]",f="[object GeneratorFunction]",g="[object Map]",p="[object Number]",m="[object Null]",v="[object Object]",w="[object Promise]",b="[object Proxy]",y="[object RegExp]",x="[object Set]",k="[object String]",S="[object Symbol]",C="[object Undefined]",$="[object WeakMap]",A="[object ArrayBuffer]",L="[object DataView]",_=/^\[object .+?Constructor\]$/,E=/^(?:0|[1-9]\d*)$/,M={};M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M[s]=M[a]=M[A]=M[c]=M[L]=M[h]=M[u]=M[d]=M[g]=M[p]=M[v]=M[y]=M[x]=M[k]=M[$]=!1;var R="object"==typeof De&&De&&De.Object===Object&&De,T="object"==typeof self&&self&&self.Object===Object&&self,O=R||T||Function("return this")(),F=t&&!t.nodeType&&t,I=F&&e&&!e.nodeType&&e,N=I&&I.exports===F,D=N&&R.process,P=function(){try{return D&&D.binding&&D.binding("util")}catch{}}(),j=P&&P.isTypedArray;function B(e,t){for(var n=-1,i=null==e?0:e.length;++nc))return!1;var u=a.get(e);if(u&&a.get(t))return u==t;var d=-1,f=!0,g=n&r?new $e:void 0;for(a.set(e,t),a.set(t,e);++d-1},Se.prototype.set=function(e,t){var n=this.__data__,i=_e(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},Ce.prototype.clear=function(){this.size=0,this.__data__={hash:new ke,map:new(he||Se),string:new ke}},Ce.prototype.delete=function(e){var t=Ne(this,e).delete(e);return this.size-=t?1:0,t},Ce.prototype.get=function(e){return Ne(this,e).get(e)},Ce.prototype.has=function(e){return Ne(this,e).has(e)},Ce.prototype.set=function(e,t){var n=Ne(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},$e.prototype.add=$e.prototype.push=function(e){return this.__data__.set(e,n),this},$e.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.clear=function(){this.__data__=new Se,this.size=0},Ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Se){var i=n.__data__;if(!he||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ce(i)}return n.set(e,t),this.size=n.size,this};var je=se?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=o}function Ye(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Xe(e){return null!=e&&"object"==typeof e}var Qe=j?function(e){return function(t){return e(t)}}(j):function(e){return Xe(e)&&qe(e.length)&&!!M[Ee(e)]};function Je(e){return function(e){return null!=e&&qe(e.length)&&!Ke(e)}(e)?Le(e):Oe(e)}e.exports=function(e,t){return Re(e,t)}}(jh,cn);var ct={};Object.defineProperty(ct,"__esModule",{value:!0}),ct.getAceInstance=ct.debounce=ct.editorEvents=ct.editorOptions=void 0;var zh=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];ct.editorOptions=zh;var Uh=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];ct.editorEvents=Uh;var Vh=function(){var e;return typeof window>"u"?(De.window={},e=Gt,delete De.window):window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=Gt,e};ct.getAceInstance=Vh;var Gh=function(e,t){var n=null;return function(){var i=this,r=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(i,r)}),t)}};ct.debounce=Gh;var Kh=De&&De.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ur=De&&De.__assign||function(){return ur=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&this.handleMarkers(y);var C=this.editor.$options;jt.editorOptions.forEach((function(t){C.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option ".concat(t," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))})),this.handleOptions(this.props),Array.isArray(w)&&w.forEach((function(t){"string"==typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)})),m&&this.editor.setKeyboardHandler("ace/keyboard/"+m),n&&(this.refEditor.className+=" "+n),v&&v(this.editor),this.editor.resize(),s&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,i=0;i 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splitse;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;return n=null==t?this.$cEditor:this.$editors[t],this.$editors.some((function(t){return t.session===e}))&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var i=t/this.$splits,r=0;r-1}function Ef(e,t){var n=this.__data__,i=mi(n,e);return i<0?n.push([e,t]):n[i][1]=t,this}function Bt(e){var t=-1,n=e?e.length:0;for(this.clear();++t0&&e.handleMarkers(x,t);for(i=0;i"u"&&(r=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=r;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];typeof i>"u"&&(i=!0);var s=i,a=this.diff_commonPrefix(e,n),l=e.substring(0,a);e=e.substring(a),n=n.substring(a),a=this.diff_commonSuffix(e,n);var c=e.substring(e.length-a);e=e.substring(0,e.length-a),n=n.substring(0,n.length-a);var h=this.diff_compute_(e,n,s,o);return l&&h.unshift(new t.Diff(0,l)),c&&h.push(new t.Diff(0,c)),this.diff_cleanupMerge(h),h},t.prototype.diff_compute_=function(e,i,r,o){var s;if(!e)return[new t.Diff(1,i)];if(!i)return[new t.Diff(n,e)];var a=e.length>i.length?e:i,l=e.length>i.length?i:e,c=a.indexOf(l);if(-1!=c)return s=[new t.Diff(1,a.substring(0,c)),new t.Diff(0,l),new t.Diff(1,a.substring(c+l.length))],e.length>i.length&&(s[0][0]=s[2][0]=n),s;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,i)];var h=this.diff_halfMatch_(e,i);if(h){var u=h[0],d=h[1],f=h[2],g=h[3],p=h[4],m=this.diff_main(u,f,r,o),v=this.diff_main(d,g,r,o);return m.concat([new t.Diff(0,p)],v)}return r&&e.length>100&&i.length>100?this.diff_lineMode_(e,i,o):this.diff_bisect_(e,i,o)},t.prototype.diff_lineMode_=function(e,i,r){var o=this.diff_linesToChars_(e,i);e=o.chars1,i=o.chars2;var s=o.lineArray,a=this.diff_main(e,i,!1,r);this.diff_charsToLines_(a,s),this.diff_cleanupSemantic(a),a.push(new t.Diff(0,""));for(var l=0,c=0,h=0,u="",d="";l=1&&h>=1){a.splice(l-c-h,c+h),l=l-c-h;for(var f=this.diff_main(u,d,!1,r),g=f.length-1;g>=0;g--)a.splice(l,0,f[g]);l+=f.length}h=0,c=0,u="",d=""}l++}return a.pop(),a},t.prototype.diff_bisect_=function(e,i,r){for(var o=e.length,s=i.length,a=Math.ceil((o+s)/2),l=a,c=2*a,h=new Array(c),u=new Array(c),d=0;dr);b++){for(var y=-b+p;y<=b-m;y+=2){for(var x=l+y,k=(L=y==-b||y!=b&&h[x-1]o)m+=2;else if(k>s)p+=2;else if(g){if(($=l+f-y)>=0&&$=(C=o-u[$]))return this.diff_bisectSplit_(e,i,L,k,r)}}for(var S=-b+v;S<=b-w;S+=2){for(var C,$=l+S,A=(C=S==-b||S!=b&&u[$-1]o)w+=2;else if(A>s)v+=2;else if(!g){if((x=l+f-S)>=0&&x=(C=o-C))return this.diff_bisectSplit_(e,i,L,k,r)}}}}return[new t.Diff(n,e),new t.Diff(1,i)]},t.prototype.diff_bisectSplit_=function(e,t,n,i,r){var o=e.substring(0,n),s=t.substring(0,i),a=e.substring(n),l=t.substring(i),c=this.diff_main(o,s,!1,r),h=this.diff_main(a,l,!1,r);return c.concat(h)},t.prototype.diff_linesToChars_=function(e,t){var n=[],i={};function r(e){for(var t="",r=0,s=-1,a=n.length;si?e=e.substring(n-i):nt.length?e:t,i=e.length>t.length?t:e;if(n.length<4||2*i.length=e.length?[i,o,s,a,h]:null}var s,a,l,c,h,u=o(n,i,Math.ceil(n.length/4)),d=o(n,i,Math.ceil(n.length/2));return u||d?(s=d?u&&u[4].length>d[4].length?u:d:u,e.length>t.length?(a=s[0],l=s[1],c=s[2],h=s[3]):(c=s[0],h=s[1],a=s[2],l=s[3]),[a,l,c,h,s[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var i=!1,r=[],o=0,s=null,a=0,l=0,c=0,h=0,u=0;a0?r[o-1]:-1,l=0,c=0,h=0,u=0,s=null,i=!0)),a++;for(i&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a=p?(g>=d.length/2||g>=f.length/2)&&(e.splice(a,0,new t.Diff(0,f.substring(0,g))),e[a-1][1]=d.substring(0,d.length-g),e[a+1][1]=f.substring(g),a++):(p>=d.length/2||p>=f.length/2)&&(e.splice(a,0,new t.Diff(0,d.substring(0,p))),e[a-1][0]=1,e[a-1][1]=f.substring(0,f.length-p),e[a+1][0]=n,e[a+1][1]=d.substring(p),a++),a++}a++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var i=e.charAt(e.length-1),r=n.charAt(0),o=i.match(t.nonAlphaNumericRegex_),s=r.match(t.nonAlphaNumericRegex_),a=o&&i.match(t.whitespaceRegex_),l=s&&r.match(t.whitespaceRegex_),c=a&&i.match(t.linebreakRegex_),h=l&&r.match(t.linebreakRegex_),u=c&&e.match(t.blanklineEndRegex_),d=h&&n.match(t.blanklineStartRegex_);return u||d?5:c||h?4:o&&!a&&l?3:a||l?2:o||s?1:0}for(var i=1;i=d&&(d=f,c=r,h=o,u=s)}e[i-1][1]!=c&&(c?e[i-1][1]=c:(e.splice(i-1,1),i--),e[i][1]=h,u?e[i+1][1]=u:(e.splice(i+1,1),i--))}i++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var i=!1,r=[],o=0,s=null,a=0,l=!1,c=!1,h=!1,u=!1;a0?r[o-1]:-1,h=u=!1),i=!0)),a++;i&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var i,r=0,o=0,s=0,a="",l="";r1?(0!==o&&0!==s&&(0!==(i=this.diff_commonPrefix(l,a))&&(r-o-s>0&&0==e[r-o-s-1][0]?e[r-o-s-1][1]+=l.substring(0,i):(e.splice(0,0,new t.Diff(0,l.substring(0,i))),r++),l=l.substring(i),a=a.substring(i)),0!==(i=this.diff_commonSuffix(l,a))&&(e[r][1]=l.substring(l.length-i)+e[r][1],l=l.substring(0,l.length-i),a=a.substring(0,a.length-i))),r-=o+s,e.splice(r,o+s),a.length&&(e.splice(r,0,new t.Diff(n,a)),r++),l.length&&(e.splice(r,0,new t.Diff(1,l)),r++),r++):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,s=0,o=0,a="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(r=1;rt));i++)s=r,a=o;return e.length!=i&&e[i][0]===n?a:a+(t-s)},t.prototype.diff_prettyHtml=function(e){for(var t=[],i=/&/g,r=//g,s=/\n/g,a=0;a");switch(l){case 1:t[a]=''+c+"";break;case n:t[a]=''+c+"";break;case 0:t[a]=""+c+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(t),r=this;function o(e,i){var o=e/t.length,s=Math.abs(n-i);return r.Match_Distance?o+s/r.Match_Distance:s?1:o}var s=this.Match_Threshold,a=e.indexOf(t,n);-1!=a&&(s=Math.min(o(0,a),s),-1!=(a=e.lastIndexOf(t,n+t.length))&&(s=Math.min(o(0,a),s)));var l=1<=g;v--){var w=i[e.charAt(v-1)];if(m[v]=0===f?(m[v+1]<<1|1)&w:(m[v+1]<<1|1)&w|(u[v+1]|u[v])<<1|1|u[v+1],m[v]&l){var b=o(f,v-1);if(b<=s){if(s=b,!((a=v-1)>n))break;g=Math.max(1,2*n-a)}}}if(o(f+1,n)>s)break;u=m}return a},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n"u")o=e,(s=this.diff_main(o,i,!0)).length>2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(e&&"object"==typeof e&&typeof i>"u"&&typeof r>"u")s=e,o=this.diff_text1(s);else if("string"==typeof e&&i&&"object"==typeof i&&typeof r>"u")o=e,s=i;else{if("string"!=typeof e||"string"!=typeof i||!r||"object"!=typeof r)throw new Error("Unknown call format to patch_make.");o=e,s=r}if(0===s.length)return[];for(var a=[],l=new t.patch_obj,c=0,h=0,u=0,d=o,f=o,g=0;g=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,d),a.push(l),l=new t.patch_obj,c=0,d=f,h=u)}1!==p&&(h+=m.length),p!==n&&(u+=m.length)}return c&&(this.patch_addContext_(l,d),a.push(l)),a},t.prototype.patch_deepCopy=function(e){for(var n=[],i=0;ithis.Match_MaxBits?-1!=(a=this.match_main(t,h.substring(0,this.Match_MaxBits),c))&&((-1==(u=this.match_main(t,h.substring(h.length-this.Match_MaxBits),c+h.length-this.Match_MaxBits))||a>=u)&&(a=-1)):a=this.match_main(t,h,c),-1==a)o[s]=!1,r-=e[s].length2-e[s].length1;else if(o[s]=!0,r=a-c,h==(l=-1==u?t.substring(a,a+h.length):t.substring(a,u+this.Match_MaxBits)))t=t.substring(0,a)+this.diff_text2(e[s].diffs)+t.substring(a+h.length);else{var d=this.diff_main(h,l,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(d)/h.length>this.Patch_DeleteThreshold)o[s]=!1;else{this.diff_cleanupSemanticLossless(d);for(var f,g=0,p=0;ps[0][1].length){var a=n-s[0][1].length;s[0][1]=i.substring(s[0][1].length)+s[0][1],o.start1-=a,o.start2-=a,o.length1+=a,o.length2+=a}if(0==(s=(o=e[e.length-1]).diffs).length||0!=s[s.length-1][0])s.push(new t.Diff(0,i)),o.length1+=n,o.length2+=n;else if(n>s[s.length-1][1].length){a=n-s[s.length-1][1].length;s[s.length-1][1]+=i.substring(0,a),o.length1+=a,o.length2+=a}return i},t.prototype.patch_splitMax=function(e){for(var i=this.Match_MaxBits,r=0;r2*i?(c.length1+=d.length,s+=d.length,h=!1,c.diffs.push(new t.Diff(u,d)),o.diffs.shift()):(d=d.substring(0,i-c.length1-this.Patch_Margin),c.length1+=d.length,s+=d.length,0===u?(c.length2+=d.length,a+=d.length):h=!1,c.diffs.push(new t.Diff(u,d)),d==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(d.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var f=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==f&&(c.length1+=f.length,c.length2+=f.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=f:c.diffs.push(new t.Diff(0,f))),h||e.splice(++r,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;nc)break;var h=this.getFoldWidgetRange(e,"all",t);if(h){if(h.start.row<=o)break;if(h.isMultiLine())t=h.end.row;else if(i==c)break}a=t}}return new r(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ns)return new r(s,i,n,t.length)}}.call(s.prototype)})),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],(function(e,t,n){var i=e("../lib/oop"),r=e("./text").Mode,o=e("./json_highlight_rules").JsonHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=e("../worker/worker_client").WorkerClient,h=function(){this.HighlightRules=o,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new l};i.inherits(h,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t);"start"==e&&(t.match(/^.*[\{\(\[]\s*$/)&&(i+=n));return i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/json"}.call(h.prototype),t.Mode=h})),ace.require(["ace/mode/json"],(function(t){e&&(e.exports=t)}))}(ad);var As={},ld={get exports(){return As},set exports(e){As=e}};!function(e,t){ace.define("ace/theme/one_dark.css",["require","exports","module"],(function(e,t,n){n.exports='.ace-one-dark .ace_gutter {\n background: #282c34;\n color: #6a6f7a\n}\n\n.ace-one-dark .ace_print-margin {\n width: 1px;\n background: #e8e8e8\n}\n\n.ace-one-dark {\n background-color: #282c34;\n color: #abb2bf\n}\n\n.ace-one-dark .ace_cursor {\n color: #528bff\n}\n\n.ace-one-dark .ace_marker-layer .ace_selection {\n background: #3d4350\n}\n\n.ace-one-dark.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0 #282c34;\n border-radius: 2px\n}\n\n.ace-one-dark .ace_marker-layer .ace_step {\n background: #c6dbae\n}\n\n.ace-one-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #747369\n}\n\n.ace-one-dark .ace_marker-layer .ace_active-line {\n background: rgba(76, 87, 103, .19)\n}\n\n.ace-one-dark .ace_gutter-active-line {\n background-color: rgba(76, 87, 103, .19)\n}\n\n.ace-one-dark .ace_marker-layer .ace_selected-word {\n border: 1px solid #3d4350\n}\n\n.ace-one-dark .ace_fold {\n background-color: #61afef;\n border-color: #abb2bf\n}\n\n.ace-one-dark .ace_keyword {\n color: #c678dd\n}\n\n.ace-one-dark .ace_keyword.ace_operator {\n color: #c678dd\n}\n\n.ace-one-dark .ace_keyword.ace_other.ace_unit {\n color: #d19a66\n}\n\n.ace-one-dark .ace_constant.ace_language {\n color: #d19a66\n}\n\n.ace-one-dark .ace_constant.ace_numeric {\n color: #d19a66\n}\n\n.ace-one-dark .ace_constant.ace_character {\n color: #56b6c2\n}\n\n.ace-one-dark .ace_constant.ace_other {\n color: #56b6c2\n}\n\n.ace-one-dark .ace_support.ace_function {\n color: #61afef\n}\n\n.ace-one-dark .ace_support.ace_constant {\n color: #d19a66\n}\n\n.ace-one-dark .ace_support.ace_class {\n color: #e5c07b\n}\n\n.ace-one-dark .ace_support.ace_type {\n color: #e5c07b\n}\n\n.ace-one-dark .ace_storage {\n color: #c678dd\n}\n\n.ace-one-dark .ace_storage.ace_type {\n color: #c678dd\n}\n\n.ace-one-dark .ace_invalid {\n color: #fff;\n background-color: #f2777a\n}\n\n.ace-one-dark .ace_invalid.ace_deprecated {\n color: #272b33;\n background-color: #d27b53\n}\n\n.ace-one-dark .ace_string {\n color: #98c379\n}\n\n.ace-one-dark .ace_string.ace_regexp {\n color: #e06c75\n}\n\n.ace-one-dark .ace_comment {\n font-style: italic;\n color: #5c6370\n}\n\n.ace-one-dark .ace_variable {\n color: #e06c75\n}\n\n.ace-one-dark .ace_variable.ace_parameter {\n color: #d19a66\n}\n\n.ace-one-dark .ace_meta.ace_tag {\n color: #e06c75\n}\n\n.ace-one-dark .ace_entity.ace_other.ace_attribute-name {\n color: #e06c75\n}\n\n.ace-one-dark .ace_entity.ace_name.ace_function {\n color: #61afef\n}\n\n.ace-one-dark .ace_entity.ace_name.ace_tag {\n color: #e06c75\n}\n\n.ace-one-dark .ace_markup.ace_heading {\n color: #98c379\n}\n\n.ace-one-dark .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ09NrYAgMjP4PAAtGAwchHMyAAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-one-dark .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'})),ace.define("ace/theme/one_dark",["require","exports","module","ace/theme/one_dark.css","ace/lib/dom"],(function(e,t,n){t.isDark=!0,t.cssClass="ace-one-dark",t.cssText=e("./one_dark.css"),e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.require(["ace/theme/one_dark"],(function(t){e&&(e.exports=t)}))}(ld);var Es={},cd={get exports(){return Es},set exports(e){Es=e}};function ud(e){const{responseHeaders:t,responseData:n,timeTaken:i,responseStatus:r,serverMemory:o}=e;return O.jsxs(O.Fragment,{children:[t&&O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"collapse collapse-arrow",children:[O.jsx("input",{type:"checkbox"}),O.jsx("div",{className:"collapse-title text-sm text-slate-500 pl-0",children:"Show Response Headers"}),O.jsx("div",{className:"collapse-content p-0",children:O.jsx(At,{maxLines:35,readOnly:!0,width:"100%",mode:"json",wrapEnabled:!0,value:t,theme:"one_dark",onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1)},editorProps:{$blockScrolling:!0}})})]}),O.jsx("br",{})]}),!n&&O.jsx("div",{className:"text-center text-sm text-slate-500",children:"No Response Data"}),n&&O.jsxs("div",{className:"mockup-code",children:[O.jsx("span",{className:"pl-5 text-sm text-slate-500",children:"RESPONSE"}),O.jsx("br",{}),O.jsxs("span",{className:"pl-5 text-sm",children:["Time taken: ",O.jsxs("b",{children:[i,"ms"]}),", Status Code: ",O.jsx("b",{children:r}),", Server memory: ",O.jsx("b",{children:o})]}),O.jsx(At,{maxLines:50,width:"100%",mode:"json",wrapEnabled:!0,readOnly:!0,value:n,theme:"one_dark",onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1)},editorProps:{$blockScrolling:!0}})]})]})}!function(e,t){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(e,t,n){var i=e("./lib/dom"),r=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),a=e("./range").Range,l=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,h=e("./tokenizer").Tokenizer,u=e("./clipboard"),d={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var i=e.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):i},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return u.getText&&u.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:f.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:f.bind(null,{year:"2-digit"}),CURRENT_MONTH:f.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:f.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:f.bind(null,{month:"short"}),CURRENT_DATE:f.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:f.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:f.bind(null,{weekday:"short"}),CURRENT_HOUR:f.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:f.bind(null,{minute:"2-digit"}),CURRENT_SECOND:f.bind(null,{second:"2-digit"})};function f(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}d.SELECTED_TEXT=d.SELECTION;var g=function(){this.snippetMap={},this.snippetNameMap={}};(function(){r.implement(this,o),this.getTokenizer=function(){return g.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function e(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var n={regex:"/("+t("/")+"+)/",onMatch:function(e,t,n){var i=n[0];return i.fmtString=!0,i.guard=e.slice(1,-1),i.flag="",""},next:"formatString"};return g.$tokenizer=new h({start:[{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return("}"==i&&n.length||-1!="`$\\".indexOf(i))&&(e=i),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,i){var r=e(t.substr(1));return i.unshift(r[0]),r},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){var i=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0").map((function(e){return{value:e}}));return n[0].choices=i,[i[0]]},next:"start"},n,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length||-1!="`$\\".indexOf(i)?e=i:"n"==i?e="\n":"t"==i?e="\t":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:i>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var i=n.shift();return i&&(i.flag=e.slice(1,-1)),this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var i={text:e.slice(2)};return n.unshift(i),[i]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var i=n.shift();return this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},n,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){"+"==e[1]&&(n[0].ifEnd=n[0]),"?"==e[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]})},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},this.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var i=this.variables[t];return"function"==typeof i&&(i=this.variables[t](e,t,n)),i??""},this.variables=d,this.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var i=t.flag||"",r=t.guard;r=new RegExp(r,i.replace(/[^gim]/g,""));var o="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,s=this,a=e.replace(r,(function(){var e=s.variables.__;s.variables.__=[].slice.call(arguments);for(var t=s.resolveVariables(o,n),i="E",r=0;r1?(w=t[t.length-1].length,v+=t.length-1):w+=e.length,b+=e}else e&&(e.start?e.end={row:v,column:w}:e.start={row:v,column:w})}));var y=e.getSelectionRange(),x=e.session.replace(y,b),k=new p(e),S=e.inVirtualSelectionMode&&e.selection.index;k.addTabstops(a,y.start,x,S)},this.insertSnippet=function(e,t){var n=this;if(e.inVirtualSelectionMode)return n.insertSnippetForSelection(e,t);e.forEachSelection((function(){n.insertSnippetForSelection(e,t)}),null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";if("html"===(t=t.split("/").pop())||"php"===t){"php"===t&&!e.session.$mode.inlinePhp&&(t="html");var n=e.getCursorPosition(),i=e.session.getState(n.row);"object"==typeof i&&(i=i[0]),i.substring&&("js-"==i.substring(0,3)?t="javascript":"css-"==i.substring(0,4)?t="css":"php-"==i.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],i=this.snippetMap;return i[t]&&i[t].includeScopes&&n.push.apply(n,i[t].includeScopes),n.push("_"),n},this.expandWithTab=function(e,t){var n=this,i=e.forEachSelection((function(){return n.expandSnippetForSelection(e,t)}),null,{keepOrder:!0});return i&&e.tabstopManager&&e.tabstopManager.tabNext(),i},this.expandSnippetForSelection=function(e,t){var n,i=e.getCursorPosition(),r=e.session.getLine(i.row),o=r.substring(0,i.column),s=r.substr(i.column),a=this.snippetMap;return this.getActiveScopes(e).some((function(e){var t=a[e];return t&&(n=this.findMatchingSnippet(t,o,s)),!!n}),this),!!n&&(t&&t.dryRun||(e.session.doc.removeInLine(i.row,i.column-n.replaceBefore.length,i.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(e,n.content),this.variables.M__=this.variables.T__=null),!0)},this.findMatchingSnippet=function(e,t,n){for(var i=e.length;i--;){var r=e[i];if((!r.startRe||r.startRe.test(t))&&(!r.endRe||r.endRe.test(n))&&(r.startRe||r.endRe))return r.matchBefore=r.startRe?r.startRe.exec(t):[""],r.matchAfter=r.endRe?r.endRe.exec(n):[""],r.replaceBefore=r.triggerRe?r.triggerRe.exec(t)[0]:"",r.replaceAfter=r.endTriggerRe?r.endTriggerRe.exec(n)[0]:"",r}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){var n=this.snippetMap,i=this.snippetNameMap,r=this;function o(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function a(e,t,n){return e=o(e),t=o(t),n?(e=t+e)&&"$"!=e[e.length-1]&&(e+="$"):(e+=t)&&"^"!=e[0]&&(e="^"+e),new RegExp(e)}function l(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],i[t]={});var o=i[t];if(e.name){var l=o[e.name];l&&r.unregister(l),o[e.name]=e}n[t].push(e),e.prefix&&(e.tabTrigger=e.prefix),!e.content&&e.body&&(e.content=Array.isArray(e.body)?e.body.join("\n"):e.body),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=s.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=a(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger),e.endRe=a(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger))}e||(e=[]),Array.isArray(e)?e.forEach(l):Object.keys(e).forEach((function(t){l(e[t])})),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){var n=this.snippetMap,i=this.snippetNameMap;function r(e){var r=i[e.scope||t];if(r&&r[e.name]){delete r[e.name];var o=n[e.scope||t],s=o&&o.indexOf(e);s>=0&&o.splice(s,1)}}e.content?r(e):Array.isArray(e)&&e.forEach(r)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],i={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=r.exec(e);){if(t[1])try{i=JSON.parse(t[1]),n.push(i)}catch{}if(t[4])i.content=t[4].replace(/^\t/gm,""),n.push(i),i={};else{var o=t[2],s=t[3];if("regex"==o){var a=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=a.exec(s)[1],i.trigger=a.exec(s)[1],i.endTrigger=a.exec(s)[1],i.endGuard=a.exec(s)[1]}else"snippet"==o?(i.tabTrigger=s.match(/^\S*/)[0],i.name||(i.name=s)):o&&(i[o]=s)}}return n},this.getSnippetByName=function(e,t){var n,i=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var r=i[t];return r&&(n=r[e]),!!n}),this),n}}).call(g.prototype);var p=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop||{},i=n.parents||{},r=(this.tabstops||[]).slice(),o=0;o2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},this.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new c,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}})}).call(p.prototype);var m=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},v=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};i.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new g;var w=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(w.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],(function(e,t,n){var i=e("../virtual_renderer").VirtualRenderer,r=e("../editor").Editor,o=e("../range").Range,s=e("../lib/event"),a=e("../lib/lang"),l=e("../lib/dom"),c=function(e){return"suggest-aria-id:".concat(e)},h=function(e){var t=new i(e);t.$maxLines=4;var n=new r(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n};l.importCssString("\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin: 0.9em;\n}\n.ace_completion-message {\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}","autocompletion.css",!1),t.AcePopup=function(e){var t=l.createElement("div"),n=new h(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.renderer.container.setAttribute("role","listbox"),n.renderer.container.setAttribute("aria-label","Autocomplete suggestions"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var i=function(){};n.focus=i,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=i,n.renderer.$cursorLayer.element.style.opacity=0,n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",(function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),d.start.row=d.end.row=t.row,e.stop()}));var r,u=new o(-1,0,-1,1/0),d=new o(-1,0,-1,1/0);d.id=n.session.addMarker(d,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?u.id&&(n.session.removeMarker(u.id),u.id=null):u.id=n.session.addMarker(u,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",(function(e){if(r){if(r.x!=e.x||r.y!=e.y){(r=e).scrollTop=n.renderer.scrollTop;var t=r.getDocumentPosition().row;u.start.row!=t&&(u.id||n.setRow(t),g(t))}}else r=e})),n.renderer.on("beforeRender",(function(){if(r&&-1!=u.start.row){r.$pos=null;var e=r.getDocumentPosition().row;u.id||n.setRow(e),g(e,!0)}})),n.renderer.on("afterRender",(function(){var e=n.getRow(),t=n.renderer.$textLayer,i=t.element.childNodes[e-t.config.firstRow],r=document.activeElement;if(i!==t.selectedNode&&t.selectedNode&&(l.removeCssClass(t.selectedNode,"ace_selected"),r.removeAttribute("aria-activedescendant"),t.selectedNode.removeAttribute("id")),t.selectedNode=i,i){l.addCssClass(i,"ace_selected");var o=c(e);i.id=o,n.renderer.container.setAttribute("aria-activedescendant",o),r.setAttribute("aria-activedescendant",o),i.setAttribute("role","option"),i.setAttribute("aria-label",n.getData(e).value),i.setAttribute("aria-setsize",n.data.length),i.setAttribute("aria-posinset",e)}}));var f=function(){g(-1)},g=function(e,t){e!==u.start.row&&(u.start.row=u.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return u.start.row},s.addListener(n.container,"mouseout",f),n.on("hide",f),n.on("changeSelection",f),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var p=n.session.bgTokenizer;return p.$tokenizeRow=function(e){var t=n.data[e],i=[];if(!t)return i;"string"==typeof t&&(t={value:t});var r=t.caption||t.value||t.name;function o(e,n){e&&i.push({type:(t.className||"")+(n||""),value:e})}for(var s=r.toLowerCase(),a=(n.filterText||"").toLowerCase(),l=0,c=0,h=0;h<=a.length;h++)if(h!=c&&(t.matchMask&1<s/2&&!i&&h+t+c>s?(l.$maxPixelHeight=h-2*this.$borderSize,o.style.top="",o.style.bottom=s-h+"px",n.isTopdown=!1):(h+=t,l.$maxPixelHeight=s-h-.2*t,o.style.top=h+"px",o.style.bottom="",n.isTopdown=!0),o.style.display="";var u=e.left;u+o.offsetWidth>a&&(u=a-o.offsetWidth),o.style.left=u+"px",this._signal("show"),r=null,n.isOpen=!0},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n},t.$singleLineEditor=h,t.getAriaId=c})),ace.define("ace/autocomplete/util",["require","exports","module"],(function(e,t,n){t.parForEach=function(e,t,n){var i=0,r=e.length;0===r&&n();for(var o=0;o=0&&n.test(e[o]);o--)r.push(e[o]);return r.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||i;for(var r=[],o=t;othis.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var n=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)})),this.filtered=t},this.filterCompletions=function(e,t){var n=[],i=t.toUpperCase(),r=t.toLowerCase();e:for(var o,s=0;o=e[s];s++){var a=o.caption||o.value||o.snippet;if(a){var l,c,h=-1,u=0,d=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else{var f=a.toLowerCase().indexOf(r);if(f>-1)d=f;else for(var g=0;g=0&&(m<0||p0&&(-1===h&&(d+=10),d+=c,u|=1<",s.escapeHTML(e.caption),"","
",s.escapeHTML(h(e.snippet))].join(""))}},d=[u,l,c];t.setCompleters=function(e){d.length=0,e&&d.push.apply(d,e)},t.addCompleter=function(e){d.push(e)},t.textCompleter=l,t.keyWordCompleter=c,t.snippetCompleter=u;var f={name:"expandSnippet",exec:function(e){return i.expandWithTab(e)},bindKey:"Tab"},g=function(e,t){p(t.session.$mode)},p=function(e){"string"==typeof e&&(e=o.$modes[e]),e&&(i.files||(i.files={}),m(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(p))},m=function(e,t){!t||!e||i.files[e]||(i.files[e]={},o.loadModule(t,(function(t){t&&(i.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=i.parseSnippetFile(t.snippetText)),i.register(t.snippets||[],t.scope),t.includeScopes&&(i.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){p("ace/mode/"+e)}))))})))},v=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!a.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name){if(a.getCompletionPrefix(t)&&!n){var i=r.for(t);i.autoInsert=!1,i.showPopup(t)}}},w=e("../editor").Editor;e("../config").defineOptions(w.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:d),this.commands.addCommand(r.startCommand)):this.commands.removeCommand(r.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:d),this.commands.on("afterExec",v)):this.commands.removeListener("afterExec",v)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(f),this.on("changeMode",g),g(0,this)):(this.commands.removeCommand(f),this.off("changeMode",g))},value:!1}})})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))}(cd),ace.config.setModuleUrl("ace/mode/json_worker",fn);var gr={},hd={get exports(){return gr},set exports(e){gr=e}};!function(e,t){var n;n=e=>(()=>{var t={703:(e,t,n)=>{var i=n(414);function r(){}function o(){}o.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,o,s){if(s!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},639:t=>{t.exports=e}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{i.r(r),i.d(r,{default:()=>p});var e=i(639),t=i.n(e),n=i(697),o=i.n(n);const s=function(e){var t=e.name.split(".");return t.length>1?t[t.length-1]:"none"};function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n1&&(n=[n[0]]);for(var i=[],o=0;o=1e9?Math.ceil(t/1e9)+"GB":t>=1e6?Math.ceil(t/1e6)+"MB":t>=1e3?Math.ceil(t/1e3)+"KB":Math.ceil(t)+"B",a.type&&"image"===a.type.split("/")[0]?a.preview={type:"image",url:window.URL.createObjectURL(a)}:a.preview={type:"file"},i.length>=p){M({code:4,message:"maximum file count reached"},a);break}if(a.size>m){M({code:2,message:"".concat(a.name," is too large")},a);break}if(a.size{const e=[];for(const[n,i]of Object.entries(t.rules)){if(0==i.length)continue;const t=i[0].split("|");(t.includes("file")||t.includes("image"))&&e.push(n)}p(e)}),[]),O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"form-control",children:[O.jsxs("label",{className:"input-group input-group-sm",children:[O.jsx("span",{className:`method-${i}`,children:i}),O.jsx("input",{type:"text",defaultValue:n,onChange:e=>l(e.target.value),placeholder:"Type here",className:"focus:outline-none input w-full input-bordered input-sm"}),O.jsxs("button",{className:"btn btn-sm btn-success",onClick:c,children:["GO ",O.jsx(Oo,{className:"inline-block w-4 h-4 ml-1"})]}),O.jsx("br",{})]}),r&&O.jsx("progress",{className:"progress progress-success w-full"})]}),O.jsx("br",{}),O.jsxs("div",{className:"collapse collapse-arrow",children:[O.jsx("input",{type:"checkbox"}),O.jsx("div",{className:"collapse-title text-sm text-slate-500 pl-0",children:"Set Global Headers"}),0!=g.length&&("POST"==i||"PUT"==i||"DELETE"==i)&&O.jsxs("div",{className:"text-sm text-slate-500 p-0",children:[O.jsx(Du,{className:"inline-block w-4 h-4 ml-1 text-yellow-500"}),"  This request requires a file upload. ",O.jsx("br",{}),O.jsx(Wu,{className:"inline-block w-4 h-4 ml-1 text-slate-500"}),"  Global headers will be overridden as ",O.jsx("code",{children:"application/json"})," ⇢ ",O.jsx("code",{children:"multipart/form-data"}),O.jsx("br",{})]}),O.jsx("div",{className:"collapse-content p-0",children:O.jsx(At,{height:"200px",width:"100%",mode:"json",value:o,onChange:h,theme:"one_dark",onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1),e.setFontSize(14)},editorProps:{$blockScrolling:!0}})})]}),O.jsx("br",{}),("GET"==i||"HEAD"==i||"DELETE"==i)&&O.jsxs("div",{className:"mockup-code",children:[O.jsxs("span",{className:"pl-5 text-sm text-slate-500",children:["Query Params. Example ",O.jsx("code",{children:"?abc=123&def=456"})]}),O.jsx(At,{height:"200px",width:"100%",mode:"sql",wrapEnabled:!0,value:a,onChange:f,theme:"one_dark",onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1),e.setFontSize(14)},editorProps:{$blockScrolling:!0}})]}),("POST"==i||"PUT"==i||"PATCH"==i)&&O.jsxs("div",{className:"mockup-code",children:[O.jsx("span",{className:"pl-5 text-sm text-slate-500",children:"REQUEST BODY"}),g.map((e=>O.jsx("div",{children:O.jsxs(fd,{className:"p-5 bg-gray-800 border border-gray-500 border-double hover:bg-gray-700 hover:border-dashed hover:cursor-pointer",onChange:t=>((e,t)=>{const n={...m};n[t]=e,v(n),u(e,t)})(t,e),multiple:e.includes(".*"),maxFileSize:1e7,minFileSize:0,clickable:!0,children:[m[e]&&m[e].length>0&&O.jsx("div",{className:"text-sm text-gray-300",children:m[e].map(((e,t)=>O.jsxs("div",{children:[t+1,") ",e.name," - ",e.size," bytes"]},e.id)))}),O.jsxs("span",{className:"text-slate-500",children:[O.jsx("code",{children:O.jsx("small",{children:e})}),e.includes(".*")&&O.jsx(di,{className:"inline-block w-4 h-4 ml-1"}),O.jsx("br",{}),e.includes(".*")?"Drop or click to upload multiple files":"Drop or click to upload single file"]})]})},Te.generate()))),O.jsx(At,{height:"200px",width:"100%",mode:"json",wrapEnabled:!0,value:s,onChange:d,theme:"one_dark",onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1),e.setFontSize(14)},editorProps:{$blockScrolling:!0}})]})]})}function gd(e){const{activeTab:t,responseStatus:n,sqlQueriesCount:i,logsData:r,modelsData:o,setActiveTab:s}=e;return O.jsxs("div",{className:"tabs tabs-boxed",children:[O.jsxs("a",{className:"tab "+("info"==t?"tab-active":""),onClick:()=>s("info"),children:[O.jsx(Bu,{className:"inline-block w-5 h-5"})," Info"]}),O.jsx("a",{className:"tab "+("request"==t?"tab-active":""),onClick:()=>s("request"),children:O.jsxs("span",{className:"text-success font-bold",children:[O.jsx(Oo,{className:"inline-block w-5 h-5"})," Send"]})}),O.jsx("span",{className:"pr-1 mb-1",children:O.jsx(Iu,{className:"inline-block w-5 h-5"})}),O.jsxs("a",{className:"pl-0 tab "+("response"==t?"tab-active":""),onClick:()=>s("response"),children:[O.jsx(Uu,{className:"inline-block w-5 h-5"})," Response",0!=n&&O.jsx("div",{className:`ml-1 badge badge-sm badge-${n} badge-info`,children:n})]}),O.jsxs("a",{className:"pl-0 pr-3 tab "+("sql"==t?"tab-active":""),onClick:()=>s("sql"),children:[O.jsx(To,{className:"inline-block w-5 h-5 mr-1"})," SQL",0!=n&&O.jsx("div",{className:"ml-1 badge badge-xs badge-warning",children:i})]}),O.jsxs("a",{className:"pl-0 pr-3 tab "+("logs"==t?"tab-active":""),onClick:()=>s("logs"),children:[O.jsx(Fu,{className:"inline-block w-5 h-5 mr-1"})," Logs",0!=n&&O.jsx("div",{className:"ml-1 badge badge-xs badge-warning",children:r.split("\n").length-1})]}),O.jsxs("a",{className:"pl-0 pr-1 tab "+("events"==t?"tab-active":""),onClick:()=>s("events"),children:[O.jsx(Ku,{className:"inline-block w-5 h-5 mr-1"})," Events",0!=n&&O.jsx("div",{className:"ml-1 badge badge-xs badge-warning",children:o&&o.modelsSummary?Object.keys(o.modelsSummary).length:0})]})]})}ace.config.setModuleUrl("ace/mode/json_worker",fn);const pd={200:"OK",201:"Created",202:"Accepted",204:"No Content",400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",422:"Unprocessable Entity",429:"Too Many Requests",500:"Internal Server Error",503:"Service Unavailable"},Ls=["http","https","mailto","tel"];function md(e){const t=(e||"").trim(),n=t.charAt(0);if("#"===n||"/"===n)return t;const i=t.indexOf(":");if(-1===i)return t;let r=-1;for(;++rr||(r=t.indexOf("#"),-1!==r&&i>r)?t:"javascript:void(0)"}var Ko=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)};function an(e){return e&&"object"==typeof e?"position"in e||"type"in e?_s(e.position):"start"in e||"end"in e?_s(e):"line"in e||"column"in e?pr(e):"":""}function pr(e){return Rs(e&&e.line)+":"+Rs(e&&e.column)}function _s(e){return pr(e&&e.start)+"-"+pr(e&&e.end)}function Rs(e){return e&&"number"==typeof e?e:1}class st extends Error{constructor(e,t,n){const i=[null,null];let r={start:{line:null,column:null},end:{line:null,column:null}};if(super(),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n){const e=n.indexOf(":");-1===e?i[1]=n:(i[0]=n.slice(0,e),i[1]=n.slice(e+1))}t&&("type"in t||"position"in t?t.position&&(r=t.position):"start"in t||"end"in t?r=t:("line"in t||"column"in t)&&(r.start=t)),this.name=an(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="","object"==typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=r.start.line,this.column=r.start.column,this.position=r,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}st.prototype.file="",st.prototype.name="",st.prototype.reason="",st.prototype.message="",st.prototype.stack="",st.prototype.fatal=null,st.prototype.column=null,st.prototype.line=null,st.prototype.source=null,st.prototype.ruleId=null,st.prototype.position=null;const ft={basename:vd,dirname:wd,extname:bd,join:yd,sep:"/"};function vd(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');dn(e);let n,i=0,r=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.charCodeAt(o)){if(n){i=o+1;break}}else r<0&&(n=!0,r=o+1);return r<0?"":e.slice(i,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;o--;)if(47===e.charCodeAt(o)){if(n){i=o+1;break}}else s<0&&(n=!0,s=o+1),a>-1&&(e.charCodeAt(o)===t.charCodeAt(a--)?a<0&&(r=o):(a=-1,r=s));return i===r?r=s:r<0&&(r=e.length),e.slice(i,r)}function wd(e){if(dn(e),0===e.length)return".";let t,n=-1,i=e.length;for(;--i;)if(47===e.charCodeAt(i)){if(t){n=i;break}}else t||(t=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)}function bd(e){dn(e);let t,n=e.length,i=-1,r=0,o=-1,s=0;for(;n--;){const a=e.charCodeAt(n);if(47!==a)i<0&&(t=!0,i=n+1),46===a?o<0?o=n:1!==s&&(s=1):o>-1&&(s=-1);else if(t){r=n+1;break}}return o<0||i<0||0===s||1===s&&o===i-1&&o===r+1?"":e.slice(o,i)}function yd(...e){let t,n=-1;for(;++n0&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}function Sd(e,t){let n,i,r="",o=0,s=-1,a=0,l=-1;for(;++l<=e.length;){if(l2){if(i=r.lastIndexOf("/"),i!==r.length-1){i<0?(r="",o=0):(r=r.slice(0,i),o=r.length-1-r.lastIndexOf("/")),s=l,a=0;continue}}else if(r.length>0){r="",o=0,s=l,a=0;continue}t&&(r=r.length>0?r+"/..":"..",o=2)}else r.length>0?r+="/"+e.slice(s+1,l):r=e.slice(s+1,l),o=l-s-1;s=l,a=0}else 46===n&&a>-1?a++:a=-1}return r}function dn(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const kd={cwd:Cd};function Cd(){return"/"}function mr(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}function $d(e){if("string"==typeof e)e=new URL(e);else if(!mr(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return Ad(e)}function Ad(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n"u"||ri.call(e,t)},Ds=function(e,t){Os&&"__proto__"===t.name?Os(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ns=function(e,t){if("__proto__"===t){if(!ri.call(e,t))return;if(Fs)return Fs(e,t).value}return e[t]},Bs=function e(){var t,n,i,r,o,s,a=arguments[0],l=1,c=arguments.length,h=!1;for("boolean"==typeof a&&(h=a,a=arguments[1]||{},l=2),(null==a||"object"!=typeof a&&"function"!=typeof a)&&(a={});lt.length;let s;o&&t.push(i);try{s=e.apply(this,t)}catch(e){if(o&&n)throw e;return i(e)}o||(s instanceof Promise?s.then(r,i):s instanceof Error?i(s):r(s))};function i(e,...i){n||(n=!0,t(e,...i))}function r(e){i(null,e)}}const Rd=Jo().freeze(),Qo={}.hasOwnProperty;function Jo(){const e=Ld(),t=[];let n,i={},r=-1;return o.data=function(e,t){return"string"==typeof e?2===arguments.length?(Yi("data",n),i[e]=t,o):Qo.call(i,e)&&i[e]||null:e?(Yi("data",n),i=e,o):i},o.Parser=void 0,o.Compiler=void 0,o.freeze=function(){if(n)return o;for(;++r{if(!e&&t&&n){const i=o.stringify(t,n);null==i||(Od(i)?n.value=i:n.result=i),s(e,n)}else s(e)}))}n(null,t)},o.processSync=function(e){let t;o.freeze(),Gi("processSync",o.Parser),Ki("processSync",o.Compiler);const n=rn(e);return o.process(n,(function(e){t=!0,Ts(e)})),js("processSync","process",t),n},o;function o(){const e=Jo();let n=-1;for(;++nr?0:r+t:t>r?r:t,n=n>0?n:0,i.length<1e4)o=Array.from(i),o.unshift(t,n),[].splice.apply(e,o);else for(n&&[].splice.apply(e,[t,n]);s0?(qe(e,e.length,0,t),e):t}const Us={}.hasOwnProperty;function qo(e){const t={};let n=-1;for(;++no))return;const n=t.events.length;let r,a,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(r){a=t.events[l][1].end;break}r=!0}for(v(s),e=n;ei;){const i=n[r];t.containerState=i[1],i[0].exit.call(t,e)}n.length=i}function w(){i.write([null]),r=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Vd(e,t,n){return $e(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function li(e){return null===e||He(e)||wi(e)?1:bi(e)?2:void 0}function yi(e,t,n){const i=[];let r=-1;for(;++r1&&e[h][1].end.offset-e[h][1].start.offset>1?2:1;const u=Object.assign({},e[n][1].end),d=Object.assign({},e[h][1].start);Ks(u,-a),Ks(d,a),o={type:a>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},e[n][1].end)},s={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[h][1].start),end:d},r={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[h][1].start)},i={type:a>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},o.start),e[h][1].start=Object.assign({},s.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=it(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=it(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",r,t]]),l=it(l,yi(t.parser.constructs.insideSpan.null,e.slice(n+1,h),t)),l=it(l,[["exit",r,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[h][1].end.offset-e[h][1].start.offset?(c=2,l=it(l,[["enter",e[h][1],t],["exit",e[h][1],t]])):c=0,qe(e,n-1,h-n+3,l),h=n+l.length-c-2;break}for(h=-1;++h=4?o(e):n(e)}function o(t){return null===t?a(t):ue(t)?e.attempt(ig,o,a)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||ue(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),s)}function a(n){return e.exit("codeIndented"),t(n)}}function sg(e,t,n){const i=this;return r;function r(t){return i.parser.lazy[i.now().line]?n(t):ue(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r):$e(e,o,"linePrefix",5)(t)}function o(e){const o=i.events[i.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):ue(e)?r(e):n(e)}}const og={name:"codeText",tokenize:cg,resolve:ag,previous:lg};function ag(e){let t,n,i=e.length-4,r=3;if(!("lineEnding"!==e[r][1].type&&"space"!==e[r][1].type||"lineEnding"!==e[i][1].type&&"space"!==e[i][1].type))for(t=r;++t=4?t(r):e.interrupt(i.parser.constructs.flow,n,t)(r)}}function ra(e,t,n,i,r,o,s,a,l){const c=l||Number.POSITIVE_INFINITY;let h=0;return function(t){return 60===t?(e.enter(i),e.enter(r),e.enter(o),e.consume(t),e.exit(o),u):null===t||41===t||hn(t)?n(t):(e.enter(i),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),g(t))};function u(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),e.exit(i),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(a),u(t)):null===t||60===t||ue(t)?n(t):(e.consume(t),92===t?f:d)}function f(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function g(r){return 40===r?++h>c?n(r):(e.consume(r),g):41===r?h--?(e.consume(r),g):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(i),t(r)):null===r||He(r)?h?n(r):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(i),t(r)):hn(r)?n(r):(e.consume(r),92===r?p:g)}function p(t){return 40===t||41===t||92===t?(e.consume(t),g):g(t)}}function sa(e,t,n,i,r,o){const s=this;let a,l=0;return function(t){return e.enter(i),e.enter(r),e.consume(t),e.exit(r),e.enter(o),c};function c(u){return null===u||91===u||93===u&&!a||94===u&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs||l>999?n(u):93===u?(e.exit(o),e.enter(r),e.consume(u),e.exit(r),e.exit(i),t):ue(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),h(u))}function h(t){return null===t||91===t||93===t||ue(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),a=a||!_e(t),92===t?u:h)}function u(t){return 91===t||92===t||93===t?(e.consume(t),l++,h):h(t)}}function oa(e,t,n,i,r,o){let s;return function(t){return e.enter(i),e.enter(r),e.consume(t),e.exit(r),s=40===t?41:t,a};function a(n){return n===s?(e.enter(r),e.consume(n),e.exit(r),e.exit(i),t):(e.enter(o),l(n))}function l(t){return t===s?(e.exit(o),a(s)):null===t?n(t):ue(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),$e(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===s||null===t||ue(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?h:c)}function h(t){return t===s||92===t?(e.consume(t),c):c(t)}}function ln(e,t){let n;return function i(r){return ue(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n=!0,i):_e(r)?$e(e,i,n?"linePrefix":"lineSuffix")(r):t(r)}}function ut(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const mg={name:"definition",tokenize:wg},vg={tokenize:bg,partial:!0};function wg(e,t,n){const i=this;let r;return function(t){return e.enter("definition"),sa.call(i,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function o(t){return r=ut(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),ln(e,ra(e,e.attempt(vg,$e(e,s,"whitespace"),$e(e,s,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(t)}function s(o){return null===o||ue(o)?(e.exit("definition"),i.parser.defined.includes(r)||i.parser.defined.push(r),t(o)):n(o)}}function bg(e,t,n){return function(t){return He(t)?ln(e,i)(t):n(t)};function i(t){return 34===t||39===t||40===t?oa(e,$e(e,r,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):n(t)}function r(e){return null===e||ue(e)?t(e):n(e)}}const yg={name:"hardBreakEscape",tokenize:xg};function xg(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),i};function i(i){return ue(i)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(i)):n(i)}}const Sg={name:"headingAtx",tokenize:Cg,resolve:kg};function kg(e,t){let n,i,r=e.length-2,o=3;return"whitespace"===e[o][1].type&&(o+=2),r-2>o&&"whitespace"===e[r][1].type&&(r-=2),"atxHeadingSequence"===e[r][1].type&&(o===r-1||r-4>o&&"whitespace"===e[r-2][1].type)&&(r-=o+1===r?2:4),r>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[r][1].end},i={type:"chunkText",start:e[o][1].start,end:e[r][1].end,contentType:"text"},qe(e,o,r-o+1,[["enter",n,t],["enter",i,t],["exit",i,t],["exit",n,t]])),e}function Cg(e,t,n){const i=this;let r=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),o(t)};function o(a){return 35===a&&r++<6?(e.consume(a),o):null===a||He(a)?(e.exit("atxHeadingSequence"),i.interrupt?t(a):s(a)):n(a)}function s(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||ue(n)?(e.exit("atxHeading"),t(n)):_e(n)?$e(e,s,"whitespace")(n):(e.enter("atxHeadingText"),l(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),s(t))}function l(t){return null===t||35===t||He(t)?(e.exit("atxHeadingText"),s(t)):(e.consume(t),l)}}const $g=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Qs=["pre","script","style","textarea"],Ag={name:"htmlFlow",tokenize:_g,resolveTo:Lg,concrete:!0},Eg={tokenize:Rg,partial:!0};function Lg(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function _g(e,t,n){const i=this;let r,o,s,a,l;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c};function c(a){return 33===a?(e.consume(a),h):47===a?(e.consume(a),f):63===a?(e.consume(a),r=3,i.interrupt?t:F):rt(a)?(e.consume(a),s=String.fromCharCode(a),o=!0,g):n(a)}function h(o){return 45===o?(e.consume(o),r=2,u):91===o?(e.consume(o),r=5,s="CDATA[",a=0,d):rt(o)?(e.consume(o),r=4,i.interrupt?t:F):n(o)}function u(r){return 45===r?(e.consume(r),i.interrupt?t:F):n(r)}function d(r){return r===s.charCodeAt(a++)?(e.consume(r),a===s.length?i.interrupt?t:A:d):n(r)}function f(t){return rt(t)?(e.consume(t),s=String.fromCharCode(t),g):n(t)}function g(a){return null===a||47===a||62===a||He(a)?47!==a&&o&&Qs.includes(s.toLowerCase())?(r=1,i.interrupt?t(a):A(a)):$g.includes(s.toLowerCase())?(r=6,47===a?(e.consume(a),p):i.interrupt?t(a):A(a)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(a):o?v(a):m(a)):45===a||Ke(a)?(e.consume(a),s+=String.fromCharCode(a),g):n(a)}function p(r){return 62===r?(e.consume(r),i.interrupt?t:A):n(r)}function m(t){return _e(t)?(e.consume(t),m):C(t)}function v(t){return 47===t?(e.consume(t),C):58===t||95===t||rt(t)?(e.consume(t),w):_e(t)?(e.consume(t),v):C(t)}function w(t){return 45===t||46===t||58===t||95===t||Ke(t)?(e.consume(t),w):b(t)}function b(t){return 61===t?(e.consume(t),y):_e(t)?(e.consume(t),b):v(t)}function y(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):_e(t)?(e.consume(t),y):(l=null,k(t))}function x(t){return null===t||ue(t)?n(t):t===l?(e.consume(t),S):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||He(t)?b(t):(e.consume(t),k)}function S(e){return 47===e||62===e||_e(e)?v(e):n(e)}function C(t){return 62===t?(e.consume(t),$):n(t)}function $(t){return _e(t)?(e.consume(t),$):null===t||ue(t)?A(t):n(t)}function A(t){return 45===t&&2===r?(e.consume(t),M):60===t&&1===r?(e.consume(t),R):62===t&&4===r?(e.consume(t),I):63===t&&3===r?(e.consume(t),F):93===t&&5===r?(e.consume(t),O):!ue(t)||6!==r&&7!==r?null===t||ue(t)?L(t):(e.consume(t),A):e.check(Eg,I,L)(t)}function L(t){return e.exit("htmlFlowData"),_(t)}function _(t){return null===t?N(t):ue(t)?e.attempt({tokenize:E,partial:!0},_,N)(t):(e.enter("htmlFlowData"),A(t))}function E(e,t,n){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r};function r(e){return i.parser.lazy[i.now().line]?n(e):t(e)}}function M(t){return 45===t?(e.consume(t),F):A(t)}function R(t){return 47===t?(e.consume(t),s="",T):A(t)}function T(t){return 62===t&&Qs.includes(s.toLowerCase())?(e.consume(t),I):rt(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),T):A(t)}function O(t){return 93===t?(e.consume(t),F):A(t)}function F(t){return 62===t?(e.consume(t),I):45===t&&2===r?(e.consume(t),F):A(t)}function I(t){return null===t||ue(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),I)}function N(n){return e.exit("htmlFlow"),t(n)}}function Rg(e,t,n){return function(i){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),e.attempt(gn,t,n)}}const Mg={name:"htmlText",tokenize:Tg};function Tg(e,t,n){const i=this;let r,o,s,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),c):47===t?(e.consume(t),k):63===t?(e.consume(t),y):rt(t)?(e.consume(t),$):n(t)}function c(t){return 45===t?(e.consume(t),h):91===t?(e.consume(t),o="CDATA[",s=0,p):rt(t)?(e.consume(t),b):n(t)}function h(t){return 45===t?(e.consume(t),u):n(t)}function u(t){return null===t||62===t?n(t):45===t?(e.consume(t),d):f(t)}function d(e){return null===e||62===e?n(e):f(e)}function f(t){return null===t?n(t):45===t?(e.consume(t),g):ue(t)?(a=f,O(t)):(e.consume(t),f)}function g(t){return 45===t?(e.consume(t),I):f(t)}function p(t){return t===o.charCodeAt(s++)?(e.consume(t),s===o.length?m:p):n(t)}function m(t){return null===t?n(t):93===t?(e.consume(t),v):ue(t)?(a=m,O(t)):(e.consume(t),m)}function v(t){return 93===t?(e.consume(t),w):m(t)}function w(t){return 62===t?I(t):93===t?(e.consume(t),w):m(t)}function b(t){return null===t||62===t?I(t):ue(t)?(a=b,O(t)):(e.consume(t),b)}function y(t){return null===t?n(t):63===t?(e.consume(t),x):ue(t)?(a=y,O(t)):(e.consume(t),y)}function x(e){return 62===e?I(e):y(e)}function k(t){return rt(t)?(e.consume(t),S):n(t)}function S(t){return 45===t||Ke(t)?(e.consume(t),S):C(t)}function C(t){return ue(t)?(a=C,O(t)):_e(t)?(e.consume(t),C):I(t)}function $(t){return 45===t||Ke(t)?(e.consume(t),$):47===t||62===t||He(t)?A(t):n(t)}function A(t){return 47===t?(e.consume(t),I):58===t||95===t||rt(t)?(e.consume(t),L):ue(t)?(a=A,O(t)):_e(t)?(e.consume(t),A):I(t)}function L(t){return 45===t||46===t||58===t||95===t||Ke(t)?(e.consume(t),L):_(t)}function _(t){return 61===t?(e.consume(t),E):ue(t)?(a=_,O(t)):_e(t)?(e.consume(t),_):A(t)}function E(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,M):ue(t)?(a=E,O(t)):_e(t)?(e.consume(t),E):(e.consume(t),r=void 0,T)}function M(t){return t===r?(e.consume(t),R):null===t?n(t):ue(t)?(a=M,O(t)):(e.consume(t),M)}function R(e){return 62===e||47===e||He(e)?A(e):n(e)}function T(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):62===t||He(t)?A(t):(e.consume(t),T)}function O(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),$e(e,F,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function F(t){return e.enter("htmlTextData"),a(t)}function I(i){return 62===i?(e.consume(i),e.exit("htmlTextData"),e.exit("htmlText"),t):n(i)}}const Dr={name:"labelEnd",tokenize:Ng,resolveTo:Dg,resolveAll:Pg},Og={tokenize:Bg},Fg={tokenize:Hg},Ig={tokenize:Wg};function Pg(e){let t,n=-1;for(;++n-1&&(s[0]=s[0].slice(i)),o>0&&s.push(e[r].slice(0,o))),s}function hp(e,t){let n=-1;const i=[];let r;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535==(65535&n)||65534==(65535&n)||n>1114111?"�":String.fromCharCode(n)}const $p=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ua(e){return e.replace($p,Ap)}function Ap(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return ca(n.slice(t?2:1),t?16:10)}return Pr(n)||e}const ha={}.hasOwnProperty,Ep=function(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),Lp(n)(Cp(Sp(n).document().write(kp()(e,t,!0))))};function Lp(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(y),autolinkProtocol:d,autolinkEmail:d,atxHeading:s(v),blockQuote:s((function(){return{type:"blockquote",children:[]}})),characterEscape:d,characterReference:d,codeFenced:s(m),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(m,a),codeText:s((function(){return{type:"inlineCode",value:""}}),a),codeTextData:d,data:d,codeFlowValue:d,definition:s((function(){return{type:"definition",identifier:"",label:null,title:null,url:""}})),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s((function(){return{type:"emphasis",children:[]}})),hardBreakEscape:s(w),hardBreakTrailing:s(w),htmlFlow:s(b,a),htmlFlowData:d,htmlText:s(b,a),htmlTextData:d,image:s((function(){return{type:"image",title:null,url:"",alt:null}})),label:a,link:s(y),listItem:s((function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}})),listItemValue:function(e){if(o("expectingFirstListItemValue")){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),r("expectingFirstListItemValue")}},listOrdered:s(x,(function(){r("expectingFirstListItemValue",!0)})),listUnordered:s(x),paragraph:s((function(){return{type:"paragraph",children:[]}})),reference:function(){r("referenceType","collapsed")},referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(v),strong:s((function(){return{type:"strong",children:[]}})),thematicBreak:s((function(){return{type:"thematicBreak"}}))},exit:{atxHeading:c(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}},autolink:c(),autolinkEmail:function(e){f.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){f.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:c(),characterEscapeValue:f,characterReferenceMarkerHexadecimal:p,characterReferenceMarkerNumeric:p,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=o("characterReferenceType");let i;n?(i=ca(t,"characterReferenceMarkerNumeric"===n?10:16),r("characterReferenceType")):i=Pr(t);const s=this.stack.pop();s.value+=i,s.position.end=Ct(e.end)},codeFenced:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),r("flowCodeInside")})),codeFencedFence:function(){o("flowCodeInside")||(this.buffer(),r("flowCodeInside",!0))},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:f,codeIndented:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")})),codeText:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),codeTextData:f,data:f,definition:c(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ut(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:c(),hardBreakEscape:c(g),hardBreakTrailing:c(g),htmlFlow:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlFlowData:f,htmlText:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlTextData:f,image:c((function(){const e=this.stack[this.stack.length-1];if(o("inReference")){const t=o("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;r("referenceType")})),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(r("inReference",!0),"link"===n.type){const t=e.children;n.children=t}else n.alt=t},labelText:function(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=ua(t),n.identifier=ut(t).toLowerCase()},lineEnding:function(e){const n=this.stack[this.stack.length-1];if(o("atHardBreak")){return n.children[n.children.length-1].position.end=Ct(e.end),void r("atHardBreak")}!o("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(n.type)&&(d.call(this,e),f.call(this,e))},link:c((function(){const e=this.stack[this.stack.length-1];if(o("inReference")){const t=o("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;r("referenceType")})),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ut(this.sliceSerialize(e)).toLowerCase(),r("referenceType","full")},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){r("inReference")},setextHeading:c((function(){r("setextHeadingSlurpLineEnding")})),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2},setextHeadingText:function(){r("setextHeadingSlurpLineEnding",!0)},strong:c(),thematicBreak:c()}};fa(t,(e||{}).mdastExtensions||[]);const n={};return function(e){let n={type:"root",children:[]};const s={stack:[n],tokenStack:[],config:t,enter:l,exit:h,buffer:a,resume:u,setData:r,getData:o},c=[];let d=-1;for(;++d0){const e=s.tokenStack[s.tokenStack.length-1];(e[1]||qs).call(s,void 0,e[0])}for(n.position={start:Ct(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ct(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d{const n=this.data("settings");return Ep(t,Object.assign({},n,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function Mp(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Tp(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]}function Op(e,t){const n=t.value?t.value+"\n":"",i=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,r={};i&&(r.className=["language-"+i]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Fp(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ip(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xt(e){const t=[];let n=-1,i=0,r=0;for(;++n55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(s=String.fromCharCode(o,t),r=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(i,n),encodeURIComponent(s)),i=n+r+1,s=""),r&&(n+=r,r=0)}return t.join("")+e.slice(i)}function da(e,t){const n=String(t.identifier).toUpperCase(),i=Xt(n.toLowerCase()),r=e.footnoteOrder.indexOf(n);let o;-1===r?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=r+1);const s=e.footnoteCounts[n],a={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+i,id:e.clobberPrefix+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,a);const l={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,l),e.applyData(t,l)}function Pp(e,t){const n=e.footnoteById;let i=1;for(;i in n;)i++;const r=String(i);return n[r]={type:"footnoteDefinition",identifier:r,children:[{type:"paragraph",children:t.children}],position:t.position},da(e,{type:"footnoteReference",identifier:r,position:t.position})}function Dp(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Np(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null}function ga(e,t){const n=t.referenceType;let i="]";if("collapsed"===n?i+="[]":"full"===n&&(i+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return{type:"text",value:"!["+t.alt+i};const r=e.all(t),o=r[0];o&&"text"===o.type?o.value="["+o.value:r.unshift({type:"text",value:"["});const s=r[r.length-1];return s&&"text"===s.type?s.value+=i:r.push({type:"text",value:i}),r}function Bp(e,t){const n=e.definition(t.identifier);if(!n)return ga(e,t);const i={src:Xt(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(i.title=n.title);const r={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,r),e.applyData(t,r)}function Hp(e,t){const n={src:Xt(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function Wp(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function jp(e,t){const n=e.definition(t.identifier);if(!n)return ga(e,t);const i={href:Xt(n.url||"")};null!==n.title&&void 0!==n.title&&(i.title=n.title);const r={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function zp(e,t){const n={href:Xt(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Up(e,t,n){const i=e.all(t),r=n?Vp(n):pa(t),o={},s=[];if("boolean"==typeof t.checked){const e=i[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},i.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a1}function Gp(e,t){const n={},i=e.all(t);let r=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++r-1?n.offset:null}}}function Jp(e,t){const n=e.all(t),i=n.shift(),r=[];if(i){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],n),r.push(n)}if(n.length>0){const i={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Nr(t.children[1]),s=Br(t.children[t.children.length-1]);o.line&&s.line&&(i.position={start:o,end:s}),r.push(i)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function Zp(e,t,n){const i=n?n.children:void 0,r=0===(i?i.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,s=o?o.length:t.children.length;let a=-1;const l=[];for(;++a0,!0),i[0]),r=i.index+i[0].length,i=n.exec(t);return o.push(no(t.slice(r),r>0,!1)),o.join("")}function no(e,t,n){let i=0,r=e.length;if(t){let t=e.codePointAt(i);for(;t===eo||t===to;)i++,t=e.codePointAt(i)}if(n){let t=e.codePointAt(r-1);for(;t===eo||t===to;)r--,t=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function tm(e,t){const n={type:"text",value:em(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function nm(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const im={blockquote:Mp,break:Tp,code:Op,delete:Fp,emphasis:Ip,footnoteReference:da,footnote:Pp,heading:Dp,html:Np,imageReference:Bp,image:Hp,inlineCode:Wp,linkReference:jp,link:zp,listItem:Up,list:Gp,paragraph:Kp,root:Yp,strong:Xp,table:Jp,tableCell:qp,tableRow:Zp,text:tm,thematicBreak:nm,toml:An,yaml:An,definition:An,footnoteDefinition:An};function An(){return null}const Hr=function(e){if(null==e)return am;if("string"==typeof e)return om(e);if("object"==typeof e)return Array.isArray(e)?rm(e):sm(e);if("function"==typeof e)return xi(e);throw new Error("Expected function, string, or object as test")};function rm(e){const t=[];let n=-1;for(;++n":"")+")"})}return h;function h(){let c,h,u,d=[];if((!t||r(s,a,l[l.length-1]||null))&&(d=um(n(s,l)),d[0]===io))return d;if(s.children&&d[0]!==cm)for(h=(i?s.children.length:-1)+o,u=l.concat(s);h>-1&&h{const n=so(e.identifier);n&&!ro.call(t,n)&&(t[n]=e)})),function(e){const n=so(e);return n&&ro.call(t,n)?t[n]:null}}function so(e){return String(e||"").toUpperCase()}const ci={}.hasOwnProperty;function dm(e,t){const n=t||{},i=n.allowDangerousHtml||!1,r={};return s.dangerous=i,s.clobberPrefix=void 0===n.clobberPrefix||null===n.clobberPrefix?"user-content-":n.clobberPrefix,s.footnoteLabel=n.footnoteLabel||"Footnotes",s.footnoteLabelTagName=n.footnoteLabelTagName||"h2",s.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},s.footnoteBackLabel=n.footnoteBackLabel||"Back to content",s.unknownHandler=n.unknownHandler,s.passThrough=n.passThrough,s.handlers={...im,...n.handlers},s.definition=fm(e),s.footnoteById=r,s.footnoteOrder=[],s.footnoteCounts={},s.patch=gm,s.applyData=pm,s.one=function(e,t){return wa(s,e,t)},s.all=function(e){return jr(s,e)},s.wrap=vm,s.augment=o,Wr(e,"footnoteDefinition",(e=>{const t=String(e.identifier).toUpperCase();ci.call(r,t)||(r[t]=e)})),s;function o(e,t){if(e&&"data"in e&&e.data){const n=e.data;n.hName&&("element"!==t.type&&(t={type:"element",tagName:"",properties:{},children:[]}),t.tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties={...t.properties,...n.hProperties}),"children"in t&&t.children&&n.hChildren&&(t.children=n.hChildren)}if(e){const n="type"in e?e:{position:e};hm(n)||(t.position={start:Nr(n),end:Br(n)})}return t}function s(e,t,n,i){return Array.isArray(n)&&(i=n,n={}),o(e,{type:"element",tagName:t,properties:n||{},children:i||[]})}}function gm(e,t){e.position&&(t.position=Qp(e))}function pm(e,t){let n=t;if(e&&e.data){const t=e.data.hName,i=e.data.hChildren,r=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:[]}),"element"===n.type&&r&&(n.properties={...n.properties,...r}),"children"in n&&n.children&&null!=i&&(n.children=i)}return n}function wa(e,t,n){const i=t&&t.type;if(!i)throw new Error("Expected node, got `"+t+"`");return ci.call(e.handlers,i)?e.handlers[i](e,t,n):e.passThrough&&e.passThrough.includes(i)?"children"in t?{...t,children:jr(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):mm(e,t)}function jr(e,t){const n=[];if("children"in t){const i=t.children;let r=-1;for(;++r0&&n.push({type:"text",value:"\n"}),n}function wm(e){const t=[];let n=-1;for(;++n1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&t.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(t)}const c=r[r.length-1];if(c&&"element"===c.type&&"p"===c.tagName){const e=c.children[c.children.length-1];e&&"text"===e.type?e.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...l)}else r.push(...l);const h={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+s},children:e.wrap(r,!0)};e.patch(i,h),t.push(h)}if(0!==t.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:"\n"}]}}function ba(e,t){const n=dm(e,t),i=n.one(e,null),r=wm(n);return r&&i.children.push({type:"text",value:"\n"},r),Array.isArray(i)?{type:"root",children:i}:i}const bm=function(e,t){return e&&"run"in e?xm(e,t):Sm(e||t)},ym=bm;function xm(e,t){return(n,i,r)=>{e.run(ba(n,t),i,(e=>{r(e)}))}}function Sm(e){return t=>ba(t,e)}class pn{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function ya(e,t){const n={},i={};let r=-1;for(;++r"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),ka=Qt({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Ca(e,t){return t in e?e[t]:t}function $a(e,t){return Ca(e,t.toLowerCase())}const Aa=Qt({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:$a,properties:{xmlns:null,xmlnsXLink:null}}),Ea=Qt({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Be,ariaAutoComplete:null,ariaBusy:Be,ariaChecked:Be,ariaColCount:ee,ariaColIndex:ee,ariaColSpan:ee,ariaControls:Oe,ariaCurrent:null,ariaDescribedBy:Oe,ariaDetails:null,ariaDisabled:Be,ariaDropEffect:Oe,ariaErrorMessage:null,ariaExpanded:Be,ariaFlowTo:Oe,ariaGrabbed:Be,ariaHasPopup:null,ariaHidden:Be,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Oe,ariaLevel:ee,ariaLive:null,ariaModal:Be,ariaMultiLine:Be,ariaMultiSelectable:Be,ariaOrientation:null,ariaOwns:Oe,ariaPlaceholder:null,ariaPosInSet:ee,ariaPressed:Be,ariaReadOnly:Be,ariaRelevant:null,ariaRequired:Be,ariaRoleDescription:Oe,ariaRowCount:ee,ariaRowIndex:ee,ariaRowSpan:ee,ariaSelected:Be,ariaSetSize:ee,ariaSort:null,ariaValueMax:ee,ariaValueMin:ee,ariaValueNow:ee,ariaValueText:null,role:null}}),$m=Qt({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:$a,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ut,acceptCharset:Oe,accessKey:Oe,action:null,allow:null,allowFullScreen:xe,allowPaymentRequest:xe,allowUserMedia:xe,alt:null,as:null,async:xe,autoCapitalize:null,autoComplete:Oe,autoFocus:xe,autoPlay:xe,capture:xe,charSet:null,checked:xe,cite:null,className:Oe,cols:ee,colSpan:null,content:null,contentEditable:Be,controls:xe,controlsList:Oe,coords:ee|Ut,crossOrigin:null,data:null,dateTime:null,decoding:null,default:xe,defer:xe,dir:null,dirName:null,disabled:xe,download:xa,draggable:Be,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:xe,formTarget:null,headers:Oe,height:ee,hidden:xe,high:ee,href:null,hrefLang:null,htmlFor:Oe,httpEquiv:Oe,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:xe,itemId:null,itemProp:Oe,itemRef:Oe,itemScope:xe,itemType:Oe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:xe,low:ee,manifest:null,max:null,maxLength:ee,media:null,method:null,min:null,minLength:ee,multiple:xe,muted:xe,name:null,nonce:null,noModule:xe,noValidate:xe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:xe,optimum:ee,pattern:null,ping:Oe,placeholder:null,playsInline:xe,poster:null,preload:null,readOnly:xe,referrerPolicy:null,rel:Oe,required:xe,reversed:xe,rows:ee,rowSpan:ee,sandbox:Oe,scope:null,scoped:xe,seamless:xe,selected:xe,shape:null,size:ee,sizes:null,slot:null,span:ee,spellCheck:Be,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ee,step:null,style:null,tabIndex:ee,target:null,title:null,translate:null,type:null,typeMustMatch:xe,useMap:null,value:Be,width:ee,wrap:null,align:null,aLink:null,archive:Oe,axis:null,background:null,bgColor:null,border:ee,borderColor:null,bottomMargin:ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:xe,declare:xe,event:null,face:null,frame:null,frameBorder:null,hSpace:ee,leftMargin:ee,link:null,longDesc:null,lowSrc:null,marginHeight:ee,marginWidth:ee,noResize:xe,noHref:xe,noShade:xe,noWrap:xe,object:null,profile:null,prompt:null,rev:null,rightMargin:ee,rules:null,scheme:null,scrolling:Be,standby:null,summary:null,text:null,topMargin:ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:xe,disableRemotePlayback:xe,prefix:null,property:null,results:ee,security:null,unselectable:null}}),Am=Qt({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Ca,properties:{about:Je,accentHeight:ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ee,amplitude:ee,arabicForm:null,ascent:ee,attributeName:null,attributeType:null,azimuth:ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ee,by:null,calcMode:null,capHeight:ee,className:Oe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ee,diffuseConstant:ee,direction:null,display:null,dur:null,divisor:ee,dominantBaseline:null,download:xe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ee,enableBackground:null,end:null,event:null,exponent:ee,externalResourcesRequired:null,fill:null,fillOpacity:ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ut,g2:Ut,glyphName:Ut,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ee,horizOriginX:ee,horizOriginY:ee,id:null,ideographic:ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ee,k:ee,k1:ee,k2:ee,k3:ee,k4:ee,kernelMatrix:Je,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ee,overlineThickness:ee,paintOrder:null,panose1:null,path:null,pathLength:ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Oe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ee,pointsAtY:ee,pointsAtZ:ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Je,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Je,rev:Je,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Je,requiredFeatures:Je,requiredFonts:Je,requiredFormats:Je,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ee,specularExponent:ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ee,strikethroughThickness:ee,string:null,stroke:null,strokeDashArray:Je,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ee,strokeOpacity:ee,strokeWidth:null,style:null,surfaceScale:ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Je,tabIndex:ee,tableValues:null,target:null,targetX:ee,targetY:ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Je,to:null,transform:null,u1:null,u2:null,underlinePosition:ee,underlineThickness:ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ee,values:null,vAlphabetic:ee,vMathematical:ee,vectorEffect:null,vHanging:ee,vIdeographic:ee,version:null,vertAdvY:ee,vertOriginX:ee,vertOriginY:ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Em=/^data[-\w.:]+$/i,ao=/-[a-z]/g,Lm=/[A-Z]/g;function _m(e,t){const n=br(t);let i=t,r=ot;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Em.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(ao,Mm);i="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!ao.test(e)){let n=e.replace(Lm,Rm);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}r=zr}return new r(i,t)}function Rm(e){return"-"+e.toLowerCase()}function Mm(e){return e.charAt(1).toUpperCase()}const lo={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Tm=ya([ka,Sa,Aa,Ea,$m],"html"),Om=ya([ka,Sa,Aa,Ea,Am],"svg");function Fm(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{Wr(t,"element",((t,n,i)=>{const r=i;let o;if(e.allowedElements?o=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(o=e.disallowedElements.includes(t.tagName)),!o&&e.allowElement&&"number"==typeof n&&(o=!e.allowElement(t,n,r)),o&&"number"==typeof n)return e.unwrapDisallowed&&t.children?r.children.splice(n,1,...t.children):r.children.splice(n,1),n}))}}var La,xr={},Im={get exports(){return xr},set exports(e){xr=e}},Le={},Ur=Symbol.for("react.element"),Vr=Symbol.for("react.portal"),Si=Symbol.for("react.fragment"),ki=Symbol.for("react.strict_mode"),Ci=Symbol.for("react.profiler"),$i=Symbol.for("react.provider"),Ai=Symbol.for("react.context"),Pm=Symbol.for("react.server_context"),Ei=Symbol.for("react.forward_ref"),Li=Symbol.for("react.suspense"),_i=Symbol.for("react.suspense_list"),Ri=Symbol.for("react.memo"),Mi=Symbol.for("react.lazy"),Dm=Symbol.for("react.offscreen");function at(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Ur:switch(e=e.type){case Si:case Ci:case ki:case Li:case _i:return e;default:switch(e=e&&e.$$typeof){case Pm:case Ai:case Ei:case Mi:case Ri:case $i:return e;default:return t}}case Vr:return t}}}La=Symbol.for("react.module.reference"),Le.ContextConsumer=Ai,Le.ContextProvider=$i,Le.Element=Ur,Le.ForwardRef=Ei,Le.Fragment=Si,Le.Lazy=Mi,Le.Memo=Ri,Le.Portal=Vr,Le.Profiler=Ci,Le.StrictMode=ki,Le.Suspense=Li,Le.SuspenseList=_i,Le.isAsyncMode=function(){return!1},Le.isConcurrentMode=function(){return!1},Le.isContextConsumer=function(e){return at(e)===Ai},Le.isContextProvider=function(e){return at(e)===$i},Le.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Ur},Le.isForwardRef=function(e){return at(e)===Ei},Le.isFragment=function(e){return at(e)===Si},Le.isLazy=function(e){return at(e)===Mi},Le.isMemo=function(e){return at(e)===Ri},Le.isPortal=function(e){return at(e)===Vr},Le.isProfiler=function(e){return at(e)===Ci},Le.isStrictMode=function(e){return at(e)===ki},Le.isSuspense=function(e){return at(e)===Li},Le.isSuspenseList=function(e){return at(e)===_i},Le.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===Si||e===Ci||e===ki||e===Li||e===_i||e===Dm||"object"==typeof e&&null!==e&&(e.$$typeof===Mi||e.$$typeof===Ri||e.$$typeof===$i||e.$$typeof===Ai||e.$$typeof===Ei||e.$$typeof===La||void 0!==e.getModuleId)},Le.typeOf=at,Im.exports=Le;const Nm=fi(xr);function Bm(e){const t=e&&"object"==typeof e&&"text"===e.type?e.value||"":e;return"string"==typeof t&&""===t.replace(/[ \t\n\f\r]/g,"")}function Hm(e){return e.join(" ").trim()}function Wm(e,t){const n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}var ui={},jm={get exports(){return ui},set exports(e){ui=e}},co=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,zm=/\n/g,Um=/^\s*/,Vm=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Gm=/^:\s*/,Km=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ym=/^[;\s]*/,Xm=/^\s+|\s+$/g,Qm="\n",uo="/",ho="*",Pt="",Jm="comment",Zm="declaration",qm=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,i=1;function r(e){var t=e.match(zm);t&&(n+=t.length);var r=e.lastIndexOf(Qm);i=~r?e.length-r:i+e.length}function o(){var e={line:n,column:i};return function(t){return t.position=new s(e),c(),t}}function s(e){this.start=e,this.end={line:n,column:i},this.source=t.source}function a(r){var o=new Error(t.source+":"+n+":"+i+": "+r);if(o.reason=r,o.filename=t.source,o.line=n,o.column=i,o.source=e,!t.silent)throw o}function l(t){var n=t.exec(e);if(n){var i=n[0];return r(i),e=e.slice(i.length),n}}function c(){l(Um)}function h(e){var t;for(e=e||[];t=u();)!1!==t&&e.push(t);return e}function u(){var t=o();if(uo==e.charAt(0)&&ho==e.charAt(1)){for(var n=2;Pt!=e.charAt(n)&&(ho!=e.charAt(n)||uo!=e.charAt(n+1));)++n;if(n+=2,Pt===e.charAt(n-1))return a("End of comment missing");var s=e.slice(2,n-2);return i+=2,r(s),e=e.slice(n),i+=2,t({type:Jm,comment:s})}}function d(){var e=o(),t=l(Vm);if(t){if(u(),!l(Gm))return a("property missing ':'");var n=l(Km),i=e({type:Zm,property:fo(t[0].replace(co,Pt)),value:n?fo(n[0].replace(co,Pt)):Pt});return l(Ym),i}}return s.prototype.content=e,c(),function(){var e,t=[];for(h(t);e=d();)!1!==e&&(t.push(e),h(t));return t}()};function fo(e){return e?e.replace(Xm,Pt):Pt}var ev=qm;function _a(e,t){var n=null;if(!e||"string"!=typeof e)return n;for(var i,r,o,s=ev(e),a="function"==typeof t,l=0,c=s.length;l0?zt.createElement(f,l,u):zt.createElement(f,l)}function rv(e){let t=-1;for(;++t for more info)`),delete En[t]}const t=Rd().use(Rp).use(e.remarkPlugins||[]).use(ym,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(Fm,e),n=new Yo;"string"==typeof e.children?n.value=e.children:void 0!==e.children&&null!==e.children&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const i=t.runSync(t.parse(n),n);if("root"!==i.type)throw new TypeError("Expected a `root` node");let r=zt.createElement(zt.Fragment,{},Ra({options:e,schema:Tm,listDepth:0},i));return e.className&&(r=zt.createElement("div",{className:e.className},r)),r}Ma.propTypes={children:pe.string,className:pe.string,allowElement:pe.func,allowedElements:pe.arrayOf(pe.string),disallowedElements:pe.arrayOf(pe.string),unwrapDisallowed:pe.bool,remarkPlugins:pe.arrayOf(pe.oneOfType([pe.object,pe.func,pe.arrayOf(pe.oneOfType([pe.bool,pe.string,pe.object,pe.func,pe.arrayOf(pe.any)]))])),rehypePlugins:pe.arrayOf(pe.oneOfType([pe.object,pe.func,pe.arrayOf(pe.oneOfType([pe.bool,pe.string,pe.object,pe.func,pe.arrayOf(pe.any)]))])),sourcePos:pe.bool,rawSourcePos:pe.bool,skipHtml:pe.bool,includeElementIndex:pe.bool,transformLinkUri:pe.oneOfType([pe.func,pe.bool]),linkTarget:pe.oneOfType([pe.func,pe.string]),transformImageUri:pe.func,components:pe.object};const uv={tokenize:pv,partial:!0},Ta={tokenize:mv,partial:!0},Oa={tokenize:vv,partial:!0},Vt={tokenize:bv,partial:!0},Fa={tokenize:wv,partial:!0},Ia={tokenize:dv,previous:Na},Pa={tokenize:gv,previous:Kr},bt={tokenize:fv,previous:Ba},gt={},hv={text:gt};let Ot=48;for(;Ot<123;)gt[Ot]=bt,Ot++,58===Ot?Ot=65:91===Ot&&(Ot=97);function fv(e,t,n){const i=this;let r,o;return function(t){return po(t)&&Ba(i.previous)&&!Yr(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(t)):n(t)};function s(t){return po(t)?(e.consume(t),s):64===t?(e.consume(t),a):n(t)}function a(t){return 46===t?e.check(Vt,u,l)(t):45===t||95===t?e.check(Vt,n,c)(t):Ke(t)?(!o&&ai(t)&&(o=!0),e.consume(t),a):u(t)}function l(t){return e.consume(t),r=!0,o=void 0,a}function c(t){return e.consume(t),h}function h(t){return 46===t?e.check(Vt,n,l)(t):a(t)}function u(i){return r&&!o?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}}function dv(e,t,n){const i=this;return function(t){return 87!==t&&119!==t||!Na(i.previous)||Yr(i.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(uv,e.attempt(Ta,e.attempt(Oa,r),n),n)(t))};function r(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}}function gv(e,t,n){const i=this;return function(t){return 72!==t&&104!==t||!Kr(i.previous)||Yr(i.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(t),r)};function r(t){return 84===t||116===t?(e.consume(t),o):n(t)}function o(t){return 84===t||116===t?(e.consume(t),s):n(t)}function s(t){return 80===t||112===t?(e.consume(t),a):n(t)}function a(t){return 83===t||115===t?(e.consume(t),l):l(t)}function l(t){return 58===t?(e.consume(t),c):n(t)}function c(t){return 47===t?(e.consume(t),h):n(t)}function h(t){return 47===t?(e.consume(t),u):n(t)}function u(t){return null===t||hn(t)||wi(t)||bi(t)?n(t):e.attempt(Ta,e.attempt(Oa,d),n)(t)}function d(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}}function pv(e,t,n){return function(t){return e.consume(t),i};function i(t){return 87===t||119===t?(e.consume(t),r):n(t)}function r(t){return 87===t||119===t?(e.consume(t),o):n(t)}function o(t){return 46===t?(e.consume(t),s):n(t)}function s(e){return null===e||ue(e)?n(e):t(e)}}function mv(e,t,n){let i,r;return o;function o(t){return 38===t?e.check(Fa,a,s)(t):46===t||95===t?e.check(Vt,a,s)(t):null===t||hn(t)||wi(t)||45!==t&&bi(t)?a(t):(e.consume(t),o)}function s(t){return 46===t?(r=i,i=void 0,e.consume(t),o):(95===t&&(i=!0),e.consume(t),o)}function a(e){return r||i?n(e):t(e)}}function vv(e,t){let n=0;return i;function i(s){return 38===s?e.check(Fa,t,r)(s):(40===s&&n++,41===s?e.check(Vt,o,r)(s):Gr(s)?t(s):Da(s)?e.check(Vt,t,r)(s):(e.consume(s),i))}function r(t){return e.consume(t),i}function o(e){return n--,n<0?t(e):r(e)}}function wv(e,t,n){return function(t){return e.consume(t),i};function i(t){return rt(t)?(e.consume(t),i):59===t?(e.consume(t),r):n(t)}function r(e){return Gr(e)?t(e):n(e)}}function bv(e,t,n){return function(t){return e.consume(t),i};function i(r){return Da(r)?(e.consume(r),i):Gr(r)?t(r):n(r)}}function Da(e){return 33===e||34===e||39===e||41===e||42===e||44===e||46===e||58===e||59===e||60===e||63===e||95===e||126===e}function Gr(e){return null===e||60===e||He(e)}function po(e){return 43===e||45===e||46===e||95===e||Ke(e)}function Na(e){return null===e||40===e||42===e||95===e||126===e||He(e)}function Kr(e){return null===e||!rt(e)}function Ba(e){return 47!==e&&Kr(e)}function Yr(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if(("labelLink"===i.type||"labelImage"===i.type)&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}gt[43]=bt,gt[45]=bt,gt[46]=bt,gt[95]=bt,gt[72]=[bt,Pa],gt[104]=[bt,Pa],gt[87]=[bt,Ia],gt[119]=[bt,Ia];const yv={tokenize:Lv,partial:!0};function xv(){return{document:{91:{tokenize:$v,continuation:{tokenize:Av},exit:Ev}},text:{91:{tokenize:Cv},93:{add:"after",tokenize:Sv,resolveTo:kv}}}}function Sv(e,t,n){const i=this;let r=i.events.length;const o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s;for(;r--;){const e=i.events[r][1];if("labelImage"===e.type){s=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(r){if(!s||!s._balanced)return n(r);const a=ut(i.sliceSerialize({start:s.end,end:i.now()}));return 94===a.charCodeAt(0)&&o.includes(a.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(r),e.exit("gfmFootnoteCallLabelMarker"),t(r)):n(r)}}function kv(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",r,t],["exit",r,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...a),e}function Cv(e,t,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,s=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(a){let h;return null===a||91===a||s++>999?n(a):93===a?o?(e.exit("chunkString"),h=e.exit("gfmFootnoteCallString"),r.includes(ut(i.sliceSerialize(h)))?function(n){return e.enter("gfmFootnoteCallLabelMarker"),e.consume(n),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t}(a):n(a)):n(a):(e.consume(a),He(a)||(o=!0),92===a?c:l)}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}}function $v(e,t,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,s,a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),c):n(t)}function c(t){let r;return null===t||91===t||a>999?n(t):93===t?s?(r=e.exit("gfmFootnoteDefinitionLabelString"),o=ut(i.sliceSerialize(r)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d):n(t):ue(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a++,c):(e.enter("chunkString").contentType="string",h(t))}function h(t){return null===t||ue(t)||91===t||93===t||a>999?(e.exit("chunkString"),c(t)):(He(t)||(s=!0),a++,e.consume(t),92===t?u:h)}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,h):h(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),$e(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return r.includes(o)||r.push(o),t(e)}}function Av(e,t,n){return e.check(gn,t,e.attempt(yv,t,n))}function Ev(e){e.exit("gfmFootnoteDefinition")}function Lv(e,t,n){const i=this;return $e(e,(function(e){const r=i.events[i.events.length-1];return r&&"gfmFootnoteDefinitionIndent"===r[1].type&&4===r[2].sliceSerialize(r[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)}function _v(e={}){let t=e.singleTilde;const n={tokenize:function(e,n,i){const r=this.previous,o=this.events;let s=0;return function(t){return 126===r&&"characterEscape"!==o[o.length-1][1].type?i(t):(e.enter("strikethroughSequenceTemporary"),a(t))};function a(o){const l=li(r);if(126===o)return s>1?i(o):(e.consume(o),s++,a);if(s<2&&!t)return i(o);const c=e.exit("strikethroughSequenceTemporary"),h=li(o);return c._open=!h||2===h&&Boolean(l),c._close=!l||2===l&&Boolean(h),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n=4?n(r):(i._gfmTableDynamicInterruptHack=!0,e.check(i.parser.constructs.flow,(function(e){return i._gfmTableDynamicInterruptHack=!1,n(e)}),(function(e){return i._gfmTableDynamicInterruptHack=!1,t(e)}))(r))}}}function Ov(e,t,n){let i=0;return function(t){return e.enter("check"),e.consume(t),r};function r(o){return-1===o||32===o?(e.consume(o),i++,4===i?t:r):null===o||He(o)?t(o):n(o)}}const Fv={tokenize:Pv},Iv={text:{91:Fv}};function Pv(e,t,n){const i=this;return function(t){return null===i.previous&&i._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),r):n(t)};function r(t){return He(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(i){return 93===i?(e.enter("taskListCheckMarker"),e.consume(i),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:Dv},t,n)):n(i)}}function Dv(e,t,n){const i=this;return $e(e,(function(e){const r=i.events[i.events.length-1];return(r&&"whitespace"===r[1].type||ue(e))&&null!==e?t(e):n(e)}),"whitespace")}function Nv(e){return qo([hv,xv(),_v(e),Rv,Iv])}function vo(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let i=0,r=n.indexOf(t);for(;-1!==r;)i++,r=n.indexOf(t,r+t.length);return i}function Bv(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Hv={}.hasOwnProperty,Wv=function(e,t,n,i){let r,o;"string"==typeof t||t instanceof RegExp?(o=[[t,n]],r=i):(o=t,r=n),r||(r={});const s=Hr(r.ignore||[]),a=jv(o);let l=-1;for(;++l0?{type:"text",value:a}:void 0),!1!==a&&(o!==n&&h.push({type:"text",value:e.value.slice(o,n)}),Array.isArray(a)?h.push(...a):a&&h.push(a),o=n+u[0].length,c=!0),!i.global)break;u=i.exec(e.value)}return c?(oe}const qi="phrasing",er=["autolink","link","image","label"],zv={transforms:[Qv],enter:{literalAutolink:Vv,literalAutolinkEmail:tr,literalAutolinkHttp:tr,literalAutolinkWww:tr},exit:{literalAutolink:Xv,literalAutolinkEmail:Yv,literalAutolinkHttp:Gv,literalAutolinkWww:Kv}},Uv={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:qi,notInConstruct:er},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:qi,notInConstruct:er},{character:":",before:"[ps]",after:"\\/",inConstruct:qi,notInConstruct:er}]};function Vv(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function tr(e){this.config.enter.autolinkProtocol.call(this,e)}function Gv(e){this.config.exit.autolinkProtocol.call(this,e)}function Kv(e){this.config.exit.data.call(this,e);this.stack[this.stack.length-1].url="http://"+this.sliceSerialize(e)}function Yv(e){this.config.exit.autolinkEmail.call(this,e)}function Xv(e){this.exit(e)}function Qv(e){Wv(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Jv],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Zv]],{ignore:["link","linkReference"]})}function Jv(e,t,n,i,r){let o="";if(!Ha(r)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!qv(n)))return!1;const s=ew(n+i);if(!s[0])return!1;const a={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function Zv(e,t,n,i){return!(!Ha(i,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function qv(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ew(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const r=vo(e,"(");let o=vo(e,")");for(;-1!==i&&r>o;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),o++;return[e,n]}function Ha(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||wi(n)||bi(n))&&(!t||47!==n)}function Wa(e){return e.label||!e.identifier?e.label||"":ua(e.identifier)}function tw(e,t,n){const i=t.indexStack,r=e.children||[],o=t.createTracker(n),s=[];let a=-1;for(i.push(-1);++a=c||e+10?" ":"")),r.shift(4),o+=r.move(rw(tw(e,n,r.current()),bw)),s(),o}function bw(e,t,n){return 0===t?e:(n?"":" ")+e}function Va(e,t,n){const i=t.indexStack,r=e.children||[],o=[];let s=-1,a=n.before;i.push(-1);let l=t.createTracker(n);for(;++s0&&("\r"===a||"\n"===a)&&"html"===c.type&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=t.createTracker(n),l.move(o.join(""))),o.push(l.move(t.handle(c,e,t,{...l.current(),before:a,after:h}))),a=o[o.length-1].slice(-1)}return i.pop(),o.join("")}Ua.peek=vw;const yw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ga.peek=$w;const xw={canContainEols:["delete"],enter:{strikethrough:kw},exit:{strikethrough:Cw}},Sw={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:yw}],handlers:{delete:Ga}};function kw(e){this.enter({type:"delete",children:[]},e)}function Cw(e){this.exit(e)}function Ga(e,t,n,i){const r=Ti(i),o=n.enter("strikethrough");let s=r.move("~~");return s+=Va(e,n,{...r.current(),before:s,after:"~"}),s+=r.move("~~"),o(),s}function $w(){return"~"}function Ka(e,t,n){let i=e.value||"",r="`",o=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++ol&&(l=e[c].length);++ha[h])&&(a[h]=e)}n.push(o)}o[c]=n,s[c]=r}let h=-1;if("object"==typeof n&&"length"in n)for(;++ha[h]&&(a[h]=o),d[h]=o),u[h]=s}o.splice(1,0,u),s.splice(1,0,d),c=-1;const f=[];for(;++c"none"===e?null:e)),children:[]},e),this.setData("inTable",!0)}function Tw(e){this.exit(e),this.setData("inTable")}function Ow(e){this.enter({type:"tableRow",children:[]},e)}function nr(e){this.exit(e)}function ko(e){this.enter({type:"tableCell",children:[]},e)}function Fw(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,Iw));this.stack[this.stack.length-1].value=t,this.exit(e)}function Iw(e,t){return"|"===t?t:e}function Pw(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,r=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,n,i){return a(function(e,t,n){const i=e.children;let r=-1;const o=[],s=t.enter("table");for(;++r-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let s=o.length+1;("tab"===r||"mixed"===r&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));const a=n.createTracker(i);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),(function(e,t,n){return t?(n?"":" ".repeat(s))+e:(n?o:o+" ".repeat(s-o.length))+e}));return l(),c}const Hw={exit:{taskListCheckValueChecked:Co,taskListCheckValueUnchecked:Co,paragraph:jw}},Ww={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:zw}};function Co(e){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===e.type}function jw(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1],n=e.children[0];if(n&&"text"===n.type){const i=t.children;let r,o=-1;for(;++oi(!n),children:["Show curl command",O.jsx(di,{className:"inline-block w-4 h-4 ml-1"})]}),n&&O.jsx(O.Fragment,{children:O.jsx("div",{className:"rounded mt-2",children:O.jsx(At,{maxLines:50,mode:"sh",value:t,theme:"one_dark",wrapEnabled:!1,onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1)},editorProps:{$blockScrolling:!0}})})})]})}function Xw(e){const{lrdDocsItem:t,curlCommand:n}=e;return O.jsx("div",{className:"mockup-window border",children:O.jsxs("div",{className:"p-5",children:[t.doc_block&&O.jsx("div",{className:"text-sm mb-10 text-slate-500",children:O.jsx(Ma,{children:t.doc_block,remarkPlugins:[Gw]})}),O.jsx("table",{className:"table table-fixed table-compact",children:O.jsxs("tbody",{children:[O.jsxs("tr",{children:[O.jsx("th",{children:"Method"}),O.jsx("td",{children:O.jsx("span",{className:`method-${t.http_method} uppercase`,children:t.http_method})})]}),t.controller&&O.jsxs("tr",{children:[O.jsx("th",{children:"Controller"}),O.jsx("td",{children:t.controller})]}),t.method&&O.jsxs("tr",{children:[O.jsx("th",{children:"Function"}),O.jsx("td",{children:t.method})]}),0!=t.middlewares.length&&O.jsxs("tr",{children:[O.jsx("th",{children:"Middlewares"}),O.jsx("td",{children:t.middlewares.map((e=>O.jsxs("div",{children:[O.jsx("span",{className:"badge badge-ghost badge-md mb-1 rounded-sm",children:e}),O.jsx("br",{})]},Te.generate())))})]}),O.jsxs("tr",{children:[O.jsx("th",{children:"Status Codes"}),O.jsx("td",{children:O.jsxs("div",{className:"collapse",children:[O.jsx("input",{type:"checkbox"}),O.jsxs("div",{className:"collapse-title text-sm text-slate-500 pl-0 mt-2",children:["Show Response codes for this request",O.jsx(di,{className:"inline-block w-4 h-4 ml-1"})]}),O.jsx("div",{className:"collapse-content p-0",children:t.responses&&t.responses.map((e=>O.jsx("div",{children:O.jsxs("div",{className:`response response-${e}`,children:["- ",e,"   ",pd[e]]})},Te.generate())))})]})})]}),O.jsxs("tr",{children:[O.jsxs("th",{children:[O.jsx(Ou,{className:"inline-block w-4 h-4 mr-1"}),"Curl"]}),O.jsx("td",{children:O.jsx(Yw,{curlCommand:n})})]})]})})]})})}!function(e,t){ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=t.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",s=t.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",a=function(){var e=this.createKeywordMapper({keyword:o,"support.function.builtin":s,"invalid.deprecated":"debugger"},"identifier"),t="(?:\\d+)",n="(?:(?:"+t+"?(?:\\.\\d+))|(?:"+t+"\\.))",i="(?:"+("(?:(?:"+n+"|"+t+"))")+"|"+n+")",r="(?:&"+t+")",a="[a-zA-Z_][a-zA-Z0-9_]*",l="(?:"+a+"(?==))",c="(?:"+a+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(e,t,n){var i="-"==e[2]?"indentedHeredoc":"heredoc",r=e.split(this.splitRegex);return n.push(i,r[4]),[{type:"constant",value:r[1]},{type:"text",value:r[2]},{type:"string",value:r[3]},{type:"support.class",value:r[4]},{type:"string",value:r[5]}]},rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^\t+"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return"heredoc"===t[0]||"indentedHeredoc"===t[0]?t[0]:e}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:"(?:\\$(?:SHLVL|\\$|\\!|\\?))"},{token:"variable",regex:l},{include:"variables"},{token:"support.function",regex:c},{token:"support.function",regex:r},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:i},{token:"constant.numeric",regex:"(?:(?:[1-9]\\d*)|(?:0))\\b"},{token:e,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};i.inherits(a,r),t.ShHighlightRules=a})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){var i=e("../../lib/oop"),r=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};i.inherits(s,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(i)?"start":r},this.getFoldWidgetRange=function(e,t,n,i){var r,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(r=o.match(this.foldingStartMarker)){var s=r.index;if(r[1])return this.openingBracketBlock(e,r[1],n,s);var a=e.getCommentFoldRange(n,s+r[0].length,1);return a&&!a.isMultiLine()&&(i?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(r=o.match(this.foldingStopMarker))){s=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],n,s):e.getCommentFoldRange(n,s,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),i=n.search(/\S/),o=t,s=n.length,a=t+=1,l=e.getLength();++tc)break;var h=this.getFoldWidgetRange(e,"all",t);if(h){if(h.start.row<=o)break;if(h.isMultiLine())t=h.end.row;else if(i==c)break}a=t}}return new r(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ns)return new r(s,i,n,t.length)}}.call(s.prototype)})),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"],(function(e,t,n){var i=e("../lib/oop"),r=e("./text").Mode,o=e("./sh_highlight_rules").ShHighlightRules,s=e("../range").Range,a=e("./folding/cstyle").FoldMode,l=e("./behaviour/cstyle").CstyleBehaviour,c=function(){this.HighlightRules=o,this.foldingRules=new a,this.$behaviour=new l};i.inherits(c,r),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return i;"start"==e&&(t.match(/^.*[\{\(\[:]\s*$/)&&(i+=n));return i};var e={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(t,n,i){if("\r\n"!==i&&"\r"!==i&&"\n"!==i)return!1;var r=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!r)return!1;do{var o=r.pop()}while(o&&("comment"==o.type||"text"==o.type&&o.value.match(/^\s+$/)));return!!o&&("keyword"==o.type&&e[o.value])},this.autoOutdent=function(e,t,n){n+=1;var i=this.$getIndent(t.getLine(n)),r=t.getTabString();i.slice(-r.length)==r&&t.remove(new s(n,i.length-r.length,n,i.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}.call(c.prototype),t.Mode=c})),ace.require(["ace/mode/sh"],(function(t){e&&(e.exports=t)}))}(Kw),ace.config.setModuleUrl("ace/mode/json_worker",fn);var Ao={},Qw={get exports(){return Ao},set exports(e){Ao=e}};function Jw(e){const{sqlData:t}=e;return O.jsxs(O.Fragment,{children:[!t&&O.jsx("div",{className:"text-center text-sm text-slate-500",children:"No SQL queries recorded"}),t&&O.jsxs(O.Fragment,{children:[O.jsx("p",{children:"SQL queries"}),O.jsx("div",{className:"rounded",children:O.jsx(At,{maxLines:50,width:"100%",readOnly:!0,mode:"sql",wrapEnabled:!0,value:t,theme:"one_dark",onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1)},editorProps:{$blockScrolling:!0}})})]})]})}function Zw(e){const{logsData:t}=e;return O.jsxs(O.Fragment,{children:[!t&&O.jsx("div",{className:"text-center text-sm text-slate-500",children:"No Laravel logs"}),t&&O.jsxs(O.Fragment,{children:[O.jsx("p",{children:"Laravel logs"}),O.jsx("div",{className:"rounded",children:O.jsx(At,{maxLines:50,width:"100%",mode:"sh",readOnly:!0,value:t,theme:"one_dark",wrapEnabled:!0,onLoad:function(e){e.renderer.setPadding(0),e.renderer.setScrollMargin(5,5,5,5),e.renderer.setShowPrintMargin(!1)},editorProps:{$blockScrolling:!0}})})]})]})}function qw(e){const{modelsData:t}=e,{modelsSummary:n,modelsTimeline:i}=t;return O.jsxs(O.Fragment,{children:[!Object.keys(n).length&&O.jsx("div",{className:"text-center text-sm text-slate-500",children:"No Models Data"}),0!=Object.keys(n).length&&O.jsxs(O.Fragment,{children:[O.jsx("h3",{className:"title",children:"Model events Summary"}),O.jsx("div",{className:"divider"}),Object.keys(n).map((e=>O.jsx("table",{className:"table table-compact table-fixed table-zebra w-full mb-10",children:O.jsx("tbody",{children:Object.keys(n[e]).map(((t,i)=>O.jsxs("tr",{children:[0==i&&O.jsxs("td",{rowSpan:Object.keys(n[e]).length,children:[O.jsx("span",{className:"font-bold text-slate-500",children:"Model"}),O.jsx("br",{}),O.jsx("div",{className:"",dangerouslySetInnerHTML:{__html:oi(e.split("\\")[e.split("\\").length-1],30,"
")}})]}),O.jsxs("td",{className:"capitalize",children:["created"==t&&O.jsx(ds,{className:"inline-block w-3 h-3 mr-1"}),"saved"==t&&O.jsx(cs,{className:"inline-block w-3 h-3 mr-1"}),"retrieved"==t&&O.jsx(us,{className:"inline-block w-3 h-3 text-white mr-1"}),"updated"==t&&O.jsx(ls,{className:"inline-block w-3 h-3 mr-1"}),"deleted"==t&&O.jsx(fs,{className:"inline-block w-3 h-3 mr-1"}),t]}),O.jsxs("td",{children:[O.jsx("span",{className:"font-bold",children:n[e][t]}),O.jsxs("span",{className:"text-slate-400 pl-1",children:["Time",n[e][t]>1?"s":""]})]})]},Te.generate())))})},Te.generate())))]}),0!=Object.keys(i).length&&O.jsxs(O.Fragment,{children:[O.jsx("h3",{className:"title",children:"Model Events Timeline"}),O.jsx("small",{className:"text-slate-500",children:"Events are in the order of occurrences"}),O.jsx("div",{className:"divider"}),O.jsx("div",{className:"flex flex-col md:grid grid-cols-12",children:Object.keys(i).map((e=>O.jsxs("div",{className:"flex md:contents",children:[O.jsxs("div",{className:"col-start-2 col-end-4 mr-10 md:mx-auto relative",children:[O.jsx("div",{className:"h-full w-3 flex items-center justify-center",children:O.jsx("div",{className:`h-full w-1 bg-${i[e].event} pointer-events-none`})}),O.jsxs("div",{className:`w-3 h-3 absolute top-1/2 rounded-full bg-${i[e].event} shadow text-center`,children:["created"==i[e].event&&O.jsx(ds,{className:"w-3 h-3 text-black mx-auto"}),"saved"==i[e].event&&O.jsx(cs,{className:"w-3 h-3 text-black mx-auto"}),"retrieved"==i[e].event&&O.jsx(us,{className:"w-3 h-3 text-white mx-auto"}),"updated"==i[e].event&&O.jsx(ls,{className:"w-3 h-3 text-black mx-auto"}),"deleted"==i[e].event&&O.jsx(fs,{className:"w-3 h-3 text-black mx-auto"})]})]}),O.jsxs("div",{className:"col-start-4 col-end-12 rounded-md my-3 mr-auto w-full break-all",children:[O.jsx("h3",{className:"mb-1",children:O.jsx("div",{className:"",dangerouslySetInnerHTML:{__html:oi(i[e].model.split("\\")[i[e].model.split("\\").length-1],30,"
")}})}),O.jsx("p",{className:"title text-justify w-full",children:O.jsx("span",{className:`badge badge-${i[e].event} rounded-sm`,children:i[e].event})})]})]},Te.generate())))})]})]})}!function(e,t){ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){var e=this.createKeywordMapper({"support.function":"avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl",keyword:"select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|then|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|foreign|not|references|default|null|inner|cross|natural|database|drop|grant|distinct","constant.language":"true|false","storage.type":"int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|money|real|number|integer"},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"string",regex:"`.*?`"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};i.inherits(o,r),t.SqlHighlightRules=o})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){var i=e("../../lib/oop"),r=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};i.inherits(s,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(i)?"start":r},this.getFoldWidgetRange=function(e,t,n,i){var r,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(r=o.match(this.foldingStartMarker)){var s=r.index;if(r[1])return this.openingBracketBlock(e,r[1],n,s);var a=e.getCommentFoldRange(n,s+r[0].length,1);return a&&!a.isMultiLine()&&(i?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(r=o.match(this.foldingStopMarker))){s=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],n,s):e.getCommentFoldRange(n,s,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),i=n.search(/\S/),o=t,s=n.length,a=t+=1,l=e.getLength();++tc)break;var h=this.getFoldWidgetRange(e,"all",t);if(h){if(h.start.row<=o)break;if(h.isMultiLine())t=h.end.row;else if(i==c)break}a=t}}return new r(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ns)return new r(s,i,n,t.length)}}.call(s.prototype)})),ace.define("ace/mode/folding/sql",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle"],(function(e,t,n){var i=e("../../lib/oop"),r=e("./cstyle").FoldMode,o=t.FoldMode=function(){};i.inherits(o,r),function(){}.call(o.prototype)})),ace.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/mode/folding/sql"],(function(e,t,n){var i=e("../lib/oop"),r=e("./text").Mode,o=e("./sql_highlight_rules").SqlHighlightRules,s=e("./folding/sql").FoldMode,a=function(){this.HighlightRules=o,this.foldingRules=new s,this.$behaviour=this.$defaultBehaviour};i.inherits(a,r),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/sql",this.snippetFileId="ace/snippets/sql"}.call(a.prototype),t.Mode=a})),ace.require(["ace/mode/sql"],(function(t){e&&(e.exports=t)}))}(Qw),ace.config.setModuleUrl("ace/mode/json_worker",fn),ace.config.setModuleUrl("ace/mode/json_worker",fn);const Ya=(e,t,n)=>{t=t||new FormData;for(const i in e){if(void 0===e[i])continue;const r=n?`${n}[${i}]`:i;if(e[i]instanceof FileList)for(let n=0;n{const e=JSON.parse(s);let r="";if(e[n+"-"+t.uri]&&(r=e[n+"-"+t.uri]),"GET"==n||"HEAD"==n||"DELETE"==n){if(r&&""!=r.trim())return b(r),void u(Cn(i,t.uri,n,r,l));let e="",o=0;for(const[n]of Object.entries(t.rules)){o++;const t=n.split(".").reduce(((e,t)=>e?`${e}[${"*"!==t?t:0}]`:t),"");e+=1==o?`?${t}=\n`:`&${t}=\n`}b(e),u(Cn(i,t.uri,n,e,l))}if("POST"==n||"PUT"==n||"PATCH"==n){if(r&&(""!=r.trim()||"{}"!=r.trim()))return x(r),void u(Cn(i,t.uri,n,r,l));const e=Object.entries(t.rules).reduce(((e,[t,n])=>{if(0==n.length)return e;const i=n[0].split("|");if(i.includes("file")||i.includes("image"))return e;const r=t.split(".");return r.reduce(((e,t,n)=>{if(t="*"===t?"0":t,n===r.length-1){if(!isNaN(Number(t)))return e=Array.isArray(e)?e:[];e[t]=i.includes("array")?[]:""}else i.includes("array")||"*"===r[n+1]||!isNaN(Number(r[n+1]))?e[t]=e[t]||[]:e[t]=e[t]||{};return e[t]}),e),e}),{}),o=JSON.stringify(e,null,2);x(o),u(Cn(i,t.uri,n,o,l))}}),[]);return O.jsxs(O.Fragment,{children:[O.jsx(gd,{activeTab:H,responseStatus:D,sqlQueriesCount:A,logsData:T,modelsData:M,setActiveTab:W}),O.jsxs("div",{className:"mt-5",children:[r&&O.jsx("div",{className:"alert alert-error mt-2 mb-2",children:r}),"info"==H&&O.jsx(Xw,{lrdDocsItem:t,curlCommand:h}),"request"==H&&O.jsx(dd,{lrdDocsItem:t,requestUri:d,method:n,sendingRequest:m,requestHeaders:l,bodyParams:y,queryParams:w,setRequestUri:f,handleSendRequest:()=>{(()=>{const e=JSON.parse(s);("GET"==n||"HEAD"==n||"DELETE"==n)&&(e[n+"-"+t.uri]=w),("POST"==n||"PUT"==n||"PATCH"==n)&&(e[n+"-"+t.uri]=y),a(JSON.stringify(e))})();try{JSON.parse(l)}catch(e){return void o("Global Request Headers are incorrect: "+e.message)}const e=JSON.parse(l);e["X-Request-LRD"]=!0,k&&(delete e["Content-Type"],e.Accept="multipart/form-data");const r={credentials:"include",method:n,headers:e};if("POST"==n||"PUT"==n||"PATCH"==n){try{null!=k&&Ya(JSON.parse(y),k)}catch(e){return void o("Request body incorrect: "+e.message)}r.body=null!=k?k:y}const c=performance.now();v(!0),E(""),F(""),N(""),$(""),o(null),fetch(`${i}/${d}${w}`,r).then((e=>{let t=performance.now()-c;return t=Math.round(1e3*(t+Number.EPSILON))/1e3,p(t),P(e.status),B(JSON.stringify(Object.fromEntries(e.headers),null,2)),v(!1),e.text()})).then((e=>{let t,n=!0;try{t=JSON.parse(e)}catch{n=!1}const i=t&&t._lrd;if(t&&t._lrd&&t._lrd.queries){const e=t._lrd.queries.map((e=>"Connection: "+e.connection_name+" Time taken: "+e.time+"ms: \n"+e.sql+"\n")).join("\n");E(e),L(t._lrd.queries.length)}if(t&&t._lrd&&t._lrd.logs){let e="";for(const n of t._lrd.logs)e+=n.level+": "+n.message+"\n";F(e)}t&&t._lrd&&t._lrd.memory&&N(t._lrd.memory),t&&t._lrd&&t._lrd.models&&t._lrd.modelsTimeline&&R({modelsSummary:t._lrd.models,modelsTimeline:t._lrd.modelsTimeline}),$(n?i&&t?.data?JSON.stringify(t?.data,null,2):JSON.stringify(t,null,2):e),W("response")})).catch((e=>{o("Response error: "+e),P(500),v(!1),W("response")}))},handleChangeRequestHeaders:e=>{c(e);try{o(null),JSON.parse(e)}catch(e){o("Global Request Headers are incorrect: "+e.message)}},handleFileChange:(e,t)=>{const n=k||new FormData,i=t.split("."),r=t.split(".").reduce(((e,t,n)=>n!==i.length-1||"*"!==t&&isNaN(Number(t))?e?`${e}[${t}]`:t:e),"");if(t.includes(".*"))for(let t=0;t`Invalid value for key ${e}`,lb=e=>`Pattern length exceeds max of ${e}.`,cb=e=>`Missing ${e} property in key`,ub=e=>`Property 'weight' in key '${e}' must be a positive integer`,Eo=Object.prototype.hasOwnProperty;class hb{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let n=Za(e);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Za(e){let t=null,n=null,i=null,r=1,o=null;if(dt(e)||wt(e))i=e,t=Lo(e),n=kr(e);else{if(!Eo.call(e,"name"))throw new Error(cb("name"));const s=e.name;if(i=s,Eo.call(e,"weight")&&(r=e.weight,r<=0))throw new Error(ub(s));t=Lo(s),n=kr(s),o=e.getFn}return{path:t,id:n,weight:r,src:i,getFn:o}}function Lo(e){return wt(e)?e:e.split(".")}function kr(e){return wt(e)?e.join("."):e}function fb(e,t){let n=[],i=!1;const r=(e,t,o)=>{if(Ze(e))if(t[o]){const s=e[t[o]];if(!Ze(s))return;if(o===t.length-1&&(dt(s)||Xa(s)||rb(s)))n.push(ib(s));else if(wt(s)){i=!0;for(let e=0,n=s.length;ee.score===t.score?e.idx{this._keysMap[e.id]=t}))}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,dt(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();dt(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t{let r=t.getFn?t.getFn(e):this.getFn(e,t.path);if(Ze(r))if(wt(r)){let e=[];const t=[{nestedArrIndex:-1,value:r}];for(;t.length;){const{nestedArrIndex:n,value:i}=t.pop();if(Ze(i))if(dt(i)&&!ir(i)){let t={v:i,i:n,n:this.norm.get(i)};e.push(t)}else wt(i)&&i.forEach(((e,n)=>{t.push({nestedArrIndex:n,value:e})}))}n.$[i]=e}else if(dt(r)&&!ir(r)){let e={v:r,n:this.norm.get(r)};n.$[i]=e}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function qa(e,t,{getFn:n=ve.getFn,fieldNormWeight:i=ve.fieldNormWeight}={}){const r=new Xr({getFn:n,fieldNormWeight:i});return r.setKeys(e.map(Za)),r.setSources(t),r.create(),r}function bb(e,{getFn:t=ve.getFn,fieldNormWeight:n=ve.fieldNormWeight}={}){const{keys:i,records:r}=e,o=new Xr({getFn:t,fieldNormWeight:n});return o.setKeys(i),o.setIndexRecords(r),o}function Ln(e,{errors:t=0,currentLocation:n=0,expectedLocation:i=0,distance:r=ve.distance,ignoreLocation:o=ve.ignoreLocation}={}){const s=t/e.length;if(o)return s;const a=Math.abs(i-n);return r?s+a/r:a?1:s}function yb(e=[],t=ve.minMatchCharLength){let n=[],i=-1,r=-1,o=0;for(let s=e.length;o=t&&n.push([i,r]),i=-1)}return e[o-1]&&o-i>=t&&n.push([i,o-1]),n}const Dt=32;function xb(e,t,n,{location:i=ve.location,distance:r=ve.distance,threshold:o=ve.threshold,findAllMatches:s=ve.findAllMatches,minMatchCharLength:a=ve.minMatchCharLength,includeMatches:l=ve.includeMatches,ignoreLocation:c=ve.ignoreLocation}={}){if(t.length>32)throw new Error(lb(32));const h=t.length,u=e.length,d=Math.max(0,Math.min(i,u));let f=o,g=d;const p=a>1||l,m=p?Array(u):[];let v;for(;(v=e.indexOf(t,g))>-1;){let e=Ln(t,{currentLocation:v,expectedLocation:d,distance:r,ignoreLocation:c});if(f=Math.min(e,f),g=v+h,p){let e=0;for(;e=l;o-=1){let s=o-1,a=n[e.charAt(s)];if(p&&(m[s]=+!!a),k[o]=(k[o+1]<<1|1)&a,i&&(k[o]|=(w[o+1]|w[o])<<1|1|w[o+1]),k[o]&x&&(b=Ln(t,{errors:i,currentLocation:s,expectedLocation:d,distance:r,ignoreLocation:c}),b<=f)){if(f=b,g=s,g<=d)break;l=Math.max(1,2*d-g)}}if(Ln(t,{errors:i+1,currentLocation:d,expectedLocation:d,distance:r,ignoreLocation:c})>f)break;w=k}const k={isMatch:g>=0,score:Math.max(.001,b)};if(p){const e=yb(m,a);e.length?l&&(k.indices=e):k.isMatch=!1}return k}function Sb(e){let t={};for(let n=0,i=e.length;n{this.chunks.push({pattern:e,alphabet:Sb(e),startIndex:t})},h=this.pattern.length;if(h>32){let e=0;const t=h%32,n=h-t;for(;e{const{isMatch:g,score:p,indices:m}=xb(e,t,d,{location:i+f,distance:r,threshold:o,findAllMatches:s,minMatchCharLength:a,includeMatches:n,ignoreLocation:l});g&&(u=!0),h+=p,g&&m&&(c=[...c,...m])}));let d={isMatch:u,score:u?h/this.chunks.length:1};return u&&n&&(d.indices=c),d}}class Lt{constructor(e){this.pattern=e}static isMultiMatch(e){return _o(e,this.multiRegex)}static isSingleMatch(e){return _o(e,this.singleRegex)}search(){}}function _o(e,t){const n=e.match(t);return n?n[1]:null}class kb extends Lt{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class Cb extends Lt{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class $b extends Lt{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class Ab extends Lt{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class Eb extends Lt{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class Lb extends Lt{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class tl extends Lt{constructor(e,{location:t=ve.location,threshold:n=ve.threshold,distance:i=ve.distance,includeMatches:r=ve.includeMatches,findAllMatches:o=ve.findAllMatches,minMatchCharLength:s=ve.minMatchCharLength,isCaseSensitive:a=ve.isCaseSensitive,ignoreLocation:l=ve.ignoreLocation}={}){super(e),this._bitapSearch=new el(e,{location:t,threshold:n,distance:i,includeMatches:r,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:a,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class nl extends Lt{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,n=0;const i=[],r=this.pattern.length;for(;(t=e.indexOf(this.pattern,n))>-1;)n=t+r,i.push([t,n-1]);const o=!!i.length;return{isMatch:o,score:o?0:1,indices:i}}}const Cr=[kb,nl,$b,Ab,Lb,Eb,Cb,tl],Ro=Cr.length,_b=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Rb="|";function Mb(e,t={}){return e.split(Rb).map((e=>{let n=e.trim().split(_b).filter((e=>e&&!!e.trim())),i=[];for(let e=0,r=n.length;e!(!e[hi.AND]&&!e[hi.OR]),Ib=e=>!!e[Er.PATH],Pb=e=>!wt(e)&&Qa(e)&&!Lr(e),Mo=e=>({[hi.AND]:Object.keys(e).map((t=>({[t]:e[t]})))});function il(e,t,{auto:n=!0}={}){const i=e=>{let r=Object.keys(e);const o=Ib(e);if(!o&&r.length>1&&!Lr(e))return i(Mo(e));if(Pb(e)){const i=o?e[Er.PATH]:r[0],s=o?e[Er.PATTERN]:e[i];if(!dt(s))throw new Error(ab(i));const a={keyId:kr(i),pattern:s};return n&&(a.searcher=Ar(s,t)),a}let s={children:[],operator:r[0]};return r.forEach((t=>{const n=e[t];wt(n)&&n.forEach((e=>{s.children.push(i(e))}))})),s};return Lr(e)||(e=Mo(e)),i(e)}function Db(e,{ignoreFieldNorm:t=ve.ignoreFieldNorm}){e.forEach((e=>{let n=1;e.matches.forEach((({key:e,norm:i,score:r})=>{const o=e?e.weight:null;n*=Math.pow(0===r&&o?Number.EPSILON:r,(o||1)*(t?1:i))})),e.score=n}))}function Nb(e,t){const n=e.matches;t.matches=[],Ze(n)&&n.forEach((e=>{if(!Ze(e.indices)||!e.indices.length)return;const{indices:n,value:i}=e;let r={indices:n,value:i};e.key&&(r.key=e.key.src),e.idx>-1&&(r.refIndex=e.idx),t.matches.push(r)}))}function Bb(e,t){t.score=e.score}function Hb(e,t,{includeMatches:n=ve.includeMatches,includeScore:i=ve.includeScore}={}){const r=[];return n&&r.push(Nb),i&&r.push(Bb),e.map((e=>{const{idx:n}=e,i={item:t[n],refIndex:n};return r.length&&r.forEach((t=>{t(e,i)})),i}))}class Jt{constructor(e,t={},n){this.options={...ve,...t},this.options.useExtendedSearch,this._keyStore=new hb(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Xr))throw new Error(ob);this._myIndex=t||qa(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Ze(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let n=0,i=this._docs.length;n-1&&(a=a.slice(0,t)),Hb(a,this._docs,{includeMatches:n,includeScore:i})}_searchStringList(e){const t=Ar(e,this.options),{records:n}=this._myIndex,i=[];return n.forEach((({v:e,i:n,n:r})=>{if(!Ze(e))return;const{isMatch:o,score:s,indices:a}=t.searchIn(e);o&&i.push({item:e,idx:n,matches:[{score:s,value:e,norm:r,indices:a}]})})),i}_searchLogical(e){const t=il(e,this.options),n=(e,t,i)=>{if(!e.children){const{keyId:n,searcher:r}=e,o=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:r});return o&&o.length?[{idx:i,item:t,matches:o}]:[]}const r=[];for(let o=0,s=e.children.length;o{if(Ze(e)){let s=n(t,e,i);s.length&&(r[i]||(r[i]={idx:i,item:e,matches:[]},o.push(r[i])),s.forEach((({matches:e})=>{r[i].matches.push(...e)})))}})),o}_searchObjectList(e){const t=Ar(e,this.options),{keys:n,records:i}=this._myIndex,r=[];return i.forEach((({$:e,i:i})=>{if(!Ze(e))return;let o=[];n.forEach(((n,i)=>{o.push(...this._findMatches({key:n,value:e[i],searcher:t}))})),o.length&&r.push({idx:i,item:e,matches:o})})),r}_findMatches({key:e,value:t,searcher:n}){if(!Ze(t))return[];let i=[];if(wt(t))t.forEach((({v:t,i:r,n:o})=>{if(!Ze(t))return;const{isMatch:s,score:a,indices:l}=n.searchIn(t);s&&i.push({score:a,key:e,value:t,idx:r,norm:o,indices:l})}));else{const{v:r,n:o}=t,{isMatch:s,score:a,indices:l}=n.searchIn(r);s&&i.push({score:a,key:e,value:r,norm:o,indices:l})}return i}}function jb(){const[e,t]=se.useState([]),[n,i]=se.useState([]),[r,o]=se.useState(""),[s,a]=se.useState(""),[l,c]=se.useState(!1),[h,u]=se.useState(null),[d]=je("groupby","default"),[f]=je("sort","default"),[g]=je("showGet","true"),[p]=je("showPost","true"),[m]=je("showDelete","true"),[v]=je("showPut","true"),[w]=je("showPatch","true"),[b]=je("showHead","true"),y={keys:["uri","doc_block"],threshold:.3},x=(e,t,n,i,r,o,s,a,l)=>`${e}?json=true&showGet=${t}&showPost=${n}&showDelete=${i}&showPut=${r}&showPatch=${o}&showHead=${s}&sort=${a}&groupby=${l}`;se.useEffect((()=>{let e=new URLSearchParams(window.location.search).get("api");if(!e){const t=location.protocol+"//"+location.host;a(t),e=t+"/request-docs/api"}if(e){const t=e?.split("/").slice(0,3).join("/");a(t)}o(e);const t=x(e,g,p,m,v,w,b,f,d);k(t)}),[]);const k=e=>{c(!0),fetch(e).then((e=>e.json())).then((e=>{if(!Array.isArray(e))return u("Invalid response"),void c(!1);u(null),t(e),i(e),c(!1),setTimeout((()=>{(()=>{const e=window.location.hash;if(e){const t=e.replace("#",""),n=document.getElementById(t);n&&n.scrollIntoView()}})()}),10)})).catch((e=>{u(e.message),c(!1)}))};return O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"sticky top-0 z-50 bg-gray-400",children:[O.jsx(nh,{handleChangeSettings:(e,t,n,i,o,s,a,l)=>{const c=x(r,e,t,n,i,o,s,a,l);k(c)},handleSearch:i=>{if(!(i=i.trim()))return void t(n);const r=new Jt(e,y).search(i),o=[];for(let e=0;eO.jsxs("div",{children:[O.jsx("div",{className:"min-h-screen",children:O.jsxs("div",{className:"main-grid grid grid-cols-10 gap-2",children:[O.jsx("div",{className:"col-span-4 ml-5",children:O.jsx(Ih,{lrdDocsItem:e,method:e.http_method})}),O.jsx("div",{className:"col-span-5 ml-5",children:O.jsx(eb,{lrdDocsItem:e,method:e.http_method,host:s})})]})}),O.jsx("div",{className:"divider"})]},Te.generate())))})]})]})}Jt.version="6.6.2",Jt.createIndex=qa,Jt.parseIndex=bb,Jt.config=ve,Jt.parseQuery=il,Fb(Ob);export{jb as default}; \ No newline at end of file diff --git a/resources/dist/index.html b/resources/dist/index.html index e55fd82..ba1c3b4 100644 --- a/resources/dist/index.html +++ b/resources/dist/index.html @@ -1 +1 @@ -LRD - Laravel Request Docs \ No newline at end of file +LRD - Laravel Request Docs \ No newline at end of file diff --git a/ui/package-lock.json b/ui/package-lock.json index e983b41..8e32ed2 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -23,9 +23,9 @@ "shortid": "^2.2.16" }, "devDependencies": { - "@otterlord/astro-compress": "^1.1.48", "@typescript-eslint/eslint-plugin": "^5.52.0", "@typescript-eslint/parser": "^5.52.0", + "astro-compress": "^2.0.8", "autoprefixer": "^10.4.13", "daisyui": "^2.50.0", "eslint": "^8.34.0", @@ -1082,191 +1082,6 @@ "node": ">= 8" } }, - "node_modules/@otterlord/astro-compress": { - "version": "1.1.48", - "resolved": "https://registry.npmjs.org/@otterlord/astro-compress/-/astro-compress-1.1.48.tgz", - "integrity": "sha512-1AUSUMk0WMSMOg/qSmJ7K/0xUsl4hYrAlmcpxzunVFen2r6QmvQDE+51nrPJljzYcXPil+aFrzGe+jfWVChz6A==", - "dev": true, - "dependencies": { - "@types/csso": "5.0.0", - "@types/html-minifier-terser": "7.0.0", - "csso": "5.0.5", - "deepmerge-ts": "5.1.0", - "fast-glob": "3.2.12", - "html-minifier-terser": "7.2.0", - "sharp": "0.32.4", - "svgo": "3.0.2", - "terser": "5.19.2" - } - }, - "node_modules/@otterlord/astro-compress/node_modules/clean-css": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz", - "integrity": "sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==", - "dev": true, - "dependencies": { - "source-map": "~0.6.0" - }, - "engines": { - "node": ">= 10.0" - } - }, - "node_modules/@otterlord/astro-compress/node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@otterlord/astro-compress/node_modules/deepmerge-ts": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-5.1.0.tgz", - "integrity": "sha512-eS8dRJOckyo9maw9Tu5O5RUi/4inFLrnoLkBe3cPfDMx3WZioXtmOew4TXQaxq7Rhl4xjDtR7c6x8nNTxOvbFw==", - "dev": true, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@otterlord/astro-compress/node_modules/html-minifier-terser": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz", - "integrity": "sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==", - "dev": true, - "dependencies": { - "camel-case": "^4.1.2", - "clean-css": "~5.3.2", - "commander": "^10.0.0", - "entities": "^4.4.0", - "param-case": "^3.0.4", - "relateurl": "^0.2.7", - "terser": "^5.15.1" - }, - "bin": { - "html-minifier-terser": "cli.js" - }, - "engines": { - "node": "^14.13.1 || >=16.0.0" - } - }, - "node_modules/@otterlord/astro-compress/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@otterlord/astro-compress/node_modules/node-addon-api": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", - "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==", - "dev": true - }, - "node_modules/@otterlord/astro-compress/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@otterlord/astro-compress/node_modules/sharp": { - "version": "0.32.4", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.4.tgz", - "integrity": "sha512-exUnZewqVZC6UXqXuQ8fyJJv0M968feBi04jb9GcUHrWtkRoAKnbJt8IfwT4NJs7FskArbJ14JAFGVuooszoGg==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "color": "^4.2.3", - "detect-libc": "^2.0.2", - "node-addon-api": "^6.1.0", - "prebuild-install": "^7.1.1", - "semver": "^7.5.4", - "simple-get": "^4.0.1", - "tar-fs": "^3.0.4", - "tunnel-agent": "^0.6.0" - }, - "engines": { - "node": ">=14.15.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@otterlord/astro-compress/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@otterlord/astro-compress/node_modules/tar-fs": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", - "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", - "dev": true, - "dependencies": { - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^3.1.5" - } - }, - "node_modules/@otterlord/astro-compress/node_modules/tar-stream": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", - "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", - "dev": true, - "dependencies": { - "b4a": "^1.6.4", - "fast-fifo": "^1.2.0", - "streamx": "^2.15.0" - } - }, - "node_modules/@otterlord/astro-compress/node_modules/terser": { - "version": "5.19.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.2.tgz", - "integrity": "sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==", - "dev": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@otterlord/astro-compress/node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/@otterlord/astro-compress/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/@pkgr/utils": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.3.1.tgz", @@ -1407,11 +1222,10 @@ } }, "node_modules/@types/node": { - "version": "18.13.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz", - "integrity": "sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==", - "optional": true, - "peer": true + "version": "20.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.0.tgz", + "integrity": "sha512-Mgq7eCtoTjT89FqNoTzzXg2XvCi5VMhRV6+I2aYanc6kQCBImeNaAYRs/DyoVqk1YEUJK5gN9VO7HRIdz4Wo3Q==", + "devOptional": true }, "node_modules/@types/parse5": { "version": "6.0.3", @@ -2135,6 +1949,22 @@ "npm": ">=6.14.0" } }, + "node_modules/astro-compress": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/astro-compress/-/astro-compress-2.0.12.tgz", + "integrity": "sha512-De5XPeVbfexO0wIoZrO3222fv1e74BoDylc6GL0AWPqasdDKXbfC3wyhmGhcEpWR6HRMi8WjdEtE6MtM5rnCaA==", + "dev": true, + "dependencies": { + "@types/csso": "5.0.0", + "@types/html-minifier-terser": "7.0.0", + "csso": "5.0.5", + "files-pipe": "2.0.15", + "html-minifier-terser": "7.2.0", + "sharp": "0.32.5", + "svgo": "3.0.2", + "terser": "5.19.2" + } + }, "node_modules/astro/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -2627,6 +2457,27 @@ "node": ">=8" } }, + "node_modules/clean-css": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz", + "integrity": "sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==", + "dev": true, + "dependencies": { + "source-map": "~0.6.0" + }, + "engines": { + "node": ">= 10.0" + } + }, + "node_modules/clean-css/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/cli-boxes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", @@ -2734,6 +2585,15 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "engines": { + "node": ">=14" + } + }, "node_modules/common-ancestor-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", @@ -4046,6 +3906,42 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/files-pipe": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/files-pipe/-/files-pipe-2.0.15.tgz", + "integrity": "sha512-82lnXCqBO3o/iyxZrHhU7ksy1LfRBw0JxbbUKo8+/8SwAFRTj6FPJKekMVINQXMf3dKXgJh5o7YjApLyeSTayw==", + "dev": true, + "dependencies": { + "@types/node": "20.5.0", + "deepmerge-ts": "5.1.0", + "fast-glob": "3.3.1" + } + }, + "node_modules/files-pipe/node_modules/deepmerge-ts": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-5.1.0.tgz", + "integrity": "sha512-eS8dRJOckyo9maw9Tu5O5RUi/4inFLrnoLkBe3cPfDMx3WZioXtmOew4TXQaxq7Rhl4xjDtR7c6x8nNTxOvbFw==", + "dev": true, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/files-pipe/node_modules/fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -4601,6 +4497,27 @@ "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", "integrity": "sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==" }, + "node_modules/html-minifier-terser": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz", + "integrity": "sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==", + "dev": true, + "dependencies": { + "camel-case": "^4.1.2", + "clean-css": "~5.3.2", + "commander": "^10.0.0", + "entities": "^4.4.0", + "param-case": "^3.0.4", + "relateurl": "^0.2.7", + "terser": "^5.15.1" + }, + "bin": { + "html-minifier-terser": "cli.js" + }, + "engines": { + "node": "^14.13.1 || >=16.0.0" + } + }, "node_modules/html-void-elements": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-2.0.1.tgz", @@ -6391,6 +6308,12 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/node-addon-api": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", + "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==", + "dev": true + }, "node_modules/node-releases": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", @@ -7799,10 +7722,88 @@ "semver": "bin/semver.js" } }, - "node_modules/server-destroy": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", - "integrity": "sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==" + "node_modules/server-destroy": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", + "integrity": "sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==" + }, + "node_modules/sharp": { + "version": "0.32.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.5.tgz", + "integrity": "sha512-0dap3iysgDkNaPOaOL4X/0akdu0ma62GcdC2NBQ+93eqpePdDdr2/LM0sFdDSMmN7yS+odyZtPsb7tx/cYBKnQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.2", + "node-addon-api": "^6.1.0", + "prebuild-install": "^7.1.1", + "semver": "^7.5.4", + "simple-get": "^4.0.1", + "tar-fs": "^3.0.4", + "tunnel-agent": "^0.6.0" + }, + "engines": { + "node": ">=14.15.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/sharp/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sharp/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sharp/node_modules/tar-fs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "dev": true, + "dependencies": { + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "node_modules/sharp/node_modules/tar-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", + "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "dev": true, + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, + "node_modules/sharp/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "node_modules/shebang-command": { "version": "2.0.0", @@ -8386,14 +8387,13 @@ } }, "node_modules/terser": { - "version": "5.16.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.2.tgz", - "integrity": "sha512-JKuM+KvvWVqT7muHVyrwv7FVRPnmHDwF6XwoIxdbF5Witi0vu99RYpxDexpJndXt3jbZZmmWr2/mQa6HvSNdSg==", - "optional": true, - "peer": true, + "version": "5.19.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.2.tgz", + "integrity": "sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==", + "devOptional": true, "dependencies": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -8408,8 +8408,7 @@ "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "optional": true, - "peer": true + "devOptional": true }, "node_modules/text-table": { "version": "0.2.0", @@ -9889,155 +9888,6 @@ "fastq": "^1.6.0" } }, - "@otterlord/astro-compress": { - "version": "1.1.48", - "resolved": "https://registry.npmjs.org/@otterlord/astro-compress/-/astro-compress-1.1.48.tgz", - "integrity": "sha512-1AUSUMk0WMSMOg/qSmJ7K/0xUsl4hYrAlmcpxzunVFen2r6QmvQDE+51nrPJljzYcXPil+aFrzGe+jfWVChz6A==", - "dev": true, - "requires": { - "@types/csso": "5.0.0", - "@types/html-minifier-terser": "7.0.0", - "csso": "5.0.5", - "deepmerge-ts": "5.1.0", - "fast-glob": "3.2.12", - "html-minifier-terser": "7.2.0", - "sharp": "0.32.4", - "svgo": "3.0.2", - "terser": "5.19.2" - }, - "dependencies": { - "clean-css": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz", - "integrity": "sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==", - "dev": true, - "requires": { - "source-map": "~0.6.0" - } - }, - "commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true - }, - "deepmerge-ts": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-5.1.0.tgz", - "integrity": "sha512-eS8dRJOckyo9maw9Tu5O5RUi/4inFLrnoLkBe3cPfDMx3WZioXtmOew4TXQaxq7Rhl4xjDtR7c6x8nNTxOvbFw==", - "dev": true - }, - "html-minifier-terser": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz", - "integrity": "sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==", - "dev": true, - "requires": { - "camel-case": "^4.1.2", - "clean-css": "~5.3.2", - "commander": "^10.0.0", - "entities": "^4.4.0", - "param-case": "^3.0.4", - "relateurl": "^0.2.7", - "terser": "^5.15.1" - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "node-addon-api": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", - "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==", - "dev": true - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "sharp": { - "version": "0.32.4", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.4.tgz", - "integrity": "sha512-exUnZewqVZC6UXqXuQ8fyJJv0M968feBi04jb9GcUHrWtkRoAKnbJt8IfwT4NJs7FskArbJ14JAFGVuooszoGg==", - "dev": true, - "requires": { - "color": "^4.2.3", - "detect-libc": "^2.0.2", - "node-addon-api": "^6.1.0", - "prebuild-install": "^7.1.1", - "semver": "^7.5.4", - "simple-get": "^4.0.1", - "tar-fs": "^3.0.4", - "tunnel-agent": "^0.6.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "tar-fs": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", - "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", - "dev": true, - "requires": { - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^3.1.5" - } - }, - "tar-stream": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", - "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", - "dev": true, - "requires": { - "b4a": "^1.6.4", - "fast-fifo": "^1.2.0", - "streamx": "^2.15.0" - } - }, - "terser": { - "version": "5.19.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.2.tgz", - "integrity": "sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==", - "dev": true, - "requires": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - } - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, "@pkgr/utils": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.3.1.tgz", @@ -10169,11 +10019,10 @@ } }, "@types/node": { - "version": "18.13.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz", - "integrity": "sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==", - "optional": true, - "peer": true + "version": "20.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.0.tgz", + "integrity": "sha512-Mgq7eCtoTjT89FqNoTzzXg2XvCi5VMhRV6+I2aYanc6kQCBImeNaAYRs/DyoVqk1YEUJK5gN9VO7HRIdz4Wo3Q==", + "devOptional": true }, "@types/parse5": { "version": "6.0.3", @@ -10736,6 +10585,22 @@ } } }, + "astro-compress": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/astro-compress/-/astro-compress-2.0.12.tgz", + "integrity": "sha512-De5XPeVbfexO0wIoZrO3222fv1e74BoDylc6GL0AWPqasdDKXbfC3wyhmGhcEpWR6HRMi8WjdEtE6MtM5rnCaA==", + "dev": true, + "requires": { + "@types/csso": "5.0.0", + "@types/html-minifier-terser": "7.0.0", + "csso": "5.0.5", + "files-pipe": "2.0.15", + "html-minifier-terser": "7.2.0", + "sharp": "0.32.5", + "svgo": "3.0.2", + "terser": "5.19.2" + } + }, "autoprefixer": { "version": "10.4.13", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.13.tgz", @@ -11024,6 +10889,23 @@ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==" }, + "clean-css": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz", + "integrity": "sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==", + "dev": true, + "requires": { + "source-map": "~0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "cli-boxes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", @@ -11102,6 +10984,12 @@ "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==" }, + "commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true + }, "common-ancestor-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", @@ -12100,6 +11988,38 @@ "flat-cache": "^3.0.4" } }, + "files-pipe": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/files-pipe/-/files-pipe-2.0.15.tgz", + "integrity": "sha512-82lnXCqBO3o/iyxZrHhU7ksy1LfRBw0JxbbUKo8+/8SwAFRTj6FPJKekMVINQXMf3dKXgJh5o7YjApLyeSTayw==", + "dev": true, + "requires": { + "@types/node": "20.5.0", + "deepmerge-ts": "5.1.0", + "fast-glob": "3.3.1" + }, + "dependencies": { + "deepmerge-ts": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-5.1.0.tgz", + "integrity": "sha512-eS8dRJOckyo9maw9Tu5O5RUi/4inFLrnoLkBe3cPfDMx3WZioXtmOew4TXQaxq7Rhl4xjDtR7c6x8nNTxOvbFw==", + "dev": true + }, + "fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + } + } + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -12509,6 +12429,21 @@ "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", "integrity": "sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==" }, + "html-minifier-terser": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz", + "integrity": "sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==", + "dev": true, + "requires": { + "camel-case": "^4.1.2", + "clean-css": "~5.3.2", + "commander": "^10.0.0", + "entities": "^4.4.0", + "param-case": "^3.0.4", + "relateurl": "^0.2.7", + "terser": "^5.15.1" + } + }, "html-void-elements": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-2.0.1.tgz", @@ -13670,6 +13605,12 @@ } } }, + "node-addon-api": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", + "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==", + "dev": true + }, "node-releases": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", @@ -14639,6 +14580,70 @@ "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", "integrity": "sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==" }, + "sharp": { + "version": "0.32.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.5.tgz", + "integrity": "sha512-0dap3iysgDkNaPOaOL4X/0akdu0ma62GcdC2NBQ+93eqpePdDdr2/LM0sFdDSMmN7yS+odyZtPsb7tx/cYBKnQ==", + "dev": true, + "requires": { + "color": "^4.2.3", + "detect-libc": "^2.0.2", + "node-addon-api": "^6.1.0", + "prebuild-install": "^7.1.1", + "semver": "^7.5.4", + "simple-get": "^4.0.1", + "tar-fs": "^3.0.4", + "tunnel-agent": "^0.6.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "tar-fs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "dev": true, + "requires": { + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "tar-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", + "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "dev": true, + "requires": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -15067,14 +15072,13 @@ } }, "terser": { - "version": "5.16.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.2.tgz", - "integrity": "sha512-JKuM+KvvWVqT7muHVyrwv7FVRPnmHDwF6XwoIxdbF5Witi0vu99RYpxDexpJndXt3jbZZmmWr2/mQa6HvSNdSg==", - "optional": true, - "peer": true, + "version": "5.19.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.2.tgz", + "integrity": "sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==", + "devOptional": true, "requires": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -15083,8 +15087,7 @@ "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "optional": true, - "peer": true + "devOptional": true } } },