diff --git a/css/default.css b/css/default.css index d20da3b..d047c77 100644 --- a/css/default.css +++ b/css/default.css @@ -1 +1 @@ -*,*::before,*::after{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:none;background-clip:padding-box;border:0;border-radius:0;box-sizing:border-box;font-style:normal;font-size:0px;font-weight:400;list-style:none;margin:0;outline:0;padding:0;scrollbar-width:none;-webkit-tap-highlight-color:rgba(0,0,0,0);text-align:left;text-decoration:none;text-indent:0;}*>*,*::before,*::after{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}::-webkit-scrollbar{width:0px;}::selection{background:var(--caret);color:var(--primary);}body{--font:Roboto,Arial,sans-serif;--mono:Roboto Mono,Lucida Console,Courier New,monospace;--background:#757575;--border:#757575;--caret:#757575;--foreground:#757575;--primary:#757575;--timing-function:cubic-bezier(.4,0,.2,1);background:var(--background);color:var(--foreground);font-family:var(--font);min-height:100vh;}body.dark{--background:#424242;--border:#616161;--caret:#fff;--foreground:#e0e0e0;--primary:#212121;}body.light{--background:#e0e0e0;--border:#bdbdbd;--caret:#000;--foreground:#212121;--primary:#fff;}svg{fill:currentcolor;height:auto;width:24px;}svg[data-copy]>path{transition:opacity .375s var(--timing-function) .375s;}svg[data-copy].confirm>path{transition-delay:.1s;}svg[data-copy]:not(.confirm)>path:last-child,svg[data-copy].confirm>path:first-child{opacity:0;}svg.spin{animation:spin 1.5s infinite var(--timing-function);}[data-title]::after{background:var(--foreground);border:1px solid var(--border);border-radius:2px;bottom:-22px;color:var(--primary);content:attr(data-title);font-size:12px;line-height:22px;opacity:0;overflow:hidden;padding:0 4px;pointer-events:none;position:absolute;transition:opacity .195s var(--timing-function),max-width 0s .195s;max-width:0;white-space:nowrap;z-index:1;}[data-title]:hover::after{opacity:1;transition:opacity .195s var(--timing-function) .5s;max-width:250px;z-index:2;}#header{align-items:center;background:var(--primary);border-bottom:1px solid var(--border);height:51px;justify-content:flex-start;left:0;padding:0 16px;right:0;top:0;}#header [data-title]::after{left:50%;transform:translatex(-50%);}#header>h1{font-size:18px;line-height:50px;}#versions{align-self:flex-start;background:var(--primary);border:1px solid transparent;flex-direction:column;height:34px;margin-left:4px;margin-top:8px;z-index:3;}#versions:focus{background:var(--background);border-color:var(--border);height:100px;}#versions>li{font-size:16px;line-height:32px;padding-left:8px;order:2;transition:background .375s var(--timing-function);}#versions>li[data-selected=true]{order:1;}#versions>li[data-selected=false]:hover{background:rgba(0,0,0,.12);}#versions>li[data-selected=false]:active,#versions>li[data-selected=false]:focus{background:rgba(0,0,0,.24);}#versions>li>svg{margin-left:4px;margin-top:4px;}#versions>li[data-selected=false]>svg{display:none;}#links{margin-left:auto;z-index:2;}#links a{margin-left:16px;}#tools{background:var(--primary);border-bottom:1px solid var(--border);height:33px;left:50%;top:50px;transform:translatex(-50%);z-index:1;}#tools::before{content:"";height:33px;left:-16px;position:absolute;top:0;width:16px;}body.dark #tools::before{background:url('data:image/svg+xml;utf-8,') no-repeat;}body.light #tools::before{background:url('data:image/svg+xml;utf-8,') no-repeat;}#tools::after{content:"";height:33px;position:absolute;right:-16px;top:0;width:16px;}body.dark #tools::after{background:url('data:image/svg+xml;utf-8,') no-repeat;}body.light #tools::after{background:url('data:image/svg+xml;utf-8,') no-repeat;}#tools svg{margin:4px 8px;}#tools p:first-of-type{transform:translatey(-24px);}#tools svg#run{margin:4px;width:72px;}#run>circle:first-of-type{fill:var(--border);}#run>circle:last-of-type,#run>rect{fill:var(--primary);}#run>path:first-of-type{transform:scale(.925);transform-origin:50%;}#tools>label>svg{margin-right:2px;}#tools>input{background:var(--background);caret-color:var(--caret);font-family:var(--mono);font-size:14px;height:22px;line-height:22px;margin:5px 6px 5px 0;padding:0 2px;width:40px;}#interpreter{padding:110px 20px 20px;z-index:1;}#interpreter [data-title]::after{right:0;}#interpreter>label,#interpreter>h2,#interpreter>p{font-size:14px;line-height:24px;margin-bottom:2px;}#interpreter svg{margin-left:8px;}#interpreter>textarea{background:var(--primary);border:1px solid var(--border);border-radius:2px;caret-color:var(--caret);font-family:var(--mono);font-size:16px;height:30px;line-height:20px;margin-bottom:20px;padding:4px;resize:none;width:100%;}#interpreter>textarea:-moz-read-only{border-color:var(--primary);}#interpreter>textarea:read-only{border-color:var(--primary);}#code{min-height:170px;}#input{min-height:90px;}#interpreter>textarea#clipboard{height:0;}#interpreter>p#error{font-size:16px;margin-top:-12px;margin-bottom:20px;}#error>svg{margin-right:8px;}#cache.enabled>path:first-of-type,#cache:not(.enabled)>path:last-of-type,#permute.enabled>path:first-of-type,#permute:not(.enabled)>path:last-of-type{display:none;}.wip{border:1px solid var(--border);padding:10px;}#docs{background:var(--primary);border-left:1px solid var(--border);}#loading{color:var(--border);bottom:0;left:10px;line-height:24px;}#menu{right:6px;top:6px;z-index:3;}#menu+ol{background:var(--background);border:1px solid var(--border);font-size:14px;opacity:0;pointer-events:none;right:6px;top:6px;transition:opacity .225s var(--timing-function);z-index:4;}#menu:focus+ol,#menu+ol:focus{opacity:1;pointer-events:initial;z-index:3;}#menu+ol>li{line-height:30px;padding:0 8px;transition:background .375s var(--timing-function);}#menu+ol>li:hover{background:rgba(0,0,0,.12);}#menu+ol>li:active,#menu+ol>li:focus,#menu+ol>li.current{background:rgba(0,0,0,.24);}#docs>article{height:100%;overscroll-behavior:contain;padding:0 20px 20px;}#docs h3{background:var(--background);font-size:20px;line-height:36px;margin:0 -20px 20px;padding:0 36px 0 0;top:0;}#docs h3>svg{margin:10px 4px;opacity:0;transition:opacity .375s var(--timing-function);width:16px;}#docs h3:hover>svg{opacity:1;}#docs h4{font-size:16px;margin-bottom:10px;}#docs h4:not(:first-child){margin-top:15px;}#docs h4.method{background:var(--background);border-radius:2px;font-family:var(--mono);font-size:14px;line-height:24px;text-indent:4px;margin-bottom:5px;}#docs h4[data-version]::after{border:1px solid var(--primary);border-radius:2px;content:"v" attr(data-version);display:inline-block;font-family:var(--font);font-size:11px;font-weight:normal;line-height:18px;float:right;margin:2px;padding:0 4px;}#docs h4>svg{margin:2px;width:20px;}#docs .columns{column-gap:10px;column-count:2;}#docs p{font-size:14px;line-height:18px;margin-bottom:10px;}#docs article>ol,#docs article>ul{margin-bottom:5px;}#docs article>ol>li,#docs article>ul>li{font-size:14px;line-height:20px;margin-bottom:5px;}#docs table{border-collapse:collapse;margin-bottom:10px;width:100%;}#docs th,#docs td{border:1px solid var(--border);font-size:14px;line-height:20px;padding:5px;}#docs a{text-decoration:var(--border) underline;}#docs code{background:var(--background);border-radius:2px;font-family:var(--mono);font-size:12px;line-height:16px;margin:0 2px;padding:0 4px;white-space:pre;}#docs table code{font-size:14px;line-height:18px;margin-left:0;}#docs span.version{border:1px solid var(--border);border-radius:2px;font-size:11px;line-height:16px;padding:0 4px;}#docs p>svg,#docs li>svg{width:18px;}#docs-intro ul>li{padding-left:10px;}#docs-intro ul>li::before{content:"•";left:0;position:absolute;}#sort{border:1px solid var(--border);}#docs>article>ol#sort>li{background:var(--primary);border:1px solid var(--border);line-height:24px;margin:-1px;padding:6px 4px 6px 0;transition:opacity .125s var(--timing-function),transform .125s var(--timing-function);}#sort.sorting>li{opacity:.6;}#sort>li.sorting{border:1px solid var(--primary);border-radius:2px;opacity:1;transform:translate(-5px,-5px);}#sort span{padding:0 4px;}#keyboard{background:var(--primary);border:1px solid var(--border);border-bottom:0;border-radius:4px 4px 0 0;bottom:0;left:0;overscroll-behavior:contain;padding:2px;transition:transform .375s var(--timing-function);width:calc(100% + 2px);max-width:804px;}#keyboard>h2{left:calc(50% - 36px);top:-32px;line-height:24px;padding:4px 24px;width:72px;}body.dark>#keyboard>h2{background:url('data:image/svg+xml;utf-8,') no-repeat;}body.light>#keyboard>h2{background:url('data:image/svg+xml;utf-8,') no-repeat;}#keyboard>h2[data-title]::after{left:50%;bottom:36px;transform:translate(-50%);}#keyboard>ol{grid-auto-rows:1fr;grid-gap:2px;grid-template-columns:repeat(auto-fill,minmax(32px,1fr));}#keyboard>ol::before {content:"";grid-column:1/1;grid-row:1/1;padding-bottom:100%;width:0;}#keyboard li{align-items:center;border:1px solid var(--border);border-radius:2px;font-size:16px;justify-content:center;transition:background .25s var(--timing-function);}#keyboard li:first-child{grid-column:1/1;grid-row:1/1;}#keyboard li:hover{background:var(--background);}@media(max-width:1204px){#keyboard{left:50%;transform:translatex(-50%) translatey(100%)}#keyboard[data-open=true]{transform:translatex(-50%) translatey(0%)}}@media(max-width:800px){#header{z-index:2;}#docs{bottom:0;position:fixed;right:0;top:0;transform:translatex(100%);transition:transform .375s var(--timing-function);width:calc(100% - 32px);max-width:400px;z-index:3;}#docs[data-open=true]{transform:translatex(0%);}#docs>h2{left:-32px;top:calc(50% - 36px);line-height:24px;padding:24px 4px;width:32px;}body.dark>#docs>h2{background:url('data:image/svg+xml;utf-8,') no-repeat;}body.light>#docs>h2{background:url('data:image/svg+xml;utf-8,') no-repeat;}#docs>h2[data-title]::after{right:2px;bottom:0;}#keyboard{left:0;transform:translatey(100%);z-index:4;}#keyboard[data-open=true]{transform:translatey(0%)}}@media(min-width:801px){#header{z-index:4;}#tools{transform:translatex(-50%) translatex(-200px);}#interpreter,#docs{display:inline-block;vertical-align:top;}#interpreter{width:calc(100% - 400px);}#docs{height:calc(100vh - 51px);position:sticky;top:51px;width:400px;z-index:2;}#docs>h2>svg{display:none;}#keyboard{z-index:3;}}@media(min-width:1205px){#keyboard{left:50%;transform:translatex(-50%) translatex(-200px) translatey(100%)}#keyboard[data-open=true]{transform:translatex(-50%) translatex(-200px) translatey(0%)}}@keyframes spin{0%{transform:rotate(0deg);}100%{transform:rotate(359deg);}}.db{display:block;}.df{display:flex;}.dg{display:grid;}.di{display:inline;}.dib{display:inline-block;}.dn{display:none;}.oz{opacity:0;}.fr{float:right;}.mz{margin:0!important;}.vab{vertical-align:bottom;}.vam{vertical-align:middle;}.vat{vertical-align:top;}.oa{overflow:auto;}.oh{overflow:hidden;}.toe{text-overflow:ellipsis;}.pa{position:absolute;}.pf{position:fixed;}.pr{position:relative;}.ps{position:sticky;}.fwm{font-weight:500;}.tac{text-align:center;}.tdu{text-decoration:var(--border) underline;}.ttc{text-transform:capitalize;}.ttl{text-transform:lowercase;}.ttu{text-transform:uppercase;}.wsnw{white-space:nowrap;}.ch{cursor:help;}.cm{cursor:move;}.cp{cursor:pointer;}.cw{cursor:wait;}.pen{pointer-events:none;} \ No newline at end of file +*,*::before,*::after{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:none;background-clip:padding-box;border:0;border-radius:0;box-sizing:border-box;font-style:normal;font-size:0px;font-weight:400;list-style:none;margin:0;outline:0;padding:0;scrollbar-width:none;-webkit-tap-highlight-color:rgba(0,0,0,0);text-align:left;text-decoration:none;text-indent:0;}*>*,*::before,*::after{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}::-webkit-scrollbar{width:0px;}::selection{background:var(--caret);color:var(--primary);}body{--font:Roboto,Arial,sans-serif;--mono:Roboto Mono,Lucida Console,Courier New,monospace;--background:#757575;--border:#757575;--caret:#757575;--foreground:#757575;--primary:#757575;--timing-function:cubic-bezier(.4,0,.2,1);background:var(--background);color:var(--foreground);font-family:var(--font);min-height:100vh;}body.dark{--background:#424242;--border:#616161;--caret:#fff;--foreground:#e0e0e0;--primary:#212121;}body.light{--background:#e0e0e0;--border:#bdbdbd;--caret:#000;--foreground:#212121;--primary:#fff;}svg{fill:currentcolor;height:auto;width:24px;}svg[data-copy]>path{transition:opacity .375s var(--timing-function) .375s;}svg[data-copy].confirm>path{transition-delay:.1s;}svg[data-copy]:not(.confirm)>path:last-child,svg[data-copy].confirm>path:first-child{opacity:0;}svg.spin{animation:spin 1.5s infinite var(--timing-function);}[data-title]::after{background:var(--foreground);border:1px solid var(--border);border-radius:2px;bottom:-22px;color:var(--primary);content:attr(data-title);font-size:12px;line-height:22px;opacity:0;overflow:hidden;padding:0 4px;pointer-events:none;position:absolute;transition:opacity .195s var(--timing-function),max-width 0s .195s;max-width:0;white-space:nowrap;z-index:1;}[data-title]:hover::after{opacity:1;transition:opacity .195s var(--timing-function) .5s;max-width:250px;z-index:2;}#header{align-items:center;background:var(--primary);border-bottom:1px solid var(--border);height:51px;justify-content:flex-start;left:0;padding:0 16px;right:0;top:0;}#header [data-title]::after{left:50%;transform:translatex(-50%);}#header>h1{font-size:18px;line-height:50px;}#versions{align-self:flex-start;background:var(--primary);border:1px solid transparent;flex-direction:column;height:34px;margin-left:4px;margin-top:8px;z-index:3;}#versions:focus{background:var(--background);border-color:var(--border);height:100px;}#versions>li{font-size:16px;line-height:32px;padding-left:8px;order:2;transition:background .375s var(--timing-function);}#versions>li[data-selected=true]{order:1;}#versions>li[data-selected=false]:hover{background:rgba(0,0,0,.12);}#versions>li[data-selected=false]:active,#versions>li[data-selected=false]:focus{background:rgba(0,0,0,.24);}#versions>li>svg{margin-left:4px;margin-top:4px;}#versions>li[data-selected=false]>svg{display:none;}#links{margin-left:auto;z-index:2;}#links a{margin-left:16px;}#tools{background:var(--primary);border-bottom:1px solid var(--border);height:33px;left:50%;top:50px;transform:translatex(-50%);z-index:1;}#tools::before{content:"";height:33px;left:-16px;position:absolute;top:0;width:16px;}body.dark #tools::before{background:url('data:image/svg+xml;utf-8,') no-repeat;}body.light #tools::before{background:url('data:image/svg+xml;utf-8,') no-repeat;}#tools::after{content:"";height:33px;position:absolute;right:-16px;top:0;width:16px;}body.dark #tools::after{background:url('data:image/svg+xml;utf-8,') no-repeat;}body.light #tools::after{background:url('data:image/svg+xml;utf-8,') no-repeat;}#tools svg{margin:4px 8px;}#tools p:first-of-type{transform:translatey(-24px);}#tools svg#run{margin:4px;width:72px;}#run>circle:first-of-type{fill:var(--border);}#run>circle:last-of-type,#run>rect{fill:var(--primary);}#run>path:first-of-type{transform:scale(.925);transform-origin:50%;}#tools>label>svg{margin-right:2px;}#tools>input{background:var(--background);caret-color:var(--caret);font-family:var(--mono);font-size:14px;height:22px;line-height:22px;margin:5px 6px 5px 0;padding:0 2px;width:40px;}#interpreter{padding:110px 20px 20px;z-index:1;}#interpreter [data-title]::after{right:0;}#interpreter>label,#interpreter>h2,#interpreter>p{font-size:14px;line-height:24px;margin-bottom:2px;}#interpreter svg{margin-left:8px;}#interpreter>textarea{background:var(--primary);border:1px solid var(--border);border-radius:2px;caret-color:var(--caret);font-family:var(--mono);font-size:16px;height:30px;line-height:20px;margin-bottom:20px;padding:4px;resize:none;width:100%;}#interpreter>textarea:-moz-read-only{border-color:var(--primary);}#interpreter>textarea:read-only{border-color:var(--primary);}#code{min-height:170px;}#input{min-height:90px;}#interpreter>textarea#clipboard{height:0;}#interpreter>p#error{font-size:16px;margin-top:-12px;margin-bottom:20px;}#error>svg{margin-right:8px;}#cache.enabled>path:first-of-type,#cache:not(.enabled)>path:last-of-type,#permute.enabled>path:first-of-type,#permute:not(.enabled)>path:last-of-type{display:none;}.wip{border:1px solid var(--border);padding:10px;}#docs{background:var(--primary);border-left:1px solid var(--border);}#loading{color:var(--border);bottom:0;left:10px;line-height:24px;z-index:5;}#menu{right:36px;top:6px;z-index:2;}#menu+ol{background:var(--background);border:1px solid var(--border);font-size:14px;opacity:0;pointer-events:none;right:6px;top:6px;transition:opacity .225s var(--timing-function);z-index:0;}#menu:focus+ol,#menu+ol:focus{opacity:1;pointer-events:initial;z-index:6;}#menu+ol>li{line-height:30px;padding:0 8px;transition:background .375s var(--timing-function);}#menu+ol>li:hover{background:rgba(0,0,0,.12);}#menu+ol>li:active,#menu+ol>li:focus,#menu+ol>li.current{background:rgba(0,0,0,.24);}#docs>article{height:100%;overscroll-behavior:contain;padding:0 20px 20px;z-index:1;}#docs h3{background:var(--background);font-size:20px;line-height:36px;margin:0 -20px 20px;padding-right:66px;top:0;}#docs h3>svg{margin:10px 4px;opacity:0;transition:opacity .375s var(--timing-function);width:16px;}#docs h3:hover>svg{opacity:1;}#docs h4{font-size:16px;margin-bottom:10px;}#docs h4:not(:first-child){margin-top:15px;}#docs h4.method{background:var(--background);border-radius:2px;font-family:var(--mono);font-size:14px;line-height:24px;text-indent:4px;margin-bottom:5px;}#docs h4[data-version]::after{border:1px solid var(--primary);border-radius:2px;content:"v" attr(data-version);display:inline-block;font-family:var(--font);font-size:11px;font-weight:normal;line-height:18px;float:right;margin:2px;padding:0 4px;}#docs h4>svg{margin:2px;width:20px;}#docs .columns{column-gap:10px;column-count:2;}#docs p{font-size:14px;line-height:18px;margin-bottom:10px;}#docs article>ol,#docs article>ul{margin-bottom:5px;}#docs article>ol>li,#docs article>ul>li{font-size:14px;line-height:20px;margin-bottom:5px;}#docs table{border-collapse:collapse;margin-bottom:10px;width:100%;}#docs th,#docs td{border:1px solid var(--border);font-size:14px;line-height:20px;padding:5px;}#docs a{text-decoration:var(--border) underline;}#docs code{background:var(--background);border-radius:2px;font-family:var(--mono);font-size:12px;line-height:16px;margin:0 2px;padding:0 4px;white-space:pre;}#docs table code{font-size:14px;line-height:18px;margin-left:0;}#docs span.version{border:1px solid var(--border);border-radius:2px;font-size:11px;line-height:16px;padding:0 4px;}#docs p>svg,#docs li>svg{width:18px;}#search{right:6px;top:6px;z-index:5;}#search:nth-last-child(2),#docs-search:not(.dn)+#search>path:first-child,#docs-search.dn+#search>path:last-child{display:none;}#docs>article#docs-search{background:var(--primary);bottom:0;left:0;right:0;top:0;z-index:4;}#docs-search>form{background:var(--primary);border-bottom:1px solid var(--background);margin:-20px 0 10px;padding:20px 0 5px;top:36px;}#docs-search input[type=text]{border:1px solid var(--border);caret-color:var(--caret);font-size:14px;height:32px;line-height:30px;margin-bottom:8px;padding:0 5px;width:100%;}#docs-search label{font-size:14px;line-height:24px;margin-bottom:5px;width:25%;}#docs-search label>svg{margin:0 3px 0 -2px;}#docs-search label>svg>path:first-child{opacity:0;transition:opacity .225s var(--timing-function);}#docs-search input[type=checkbox]:checked+label>svg>path:first-child{opacity:1;}#docs-search>h3{padding-left:24px;}#docs-intro ul>li{padding-left:10px;}#docs-intro ul>li::before{content:"•";left:0;position:absolute;}#sort{border:1px solid var(--border);}#docs>article>ol#sort>li{background:var(--primary);border:1px solid var(--border);line-height:24px;margin:-1px;padding:6px 4px 6px 0;transition:opacity .125s var(--timing-function),transform .125s var(--timing-function);}#sort.sorting>li{opacity:.6;}#sort>li.sorting{border:1px solid var(--primary);border-radius:2px;opacity:1;transform:translate(-5px,-5px);}#sort span{padding:0 4px;}#keyboard{background:var(--primary);border:1px solid var(--border);border-bottom:0;border-radius:4px 4px 0 0;bottom:0;left:0;overscroll-behavior:contain;padding:2px;transition:transform .375s var(--timing-function);width:calc(100% + 2px);max-width:804px;}#keyboard>h2{left:calc(50% - 36px);top:-32px;line-height:24px;padding:4px 24px;width:72px;}body.dark>#keyboard>h2{background:url('data:image/svg+xml;utf-8,') no-repeat;}body.light>#keyboard>h2{background:url('data:image/svg+xml;utf-8,') no-repeat;}#keyboard>h2[data-title]::after{left:50%;bottom:36px;transform:translate(-50%);}#keyboard>ol{grid-auto-rows:1fr;grid-gap:2px;grid-template-columns:repeat(auto-fill,minmax(32px,1fr));}#keyboard>ol::before {content:"";grid-column:1/1;grid-row:1/1;padding-bottom:100%;width:0;}#keyboard li{align-items:center;border:1px solid var(--border);border-radius:2px;font-size:16px;justify-content:center;transition:background .25s var(--timing-function);}#keyboard li:first-child{grid-column:1/1;grid-row:1/1;}#keyboard li:hover{background:var(--background);}@media(max-width:1204px){#keyboard{left:50%;transform:translatex(-50%) translatey(100%)}#keyboard[data-open=true]{transform:translatex(-50%) translatey(0%)}}@media(max-width:800px){#header{z-index:2;}#docs{bottom:0;position:fixed;right:0;top:0;transform:translatex(100%);transition:transform .375s var(--timing-function);width:calc(100% - 32px);max-width:400px;z-index:3;}#docs[data-open=true]{transform:translatex(0%);}#docs>h2{left:-32px;top:calc(50% - 36px);line-height:24px;padding:24px 4px;width:32px;}body.dark>#docs>h2{background:url('data:image/svg+xml;utf-8,') no-repeat;}body.light>#docs>h2{background:url('data:image/svg+xml;utf-8,') no-repeat;}#docs>h2[data-title]::after{right:2px;bottom:0;}#keyboard{left:0;transform:translatey(100%);z-index:4;}#keyboard[data-open=true]{transform:translatey(0%)}}@media(min-width:801px){#header{z-index:4;}#tools{transform:translatex(-50%) translatex(-200px);}#interpreter,#docs{display:inline-block;vertical-align:top;}#interpreter{width:calc(100% - 400px);}#docs{height:calc(100vh - 51px);position:sticky;top:51px;width:400px;z-index:2;}#docs>h2>svg{display:none;}#keyboard{z-index:3;}}@media(min-width:1205px){#keyboard{left:50%;transform:translatex(-50%) translatex(-200px) translatey(100%)}#keyboard[data-open=true]{transform:translatex(-50%) translatex(-200px) translatey(0%)}}@keyframes spin{0%{transform:rotate(0deg);}100%{transform:rotate(359deg);}}.db{display:block;}.df{display:flex;}.dg{display:grid;}.di{display:inline;}.dib{display:inline-block;}.dn{display:none;}.oz{opacity:0;}.fr{float:right;}.mz{margin:0!important;}.vab{vertical-align:bottom;}.vam{vertical-align:middle;}.vat{vertical-align:top;}.oa{overflow:auto;}.oh{overflow:hidden;}.toe{text-overflow:ellipsis;}.pa{position:absolute;}.pf{position:fixed;}.pr{position:relative;}.ps{position:sticky;}.fwm{font-weight:500;}.tac{text-align:center;}.tdu{text-decoration:var(--border) underline;}.ttc{text-transform:capitalize;}.ttl{text-transform:lowercase;}.ttu{text-transform:uppercase;}.wsnw{white-space:nowrap;}.ch{cursor:help;}.cm{cursor:move;}.cp{cursor:pointer;}.cw{cursor:wait;}.pen{pointer-events:none;} \ No newline at end of file diff --git a/docs/array.json b/docs/array.json index 64e3b9e..f775c85 100644 --- a/docs/array.json +++ b/docs/array.json @@ -1 +1 @@ -{"type":"methods","title":"Array Methods","object":"A","intro":[],"methods":{"a(s/n)":{"description":"Returns the last index of `x`s/n`` in `A`, or `-1` if not found.","returns":"N","version":"1.4.5"},"a(f)":{"description":"Returns the index of the last element in `A` to return a truthy value when passed through `f`, or `-1` if none do.","returns":"N","version":"1.4.5"},"b(s/n)":{"description":"Returns the first index of `s/n` in `A`, or `-1` if not found.","returns":"N","version":"1.4.5"},"b(f)":{"description":"Returns the index of the first element in `A` to return a truthy value when passed through `f`, or `-1` if none do.","returns":"N","version":"1.4.5"},"c()":{"description":"Returns `A` flattened.","returns":"A","version":"1.4.5"},"c(n)":{"description":"Returns `A` flattened by `n` levels.","returns":"A","version":"1.4.6"},"c(f)":{"description":"Returns the result of passing each element in `A` through `f` and then flattening by 1 level.","returns":"A","version":"1.4.6"},"c(a)":{"description":"Returns the result of concatenating `a` to `A`.","returns":"A","version":"1.4.5"},"d(f?)":{"description":"Returns `true` if any element of `A` returns a truthy value when passed through `f`, or `false` if none do.","returns":"B","version":"1.4.5"},"e(f?)":{"description":"Returns `true` if every element of `A` returns a truthy value when passed through `f`, or `false` if any doesn't.","returns":"B","version":"1.4.5"},"e(a)":{"description":"Returns `true` if every element of `A` is exactly equal to the corresponding element of `a`, or `false` if any isn't. Supports multi-dimensional arrays as of [v:1.4.6].","returns":"B","version":"1.4.5"},"f(f?)":{"description":"Returns the elements of `A` that return a truthy value when passed through `f`.","returns":"A","version":"1.4.5"},"f(a,n=0)":{"description":"Returns the elements of `A` that are also contained in `a` if `n%3=0`; the unique elements that appear in both `A` and `a` if `n%3=1`; or the elements that appear in both `A` and `a` if `n%3=2`.","returns":"A","version":"1.4.5"},"g(n=0)":{"description":"Returns the element in `A` at index `n`.","returns":"X","version":"1.4.5"},"g(n,…,n)":{"description":"Returns the element in multi-dimensional `A` at index `n,...,n`.","returns":"X","version":"1.4.6"},"g(n,...,n?,f)":{"description":"Returns `A` after first passing the element at index `n,...,n` through `f`. Modifies the original `A`.","returns":"A","version":"1.4.6"},"g(a)":{"description":"Returns the elements in `A` at the indices in `a`.","returns":"A","version":"1.4.6"},"g(a,f)":{"description":"Returns `A` after first passing the elements at the indices in `a` through `f`. Modifies the original `A`.","returns":"A","version":"1.4.6"},"g(f)":{"description":"Returns the result of passing `A` through `f`.","returns":"A","version":"1.4.6"},"h(n=0,x)":{"description":"Returns `A` with the element at index `n` replaced with `x`. Modifies the original `A`. Arguments may be passed in any order unless `x` is an integer.","returns":"A","version":"1.4.5"},"i(n=0,x)":{"description":"Returns `A` with `x` inserted at index `n`. Modifies the original `A`. Arguments may be passed in any order unless `x` is an integer.","returns":"A","version":"1.4.5"},"j(n1=0,n2=1)":{"description":"Returns `n2` elements from `A` starting at index `n1`. Modifies the original `A` by removing those elements.","returns":"A","version":"1.4.5"},"k(f?)":{"description":"Returns the elements of `A` that return a falsey value when passed through `f`.","returns":"A","version":"1.4.5"},"k(a)":{"description":"Returns `A` with the elements in `a` removed.","returns":"A","version":"1.4.5"},"k(x)":{"description":"Returns `A` with `x` removed.","returns":"A","version":"1.4.5"},"l()":{"description":"Returns the length of `A`.","returns":"N","version":"1.4.5"},"l(f)":{"description":"Returns elements of `A` whose lengths return a truthy value when passed through `f`.","returns":"A","version":"1.4.6"},"l(n)":{"description":"Returns elements of `A` of length `n`.","returns":"A","version":"1.4.6"},"m(f)":{"description":"Returns the result of passing each element in `A` through `f`.","returns":"A","version":"1.4.5"},"n(f?)":{"description":"Returns `A` sorted by passing each pair of elements `x,y` through `f`. Sorts `x` to the left if `f` returns a value `<0` or `y` to the left if `>0`. Modifies the original `A`.","returns":"A","version":"1.4.5"},"o(n=1)":{"description":"Returns the last `n` elements of `A`. If `n=1` then the element itself is returned. Modifies the original `A` by removing those elements.","returns":"A/X","version":"1.4.5"},"o(f)":{"description":"Returns the result of passing the last element in `A` through `f`. Modifies the original `A`.","returns":"A","version":"1.4.6"},"p(x,...,x)":{"description":"Returns the result of appending each `x` to `A`. Modifies the original `A`.","returns":"A","version":"1.4.5"},"q(x=\"\")":{"description":"Returns `A` joined with `x`.","returns":"S","version":"1.4.5"},"r(f,x=A[0])":{"description":"Returns the result of reducing `A` by `f` with an initial value of `x`.","returns":"X","version":"1.4.5"},"s(n1=0,n2=A.length)":{"description":"Returns the result of slicing `A` from index `n1` to `n2`.","returns":"A","version":"1.4.5"},"t(n1=0,n2=A.length)":{"description":"Returns `n2` elements from `A` starting at index `n1`.","returns":"A","version":"1.4.5"},"u(x,...,x)":{"description":"Returns the result of prepending each `x` to `A`. Modifies the original `A`.","returns":"A","version":"1.4.5"},"v()":{"description":"Returns the first element of `A`. Modifies the original `A` by removing that element.","returns":"X","version":"1.4.5"},"v(n=1)":{"description":"Returns the first `n` elements of `A`. Modifies the original `A` by removing those elements.","returns":"A","version":"1.4.6"},"v(f)":{"description":"Returns the result of passing the first element in `A` through `f`. Modifies the original `A`.","returns":"A","version":"1.4.6"},"w()":{"description":"Returns `A` reversed. Modifies the original `A`.","returns":"A","version":"1.4.5"},"x(f?)":{"description":"Returns the result of reducing `A` by addition after first passing each element through `f`.","returns":"N","version":"1.4.5"},"y()":{"description":"Returns the transposing rows and columns of each element.","returns":"A","version":"1.4.5"},"y(f)":{"description":"Returns the result of passing each column in `A` through `f`.","returns":"A","version":"1.4.5"},"z(n=1)":{"description":"Returns the result of rotating `A` clockwise by `n*90` degrees.","returns":"A","version":"1.4.5"},"à(n?)":{"description":"Returns all combinations of `A`. If `n` is passed, returns all combinations of length `n`.","returns":"A","version":"1.4.5"},"á(n?)":{"description":"Returns all unique permutations of `A`. If `n` is passed, returns all permutations of length `n`.","returns":"A","version":"1.4.5"},"â(x?)":{"description":"Returns the unique elements of `A` in the order they first appear. If `x` is passed then it is concatenated to A first.","returns":"A","version":"1.4.5"},"ã(n?,s/a?)":{"description":"Returns all subsections of `A`. If `n` is passed, returns all subsections of length `n`. Prior to [v:1.4.6] `n` defaults to `2`. If `s/a` is also passed then it is first prepended to the array.","returns":"A","version":"1.4.5"},"ã(f)":{"description":"Returns all subssections of `A` after passing each through `f`.","returns":"A","version":"1.4.6"},"ä(f,s/a?)":{"description":"Returns the result of passing each consecutive pair of elements `x,y` in `A` through `f` with arguments `(x,y,x+y)`. If `s/a` is passed then it is first prepended to the array.","returns":"A","version":"1.4.5"},"å(f,x=A[0])":{"description":"Returns the result of cumulatively reducing `A` by `f` with an initial value of `x`.","returns":"A","version":"1.4.5"},"æ(f?)":{"description":"Returns the first element of `A` to return a truthy value when passed through `f`.","returns":"X","version":"1.4.5"},"ç(x)":{"description":"Returns `A` with each element replaced with `x`.","returns":"A","version":"1.4.5"},"è(f)":{"description":"Returns the number of elements in `A` that return a truthy value when passed through `f`.","returns":"N","version":"1.4.5"},"é(n=1)":{"description":"Returns the result of rotating `A` right by `n` elements.","returns":"A","version":"1.4.5"},"ê(n=0)":{"description":"Returns `A` palindromised if `n%2=0`, or the reverse of `A` concatenated to `A`.","returns":"A","version":"1.4.5"},"ê(s)":{"description":"Returns `true` if `A` is a palindrome, or `false` if it isn't","returns":"B","version":"1.4.5"},"ë(n1=2,n2=0)":{"description":"Returns every `n1`th element of `A` starting from index `n2`.","returns":"A","version":"1.4.5"},"ì(n/s/a)":{"description":"Returns the result of converting `A` from an array of base-`n/s/a` digits to base-`10`. (e.g., `[\"b\",\"a\",\"a\",\"b\"].n(\"ab\")` = `[1,0,0,1].ì(2)` = `9`)","returns":"N","version":"1.4.5"},"í(a?,f?)":{"description":"Returns the result of pairing each element in `A` with the corresponding element in `a`. If `a` is not passed then the indices of the elements in `A` are used instead. If `f` is passed then each pair of elements is reduced by passing it through `f`.","returns":"A","version":"1.4.5"},"î(a/s=[0])":{"description":"Returns `a/s` repeated and sliced to the length of `A`.","returns":"A","version":"1.4.5"},"ï(a=A,f?)":{"description":"Returns the result of pairing each element in `A` with each element in `a` and reducing each pair by `f`. If `f` is passed then each pair of elements is reduced by passing it through `f`.","returns":"A","version":"1.4.5"},"ð(f?)":{"description":"Returns the indices of the elements in `A` that return a truthy value when passed through `f`.","returns":"A","version":"1.4.6"},"ñ(f?)":{"description":"Returns the elements of `A` sorted as though they had been passed through `f`.","returns":"A","version":"1.4.5"},"ò(n=2)":{"description":"Returns `A` partitioned into arrays of length `n`. If `n` is negative then partitions from the end of `A`","returns":"A","version":"1.4.5"},"ò(f)":{"description":"Returns `A` partitioned between each pair of elements that return a truthy value when passed through `f`.","returns":"A","version":"1.4.5"},"ó(n=2)":{"description":"Returns `A` partitioned into `n` arrays each containing every `n`th element of `A`.","returns":"A","version":"1.4.5"},"ó(f)":{"description":"Returns `A` partitioned between each pair of elements that return a falsey value when passed through `f`.","returns":"A","version":"1.4.5"},"ô()":{"description":"Returns `A` partitioned at each falsey element.","returns":"A","version":"1.4.5"},"ô(f)":{"description":"Returns `A` partitioned at each element that returns a truthy value when passed through `f`.","returns":"A","version":"1.4.5"},"ö(n=1)":{"description":"Returns `n` random elements from `A` with `n` rounded up to the nearest whole number, if necessary. If `n=1` then the element itself is returned.","returns":"A/X","version":"1.4.5"},"ö(s)":{"description":"Returns a random permutation of `A`.","returns":"A","version":"1.4.5"},"ö(f)":{"description":"Returns a random element of `A` that returns a truthy value when passed through `f`.","returns":"X","version":"1.4.5"},"ø(a)":{"description":"Returns `true` if `A` contains any element of `a`, or `false` if it doesn't.","returns":"B","version":"1.4.5"},"ø(x)":{"description":"Returns `true` if `A` contains `x`, or `false` if it doesn't.","returns":"B","version":"1.4.5"},"ù(s=\" \",n?)":{"description":"Returns the result of left-padding each element in `A` with `s` to length `n`. If `n` is not passed then the length of the longest element is used.","returns":"A","version":"1.4.5"},"ú(s=\" \",n?)":{"description":"Returns the result of right-padding each element in `A` with `s` to length `n`. If `n` is not passed then the length of the longest element is used.","returns":"A","version":"1.4.5"},"û(s=\" \",n?)":{"description":"Returns the result of centre-padding each element in `A` with `s` to length `n`. If `n` is not passed then the length of the longest element is used.","returns":"A","version":"1.4.5"},"û(f?)":{"description":"Returns the elements of `A` sorted and grouped by the values returned by passing each through `f`.","returns":"A","version":"1.4.6"}}} \ No newline at end of file +{"type":"methods","title":"Array Methods","object":"A","intro":[],"methods":{"a(s/n)":{"description":"Returns the last index of `x`s/n`` in `A`, or `-1` if not found.","returns":"N","version":"1.4.5"},"a(f)":{"description":"Returns the index of the last element in `A` to return a truthy value when passed through `f`, or `-1` if none do.","returns":"N","version":"1.4.5"},"b(s/n)":{"description":"Returns the first index of `s/n` in `A`, or `-1` if not found.","returns":"N","version":"1.4.5"},"b(f)":{"description":"Returns the index of the first element in `A` to return a truthy value when passed through `f`, or `-1` if none do.","returns":"N","version":"1.4.5"},"c()":{"description":"Returns `A` flattened.","returns":"A","version":"1.4.5"},"c(n)":{"description":"Returns `A` flattened by `n` levels.","returns":"A","version":"1.4.6"},"c(f)":{"description":"Returns the result of passing each element in `A` through `f` and then flattening by 1 level.","returns":"A","version":"1.4.6"},"c(a)":{"description":"Returns the result of concatenating `a` to `A`.","returns":"A","version":"1.4.5"},"d(f?)":{"description":"Returns `true` if any element of `A` returns a truthy value when passed through `f`, or `false` if none do.","returns":"B","version":"1.4.5"},"e(f?)":{"description":"Returns `true` if every element of `A` returns a truthy value when passed through `f`, or `false` if any doesn't.","returns":"B","version":"1.4.5"},"e(a)":{"description":"Returns `true` if every element of `A` is exactly equal to the corresponding element of `a`, or `false` if any isn't. Supports multi-dimensional arrays as of [v:1.4.6].","returns":"B","version":"1.4.5"},"f(f?)":{"description":"Returns the elements of `A` that return a truthy value when passed through `f`.","returns":"A","version":"1.4.5"},"f(a,n=0)":{"description":"Returns the elements of `A` that are also contained in `a` if `n%3=0`; the unique elements that appear in both `A` and `a` if `n%3=1`; or the elements that appear in both `A` and `a` if `n%3=2`.","returns":"A","version":"1.4.5"},"g(n=0)":{"description":"Returns the element in `A` at index `n`.","returns":"X","version":"1.4.5"},"g(n,...,n)":{"description":"Returns the element in multi-dimensional `A` at index `n,...,n`.","returns":"X","version":"1.4.6"},"g(n,...,n?,f)":{"description":"Returns `A` after first passing the element at index `n,...,n` through `f`. Modifies the original `A`.","returns":"A","version":"1.4.6"},"g(a)":{"description":"Returns the elements in `A` at the indices in `a`.","returns":"A","version":"1.4.6"},"g(a,f)":{"description":"Returns `A` after first passing the elements at the indices in `a` through `f`. Modifies the original `A`.","returns":"A","version":"1.4.6"},"g(f)":{"description":"Returns the result of passing `A` through `f`.","returns":"A","version":"1.4.6"},"h(n=0,x)":{"description":"Returns `A` with the element at index `n` replaced with `x`. Modifies the original `A`. Arguments may be passed in any order unless `x` is an integer.","returns":"A","version":"1.4.5"},"i(n=0,x)":{"description":"Returns `A` with `x` inserted at index `n`. Modifies the original `A`. Arguments may be passed in any order unless `x` is an integer.","returns":"A","version":"1.4.5"},"j(n1=0,n2=1)":{"description":"Returns `n2` elements from `A` starting at index `n1`. Modifies the original `A` by removing those elements.","returns":"A","version":"1.4.5"},"k(f?)":{"description":"Returns the elements of `A` that return a falsey value when passed through `f`.","returns":"A","version":"1.4.5"},"k(a)":{"description":"Returns `A` with the elements in `a` removed.","returns":"A","version":"1.4.5"},"k(x)":{"description":"Returns `A` with `x` removed.","returns":"A","version":"1.4.5"},"l()":{"description":"Returns the length of `A`.","returns":"N","version":"1.4.5"},"l(f)":{"description":"Returns elements of `A` whose lengths return a truthy value when passed through `f`.","returns":"A","version":"1.4.6"},"l(n)":{"description":"Returns elements of `A` of length `n`.","returns":"A","version":"1.4.6"},"m(f)":{"description":"Returns the result of passing each element in `A` through `f`.","returns":"A","version":"1.4.5"},"n(f?)":{"description":"Returns `A` sorted by passing each pair of elements `x,y` through `f`. Sorts `x` to the left if `f` returns a value `<0` or `y` to the left if `>0`. Modifies the original `A`.","returns":"A","version":"1.4.5"},"o(n=1)":{"description":"Returns the last `n` elements of `A`. If `n=1` then the element itself is returned. Modifies the original `A` by removing those elements.","returns":"A/X","version":"1.4.5"},"o(f)":{"description":"Returns the result of passing the last element in `A` through `f`. Modifies the original `A`.","returns":"A","version":"1.4.6"},"p(x,...,x)":{"description":"Returns the result of appending each `x` to `A`. Modifies the original `A`.","returns":"A","version":"1.4.5"},"q(x=\"\")":{"description":"Returns `A` joined with `x`.","returns":"S","version":"1.4.5"},"r(f,x=A[0])":{"description":"Returns the result of reducing `A` by `f` with an initial value of `x`.","returns":"X","version":"1.4.5"},"s(n1=0,n2=A.length)":{"description":"Returns the result of slicing `A` from index `n1` to `n2`.","returns":"A","version":"1.4.5"},"t(n1=0,n2=A.length)":{"description":"Returns `n2` elements from `A` starting at index `n1`.","returns":"A","version":"1.4.5"},"u(x,...,x)":{"description":"Returns the result of prepending each `x` to `A`. Modifies the original `A`.","returns":"A","version":"1.4.5"},"v()":{"description":"Returns the first element of `A`. Modifies the original `A` by removing that element.","returns":"X","version":"1.4.5"},"v(n=1)":{"description":"Returns the first `n` elements of `A`. Modifies the original `A` by removing those elements.","returns":"A","version":"1.4.6"},"v(f)":{"description":"Returns the result of passing the first element in `A` through `f`. Modifies the original `A`.","returns":"A","version":"1.4.6"},"w()":{"description":"Returns `A` reversed. Modifies the original `A`.","returns":"A","version":"1.4.5"},"x(f?)":{"description":"Returns the result of reducing `A` by addition after first passing each element through `f`.","returns":"N","version":"1.4.5"},"y()":{"description":"Returns the transposing rows and columns of each element.","returns":"A","version":"1.4.5"},"y(f)":{"description":"Returns the result of passing each column in `A` through `f`.","returns":"A","version":"1.4.5"},"z(n=1)":{"description":"Returns the result of rotating `A` clockwise by `n*90` degrees.","returns":"A","version":"1.4.5"},"à(n?)":{"description":"Returns all combinations of `A`. If `n` is passed, returns all combinations of length `n`.","returns":"A","version":"1.4.5"},"á(n?)":{"description":"Returns all unique permutations of `A`. If `n` is passed, returns all permutations of length `n`.","returns":"A","version":"1.4.5"},"â(x?)":{"description":"Returns the unique elements of `A` in the order they first appear. If `x` is passed then it is concatenated to A first.","returns":"A","version":"1.4.5"},"ã(n?,s/a?)":{"description":"Returns all subsections of `A`. If `n` is passed, returns all subsections of length `n`. Prior to [v:1.4.6] `n` defaults to `2`. If `s/a` is also passed then it is first prepended to the array.","returns":"A","version":"1.4.5"},"ã(f)":{"description":"Returns all subssections of `A` after passing each through `f`.","returns":"A","version":"1.4.6"},"ä(f,s/a?)":{"description":"Returns the result of passing each consecutive pair of elements `x,y` in `A` through `f` with arguments `(x,y,x+y)`. If `s/a` is passed then it is first prepended to the array.","returns":"A","version":"1.4.5"},"å(f,x=A[0])":{"description":"Returns the result of cumulatively reducing `A` by `f` with an initial value of `x`.","returns":"A","version":"1.4.5"},"æ(f?)":{"description":"Returns the first element of `A` to return a truthy value when passed through `f`.","returns":"X","version":"1.4.5"},"ç(x)":{"description":"Returns `A` with each element replaced with `x`.","returns":"A","version":"1.4.5"},"è(f)":{"description":"Returns the number of elements in `A` that return a truthy value when passed through `f`.","returns":"N","version":"1.4.5"},"é(n=1)":{"description":"Returns the result of rotating `A` right by `n` elements.","returns":"A","version":"1.4.5"},"ê(n=0)":{"description":"Returns `A` palindromised if `n%2=0`, or the reverse of `A` concatenated to `A`.","returns":"A","version":"1.4.5"},"ê(s)":{"description":"Returns `true` if `A` is a palindrome, or `false` if it isn't","returns":"B","version":"1.4.5"},"ë(n1=2,n2=0)":{"description":"Returns every `n1`th element of `A` starting from index `n2`.","returns":"A","version":"1.4.5"},"ì(n/s/a)":{"description":"Returns the result of converting `A` from an array of base-`n/s/a` digits to base-`10`. (e.g., `[\"b\",\"a\",\"a\",\"b\"].n(\"ab\")` = `[1,0,0,1].ì(2)` = `9`)","returns":"N","version":"1.4.5"},"í(a?,f?)":{"description":"Returns the result of pairing each element in `A` with the corresponding element in `a`. If `a` is not passed then the indices of the elements in `A` are used instead. If `f` is passed then each pair of elements is reduced by passing it through `f`.","returns":"A","version":"1.4.5"},"î(a/s=[0])":{"description":"Returns `a/s` repeated and sliced to the length of `A`.","returns":"A","version":"1.4.5"},"ï(a=A,f?)":{"description":"Returns the result of pairing each element in `A` with each element in `a` and reducing each pair by `f`. If `f` is passed then each pair of elements is reduced by passing it through `f`.","returns":"A","version":"1.4.5"},"ð(f?)":{"description":"Returns the indices of the elements in `A` that return a truthy value when passed through `f`.","returns":"A","version":"1.4.6"},"ñ(f?)":{"description":"Returns the elements of `A` sorted as though they had been passed through `f`.","returns":"A","version":"1.4.5"},"ò(n=2)":{"description":"Returns `A` partitioned into arrays of length `n`. If `n` is negative then partitions from the end of `A`","returns":"A","version":"1.4.5"},"ò(f)":{"description":"Returns `A` partitioned between each pair of elements that return a truthy value when passed through `f`.","returns":"A","version":"1.4.5"},"ó(n=2)":{"description":"Returns `A` partitioned into `n` arrays each containing every `n`th element of `A`.","returns":"A","version":"1.4.5"},"ó(f)":{"description":"Returns `A` partitioned between each pair of elements that return a falsey value when passed through `f`.","returns":"A","version":"1.4.5"},"ô()":{"description":"Returns `A` partitioned at each falsey element.","returns":"A","version":"1.4.5"},"ô(f)":{"description":"Returns `A` partitioned at each element that returns a truthy value when passed through `f`.","returns":"A","version":"1.4.5"},"ö(n=1)":{"description":"Returns `n` random elements from `A` with `n` rounded up to the nearest whole number, if necessary. If `n=1` then the element itself is returned.","returns":"A/X","version":"1.4.5"},"ö(s)":{"description":"Returns a random permutation of `A`.","returns":"A","version":"1.4.5"},"ö(f)":{"description":"Returns a random element of `A` that returns a truthy value when passed through `f`.","returns":"X","version":"1.4.5"},"ø(a)":{"description":"Returns `true` if `A` contains any element of `a`, or `false` if it doesn't.","returns":"B","version":"1.4.5"},"ø(x)":{"description":"Returns `true` if `A` contains `x`, or `false` if it doesn't.","returns":"B","version":"1.4.5"},"ù(s=\" \",n?)":{"description":"Returns the result of left-padding each element in `A` with `s` to length `n`. If `n` is not passed then the length of the longest element is used.","returns":"A","version":"1.4.5"},"ú(s=\" \",n?)":{"description":"Returns the result of right-padding each element in `A` with `s` to length `n`. If `n` is not passed then the length of the longest element is used.","returns":"A","version":"1.4.5"},"û(s=\" \",n?)":{"description":"Returns the result of centre-padding each element in `A` with `s` to length `n`. If `n` is not passed then the length of the longest element is used.","returns":"A","version":"1.4.5"},"û(f?)":{"description":"Returns the elements of `A` sorted and grouped by the values returned by passing each through `f`.","returns":"A","version":"1.4.6"}}} \ No newline at end of file diff --git a/docs/flags.json b/docs/flags.json index 80477dc..4783453 100644 --- a/docs/flags.json +++ b/docs/flags.json @@ -1 +1 @@ -{"type":"flags","title":"Flags","object":"","intro":["Flags can be entered either in the dedicated field or directly in the input box. Some flags may be combined in the form `-mR`. When a flag runs the programme on each element in the first input and that input is a number then it is first converted to the range `[0,N)` or, if that input is a string, it is first split into an array of characters and rejoined again afterwards."],"flags":{"!":{"description":"Outputs the logical `NOT` of the value returned by the programme; i.e., `true` if falsey, or `false` if truthy.","version":"1.4.5"},"E\"s\"":{"description":"Outputs `s` if the programme throws an error. Considered to be a \"cheating\" flag - use at your own discretion.","version":"1.4.6"},"F\"s\"":{"description":"Outputs `s` if the programme returns a falsey value. Considered to be a \"cheating\" flag - use at your own discretion.","version":"1.4.6"},"N":{"description":"Converts the value returned by the programme to a number. If that value is an array, it is first joined to a string.","version":"1.4.5"},"P":{"description":"Joins the value returned by the programme to a string if that value is an array.","version":"1.4.5"},"Q":{"description":"\"Prettyprints\" the output.","version":"1.4.5"},"R":{"description":"Joins the value returned by the programme to a string with newlinews if that value is an array.","version":"1.4.5"},"S":{"description":"Joins the value returned by the programme to a string with spaces if that value is an array.","version":"1.4.5"},"d":{"description":"Runs the program on each element in the first input, outputting `true` if any returns a truthy value, or `false` if not.","version":"1.4.5"},"e":{"description":"Runs the program on each element in the first input, outputting `true` if all return a truthy value, or `false` if not.","version":"1.4.5"},"f":{"description":"Runs the program on each element in the first input, outputting an array of those that return a truthy value.","version":"1.4.5"},"g":{"description":"If the programme returns a number then outputs its sign; `-1` if negative, `1` if positive, `0` if `0`, or `NaN` if `NaN`.","version":"1.4.5"},"gn":{"description":"If the programme returns a string or an array, outputs the character or element at index `n`, with `n` defaulting to `0`.","version":"1.4.5"},"h":{"description":"If the programme returns a string or an array, outputs the last character or element.","version":"1.4.5"},"m":{"description":"Runs the program on each element in the first input, outputting an array of the results.","version":"1.4.5"},"x":{"description":"Runs the `.x()` method for the relevant type on the value returned by the programme, trimming a string, reducing an array by addition, or rounding a number to the nearest whole number.","version":"1.4.5"},"¡":{"description":"Outputs the value returned by the programme as a boolean; i.e., `true` if truthy, or `false` if falsey.","version":"1.4.5"},"æ":{"description":"Runs the program on each element in the first input, outputting the first to return a truthy value.","version":"1.4.5"}}} \ No newline at end of file +{"type":"flags","title":"Flags","object":"","intro":["Flags can be entered either in the dedicated field in the header or directly in the input box. Some flags may be combined in the form `-mR`. When a flag runs the programme on each element in the first input and that input is a number then it is first converted to the range `[0,N)` or, if that input is a string, it is first split into an array of characters and rejoined again afterwards."],"flags":{"!":{"description":"Outputs the logical `NOT` of the value returned by the programme; i.e., `true` if falsey, or `false` if truthy.","version":"1.4.5"},"E":{"description":"Outputs an empty string if the programme throws an error.","version":"1.4.6"},"E\"s\"":{"description":"Outputs `s` if the programme throws an error. Considered to be a \"cheating\" flag - use at your own discretion.","version":"1.4.6"},"F":{"description":"Outputs an empty string if the programme returns a falsey value.","version":"1.4.6"},"F\"s\"":{"description":"Outputs `s` if the programme returns a falsey value. Considered to be a \"cheating\" flag - use at your own discretion.","version":"1.4.6"},"N":{"description":"Converts the value returned by the programme to a number. If that value is an array, it is first joined to a string.","version":"1.4.5"},"P":{"description":"Joins the value returned by the programme to a string if that value is an array.","version":"1.4.5"},"Q":{"description":"\"Prettyprints\" the output.","version":"1.4.5"},"R":{"description":"Joins the value returned by the programme to a string with newlinews if that value is an array.","version":"1.4.5"},"S":{"description":"Joins the value returned by the programme to a string with spaces if that value is an array.","version":"1.4.5"},"d":{"description":"Runs the program on each element in the first input, outputting `true` if any returns a truthy value, or `false` if not.","version":"1.4.5"},"e":{"description":"Runs the program on each element in the first input, outputting `true` if all return a truthy value, or `false` if not.","version":"1.4.5"},"f":{"description":"Runs the program on each element in the first input, outputting an array of those that return a truthy value.","version":"1.4.5"},"g":{"description":"If the programme returns a number then outputs its sign; `-1` if negative, `1` if positive, `0` if `0`, or `NaN` if `NaN`.","version":"1.4.5"},"gn":{"description":"If the programme returns a string or an array, outputs the character or element at index `n`, with `n` defaulting to `0`.","version":"1.4.5"},"h":{"description":"If the programme returns a string or an array, outputs the last character or element.","version":"1.4.5"},"m":{"description":"Runs the program on each element in the first input, outputting an array of the results.","version":"1.4.5"},"x":{"description":"Runs the `.x()` method for the relevant type on the value returned by the programme, trimming a string, reducing an array by addition, or rounding a number to the nearest whole number.","version":"1.4.5"},"¡":{"description":"Outputs the value returned by the programme as a boolean; i.e., `true` if truthy, or `false` if falsey.","version":"1.4.5"},"æ":{"description":"Runs the program on each element in the first input, outputting the first to return a truthy value.","version":"1.4.5"}}} \ No newline at end of file diff --git a/docs/intro.html b/docs/intro.html index 8e4771e..c26dd68 100644 --- a/docs/intro.html +++ b/docs/intro.html @@ -1 +1 @@ -

Introduction

This 3rd-party interpreter and, in particular, its documentation are a work in progress. The official Japt interpreter with complete documentation can be found at [ethproductions.github.io/japt](https://ethproductions.github.io/japt/).

This documentation provides an overview of the features, functions & methods of Japt. For more in-depth tutorials, see the [tips for golfing in Japt](https://codegolf.stackexchange.com/q/121253/) on PPCG, join the [Japt chatroom](https://chat.stackexchange.com/rooms/34018/japt) or have a look through some [recent solutions](https://codegolf.stackexchange.com/search?tab=newest&q=Japt).

Navigate the documentation's sections via the [icon:dots-vertical] icon in the top-right corner.

Version labels such as [v:1.4.6] are used to indicate which version of Japt a feature or method was added in.

The following abbreviations are used throughout the documentation, uppercase for objects and lowercase for method arguments:

[shortcuts:Shortcuts] and method names can be inserted into the code by clicking on them.

  1. `A`: Array
  2. `B`: Boolean
  3. `D`: Date
  4. `F`: Function/Method
  5. `N`: Number
  6. `R`: RegExp
  7. `S`: String
  8. `X`: Any type

Credits

\ No newline at end of file +

Introduction

This 3rd-party interpreter and, in particular, its documentation are a work in progress. The official Japt interpreter with complete documentation can be found at [ethproductions.github.io/japt](https://ethproductions.github.io/japt/).

This documentation provides an overview of the features, functions & methods of Japt. For more in-depth tutorials, see the [tips for golfing in Japt](https://codegolf.stackexchange.com/q/121253/) on PPCG, join the [Japt chatroom](https://chat.stackexchange.com/rooms/34018/japt) or have a look through some [recent solutions](https://codegolf.stackexchange.com/search?tab=newest&q=Japt).

The documentation's sections can be navigated via the [icon:dots-vertical] icon in the top-right corner and the various methods can be searched by clicking on the [icon:magnify] icon.

Version labels such as [v:1.4.6] are used to indicate which version of Japt a feature or method was added in.

[shortcuts:Shortcuts] and method names can be inserted into the code by clicking on them.

The following abbreviations are used throughout the documentation, uppercase for objects and lowercase for method arguments:

  1. `A`: Array
  2. `B`: Boolean
  3. `D`: Date
  4. `F`: Function/Method
  5. `N`: Number
  6. `R`: RegExp
  7. `S`: String
  8. `X`: Any type

Credits

\ No newline at end of file diff --git a/index.html b/index.html index 5fc843f..c830aa7 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Japt Interpreter

Transpiled JS:

Output:

\ No newline at end of file +Japt Interpreter

Transpiled JS:

Output:

\ No newline at end of file diff --git a/js/default.js b/js/default.js index 20cbf0c..653f7d3 100644 --- a/js/default.js +++ b/js/default.js @@ -1 +1 @@ -{w=window,d=document,b=d.body,l=w.localStorage,u=new URL(w.location.href),a=S=>d.querySelectorAll(S),e=E=>d.createElement(E),i=I=>d.getElementById(I),n=E=>d.createElementNS(`http://www.w3.org/2000/svg`,E),q=S=>d.querySelector(S),t=T=>d.createTextNode(T),characters="$[]^_`{|}~¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕ×ßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûü",shortcuts={"XYZ{X":{character:`È`,version:`1.4.5`},"XYZ{Y":{character:`Ï`,version:`1.4.5`},"g ":{character:`Î`,version:`1.4.5`},"gJ ":{character:`Ì`,version:`1.4.5`},"l ":{character:`Ê`,version:`1.4.5`},"Um@":{character:`¡`,version:`1.4.5`},"m@":{character:`£`,version:`1.4.5`},"m_":{character:`®`,version:`1.4.5`},"mDEF{D":{character:`Ë`,version:`1.4.5`},"n2 ":{character:`Í`,version:`1.4.5`},"o@":{character:`Æ`,version:`1.4.5`},"o_":{character:`Ç`,version:`1.4.5`},"p2 ":{character:`²`,version:`1.4.5`},"p3 ":{character:`³`,version:`1.4.5`},"q ":{character:`¬`,version:`1.4.5`},"qR ":{character:`·`,version:`1.4.5`},"qS ":{character:`¸`,version:`1.4.5`},"r*1 ":{character:`×`,version:`1.4.5`},"s0,":{character:`¯`,version:`1.4.5`},"s1 ":{character:`Å`,version:`1.4.5`},"Us2 ":{character:`¢`,version:`1.4.5`},"s2 ":{character:`¤`,version:`1.4.5`},"w ":{character:`Ô`,version:`1.4.6`},"y ":{character:`Õ`,version:`1.4.6`},"} ":{character:`Ã`,version:`1.4.5`},") ":{character:`¹`,version:`1.4.5`},"+1":{character:`Ä`,version:`1.4.5`},"++":{character:`°`,version:`1.4.5`},"+=":{character:`±`,version:`1.4.5`},"-1":{character:`É`,version:`1.4.5`},"--":{character:`´`,version:`1.4.5`},"-=":{character:`µ`,version:`1.4.5`},"*2":{character:`Ñ`,version:`1.4.5`},"!==":{character:`À`,version:`1.4.5`},"!=":{character:`¦`,version:`1.4.5`},"===":{character:`¶`,version:`1.4.5`},"==":{character:`¥`,version:`1.4.5`},"<=":{character:`§`,version:`1.4.5`},">=":{character:`¨`,version:`1.4.5`},"&&!":{character:`«`,version:`1.4.5`},"&&":{character:`©`,version:`1.4.5`},"||":{character:`ª`,version:`1.4.5`},"-~":{character:`Ò`,version:`1.4.6`},"~-":{character:`Ó`,version:`1.4.6`},"~~":{character:`Â`,version:`1.4.5`},">>>":{character:`Á`,version:`1.4.5`},".25":{character:`¼`,version:`1.4.5`},".5":{character:`½`,version:`1.4.5`},".75":{character:`¾`,version:`1.4.5`},"(((":{character:`»`,version:`1.4.5`},"((":{character:`º`,version:`1.4.5`}},regexes={"w":{match:`A-Z, a-z & 0-9`,version:`1.4.5`},"W":{match:`Everything else`,version:`1.4.5`},"d":{match:`0-9`,version:`1.4.5`},"D":{match:`Everything else`,version:`1.4.5`},"s":{match:`Whitespace`,version:`1.4.5`},"S":{match:`Everything else`,version:`1.4.5`},"n":{match:`Newline`,version:`1.4.5`},"t":{match:`Tab`,version:`1.4.5`},"b":{match:`Word boundary`,version:`1.4.5`},"B":{match:`Everything else`,version:`1.4.5`},"a":{match:`a-z`,version:`1.4.5`},"A":{match:`A-Z`,version:`1.4.5`},"l":{match:`A-Z & a-z`,version:`1.4.5`},"L":{match:`Everything else`,version:`1.4.5`},"p":{match:`ASCII`,version:`1.4.5`},"P":{match:`Everything else`,version:`1.4.5`},"q":{match:`ASCII & newline`,version:`1.4.5`},"Q":{match:`Everything else`,version:`1.4.5`},"v":{match:`Vowels`,version:`1.4.5`},"V":{match:`Everything else`,version:`1.4.5`},"y":{match:`Vowels & Yy`,version:`1.4.5`},"Y":{match:`Everything else`,version:`1.4.5`},"c":{match:`Consonants`,version:`1.4.5`},"C":{match:`Everything else`,version:`1.4.5`}},version={current:`1.4.6`,list:i(`versions`),numbers:[`1.4.5`,`1.4.6`,`2.0a0`],change(event){let ver=event.target.dataset.version;if(ver&&ver!==version.selected)window.location.href=interpreter.url(ver);},init(){let item,menu,svg,ver;version.two=/^2/.test(version.selected);for(ver of version.numbers){if(item)item=item.cloneNode(true);else{svg=n(`svg`);svg.classList.add(`fr`);svg.setAttribute(`viewBox`,`0 0 24 24`);svg.dataset.mdi=`menu-down`;item=e(`li`);item.classList.add(`cp`);item.append(svg,t(``));}item.classList.toggle(`fwm`,ver===version.current);item.dataset.selected=ver===version.selected;item.dataset.version=ver;item.lastChild.nodeValue=`v`+ver;version.list.append(item);}}},interpreter={bytes:0,running:false,fields:{code:i(`code`),counter:i(`counter`),error:q(`#error>span`),explanation:i(`explanation`),flags:i(`flags`),input:i(`input`),output:i(`output`),timer:i(`timer`),transpiled:i(`transpiled`)},button:i(`run`),cache:{enabled:false,array:l[`json-cache`]?JSON.parse(l[`json-cache`]):[],buttons:{clear:i(`clear`),toggle:i(`cache`)},add(code,flags,input,output,timer){interpreter.cache.array.push({code:code,flags:flags,input:input,output:output,timer:timer,version:version.selected});if(interpreter.cache.array.length===1)interpreter.cache.buttons.clear.parentNode.classList.remove(`dn`);interpreter.cache.array=interpreter.cache.array.slice(-50);l.setItem(`json-cache`,JSON.stringify(interpreter.cache.array));},clear(){interpreter.cache.array=[];l.removeItem(`json-cache`);interpreter.cache.buttons.clear.parentNode.classList.add(`dn`);},find(code,flags,input){return interpreter.cache.array.find(obj=>obj.code===code&&obj.flags===flags&&obj.input===input&&obj.version===version.selected);},toggle(){interpreter.cache.enabled=!interpreter.cache.enabled;interpreter.cache.buttons.toggle.classList.toggle(`enabled`,interpreter.cache.enabled);interpreter.cache.buttons.clear.parentNode.classList.toggle(`dn`,!interpreter.cache.enabled||!interpreter.cache.array.length);interpreter.cache.buttons.toggle.parentNode.dataset.title=`${interpreter.cache.enabled?`Disable`:`Enable`} Caching`;},},init(){let params=u.searchParams;version.selected=version.numbers.includes(params.get(`v`))?params.get(`v`):version.current;q(`title`).firstChild.nodeValue=`Japt v${version.selected} Interpreter`;if(params.get(`flags`))interpreter.fields.flags.value=interpreter.decode(params.get(`flags`));if(params.get(`code`)){interpreter.fields.code.value=interpreter.decode(params.get(`code`));general.resize(interpreter.fields.code);}if(params.get(`input`)){interpreter.fields.input.value=interpreter.decode(params.get(`input`));general.resize(interpreter.fields.input);}interpreter.fields.counter.append(t(``));interpreter.fields.timer.append(t(``));interpreter.regex=RegExp(Object.keys(shortcuts).filter(shortcut=>shortcuts[shortcut].version<=version.selected).map(string=>string.replace(/(?=\W)/g,`\\`)).join(`|`),`g`);},decode(text){return atob(text).replace(/\\u[0-9A-F]{4}/gi,chr=>String.fromCharCode(parseInt(chr.slice(2),16)));},encode(text){return btoa(text.replace(/./g,chr=>chr.charCodeAt(0)<256?chr:`\\u`+chr.charCodeAt(0).toString(16).padStart(4,0)));},flags(event){if(event.type===`focus`&&!interpreter.fields.flags.value)interpreter.fields.flags.value=`-`;else if(event.type===`blur`&&interpreter.fields.flags.value===`-`)interpreter.fields.flags.value=``;},golf(){let code=golfed=interpreter.fields.code.value,transpiled=interpreter.fields.transpiled.value,offset=0,match,tmp,shortcut;while(match=interpreter.regex.exec(code)){shortcut=shortcuts[match[0]].character;tmp=golfed.substring(0,match.index-offset)+shortcut+golfed.slice(match.index+match[0].length-offset);if(transpiled===Japt.transpile(tmp)){golfed=tmp;offset+=match[0].length-shortcut.length;}else interpreter.regex.lastIndex=match.index+1;}if(code!==golfed){interpreter.fields.code.select();d.execCommand(`insertText`,false,golfed);interpreter.update();interpreter.fields.code.selectionStart=interpreter.fields.code.selectionEnd=golfed.length;}else interpreter.fields.code.focus();interpreter.regex.lastIndex=0;},markdown(){let markdown=`#[Japt](https://github.com/ETHproductions/japt)`;if(version.current!==version.selected)markdown+=` v`+version.selected;if(interpreter.fields.flags.value)markdown+=` [\`${interpreter.fields.flags.value}\`](https://codegolf.meta.stackexchange.com/a/14339/)`;markdown+=`, ${interpreter.bytes} ${`bytes`.slice(0,interpreter.bytes!==1?5:4)}\n\n${interpreter.fields.code.value.replace(/^/gm,` `)}\n\n[Try it](${interpreter.url()})`;if(interpreter.fields.explanation.value)markdown+=`\n\n`+interpreter.fields.explanation.value.replace(/^/gm,` `);return markdown;},reset(){b.classList.remove(`cw`);interpreter.running=false;},run(){if(!interpreter.running){let code=interpreter.fields.code.value,flags=interpreter.fields.flags.value,input=interpreter.fields.input.value,result,timer;interpreter.fields.error.parentNode.classList.add(`dn`);if(interpreter.cache.enabled)result=interpreter.cache.find(code,flags,input);if(interpreter.cache.enabled&&result){interpreter.fields.timer.firstChild.nodeValue=`cached`;interpreter.fields.output.value=result.output;general.resize(interpreter.fields.output);}else{interpreter.running=true;b.classList.add(`cw`);interpreter.fields.timer.firstChild.nodeValue=``;Japt.run(code,input+`\n`+flags,false,()=>timer=performance.now(),output=>{timer=performance.now()-timer;interpreter.fields.timer.firstChild.nodeValue=(timer/1e3).toFixed(3)+` seconds`;if(Japt.implicit_output)Japt.output(output);general.resize(interpreter.fields.output);interpreter.reset();if(interpreter.cache.enabled)interpreter.cache.add(code,flags,input,output,timer);},err=>{console.error(err);Japt.error(err);interpreter.fields.error.parentNode.classList.remove(`dn`);interpreter.reset();});}}},update(){let code=interpreter.fields.code.value,encoding=`ISO-8859-1`;interpreter.fields.transpiled.value=Japt.transpile(code);general.resize(interpreter.fields.code);general.resize(interpreter.fields.transpiled);if (/[^\x00-\xff]/.test(code)){code=unescape(encodeURI(code));encoding=`UTF-8`;}interpreter.bytes=code.length;interpreter.fields.counter.firstChild.nodeValue=interpreter.bytes+` bytes`.slice(0,interpreter.bytes!==1?6:5)+` (${encoding})`;},url(v=version.selected){let url=u.protocol+`//${u.hostname+u.pathname}?v=`+v;if(interpreter.fields.flags.value)url+=`&flags=`+interpreter.encode(interpreter.fields.flags.value);if(interpreter.fields.code.value)url+=`&code=`+interpreter.encode(interpreter.fields.code.value);if(interpreter.fields.input.value)url+=`&input=`+interpreter.encode(interpreter.fields.input.value);return url.replace(/\+/g,`%2b`).replace(/ /g,`%20`);}},compressor={bases:[11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],delimiters:` \nabcdefghijklmnopqrstuvwxyz`,golfables:`gnpqswy`,shortcuts:`ÎͲ¬¤ÔÕ`,field:i(`compressor`),buttons:{compress:i(`compress`),copy:i(`copy-compressed`),permute:i(`permute`),reset:i(`reset`)},permutations:{enabled:false,get(){let length=compressor.value.length,permutations=[compressor.value.slice()],tmp=Array(length).fill(0),x=1,index;while (x(one.weight>two.weight)-(one.weightcompressor.get(compressor.map(array,base)));let delimiters,strings;if(base){strings=array.map(num=>num.toString(base));delimiters=compressor.delimiters.k(strings.join(``));}else delimiters=compressor.delimiters.k(array.join(``));return [...delimiters].map(character=>{let obj={delimiter:character};if(compressor.permutations.enabled)obj.permutation=array;if(base){obj.string=shoco.c(strings.join(character));obj.base=base;}else obj.string=shoco.c(array.join(character));obj.string=`\`${obj.string.replace(/(?=`)/g,`\\`)}\``;return obj;});},reset(){compressor.field.readOnly=false;compressor.field.value=compressor.original;general.resize(compressor.field);compressor.buttons.compress.parentNode.classList.remove(`dn`);compressor.buttons.permute.parentNode.classList.remove(`dn`);compressor.buttons.copy.parentNode.classList.add(`dn`);compressor.buttons.reset.parentNode.classList.add(`dn`);},run(){try{let array=compressor.value.startsWith(`["`);if(array)compressor.value=compressor.value.replace(/([^\\[]")"/g,`$1,"`);compressor.value=eval(compressor.value);if(compressor.value.constructor===String)compressor.result={string:`\`${shoco.c(compressor.value).replace(/(?=`)/g,`\\`)}\``};else if(compressor.value.constructor===Array){if(compressor.value.every(elm=>elm.constructor===String)){if(compressor.permutations.enabled)compressor.permutations.get();compressor.result=compressor.map(compressor.value);}else if(compressor.value.every(elm=>elm.constructor===Number)){if(compressor.permutations.enabled)compressor.permutations.get();compressor.result=compressor.bases.map(base=>compressor.map(compressor.value,base));compressor.result=compressor.result.map(compressor.get);}compressor.result=compressor.get(compressor.result);}compressor.update(array);}catch(err){console.error(err);compressor.reset();}},update(array){let original=compressor.original,quotes=/([^\\]"),"/g;if(array)original=original.replace(quotes,`$1"`);if(compressor.result.delimiter){if(compressor.result.delimiter===` `){compressor.result.delimiter=`S`;compressor.result.string+=`¸`;}else if(compressor.result.delimiter===`\n`){compressor.result.delimiter=`R`;compressor.result.string+=`·`;}else if(compressor.golfables.includes(compressor.result.delimiter))compressor.result.string+=`q${compressor.shortcuts[compressor.golfables.search(compressor.result.delimiter)]}`;else compressor.result.string+=`q${compressor.result.delimiter} `;}if(compressor.result.base)compressor.result.string+=`mn${compressor.result.base=compressor.result.base<17?`ABCDEFG`[compressor.result.base%10]:compressor.result.base===32?`H`:compressor.result.base} `;compressor.field.value=`Original: ${original}\n`;if(compressor.result.permutation)compressor.field.value+=`Permutation: ${JSON.stringify(compressor.result.permutation).replace(array?quotes:``,array?`$1"`:``)}\n`;compressor.field.value+=`Bytes: ${original.length}\n`;compressor.field.value+=`Compressed: ${compressor.result.string}\n`;if(compressor.result.base)compressor.field.value+=`Base: ${compressor.result.base}\n`;if(compressor.result.delimiter)compressor.field.value+=`Delimiter: ${compressor.result.delimiter}\n`;compressor.field.value+=`Bytes: ${compressor.result.string.length}`;general.resize(compressor.field);compressor.buttons.copy.parentNode.classList.remove(`dn`);if(compressor.permutations.enabled)compressor.buttons.reset.addEventListener(`animationiteration`,()=>compressor.buttons.reset.classList.remove(`spin`),{capture:false,once:true});},weigh(obj){obj.weight=obj.string.length-` \n`.includes(obj.delimiter)-` \n${compressor.golfables}`.includes(obj.delimiter)-(obj.base<17||obj.base===32);return obj;}},docs={sidebar:i(`docs`),files:l[`japt-docs`]?JSON.parse(l[`japt-docs`]):[`docs/intro.html`,`docs/basics.html`,`docs/variables.html`,`docs/shortcuts.html`,`docs/compression.html`,`docs/regex.html`,`docs/string.json`,`docs/array.json`,`docs/number.json`,`docs/function.json`,`docs/date.json`,`docs/math.json`,`docs/other.json`,`docs/flags.json`,`docs/examples.html`,`docs/settings.html`],init(){let menu=e(`ol`),sort=e(`ol`),article,current,item,order,svg;return Promise.all(docs.files.map(file=>fetch(file))).then(async files=>{for(let [index,file] of files.entries()){if(article){article=article.cloneNode(false);item=item.cloneNode(true);order=order.cloneNode(true);svg=svg.cloneNode(true);}else{article=e(`article`);article.classList.add(`oa`);item=e(`li`);item.classList.add(`cp`,`fwm`,`oh`,`toe`,`wsnw`);item.append(t(``));order=e(`li`);order.classList.add(`pr`);order.append(e(`span`),t(``));order.firstChild.classList.add(`cm`,`dib`,`vat`);svg=n(`svg`);svg.classList.add(`pen`,`vat`);svg.dataset.mdi=`drag-vertical`;svg.setAttribute(`viewBox`,`0 0 24 24`);order.firstChild.append(svg);svg=n(`svg`);svg.classList.add(`cp`,`vat`);svg.dataset.mdi=`link-variant,check`;svg.setAttribute(`viewBox`,`0 0 24 24`);}article.id=item.dataset.section=svg.dataset.copy=`docs-`+docs.files[index].slice(5,-5);current=!index&&!u.hash.startsWith(`#docs-`)||u.hash.slice(1)===article.id;if(current)docs.current={article,item};article.classList.toggle(`dn`,!current);item.classList.toggle(`current`,current);svg.addEventListener(`click`,general.copy,false);switch(docs.files[index].slice(-4)){case`json`:docs.json(await file.json(),article);break;case`html`:article.innerHTML=docs.parse(await file.text());break;default:console.error(`Failed to load documenation:`,file.url)}docs.sidebar.append(article);item.firstChild.nodeValue=order.lastChild.nodeValue=article.firstChild.firstChild.nodeValue;article.firstChild.prepend(svg);menu.append(item);order.dataset.file=docs.files[index];sort.append(order);}docs.menu(menu);docs.shortcuts();docs.regex();i(`docs-examples`).addEventListener(`click`,docs.example,false);docs.settings(sort);general.icons(docs.sidebar);i(`loading`).remove();});},change(event){if(event.target.dataset.section){docs.current.article.classList.add(`dn`);docs.current.article=i(event.target.dataset.section);docs.current.article.classList.remove(`dn`);docs.current.item.classList.remove(`current`);docs.current.item=docs.sidebar.querySelector(`#menu+ol>li[data-section=${event.target.dataset.section}]`);docs.current.item.classList.add(`current`);if(event.target===docs.current.item)event.target.parentNode.blur();}},close(event){general.close(event,docs.toggle);},example(event){let dataset=event.target.dataset;if(dataset.code){interpreter.fields.code.select();d.execCommand(`insertText`,false,dataset.code);interpreter.update();interpreter.run();}},json(json,article){let object=json[json.type],heading,intro,key,svg,title,text;heading=e(`h3`);heading.classList.add(`ps`);heading.append(t(json.title));article.append(heading);if(json.intro){for(intro of json.intro){if(text)text=text.cloneNode(false);else text=e(`p`);text.innerHTML=docs.parse(intro);article.append(text);}}for(key in object){if(title){title=title.cloneNode(false);if(json.type===`methods`)svg=svg.cloneNode(true);text=text.cloneNode(false);}else{title=e(`h4`);title.classList.add(`method`,`fwm`);if(json.type===`methods`){title.classList.add(`cp`);svg=n(`svg`);svg.classList.add(`vat`);svg.setAttribute(`viewBox`,`0 0 24 24`);svg.dataset.mdi=`arrow-right`;}text=e(`p`);}title.dataset.version=object[key].version;switch(json.type){case`flags`:title.append(t(`-`+key));break;default:title.dataset.character=key[0];title.append(t(json.object+`.`+key),svg,t(object[key].returns));}text.innerHTML=docs.parse(object[key].description);article.append(title,text);}},menu(list){let svg=n(`svg`);svg.classList.add(`cp`,`pa`);svg.dataset.mdi=`dots-vertical`;svg.id=`menu`;svg.tabIndex=`-1`;svg.setAttribute(`viewBox`,`0 0 24 24`);list.classList.add(`pa`);list.tabIndex=`-1`;docs.sidebar.prepend(svg,list);},parse(text){return text.replace(/\n/g,`
`).replace(/`([^`]+?)`([^`]+?)``/g,`$2`).replace(/`([^`]+?)`/g,`$1`).replace(/\[([^\]]+?)\]\(([^)]+?)\)/g,`$1`).replace(/\[(v)\:([^\]]+?)\]/g,`$1$2`).replace(/\[icon\:([^\]]+?)\]/g,``).replace(/\[([a-z]+)\:([^\]]+?)\]/g,`$2`);},regex(){let table=i(`regex`),regex,row,cell,code,ver;for(regex in regexes){if(row){row=row.cloneNode(false);cell=cell.cloneNode(false);code=code.cloneNode(false);ver=ver.cloneNode(false);}else{row=e(`tr`);cell=e(`td`);code=e(`code`);code.classList.add(`dib`,`vam`);ver=e(`span`);ver.classList.add(`version`,`dib`,`vam`);}code.append(t((version.selected<`2.0a0`?`%`:`\\`)+regex));cell.append(code);row.append(cell);cell=cell.cloneNode(false);cell.append(t(regexes[regex].match));row.append(cell);cell=cell.cloneNode(false);ver.append(t(`v`+regexes[regex].version));cell.append(ver);row.append(cell);table.append(row);}},settings(list){list.lastChild.remove();list.id=`sort`;i(`docs-settings`).append(list);general.js(`https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js`).then(()=>{Sortable.create(list,{animation:150,chosenClass:`sorting`,handle:`span`,onChoose:event=>event.target.classList.add(`sorting`),onUnchoose:event=>event.target.classList.remove(`sorting`),onEnd:event=>{}});});},shortcuts(){let table=i(`shortcuts`),shortcut,row,cell,code,ver;for(shortcut in shortcuts){if(row){row=row.cloneNode(false);cell=cell.cloneNode(false);code=code.cloneNode(false);ver=ver.cloneNode(false);}else{row=e(`tr`);cell=e(`td`);code=e(`code`);code.classList.add(`dib`,`vam`);ver=e(`span`);ver.classList.add(`version`,`dib`,`vam`);}code.classList.add(`cp`);code.append(t(code.dataset.character=shortcuts[shortcut].character));cell.append(code);row.append(cell);code=code.cloneNode(false);code.classList.remove(`cp`);code.removeAttribute(`data-character`);code.append(t(shortcut));cell=cell.cloneNode(false);cell.append(code);row.append(cell);cell=cell.cloneNode(false);ver.append(t(`v`+shortcuts[shortcut].version));cell.append(ver);row.append(cell);table.append(row);}},toggle(){docs.open=docs.sidebar.dataset.open!==`true`;docs.sidebar.dataset.open=docs.open;if(docs.open)b.addEventListener(`keydown`,docs.close,false);else b.removeEventListener(`keydown`,docs.close);}},keyboard={list:q(`#keyboard>ol`),init(){let item,key;for(key of characters){if(item)item=item.cloneNode(true);else{item=e(`li`);item.classList.add(`cp`,`df`);item.tabIndex=`-1`;item.append(t(``));}item.dataset.character=item.firstChild.nodeValue=key;keyboard.list.append(item);}},close(event){general.close(event,keyboard.toggle);},insert(event){if(event.target.dataset.character){interpreter.fields.code.focus();d.execCommand(`insertText`,false,event.target.dataset.character);interpreter.update();if(event.currentTarget===keyboard.list)event.target.focus();}},toggle(){keyboard.open=keyboard.list.parentNode.dataset.open!==`true`;keyboard.list.parentNode.dataset.open=keyboard.open;if(keyboard.open)b.addEventListener(`keydown`,keyboard.close,false);else b.removeEventListener(`keydown`,keyboard.close);}},general={buttons:{theme:i(`theme`)},clipboard:i(`clipboard`),meta:q(`meta[name=theme-color]`),mdi:{"alert":`M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z`,"arrow-right":`M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z`,"autorenew":`M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z`,"check":`M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z`,"check-box-outline":`M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M19,5V19H5V5H19M10,17L6,13L7.41,11.58L10,14.17L16.59,7.58L18,9`,"checkbox-blank-outline":`M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z`,"clipboard-text-outline":`M19,3H14.82C14.25,1.44 12.53,0.64 11,1.2C10.14,1.5 9.5,2.16 9.18,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M12,3A1,1 0 0,1 13,4A1,1 0 0,1 12,5A1,1 0 0,1 11,4A1,1 0 0,1 12,3M7,7H17V5H19V19H5V5H7V7M17,11H7V9H17V11M15,15H7V13H15V15Z`,"delete":`M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z`,"dots-vertical":`M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z`,"drag-vertical":`M9,3H11V5H9V3M13,3H15V5H13V3M9,7H11V9H9V7M13,7H15V9H13V7M9,11H11V13H9V11M13,11H15V13H13V11M9,15H11V17H9V15M13,15H15V17H13V15M9,19H11V21H9V19M13,19H15V21H13V19Z`,"flag":`M14.4,6L14,4H5V21H7V14H12.6L13,16H20V6H14.4Z`,"file-document":`M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z`,"golf":`M19.5,18A1.5,1.5 0 0,1 21,19.5A1.5,1.5 0 0,1 19.5,21A1.5,1.5 0 0,1 18,19.5A1.5,1.5 0 0,1 19.5,18M17,5.92L11,9V18.03C13.84,18.19 16,19 16,20C16,21.1 13.31,22 10,22C6.69,22 4,21.1 4,20C4,19.26 5.21,18.62 7,18.27V20H9V2L17,5.92Z`,"github-circle":`M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z`,"invert-colors":`M12,19.58V19.58C10.4,19.58 8.89,18.96 7.76,17.83C6.62,16.69 6,15.19 6,13.58C6,12 6.62,10.47 7.76,9.34L12,5.1M17.66,7.93L12,2.27V2.27L6.34,7.93C3.22,11.05 3.22,16.12 6.34,19.24C7.9,20.8 9.95,21.58 12,21.58C14.05,21.58 16.1,20.8 17.66,19.24C20.78,16.12 20.78,11.05 17.66,7.93Z`,"keyboard":`M19,10H17V8H19M19,13H17V11H19M16,10H14V8H16M16,13H14V11H16M16,17H8V15H16M7,10H5V8H7M7,13H5V11H7M8,11H10V13H8M8,8H10V10H8M11,11H13V13H11M11,8H13V10H11M20,5H4C2.89,5 2,5.89 2,7V17A2,2 0 0,0 4,19H20A2,2 0 0,0 22,17V7C22,5.89 21.1,5 20,5Z`,"link-variant":`M10.59,13.41C11,13.8 11,14.44 10.59,14.83C10.2,15.22 9.56,15.22 9.17,14.83C7.22,12.88 7.22,9.71 9.17,7.76V7.76L12.71,4.22C14.66,2.27 17.83,2.27 19.78,4.22C21.73,6.17 21.73,9.34 19.78,11.29L18.29,12.78C18.3,11.96 18.17,11.14 17.89,10.36L18.36,9.88C19.54,8.71 19.54,6.81 18.36,5.64C17.19,4.46 15.29,4.46 14.12,5.64L10.59,9.17C9.41,10.34 9.41,12.24 10.59,13.41M13.41,9.17C13.8,8.78 14.44,8.78 14.83,9.17C16.78,11.12 16.78,14.29 14.83,16.24V16.24L11.29,19.78C9.34,21.73 6.17,21.73 4.22,19.78C2.27,17.83 2.27,14.66 4.22,12.71L5.71,11.22C5.7,12.04 5.83,12.86 6.11,13.65L5.64,14.12C4.46,15.29 4.46,17.19 5.64,18.36C6.81,19.54 8.71,19.54 9.88,18.36L13.41,14.83C14.59,13.66 14.59,11.76 13.41,10.59C13,10.2 13,9.56 13.41,9.17Z`,"loading":`M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z`,"markdown":`M2,16V8H4L7,11L10,8H12V16H10V10.83L7,13.83L4,10.83V16H2M16,8H19V12H21.5L17.5,16.5L13.5,12H16V8Z`,"menu-down":`M7,10L12,15L17,10H7Z`,"play":`M8,5.14V19.14L19,12.14L8,5.14Z`,"play-circle":`M10,16.5V7.5L16,12M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z`,"redo":`M18.4,10.6C16.55,9 14.15,8 11.5,8C6.85,8 2.92,11.03 1.54,15.22L3.9,16C4.95,12.81 7.95,10.5 11.5,10.5C13.45,10.5 15.23,11.22 16.62,12.38L13,16H22V7L18.4,10.6Z`,"shuffle":`M14.83,13.41L13.42,14.82L16.55,17.95L14.5,20H20V14.5L17.96,16.54L14.83,13.41M14.5,4L16.54,6.04L4,18.59L5.41,20L17.96,7.46L20,9.5V4M10.59,9.17L5.41,4L4,5.41L9.17,10.58L10.59,9.17Z`,"shuffle-disabled":`M16,4.5V7H5V9H16V11.5L19.5,8M16,12.5V15H5V17H16V19.5L19.5,16`,"stack-exchange":`M4,14.04V11H20V14.04H4M4,10V7H20V10H4M17.46,2C18.86,2 20,3.18 20,4.63V6H4V4.63C4,3.18 5.14,2 6.54,2H17.46M4,15H20V16.35C20,17.81 18.86,19 17.46,19H16.5L13,22V19H6.54C5.14,19 4,17.81 4,16.35V15Z`,"text":`M21,6V8H3V6H21M3,18H12V16H3V18M3,13H21V11H3V13Z`,"undo":`M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z`},init(){general.theme();interpreter.init();version.init();general.icons(b);keyboard.init();let file=`https://cdn.jsdelivr.net/gh/ETHproductions/japt`;file+=`@${version.selected===version.current||version.two?`master@{${new Date().toISOString().replace(/(\:\d\d){2}\.\d+.+?$/,``)}}`:`v`+version.selected}/src/${version.two?`japt`:`japt-interpreter`}.js`;general.js(`https://cdn.jsdelivr.net/gh/ETHproductions/japt/dependencies/shoco.js`).then(()=>{general.js(file).then(()=>{Japt.stdout=interpreter.fields.output;Japt.stderr=interpreter.fields.error;if(interpreter.fields.code.value){interpreter.update();interpreter.run();}general.listeners();docs.init().catch(err=>console.error(`Failed to load documentation:`,err));}).catch(err=>console.error(`Failed to load interpreter:`,err));}).catch(err=>console.error(`Failed to load schoco:`,err));},close(event,fn){if(event.keyCode===27){fn();event.stopPropagation();}},copy(event){let target=event.target.dataset.copy,text;console.log(target.startsWith(`docs-`));if(target===`compressor`)text=compressor.result.string;else if(interpreter[target])text=interpreter[target]();else if(interpreter.fields[target])text=interpreter.fields[target].value;else if(target.startsWith(`docs-`))text=interpreter.url()+`#`+target;if(target===`explanation`)text=text.replace(/^/gm,` `);general.clipboard.value=text;general.clipboard.select();d.execCommand(`copy`,false);event.target.classList.add(`confirm`);event.target.addEventListener(`transitionend`,()=>event.target.classList.remove(`confirm`),{capture:false,once:false});},icons(parent){let icon,path,svg;for(svg of parent.querySelectorAll(`svg[data-mdi]`)){if(!svg.getAttribute(`viewBox`))svg.setAttribute(`viewBox`,`0 0 24 24`);for(icon of svg.dataset.mdi.split(`,`)){if(path)path=path.cloneNode(true);else{path=n(`path`);path.classList.add(`pen`);}path.setAttribute(`d`,general.mdi[icon]);svg.append(path);}svg.removeAttribute(`data-mdi`);}},js(file){return new Promise((resolve,reject)=>{let script=e(`script`);script.async=true;script.src=file;b.append(script);script.addEventListener(`load`,resolve,{capture:false,once:true});script.addEventListener(`error`,reject,{capture:false,once:true});});},listeners(){b.addEventListener(`keydown`,general.run,false);version.list.addEventListener(`click`,version.change,false);general.buttons.theme.addEventListener(`click`,general.theme,false);interpreter.fields.flags.addEventListener(`focus`,interpreter.flags,false);interpreter.fields.flags.addEventListener(`blur`,interpreter.flags,false);interpreter.button.addEventListener(`click`,interpreter.run,false);i(`copy-link`).addEventListener(`click`,general.copy,false);i(`copy-post`).addEventListener(`click`,general.copy,false);i(`undo`).addEventListener(`click`,()=>d.execCommand(`undo`,false),false);i(`redo`).addEventListener(`click`,()=>d.execCommand(`redo`,false),false);i(`golf`).addEventListener(`click`,interpreter.golf,false);i(`copy-code`).addEventListener(`click`,general.copy,false);interpreter.fields.code.addEventListener(`input`,interpreter.update,false);i(`copy-js`).addEventListener(`click`,general.copy,false);i(`copy-input`).addEventListener(`click`,general.copy,false);interpreter.fields.input.addEventListener(`input`,()=>general.resize(interpreter.fields.input),false);i(`copy-output`).addEventListener(`click`,general.copy,false);interpreter.cache.buttons.toggle.addEventListener(`click`,interpreter.cache.toggle,false);interpreter.cache.buttons.clear.addEventListener(`click`,interpreter.cache.clear,false);i(`copy-explanation`).addEventListener(`click`,general.copy,false);interpreter.fields.explanation.addEventListener(`input`,()=>general.resize(interpreter.fields.explanation),false);compressor.buttons.compress.addEventListener(`click`,compressor.init,false);compressor.buttons.permute.addEventListener(`click`,compressor.permutations.toggle,false);compressor.buttons.copy.addEventListener(`click`,general.copy,false);compressor.buttons.reset.addEventListener(`click`,compressor.reset,false);compressor.field.addEventListener(`input`,()=>general.resize(compressor.field),false);q(`#docs>h2`).addEventListener(`click`,docs.toggle,false);docs.sidebar.addEventListener(`click`,docs.change,false);docs.sidebar.addEventListener(`click`,keyboard.insert,false);q(`#keyboard>h2`).addEventListener(`click`,keyboard.toggle,false);keyboard.list.addEventListener(`click`,keyboard.insert,false);w.addEventListener(`resize`,()=>{general.resize(interpreter.fields.code);general.resize(interpreter.fields.transpiled);general.resize(interpreter.fields.input);general.resize(interpreter.fields.output);general.resize(interpreter.fields.explanation);general.resize(compressor.field);},false);},resize(field){general.clipboard.value=field.value;field.style.height=2+general.clipboard.scrollHeight+`px`;},run(event){if(event.ctrlKey&&event.keyCode==13)interpreter.run();},theme(loaded=false){if(loaded){b.classList.toggle(`light`);b.classList.toggle(`dark`);}else b.classList.add(l[`japt-theme`]||`dark`);let light=b.classList.contains(`light`);general.meta.content=`#${light?`fff`:`212121`}`;general.buttons.theme.parentNode.dataset.title=`${light?`Dark`:`Light`} Theme`;if(loaded)l.setItem(`japt-theme`,light?`light`:`dark`);}};general.init();} \ No newline at end of file +{const w=window,d=document,b=d.body,l=w.localStorage,u=new URL(w.location.href),a=S=>d.querySelectorAll(S),e=E=>d.createElement(E),i=I=>d.getElementById(I),n=E=>d.createElementNS(`http://www.w3.org/2000/svg`,E),q=S=>d.querySelector(S),t=T=>d.createTextNode(T),characters="$[]^_`{|}~¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕ×ßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûü",shortcuts={"XYZ{X":{character:`È`,version:`1.4.5`},"XYZ{Y":{character:`Ï`,version:`1.4.5`},"g ":{character:`Î`,version:`1.4.5`},"gJ ":{character:`Ì`,version:`1.4.5`},"l ":{character:`Ê`,version:`1.4.5`},"Um@":{character:`¡`,version:`1.4.5`},"m@":{character:`£`,version:`1.4.5`},"m_":{character:`®`,version:`1.4.5`},"mDEF{D":{character:`Ë`,version:`1.4.5`},"n2 ":{character:`Í`,version:`1.4.5`},"o@":{character:`Æ`,version:`1.4.5`},"o_":{character:`Ç`,version:`1.4.5`},"p2 ":{character:`²`,version:`1.4.5`},"p3 ":{character:`³`,version:`1.4.5`},"q ":{character:`¬`,version:`1.4.5`},"qR ":{character:`·`,version:`1.4.5`},"qS ":{character:`¸`,version:`1.4.5`},"r*1 ":{character:`×`,version:`1.4.5`},"s0,":{character:`¯`,version:`1.4.5`},"s1 ":{character:`Å`,version:`1.4.5`},"Us2 ":{character:`¢`,version:`1.4.5`},"s2 ":{character:`¤`,version:`1.4.5`},"w ":{character:`Ô`,version:`1.4.6`},"y ":{character:`Õ`,version:`1.4.6`},"} ":{character:`Ã`,version:`1.4.5`},") ":{character:`¹`,version:`1.4.5`},"+1":{character:`Ä`,version:`1.4.5`},"++":{character:`°`,version:`1.4.5`},"+=":{character:`±`,version:`1.4.5`},"-1":{character:`É`,version:`1.4.5`},"--":{character:`´`,version:`1.4.5`},"-=":{character:`µ`,version:`1.4.5`},"*2":{character:`Ñ`,version:`1.4.5`},"!==":{character:`À`,version:`1.4.5`},"!=":{character:`¦`,version:`1.4.5`},"===":{character:`¶`,version:`1.4.5`},"==":{character:`¥`,version:`1.4.5`},"<=":{character:`§`,version:`1.4.5`},">=":{character:`¨`,version:`1.4.5`},"&&!":{character:`«`,version:`1.4.5`},"&&":{character:`©`,version:`1.4.5`},"||":{character:`ª`,version:`1.4.5`},"-~":{character:`Ò`,version:`1.4.6`},"~-":{character:`Ó`,version:`1.4.6`},"~~":{character:`Â`,version:`1.4.5`},">>>":{character:`Á`,version:`1.4.5`},".25":{character:`¼`,version:`1.4.5`},".5":{character:`½`,version:`1.4.5`},".75":{character:`¾`,version:`1.4.5`},"(((":{character:`»`,version:`1.4.5`},"((":{character:`º`,version:`1.4.5`}},regexes={"w":{match:`A-Z, a-z & 0-9`,version:`1.4.5`},"W":{match:`Everything else`,version:`1.4.5`},"d":{match:`0-9`,version:`1.4.5`},"D":{match:`Everything else`,version:`1.4.5`},"s":{match:`Whitespace`,version:`1.4.5`},"S":{match:`Everything else`,version:`1.4.5`},"n":{match:`Newline`,version:`1.4.5`},"t":{match:`Tab`,version:`1.4.5`},"b":{match:`Word boundary`,version:`1.4.5`},"B":{match:`Everything else`,version:`1.4.5`},"a":{match:`a-z`,version:`1.4.5`},"A":{match:`A-Z`,version:`1.4.5`},"l":{match:`A-Z & a-z`,version:`1.4.5`},"L":{match:`Everything else`,version:`1.4.5`},"p":{match:`ASCII`,version:`1.4.5`},"P":{match:`Everything else`,version:`1.4.5`},"q":{match:`ASCII & newline`,version:`1.4.5`},"Q":{match:`Everything else`,version:`1.4.5`},"v":{match:`Vowels`,version:`1.4.5`},"V":{match:`Everything else`,version:`1.4.5`},"y":{match:`Vowels & Yy`,version:`1.4.5`},"Y":{match:`Everything else`,version:`1.4.5`},"c":{match:`Consonants`,version:`1.4.5`},"C":{match:`Everything else`,version:`1.4.5`}},version={current:`1.4.6`,list:i(`versions`),numbers:[`1.4.5`,`1.4.6`,`2.0a0`],change(event){let ver=event.target.dataset.version;if(ver&&ver!==version.selected)window.location.href=interpreter.url(ver);},init(){let item,menu,svg,ver;version.two=/^2/.test(version.selected);for(ver of version.numbers){if(item)item=item.cloneNode(true);else{svg=n(`svg`);svg.classList.add(`fr`);svg.setAttribute(`viewBox`,`0 0 24 24`);svg.dataset.mdi=`menu-down`;item=e(`li`);item.classList.add(`cp`);item.append(svg,t(``));}item.classList.toggle(`fwm`,ver===version.current);item.dataset.selected=ver===version.selected;item.dataset.version=ver;item.lastChild.nodeValue=`v`+ver;version.list.append(item);}}},interpreter={bytes:0,running:false,fields:{code:i(`code`),counter:i(`counter`),error:q(`#error>span`),explanation:i(`explanation`),flags:i(`flags`),input:i(`input`),output:i(`output`),timer:i(`timer`),transpiled:i(`transpiled`)},button:i(`run`),cache:{enabled:false,array:l[`json-cache`]?JSON.parse(l[`json-cache`]):[],buttons:{clear:i(`clear`),toggle:i(`cache`)},add(code,flags,input,output,timer){interpreter.cache.array.push({code:code,flags:flags,input:input,output:output,timer:timer,version:version.selected});if(interpreter.cache.array.length===1)interpreter.cache.buttons.clear.parentNode.classList.remove(`dn`);interpreter.cache.array=interpreter.cache.array.slice(-50);l.setItem(`json-cache`,JSON.stringify(interpreter.cache.array));},clear(){interpreter.cache.array=[];l.removeItem(`json-cache`);interpreter.cache.buttons.clear.parentNode.classList.add(`dn`);},find(code,flags,input){return interpreter.cache.array.find(obj=>obj.code===code&&obj.flags===flags&&obj.input===input&&obj.version===version.selected);},toggle(){interpreter.cache.enabled=!interpreter.cache.enabled;interpreter.cache.buttons.toggle.classList.toggle(`enabled`,interpreter.cache.enabled);interpreter.cache.buttons.clear.parentNode.classList.toggle(`dn`,!interpreter.cache.enabled||!interpreter.cache.array.length);interpreter.cache.buttons.toggle.parentNode.dataset.title=`${interpreter.cache.enabled?`Disable`:`Enable`} Caching`;},},init(){let params=u.searchParams;version.selected=version.numbers.includes(params.get(`v`))?params.get(`v`):version.current;q(`title`).firstChild.nodeValue=`Japt v${version.selected} Interpreter`;if(params.get(`flags`))interpreter.fields.flags.value=interpreter.decode(params.get(`flags`));if(params.get(`code`)){interpreter.fields.code.value=interpreter.decode(params.get(`code`));general.resize(interpreter.fields.code);}if(params.get(`input`)){interpreter.fields.input.value=interpreter.decode(params.get(`input`));general.resize(interpreter.fields.input);}interpreter.fields.counter.append(t(``));interpreter.fields.timer.append(t(``));interpreter.regex=RegExp(Object.keys(shortcuts).filter(shortcut=>shortcuts[shortcut].version<=version.selected).map(string=>string.replace(/(?=\W)/g,`\\`)).join(`|`),`g`);},decode(text){return atob(text).replace(/\\u[0-9A-F]{4}/gi,chr=>String.fromCharCode(parseInt(chr.slice(2),16)));},encode(text){return btoa(text.replace(/./g,chr=>chr.charCodeAt(0)<256?chr:`\\u`+chr.charCodeAt(0).toString(16).padStart(4,0)));},flags(event){if(event.type===`focus`&&!interpreter.fields.flags.value)interpreter.fields.flags.value=`-`;else if(event.type===`blur`&&interpreter.fields.flags.value===`-`)interpreter.fields.flags.value=``;},golf(){let code=golfed=interpreter.fields.code.value,transpiled=interpreter.fields.transpiled.value,offset=0,match,tmp,shortcut;while(match=interpreter.regex.exec(code)){shortcut=shortcuts[match[0]].character;tmp=golfed.substring(0,match.index-offset)+shortcut+golfed.slice(match.index+match[0].length-offset);if(transpiled===Japt.transpile(tmp)){golfed=tmp;offset+=match[0].length-shortcut.length;}else interpreter.regex.lastIndex=match.index+1;}if(code!==golfed){interpreter.fields.code.select();d.execCommand(`insertText`,false,golfed);interpreter.update();interpreter.fields.code.selectionStart=interpreter.fields.code.selectionEnd=golfed.length;}else interpreter.fields.code.focus();interpreter.regex.lastIndex=0;},markdown(){let markdown=`#[Japt](https://github.com/ETHproductions/japt)`;if(version.current!==version.selected)markdown+=` v`+version.selected;if(interpreter.fields.flags.value)markdown+=` [\`${interpreter.fields.flags.value}\`](https://codegolf.meta.stackexchange.com/a/14339/)`;markdown+=`, ${interpreter.bytes} ${`bytes`.slice(0,interpreter.bytes!==1?5:4)}\n\n${interpreter.fields.code.value.replace(/^/gm,` `)}\n\n[Try it](${interpreter.url()})`;if(interpreter.fields.explanation.value)markdown+=`\n\n`+interpreter.fields.explanation.value.replace(/^/gm,` `);return markdown;},reset(){b.classList.remove(`cw`);interpreter.running=false;},run(){if(!interpreter.running){let code=interpreter.fields.code.value,flags=interpreter.fields.flags.value,input=interpreter.fields.input.value,result,timer;interpreter.fields.error.parentNode.classList.add(`dn`);if(interpreter.cache.enabled)result=interpreter.cache.find(code,flags,input);if(interpreter.cache.enabled&&result){interpreter.fields.timer.firstChild.nodeValue=`cached`;interpreter.fields.output.value=result.output;general.resize(interpreter.fields.output);}else{interpreter.running=true;b.classList.add(`cw`);interpreter.fields.timer.firstChild.nodeValue=``;Japt.run(code,input+`\n`+flags,false,()=>timer=performance.now(),output=>{timer=performance.now()-timer;interpreter.fields.timer.firstChild.nodeValue=(timer/1e3).toFixed(3)+` seconds`;if(Japt.implicit_output)Japt.output(output);general.resize(interpreter.fields.output);interpreter.reset();if(interpreter.cache.enabled)interpreter.cache.add(code,flags,input,output,timer);},err=>{console.error(err);Japt.error(err);interpreter.fields.error.parentNode.classList.remove(`dn`);interpreter.reset();});}}},update(){let code=interpreter.fields.code.value,encoding=`ISO-8859-1`;interpreter.fields.transpiled.value=Japt.transpile(code);general.resize(interpreter.fields.code);general.resize(interpreter.fields.transpiled);if (/[^\x00-\xff]/.test(code)){code=unescape(encodeURI(code));encoding=`UTF-8`;}interpreter.bytes=code.length;interpreter.fields.counter.firstChild.nodeValue=interpreter.bytes+` bytes`.slice(0,interpreter.bytes!==1?6:5)+` (${encoding})`;},url(v=version.selected){let url=u.protocol+`//${u.hostname+u.pathname}?v=`+v;if(interpreter.fields.flags.value)url+=`&flags=`+interpreter.encode(interpreter.fields.flags.value);if(interpreter.fields.code.value)url+=`&code=`+interpreter.encode(interpreter.fields.code.value);if(interpreter.fields.input.value)url+=`&input=`+interpreter.encode(interpreter.fields.input.value);return url.replace(/\+/g,`%2b`).replace(/ /g,`%20`);}},compressor={bases:[11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],delimiters:` \nabcdefghijklmnopqrstuvwxyz`,golfables:`gnpqswy`,shortcuts:`ÎͲ¬¤ÔÕ`,field:i(`compressor`),buttons:{compress:i(`compress`),copy:i(`copy-compressed`),permute:i(`permute`),reset:i(`reset`)},permutations:{enabled:false,get(){let length=compressor.value.length,permutations=[compressor.value.slice()],tmp=Array(length).fill(0),x=1,index;while (x(one.weight>two.weight)-(one.weightcompressor.get(compressor.map(array,base)));let delimiters,strings;if(base){strings=array.map(num=>num.toString(base));delimiters=compressor.delimiters.k(strings.join(``));}else delimiters=compressor.delimiters.k(array.join(``));return [...delimiters].map(character=>{let obj={delimiter:character};if(compressor.permutations.enabled)obj.permutation=array;if(base){obj.string=shoco.c(strings.join(character));obj.base=base;}else obj.string=shoco.c(array.join(character));obj.string=`\`${obj.string.replace(/(?=`)/g,`\\`)}\``;return obj;});},reset(){compressor.field.readOnly=false;compressor.field.value=compressor.original;general.resize(compressor.field);compressor.buttons.compress.parentNode.classList.remove(`dn`);compressor.buttons.permute.parentNode.classList.remove(`dn`);compressor.buttons.copy.parentNode.classList.add(`dn`);compressor.buttons.reset.parentNode.classList.add(`dn`);},run(){try{let array=compressor.value.startsWith(`["`);if(array)compressor.value=compressor.value.replace(/([^\\[]")"/g,`$1,"`);compressor.value=eval(compressor.value);if(compressor.value.constructor===String)compressor.result={string:`\`${shoco.c(compressor.value).replace(/(?=`)/g,`\\`)}\``};else if(compressor.value.constructor===Array){if(compressor.value.every(elm=>elm.constructor===String)){if(compressor.permutations.enabled)compressor.permutations.get();compressor.result=compressor.map(compressor.value);}else if(compressor.value.every(elm=>elm.constructor===Number)){if(compressor.permutations.enabled)compressor.permutations.get();compressor.result=compressor.bases.map(base=>compressor.map(compressor.value,base));compressor.result=compressor.result.map(compressor.get);}compressor.result=compressor.get(compressor.result);}compressor.update(array);}catch(err){console.error(err);compressor.reset();}},update(array){let original=compressor.original,quotes=/([^\\]"),"/g;if(array)original=original.replace(quotes,`$1"`);if(compressor.result.delimiter){if(compressor.result.delimiter===` `){compressor.result.delimiter=`S`;compressor.result.string+=`¸`;}else if(compressor.result.delimiter===`\n`){compressor.result.delimiter=`R`;compressor.result.string+=`·`;}else if(compressor.golfables.includes(compressor.result.delimiter))compressor.result.string+=`q${compressor.shortcuts[compressor.golfables.search(compressor.result.delimiter)]}`;else compressor.result.string+=`q${compressor.result.delimiter} `;}if(compressor.result.base)compressor.result.string+=`mn${compressor.result.base=compressor.result.base<17?`ABCDEFG`[compressor.result.base%10]:compressor.result.base===32?`H`:compressor.result.base} `;compressor.field.value=`Original: ${original}\n`;if(compressor.result.permutation)compressor.field.value+=`Permutation: ${JSON.stringify(compressor.result.permutation).replace(array?quotes:``,array?`$1"`:``)}\n`;compressor.field.value+=`Bytes: ${original.length}\n`;compressor.field.value+=`Compressed: ${compressor.result.string}\n`;if(compressor.result.base)compressor.field.value+=`Base: ${compressor.result.base}\n`;if(compressor.result.delimiter)compressor.field.value+=`Delimiter: ${compressor.result.delimiter}\n`;compressor.field.value+=`Bytes: ${compressor.result.string.length}`;general.resize(compressor.field);compressor.buttons.copy.parentNode.classList.remove(`dn`);if(compressor.permutations.enabled)compressor.buttons.reset.addEventListener(`animationiteration`,()=>compressor.buttons.reset.classList.remove(`spin`),{capture:false,once:true});},weigh(obj){obj.weight=obj.string.length-` \n`.includes(obj.delimiter)-` \n${compressor.golfables}`.includes(obj.delimiter)-(obj.base<17||obj.base===32);return obj;}},docs={sidebar:i(`docs`),files:l[`japt-docs`]?JSON.parse(l[`japt-docs`]):[`docs/intro.html`,`docs/basics.html`,`docs/variables.html`,`docs/shortcuts.html`,`docs/compression.html`,`docs/regex.html`,`docs/string.json`,`docs/array.json`,`docs/number.json`,`docs/function.json`,`docs/date.json`,`docs/math.json`,`docs/other.json`,`docs/flags.json`,`docs/examples.html`,`docs/settings.html`],search:{article:i(`docs-search`),form:q(`#docs-search>form`),input:q(`#docs-search>form>input[type=text]`),init(){docs.search.titles=docs.search.article.querySelectorAll(`h4`);docs.search.methods=[...docs.search.form.querySelectorAll(`input[type=checkbox]`)];docs.search.form.addEventListener(`input`,docs.search.wait,true);},exec(){let hide,title,text;docs.search.article.scrollTo({behavior:`smooth`,top:0});for(title of docs.search.titles){text=title.nextElementSibling;hide=!docs.search.input.value||!text.firstChild.nodeValue.replace(/^Returns |\<[^>]+?\>/g,``).toLowerCase().includes(docs.search.input.value.toLowerCase())||!docs.search.methods.map(input=>input.checked&&input.value).includes(title.dataset.object);title.classList.toggle(`dn`,hide);text.classList.toggle(`dn`,hide);}},toggle(){docs.search.article.classList.toggle(`dn`);},wait(){if(docs.search.timer)clearTimeout(docs.search.timer);docs.search.timer=setTimeout(docs.search.exec,100);}},init(){let menu=e(`ol`),sort=e(`ol`),article,current,input,item,json,label,order,svg;return Promise.all(docs.files.map(file=>fetch(file))).then(async files=>{for(let [index,file] of files.entries()){if(article){article=article.cloneNode(false);item=item.cloneNode(true);order=order.cloneNode(true);svg=svg.cloneNode(true);input=input.cloneNode(true);label=label.cloneNode(true);}else{article=e(`article`);article.classList.add(`oa`);item=e(`li`);item.classList.add(`cp`,`fwm`,`oh`,`toe`,`wsnw`);item.append(t(``));order=e(`li`);order.classList.add(`pr`);order.append(e(`span`),t(``));order.firstChild.classList.add(`cm`,`dib`,`vat`);svg=n(`svg`);svg.classList.add(`pen`,`vat`);svg.dataset.mdi=`drag-vertical`;svg.setAttribute(`viewBox`,`0 0 24 24`);order.firstChild.append(svg);input=e(`input`);input.checked=true;input.name=`methods`;input.type=`checkbox`;label=e(`label`);label.classList.add(`dib`,`cp`); svg=n(`svg`);svg.classList.add(`cp`,`vat`);svg.dataset.mdi=`check-box-outline,checkbox-blank-outline`;svg.setAttribute(`viewBox`,`0 0 24 24`);label.append(svg,t(``));svg=n(`svg`);svg.classList.add(`cp`,`vat`);svg.dataset.mdi=`link-variant,check`;svg.setAttribute(`viewBox`,`0 0 24 24`);}article.id=item.dataset.section=svg.dataset.copy=`docs-`+docs.files[index].slice(5,-5);current=!index&&!u.hash.startsWith(`#docs-`)||u.hash.slice(1)===article.id;if(current)docs.current={article,item};article.classList.toggle(`dn`,!current);item.classList.toggle(`current`,current);svg.addEventListener(`click`,general.copy,false);switch(docs.files[index].slice(-4)){case`json`:docs.json(json=await file.json(),article);if(json.type===`methods`){label.setAttribute(`for`,input.id=`method-`+json.object);input.value=json.object;label.lastChild.nodeValue=article.firstChild.firstChild.nodeValue.match(/[^ ]+/);docs.search.form.append(input,label);}break;case`html`:article.innerHTML=docs.parse(await file.text());break;default:console.error(`Failed to load documenation:`,file.url)}docs.sidebar.append(article);item.firstChild.nodeValue=order.lastChild.nodeValue=article.firstChild.firstChild.nodeValue;article.firstChild.prepend(svg);menu.append(item);order.dataset.file=docs.files[index];sort.append(order);}docs.menu(menu);docs.shortcuts();docs.regex();i(`docs-examples`).addEventListener(`click`,docs.example,false);docs.settings(sort);general.icons(docs.sidebar);docs.search.init();i(`loading`).remove();});},change(event){if(event.target.dataset.section){docs.current.article.classList.add(`dn`);docs.current.article=i(event.target.dataset.section);docs.current.article.classList.remove(`dn`);docs.current.item.classList.remove(`current`);docs.current.item=docs.sidebar.querySelector(`#menu+ol>li[data-section=${event.target.dataset.section}]`);docs.current.item.classList.add(`current`);if(event.target===docs.current.item)event.target.parentNode.blur();}},close(event){general.close(event,docs.toggle);},example(event){let dataset=event.target.dataset;if(dataset.code){interpreter.fields.code.select();d.execCommand(`insertText`,false,dataset.code);interpreter.update();interpreter.run();}},json(json,article){let object=json[json.type],heading,intro,key,svg,title,text;heading=e(`h3`);heading.classList.add(`ps`);heading.append(t(json.title));article.append(heading);if(json.intro){for(intro of json.intro){if(text)text=text.cloneNode(false);else text=e(`p`);text.innerHTML=docs.parse(intro);article.append(text);}}for(key in object){if(title){title=title.cloneNode(false);if(json.type===`methods`)svg=svg.cloneNode(true);text=text.cloneNode(false);}else{title=e(`h4`);title.classList.add(`method`,`fwm`);if(json.type===`methods`){title.classList.add(`cp`);svg=n(`svg`);svg.classList.add(`vat`);svg.setAttribute(`viewBox`,`0 0 24 24`);svg.dataset.mdi=`arrow-right`;}text=e(`p`);}title.dataset.version=object[key].version;text.innerHTML=docs.parse(object[key].description);article.append(title,text);switch(json.type){case`flags`:title.append(t(`-`+key));break;default:title.dataset.character=key[0];title.append(t(json.object+`.`+key),svg,t(object[key].returns));docs.search.article.append(title=title.cloneNode(true),text=text.cloneNode(true));title.dataset.object=json.object;title.classList.add(`dn`);text.classList.add(`dn`);}}},menu(list){let svg=n(`svg`);svg.classList.add(`cp`,`pa`);svg.dataset.mdi=`dots-vertical`;svg.id=`menu`;svg.tabIndex=`-1`;svg.setAttribute(`viewBox`,`0 0 24 24`);list.classList.add(`pa`);list.tabIndex=`-1`;docs.sidebar.prepend(svg,list);},parse(text){return text.replace(/\n/g,`
`).replace(/`([^`]+?)`([^`]+?)``/g,`$2`).replace(/`([^`]+?)`/g,`$1`).replace(/\[([^\]]+?)\]\(([^)]+?)\)/g,`$1`).replace(/\[(v)\:([^\]]+?)\]/g,`$1$2`).replace(/\[icon\:([^\]]+?)\]/g,``).replace(/\[([a-z]+)\:([^\]]+?)\]/g,`$2`);},regex(){let table=i(`regex`),regex,row,cell,code,ver;for(regex in regexes){if(row){row=row.cloneNode(false);cell=cell.cloneNode(false);code=code.cloneNode(false);ver=ver.cloneNode(false);}else{row=e(`tr`);cell=e(`td`);code=e(`code`);code.classList.add(`dib`,`vam`);ver=e(`span`);ver.classList.add(`version`,`dib`,`vam`);}code.append(t((version.selected<`2.0a0`?`%`:`\\`)+regex));cell.append(code);row.append(cell);cell=cell.cloneNode(false);cell.append(t(regexes[regex].match));row.append(cell);cell=cell.cloneNode(false);ver.append(t(`v`+regexes[regex].version));cell.append(ver);row.append(cell);table.append(row);}},settings(list){list.lastChild.remove();list.id=`sort`;i(`docs-settings`).append(list);general.js(`https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js`).then(()=>{Sortable.create(list,{animation:150,chosenClass:`sorting`,handle:`span`,onChoose:event=>event.target.classList.add(`sorting`),onUnchoose:event=>event.target.classList.remove(`sorting`),onEnd:event=>{}});});},shortcuts(){let table=i(`shortcuts`),shortcut,row,cell,code,ver;for(shortcut in shortcuts){if(row){row=row.cloneNode(false);cell=cell.cloneNode(false);code=code.cloneNode(false);ver=ver.cloneNode(false);}else{row=e(`tr`);cell=e(`td`);code=e(`code`);code.classList.add(`dib`,`vam`);ver=e(`span`);ver.classList.add(`version`,`dib`,`vam`);}code.classList.add(`cp`);code.append(t(code.dataset.character=shortcuts[shortcut].character));cell.append(code);row.append(cell);code=code.cloneNode(false);code.classList.remove(`cp`);code.removeAttribute(`data-character`);code.append(t(shortcut));cell=cell.cloneNode(false);cell.append(code);row.append(cell);cell=cell.cloneNode(false);ver.append(t(`v`+shortcuts[shortcut].version));cell.append(ver);row.append(cell);table.append(row);}},toggle(){docs.open=docs.sidebar.dataset.open!==`true`;docs.sidebar.dataset.open=docs.open;if(docs.open)b.addEventListener(`keydown`,docs.close,false);else b.removeEventListener(`keydown`,docs.close);}},keyboard={list:q(`#keyboard>ol`),init(){let item,key;for(key of characters){if(item)item=item.cloneNode(true);else{item=e(`li`);item.classList.add(`cp`,`df`);item.tabIndex=`-1`;item.append(t(``));}item.dataset.character=item.firstChild.nodeValue=key;keyboard.list.append(item);}},close(event){general.close(event,keyboard.toggle);},insert(event){if(event.target.dataset.character){interpreter.fields.code.focus();d.execCommand(`insertText`,false,event.target.dataset.character);interpreter.update();if(event.currentTarget===keyboard.list)event.target.focus();}},toggle(){keyboard.open=keyboard.list.parentNode.dataset.open!==`true`;keyboard.list.parentNode.dataset.open=keyboard.open;if(keyboard.open)b.addEventListener(`keydown`,keyboard.close,false);else b.removeEventListener(`keydown`,keyboard.close);}},general={buttons:{theme:i(`theme`)},clipboard:i(`clipboard`),meta:q(`meta[name=theme-color]`),mdi:{"alert":`M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z`,"arrow-right":`M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z`,"autorenew":`M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z`,"check":`M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z`,"check-box-outline":`M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M19,5V19H5V5H19M10,17L6,13L7.41,11.58L10,14.17L16.59,7.58L18,9`,"checkbox-blank-outline":`M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z`,"clipboard-text-outline":`M19,3H14.82C14.25,1.44 12.53,0.64 11,1.2C10.14,1.5 9.5,2.16 9.18,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M12,3A1,1 0 0,1 13,4A1,1 0 0,1 12,5A1,1 0 0,1 11,4A1,1 0 0,1 12,3M7,7H17V5H19V19H5V5H7V7M17,11H7V9H17V11M15,15H7V13H15V15Z`,"close":`M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z`,"delete":`M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z`,"dots-vertical":`M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z`,"drag-vertical":`M9,3H11V5H9V3M13,3H15V5H13V3M9,7H11V9H9V7M13,7H15V9H13V7M9,11H11V13H9V11M13,11H15V13H13V11M9,15H11V17H9V15M13,15H15V17H13V15M9,19H11V21H9V19M13,19H15V21H13V19Z`,"flag":`M14.4,6L14,4H5V21H7V14H12.6L13,16H20V6H14.4Z`,"file-document":`M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z`,"golf":`M19.5,18A1.5,1.5 0 0,1 21,19.5A1.5,1.5 0 0,1 19.5,21A1.5,1.5 0 0,1 18,19.5A1.5,1.5 0 0,1 19.5,18M17,5.92L11,9V18.03C13.84,18.19 16,19 16,20C16,21.1 13.31,22 10,22C6.69,22 4,21.1 4,20C4,19.26 5.21,18.62 7,18.27V20H9V2L17,5.92Z`,"github-circle":`M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z`,"invert-colors":`M12,19.58V19.58C10.4,19.58 8.89,18.96 7.76,17.83C6.62,16.69 6,15.19 6,13.58C6,12 6.62,10.47 7.76,9.34L12,5.1M17.66,7.93L12,2.27V2.27L6.34,7.93C3.22,11.05 3.22,16.12 6.34,19.24C7.9,20.8 9.95,21.58 12,21.58C14.05,21.58 16.1,20.8 17.66,19.24C20.78,16.12 20.78,11.05 17.66,7.93Z`,"keyboard":`M19,10H17V8H19M19,13H17V11H19M16,10H14V8H16M16,13H14V11H16M16,17H8V15H16M7,10H5V8H7M7,13H5V11H7M8,11H10V13H8M8,8H10V10H8M11,11H13V13H11M11,8H13V10H11M20,5H4C2.89,5 2,5.89 2,7V17A2,2 0 0,0 4,19H20A2,2 0 0,0 22,17V7C22,5.89 21.1,5 20,5Z`,"link-variant":`M10.59,13.41C11,13.8 11,14.44 10.59,14.83C10.2,15.22 9.56,15.22 9.17,14.83C7.22,12.88 7.22,9.71 9.17,7.76V7.76L12.71,4.22C14.66,2.27 17.83,2.27 19.78,4.22C21.73,6.17 21.73,9.34 19.78,11.29L18.29,12.78C18.3,11.96 18.17,11.14 17.89,10.36L18.36,9.88C19.54,8.71 19.54,6.81 18.36,5.64C17.19,4.46 15.29,4.46 14.12,5.64L10.59,9.17C9.41,10.34 9.41,12.24 10.59,13.41M13.41,9.17C13.8,8.78 14.44,8.78 14.83,9.17C16.78,11.12 16.78,14.29 14.83,16.24V16.24L11.29,19.78C9.34,21.73 6.17,21.73 4.22,19.78C2.27,17.83 2.27,14.66 4.22,12.71L5.71,11.22C5.7,12.04 5.83,12.86 6.11,13.65L5.64,14.12C4.46,15.29 4.46,17.19 5.64,18.36C6.81,19.54 8.71,19.54 9.88,18.36L13.41,14.83C14.59,13.66 14.59,11.76 13.41,10.59C13,10.2 13,9.56 13.41,9.17Z`,"loading":`M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z`,"magnify":`M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z`,"markdown":`M2,16V8H4L7,11L10,8H12V16H10V10.83L7,13.83L4,10.83V16H2M16,8H19V12H21.5L17.5,16.5L13.5,12H16V8Z`,"menu-down":`M7,10L12,15L17,10H7Z`,"play":`M8,5.14V19.14L19,12.14L8,5.14Z`,"play-circle":`M10,16.5V7.5L16,12M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z`,"redo":`M18.4,10.6C16.55,9 14.15,8 11.5,8C6.85,8 2.92,11.03 1.54,15.22L3.9,16C4.95,12.81 7.95,10.5 11.5,10.5C13.45,10.5 15.23,11.22 16.62,12.38L13,16H22V7L18.4,10.6Z`,"shuffle":`M14.83,13.41L13.42,14.82L16.55,17.95L14.5,20H20V14.5L17.96,16.54L14.83,13.41M14.5,4L16.54,6.04L4,18.59L5.41,20L17.96,7.46L20,9.5V4M10.59,9.17L5.41,4L4,5.41L9.17,10.58L10.59,9.17Z`,"shuffle-disabled":`M16,4.5V7H5V9H16V11.5L19.5,8M16,12.5V15H5V17H16V19.5L19.5,16`,"stack-exchange":`M4,14.04V11H20V14.04H4M4,10V7H20V10H4M17.46,2C18.86,2 20,3.18 20,4.63V6H4V4.63C4,3.18 5.14,2 6.54,2H17.46M4,15H20V16.35C20,17.81 18.86,19 17.46,19H16.5L13,22V19H6.54C5.14,19 4,17.81 4,16.35V15Z`,"text":`M21,6V8H3V6H21M3,18H12V16H3V18M3,13H21V11H3V13Z`,"undo":`M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z`},init(){general.theme();interpreter.init();version.init();general.icons(b);keyboard.init();let file=`https://cdn.jsdelivr.net/gh/ETHproductions/japt`;file+=`@${version.selected===version.current||version.two?`master@{${new Date().toISOString().replace(/(\:\d\d){2}\.\d+.+?$/,``)}}`:`v`+version.selected}/src/${version.two?`japt`:`japt-interpreter`}.js`;general.js(`https://cdn.jsdelivr.net/gh/ETHproductions/japt/dependencies/shoco.js`).then(()=>{general.js(file).then(()=>{Japt.stdout=interpreter.fields.output;Japt.stderr=interpreter.fields.error;if(interpreter.fields.code.value){interpreter.update();interpreter.run();}general.listeners();docs.init().catch(err=>console.error(`Failed to load documentation:`,err));}).catch(err=>console.error(`Failed to load interpreter:`,err));}).catch(err=>console.error(`Failed to load schoco:`,err));},close(event,fn){if(event.keyCode===27){fn();event.stopPropagation();}},copy(event){let target=event.target.dataset.copy,text;console.log(target.startsWith(`docs-`));if(target===`compressor`)text=compressor.result.string;else if(interpreter[target])text=interpreter[target]();else if(interpreter.fields[target])text=interpreter.fields[target].value;else if(target.startsWith(`docs-`))text=interpreter.url()+`#`+target;if(target===`explanation`)text=text.replace(/^/gm,` `);general.clipboard.value=text;general.clipboard.select();d.execCommand(`copy`,false);event.target.classList.add(`confirm`);event.target.addEventListener(`transitionend`,()=>event.target.classList.remove(`confirm`),{capture:false,once:false});},icons(parent){let icon,path,svg;for(svg of parent.querySelectorAll(`svg[data-mdi]`)){if(!svg.getAttribute(`viewBox`))svg.setAttribute(`viewBox`,`0 0 24 24`);for(icon of svg.dataset.mdi.split(`,`)){if(path)path=path.cloneNode(true);else{path=n(`path`);path.classList.add(`pen`);}path.setAttribute(`d`,general.mdi[icon]);svg.append(path);}svg.removeAttribute(`data-mdi`);}},js(file){return new Promise((resolve,reject)=>{let script=e(`script`);script.async=true;script.src=file;b.append(script);script.addEventListener(`load`,resolve,{capture:false,once:true});script.addEventListener(`error`,reject,{capture:false,once:true});});},listeners(){b.addEventListener(`keydown`,general.run,false);version.list.addEventListener(`click`,version.change,false);general.buttons.theme.addEventListener(`click`,general.theme,false);interpreter.fields.flags.addEventListener(`focus`,interpreter.flags,false);interpreter.fields.flags.addEventListener(`blur`,interpreter.flags,false);interpreter.button.addEventListener(`click`,interpreter.run,false);i(`copy-link`).addEventListener(`click`,general.copy,false);i(`copy-post`).addEventListener(`click`,general.copy,false);i(`undo`).addEventListener(`click`,()=>d.execCommand(`undo`,false),false);i(`redo`).addEventListener(`click`,()=>d.execCommand(`redo`,false),false);i(`golf`).addEventListener(`click`,interpreter.golf,false);i(`copy-code`).addEventListener(`click`,general.copy,false);interpreter.fields.code.addEventListener(`input`,interpreter.update,false);i(`copy-js`).addEventListener(`click`,general.copy,false);i(`copy-input`).addEventListener(`click`,general.copy,false);interpreter.fields.input.addEventListener(`input`,()=>general.resize(interpreter.fields.input),false);i(`copy-output`).addEventListener(`click`,general.copy,false);interpreter.cache.buttons.toggle.addEventListener(`click`,interpreter.cache.toggle,false);interpreter.cache.buttons.clear.addEventListener(`click`,interpreter.cache.clear,false);i(`copy-explanation`).addEventListener(`click`,general.copy,false);interpreter.fields.explanation.addEventListener(`input`,()=>general.resize(interpreter.fields.explanation),false);compressor.buttons.compress.addEventListener(`click`,compressor.init,false);compressor.buttons.permute.addEventListener(`click`,compressor.permutations.toggle,false);compressor.buttons.copy.addEventListener(`click`,general.copy,false);compressor.buttons.reset.addEventListener(`click`,compressor.reset,false);compressor.field.addEventListener(`input`,()=>general.resize(compressor.field),false);q(`#docs>h2`).addEventListener(`click`,docs.toggle,false);docs.sidebar.addEventListener(`click`,docs.change,false);docs.sidebar.addEventListener(`click`,keyboard.insert,false);i(`search`).addEventListener(`click`,docs.search.toggle,false);q(`#keyboard>h2`).addEventListener(`click`,keyboard.toggle,false);keyboard.list.addEventListener(`click`,keyboard.insert,false);w.addEventListener(`resize`,()=>{general.resize(interpreter.fields.code);general.resize(interpreter.fields.transpiled);general.resize(interpreter.fields.input);general.resize(interpreter.fields.output);general.resize(interpreter.fields.explanation);general.resize(compressor.field);},false);},resize(field){general.clipboard.value=field.value;field.style.height=2+general.clipboard.scrollHeight+`px`;},run(event){if(event.ctrlKey&&event.keyCode==13)interpreter.run();},theme(loaded=false){if(loaded){b.classList.toggle(`light`);b.classList.toggle(`dark`);}else b.classList.add(l[`japt-theme`]||`dark`);let light=b.classList.contains(`light`);general.meta.content=`#${light?`fff`:`212121`}`;general.buttons.theme.parentNode.dataset.title=`${light?`Dark`:`Light`} Theme`;if(loaded)l.setItem(`japt-theme`,light?`light`:`dark`);}};general.init();} \ No newline at end of file diff --git a/src/css/default.css b/src/css/default.css index c5ba13c..e2f0fce 100644 --- a/src/css/default.css +++ b/src/css/default.css @@ -311,11 +311,12 @@ body.light #tools::after{ bottom:0; left:10px; line-height:24px; + z-index:5; } #menu{ - right:6px; + right:36px; top:6px; - z-index:3; + z-index:2; } #menu+ol{ background:var(--background); @@ -326,12 +327,12 @@ body.light #tools::after{ right:6px; top:6px; transition:opacity .225s var(--timing-function); - z-index:4; + z-index:0; } #menu:focus+ol,#menu+ol:focus{ opacity:1; pointer-events:initial; - z-index:3; + z-index:6; } #menu+ol>li{ line-height:30px; @@ -348,13 +349,14 @@ body.light #tools::after{ height:100%; overscroll-behavior:contain; padding:0 20px 20px; + z-index:1; } #docs h3{ background:var(--background); font-size:20px; line-height:36px; margin:0 -20px 20px; - padding:0 36px 0 0; + padding-right:66px; top:0; } #docs h3>svg{ @@ -457,6 +459,60 @@ body.light #tools::after{ #docs p>svg,#docs li>svg{ width:18px; } +#search{ + right:6px; + top:6px; + z-index:5; +} +#search:nth-last-child(2), +#docs-search:not(.dn)+#search>path:first-child, +#docs-search.dn+#search>path:last-child{ + display:none; +} +#docs>article#docs-search{ + background:var(--primary); + bottom:0; + left:0; + right:0; + top:0; + z-index:4; +} +#docs-search>form{ + background:var(--primary); + border-bottom:1px solid var(--background); + margin:-20px 0 10px; + padding:20px 0 5px; + top:36px; +} +#docs-search input[type=text]{ + border:1px solid var(--border); + caret-color:var(--caret); + font-size:14px; + height:32px; + line-height:30px; + margin-bottom:8px; + padding:0 5px; + width:100%; +} +#docs-search label{ + font-size:14px; + line-height:24px; + margin-bottom:5px; + width:25%; +} +#docs-search label>svg{ + margin:0 3px 0 -2px; +} +#docs-search label>svg>path:first-child{ + opacity:0; + transition:opacity .225s var(--timing-function); +} +#docs-search input[type=checkbox]:checked+label>svg>path:first-child{ + opacity:1; +} +#docs-search>h3{ + padding-left:24px; +} #docs-intro ul>li{ padding-left:10px; } diff --git a/src/docs/array.json b/src/docs/array.json index 01fca00..2a4dd49 100644 --- a/src/docs/array.json +++ b/src/docs/array.json @@ -74,7 +74,7 @@ "returns":"X", "version":"1.4.5" }, - "g(n,…,n)":{ + "g(n,...,n)":{ "description":"Returns the element in multi-dimensional `A` at index `n,...,n`.", "returns":"X", "version":"1.4.6" diff --git a/src/docs/flags.json b/src/docs/flags.json index b03ead9..945022f 100644 --- a/src/docs/flags.json +++ b/src/docs/flags.json @@ -3,17 +3,25 @@ "title":"Flags", "object":"", "intro":[ - "Flags can be entered either in the dedicated field or directly in the input box. Some flags may be combined in the form `-mR`. When a flag runs the programme on each element in the first input and that input is a number then it is first converted to the range `[0,N)` or, if that input is a string, it is first split into an array of characters and rejoined again afterwards." + "Flags can be entered either in the dedicated field in the header or directly in the input box. Some flags may be combined in the form `-mR`. When a flag runs the programme on each element in the first input and that input is a number then it is first converted to the range `[0,N)` or, if that input is a string, it is first split into an array of characters and rejoined again afterwards." ], "flags":{ "!":{ "description":"Outputs the logical `NOT` of the value returned by the programme; i.e., `true` if falsey, or `false` if truthy.", "version":"1.4.5" }, + "E":{ + "description":"Outputs an empty string if the programme throws an error.", + "version":"1.4.6" + }, "E\"s\"":{ "description":"Outputs `s` if the programme throws an error. Considered to be a \"cheating\" flag - use at your own discretion.", "version":"1.4.6" }, + "F":{ + "description":"Outputs an empty string if the programme returns a falsey value.", + "version":"1.4.6" + }, "F\"s\"":{ "description":"Outputs `s` if the programme returns a falsey value. Considered to be a \"cheating\" flag - use at your own discretion.", "version":"1.4.6" diff --git a/src/docs/intro.html b/src/docs/intro.html index 85789e4..a6c13c1 100644 --- a/src/docs/intro.html +++ b/src/docs/intro.html @@ -1,10 +1,10 @@

Introduction

This 3rd-party interpreter and, in particular, its documentation are a work in progress. The official Japt interpreter with complete documentation can be found at [ethproductions.github.io/japt](https://ethproductions.github.io/japt/).

This documentation provides an overview of the features, functions & methods of Japt. For more in-depth tutorials, see the [tips for golfing in Japt](https://codegolf.stackexchange.com/q/121253/) on PPCG, join the [Japt chatroom](https://chat.stackexchange.com/rooms/34018/japt) or have a look through some [recent solutions](https://codegolf.stackexchange.com/search?tab=newest&q=Japt).

-

Navigate the documentation's sections via the [icon:dots-vertical] icon in the top-right corner.

+

The documentation's sections can be navigated via the [icon:dots-vertical] icon in the top-right corner and the various methods can be searched by clicking on the [icon:magnify] icon.

Version labels such as [v:1.4.6] are used to indicate which version of Japt a feature or method was added in.

-

The following abbreviations are used throughout the documentation, uppercase for objects and lowercase for method arguments:

[shortcuts:Shortcuts] and method names can be inserted into the code by clicking on them.

+

The following abbreviations are used throughout the documentation, uppercase for objects and lowercase for method arguments:

  1. `A`: Array
  2. `B`: Boolean
  3. @@ -21,5 +21,5 @@

    Credits

  4. This interpreter built and maintained by [Shaggy](https://github.com/PeterShaggyNoble/).
  5. Icons by [Material Design Icons](https://materialdesignicons.com/).
  6. Compressor's permutation method by [le_m](https://stackoverflow.com/a/37580979/).
  7. -
  8. Thanks to [ETHproductions](https://codegolf.stackexchange.com/users/42545/ethproductions), [ASCII-only](https://codegolf.stackexchange.com/users/39244/ascii-only) and, in particular, [Oliver](https://codegolf.stackexchange.com/users/61613/oliver) for their feedback, suggestions and rigorous testing in the [Japt chatroom](https://chat.stackexchange.com/rooms/34018/japt).
  9. +
  10. Thanks to [ETHproductions](https://codegolf.stackexchange.com/users/42545/ethproductions), [ASCII-only](https://codegolf.stackexchange.com/users/39244/ascii-only), [Embodiment of Ignorance](https://codegolf.stackexchange.com/users/84206/embodiment-of-ignorance) and, in particular, [Oliver](https://codegolf.stackexchange.com/users/61613/oliver) for their feedback, suggestions and rigorous testing in the [Japt chatroom](https://chat.stackexchange.com/rooms/34018/japt).
  11. \ No newline at end of file diff --git a/src/index.html b/src/index.html index 000a642..5d3da6f 100644 --- a/src/index.html +++ b/src/index.html @@ -58,6 +58,13 @@

    <