@cubejs-backend/server-core 0.35.56 → 0.35.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/playground/assets/{CachePane-9673c7ae.js → CachePane-3d9352e4.js} +1 -1
- package/playground/assets/{GraphiQLSandbox-53d3feeb.js → GraphiQLSandbox-e1707399.js} +2 -2
- package/playground/assets/{SchemaReference-ef4fa07a.js → SchemaReference-b5aba4ba.js} +1 -1
- package/playground/assets/{SqlQueryTab-3e2bdfa2.js → SqlQueryTab-5c44a6c7.js} +1 -1
- package/playground/assets/{brace-fold-6a775a2a.js → brace-fold-eb99ef25.js} +1 -1
- package/playground/assets/{closebrackets-8dae6aa3.js → closebrackets-173973f4.js} +1 -1
- package/playground/assets/{codemirror-3e55eb16.js → codemirror-209aaaaa.js} +1 -1
- package/playground/assets/{comment-3e14e4d5.js → comment-c40eda47.js} +1 -1
- package/playground/assets/{dialog-b108f254.js → dialog-74fdc56d.js} +1 -1
- package/playground/assets/{dialog-a3340072.js → dialog-d8e24f8a.js} +1 -1
- package/playground/assets/{foldgutter-04638de0.js → foldgutter-b9987ffe.js} +1 -1
- package/playground/assets/{hint-2f6f4aaa.js → hint-4bf6b6c9.js} +1 -1
- package/playground/assets/{hint-35bc0266.js → hint-85227eef.js} +1 -1
- package/playground/assets/{index-21441f59.js → index-273ac92b.js} +1 -1
- package/playground/assets/{index-5b7876a6.js → index-4c243b0e.js} +1 -1
- package/playground/assets/{index-f32c771c.js → index-bfe4aca1.js} +1 -1
- package/playground/assets/{info-2f09b005.js → info-4852b539.js} +1 -1
- package/playground/assets/{info-addon-ccdc82e5.js → info-addon-a373c333.js} +1 -1
- package/playground/assets/{javascript-1746d201.js → javascript-10986ee6.js} +1 -1
- package/playground/assets/{jump-1975be72.js → jump-6189d261.js} +1 -1
- package/playground/assets/{jump-to-line-00f030bc.js → jump-to-line-89afbc3a.js} +1 -1
- package/playground/assets/{lint-0dc04469.js → lint-20c2736e.js} +1 -1
- package/playground/assets/{lint-d3c9ba5b.js → lint-61771210.js} +1 -1
- package/playground/assets/{lint-087d334a.js → lint-f4706595.js} +1 -1
- package/playground/assets/matchbrackets-ced66c94.js +1 -0
- package/playground/assets/{mode-6f83539b.js → mode-21587de9.js} +1 -1
- package/playground/assets/{mode-55dee06f.js → mode-46e569c1.js} +1 -1
- package/playground/assets/{mode-0a6ca237.js → mode-85ef62f6.js} +1 -1
- package/playground/assets/{search-3880dafb.js → search-5e8ca4dd.js} +1 -1
- package/playground/assets/{searchcursor-c88732e4.js → searchcursor-4418e4ab.js} +1 -1
- package/playground/assets/{searchcursor-f596c4b5.js → searchcursor-ebf28448.js} +1 -1
- package/playground/assets/{show-hint-61147df4.js → show-hint-a374ab23.js} +1 -1
- package/playground/assets/{sublime-4489239f.js → sublime-711c7963.js} +3 -3
- package/playground/index.html +1 -1
- package/playground/assets/matchbrackets-08ac6e5b.js +0 -1
- package/playground/assets/matchbrackets-8cf1c673.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as O}from"./index-
|
|
1
|
+
import{o as O}from"./index-bfe4aca1.js";import{a as D}from"./codemirror-209aaaaa.js";import{r as I}from"./index-4c243b0e.js";function $(r,e){for(var t=0;t<e.length;t++){const s=e[t];if(typeof s!="string"&&!Array.isArray(s)){for(const a in s)if(a!=="default"&&!(a in r)){const u=Object.getOwnPropertyDescriptor(s,a);u&&Object.defineProperty(r,a,u.get?u:{enumerable:!0,get:()=>s[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var F={},G={};Object.defineProperty(G,"__esModule",{value:!0});function C(r){p=r,j=r.length,i=f=y=-1,o(),N();var e=B();return v("EOF"),e}G.default=C;var p,j,i,f,y,n,l;function B(){var r=i,e=[];if(v("{"),!w("}")){do e.push(H());while(w(","));v("}")}return{kind:"Object",start:r,end:y,members:e}}function H(){var r=i,e=l==="String"?q():null;v("String"),v(":");var t=Q();return{kind:"Member",start:r,end:y,key:e,value:t}}function U(){var r=i,e=[];if(v("["),!w("]")){do e.push(Q());while(w(","));v("]")}return{kind:"Array",start:r,end:y,values:e}}function Q(){switch(l){case"[":return U();case"{":return B();case"String":case"Number":case"Boolean":case"Null":var r=q();return N(),r}v("Value")}function q(){return{kind:l,start:i,end:f,value:JSON.parse(p.slice(i,f))}}function v(r){if(l===r){N();return}var e;if(l==="EOF")e="[end of file]";else if(f-i>1)e="`"+p.slice(i,f)+"`";else{var t=p.slice(i).match(/^.+?\b/);e="`"+(t?t[0]:p[i])+"`"}throw m("Expected "+r+" but found "+e+".")}function m(r){return{message:r,start:i,end:f}}function w(r){if(l===r)return N(),!0}function o(){return f<j&&(f++,n=f===j?0:p.charCodeAt(f)),n}function N(){for(y=f;n===9||n===10||n===13||n===32;)o();if(n===0){l="EOF";return}switch(i=f,n){case 34:return l="String",z();case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return l="Number",J();case 102:if(p.slice(i,i+5)!=="false")break;f+=4,o(),l="Boolean";return;case 110:if(p.slice(i,i+4)!=="null")break;f+=3,o(),l="Null";return;case 116:if(p.slice(i,i+4)!=="true")break;f+=3,o(),l="Boolean";return}l=p[i],o()}function z(){for(o();n!==34&&n>31;)if(n===92)switch(n=o(),n){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:o();break;case 117:o(),_(),_(),_(),_();break;default:throw m("Bad character escape sequence.")}else{if(f===j)throw m("Unterminated string.");o()}if(n===34){o();return}throw m("Unterminated string.")}function _(){if(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102)return o();throw m("Expected hexadecimal digit.")}function J(){n===45&&o(),n===48?o():x(),n===46&&(o(),x()),(n===69||n===101)&&(n=o(),(n===43||n===45)&&o(),x())}function x(){if(n<48||n>57)throw m("Expected decimal digit.");do o();while(n>=48&&n<=57)}var K=O&&O.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var s=t.call(r),a,u=[],c;try{for(;(e===void 0||e-- >0)&&!(a=s.next()).done;)u.push(a.value)}catch(d){c={error:d}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(c)throw c.error}}return u},M=O&&O.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(F,"__esModule",{value:!0});var R=M(D),b=I,W=M(G);R.default.registerHelper("lint","graphql-variables",function(r,e,t){if(!r)return[];var s;try{s=W.default(r)}catch(u){if(u.stack)throw u;return[L(t,u,u.message)]}var a=e.variableToType;return a?X(t,a,s):[]});function X(r,e,t){var s=[];return t.members.forEach(function(a){var u;if(a){var c=(u=a.key)===null||u===void 0?void 0:u.value,d=e[c];d?k(d,a.value).forEach(function(g){var h=K(g,2),E=h[0],V=h[1];s.push(L(r,E,V))}):s.push(L(r,a.key,'Variable "$'+c+'" does not appear in any GraphQL query.'))}}),s}function k(r,e){if(!r||!e)return[];if(r instanceof b.GraphQLNonNull)return e.kind==="Null"?[[e,'Type "'+r+'" is non-nullable and cannot be null.']]:k(r.ofType,e);if(e.kind==="Null")return[];if(r instanceof b.GraphQLList){var t=r.ofType;if(e.kind==="Array"){var s=e.values||[];return P(s,function(c){return k(t,c)})}return k(t,e)}if(r instanceof b.GraphQLInputObjectType){if(e.kind!=="Object")return[[e,'Type "'+r+'" must be an Object.']];var a=Object.create(null),u=P(e.members,function(c){var d,g=(d=c==null?void 0:c.key)===null||d===void 0?void 0:d.value;a[g]=!0;var h=r.getFields()[g];if(!h)return[[c.key,'Type "'+r+'" does not have a field "'+g+'".']];var E=h?h.type:void 0;return k(E,c.value)});return Object.keys(r.getFields()).forEach(function(c){if(!a[c]){var d=r.getFields()[c].type;d instanceof b.GraphQLNonNull&&u.push([e,'Object of type "'+r+'" is missing required field "'+c+'".'])}}),u}return r.name==="Boolean"&&e.kind!=="Boolean"||r.name==="String"&&e.kind!=="String"||r.name==="ID"&&e.kind!=="Number"&&e.kind!=="String"||r.name==="Float"&&e.kind!=="Number"||r.name==="Int"&&(e.kind!=="Number"||(e.value|0)!==e.value)?[[e,'Expected value of type "'+r+'".']]:(r instanceof b.GraphQLEnumType||r instanceof b.GraphQLScalarType)&&(e.kind!=="String"&&e.kind!=="Number"&&e.kind!=="Boolean"&&e.kind!=="Null"||Y(r.parseValue(e.value)))?[[e,'Expected value of type "'+r+'".']]:[]}function L(r,e,t){return{message:t,severity:"error",type:"validation",from:r.posFromIndex(e.start),to:r.posFromIndex(e.end)}}function Y(r){return r==null||r!==r}function P(r,e){return Array.prototype.concat.apply([],r.map(e))}const A=$({__proto__:null,default:F},[F]);export{A as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as P}from"./index-
|
|
1
|
+
import{g as P}from"./index-bfe4aca1.js";import{a as U}from"./codemirror-209aaaaa.js";function W(v,m){for(var s=0;s<m.length;s++){const f=m[s];if(typeof f!="string"&&!Array.isArray(f)){for(const d in f)if(d!=="default"&&!(d in v)){const g=Object.getOwnPropertyDescriptor(f,d);g&&Object.defineProperty(v,d,g.get?g:{enumerable:!0,get:()=>f[d]})}}}return Object.freeze(Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}))}var B={exports:{}};(function(v,m){(function(s){s(U)})(function(s){var f="CodeMirror-lint-markers",d="CodeMirror-lint-line-";function g(t,e,r){var n=document.createElement("div");n.className="CodeMirror-lint-tooltip cm-s-"+t.options.theme,n.appendChild(r.cloneNode(!0)),t.state.lint.options.selfContain?t.getWrapperElement().appendChild(n):document.body.appendChild(n);function o(i){if(!n.parentNode)return s.off(document,"mousemove",o);n.style.top=Math.max(0,i.clientY-n.offsetHeight-5)+"px",n.style.left=i.clientX+5+"px"}return s.on(document,"mousemove",o),o(e),n.style.opacity!=null&&(n.style.opacity=1),n}function T(t){t.parentNode&&t.parentNode.removeChild(t)}function w(t){t.parentNode&&(t.style.opacity==null&&T(t),t.style.opacity=0,setTimeout(function(){T(t)},600))}function L(t,e,r,n){var o=g(t,e,r);function i(){s.off(n,"mouseout",i),o&&(w(o),o=null)}var a=setInterval(function(){if(o)for(var l=n;;l=l.parentNode){if(l&&l.nodeType==11&&(l=l.host),l==document.body)return;if(!l){i();break}}if(!o)return clearInterval(a)},400);s.on(n,"mouseout",i)}function _(t,e,r){this.marked=[],e instanceof Function&&(e={getAnnotations:e}),(!e||e===!0)&&(e={}),this.options={},this.linterOptions=e.options||{};for(var n in y)this.options[n]=y[n];for(var n in e)y.hasOwnProperty(n)?e[n]!=null&&(this.options[n]=e[n]):e.options||(this.linterOptions[n]=e[n]);this.timeout=null,this.hasGutter=r,this.onMouseOver=function(o){H(t,o)},this.waitingFor=0}var y={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function E(t){var e=t.state.lint;e.hasGutter&&t.clearGutter(f),e.options.highlightLines&&A(t);for(var r=0;r<e.marked.length;++r)e.marked[r].clear();e.marked.length=0}function A(t){t.eachLine(function(e){var r=e.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(e.wrapClass);r&&t.removeLineClass(e,"wrap",r[0])})}function F(t,e,r,n,o){var i=document.createElement("div"),a=i;return i.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+r,n&&(a=i.appendChild(document.createElement("div")),a.className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),o!=!1&&s.on(a,"mouseover",function(l){L(t,l,e,a)}),i}function G(t,e){return t=="error"?t:e}function I(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],o=n.from.line;(e[o]||(e[o]=[])).push(n)}return e}function M(t){var e=t.severity;e||(e="error");var r=document.createElement("div");return r.className="CodeMirror-lint-message CodeMirror-lint-message-"+e,typeof t.messageHTML!="undefined"?r.innerHTML=t.messageHTML:r.appendChild(document.createTextNode(t.message)),r}function D(t,e){var r=t.state.lint,n=++r.waitingFor;function o(){n=-1,t.off("change",o)}t.on("change",o),e(t.getValue(),function(i,a){t.off("change",o),r.waitingFor==n&&(a&&i instanceof s&&(i=a),t.operation(function(){k(t,i)}))},r.linterOptions,t)}function C(t){var e=t.state.lint;if(e){var r=e.options,n=r.getAnnotations||t.getHelper(s.Pos(0,0),"lint");if(n)if(r.async||n.async)D(t,n);else{var o=n(t.getValue(),e.linterOptions,t);if(!o)return;o.then?o.then(function(i){t.operation(function(){k(t,i)})}):t.operation(function(){k(t,o)})}}}function k(t,e){var r=t.state.lint;if(r){var n=r.options;E(t);for(var o=I(e),i=0;i<o.length;++i){var a=o[i];if(a){var l=[];a=a.filter(function(N){return l.indexOf(N.message)>-1?!1:l.push(N.message)});for(var u=null,h=r.hasGutter&&document.createDocumentFragment(),O=0;O<a.length;++O){var p=a[O],c=p.severity;c||(c="error"),u=G(u,c),n.formatAnnotation&&(p=n.formatAnnotation(p)),r.hasGutter&&h.appendChild(M(p)),p.to&&r.marked.push(t.markText(p.from,p.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+c,__annotation:p}))}r.hasGutter&&t.setGutterMarker(i,f,F(t,h,u,o[i].length>1,n.tooltips)),n.highlightLines&&t.addLineClass(i,"wrap",d+u)}}n.onUpdateLinting&&n.onUpdateLinting(e,o,t)}}function x(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(function(){C(t)},e.options.delay))}function j(t,e,r){for(var n=r.target||r.srcElement,o=document.createDocumentFragment(),i=0;i<e.length;i++){var a=e[i];o.appendChild(M(a))}L(t,r,o,n)}function H(t,e){var r=e.target||e.srcElement;if(/\bCodeMirror-lint-mark-/.test(r.className)){for(var n=r.getBoundingClientRect(),o=(n.left+n.right)/2,i=(n.top+n.bottom)/2,a=t.findMarksAt(t.coordsChar({left:o,top:i},"client")),l=[],u=0;u<a.length;++u){var h=a[u].__annotation;h&&l.push(h)}l.length&&j(t,l,e)}}s.defineOption("lint",!1,function(t,e,r){if(r&&r!=s.Init&&(E(t),t.state.lint.options.lintOnChange!==!1&&t.off("change",x),s.off(t.getWrapperElement(),"mouseover",t.state.lint.onMouseOver),clearTimeout(t.state.lint.timeout),delete t.state.lint),e){for(var n=t.getOption("gutters"),o=!1,i=0;i<n.length;++i)n[i]==f&&(o=!0);var a=t.state.lint=new _(t,e,o);a.options.lintOnChange&&t.on("change",x),a.options.tooltips!=!1&&a.options.tooltips!="gutter"&&s.on(t.getWrapperElement(),"mouseover",a.onMouseOver),C(t)}}),s.defineExtension("performLint",function(){C(this)})})})();var b=B.exports;const R=P(b),z=W({__proto__:null,default:R},[b]);export{z as l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as T}from"./index-bfe4aca1.js";import{a as j}from"./codemirror-209aaaaa.js";function O(x,B){for(var u=0;u<B.length;u++){const g=B[u];if(typeof g!="string"&&!Array.isArray(g)){for(const i in g)if(i!=="default"&&!(i in x)){const k=Object.getOwnPropertyDescriptor(g,i);k&&Object.defineProperty(x,i,k.get?k:{enumerable:!0,get:()=>g[i]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var _={exports:{}};(function(x,B){(function(u){u(j)})(function(u){var g=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),i=u.Pos,k={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function m(t){return t&&t.bracketRegex||/[(){}[\]]/}function L(t,r,e){var l=t.getLineHandle(r.line),n=r.ch-1,c=e&&e.afterCursor;c==null&&(c=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var f=m(e),o=!c&&n>=0&&f.test(l.text.charAt(n))&&k[l.text.charAt(n)]||f.test(l.text.charAt(n+1))&&k[l.text.charAt(++n)];if(!o)return null;var a=o.charAt(1)==">"?1:-1;if(e&&e.strict&&a>0!=(n==r.ch))return null;var v=t.getTokenTypeAt(i(r.line,n+1)),s=A(t,i(r.line,n+(a>0?1:0)),a,v,e);return s==null?null:{from:i(r.line,n),to:s&&s.pos,match:s&&s.ch==o.charAt(0),forward:a>0}}function A(t,r,e,l,n){for(var c=n&&n.maxScanLineLength||1e4,f=n&&n.maxScanLines||1e3,o=[],a=m(n),v=e>0?Math.min(r.line+f,t.lastLine()+1):Math.max(t.firstLine()-1,r.line-f),s=r.line;s!=v;s+=e){var h=t.getLine(s);if(h){var p=e>0?0:h.length-1,S=e>0?h.length:-1;if(!(h.length>c))for(s==r.line&&(p=r.ch-(e<0?1:0));p!=S;p+=e){var y=h.charAt(p);if(a.test(y)&&(l===void 0||(t.getTokenTypeAt(i(s,p+1))||"")==(l||""))){var E=k[y];if(E&&E.charAt(1)==">"==e>0)o.push(y);else if(o.length)o.pop();else return{pos:i(s,p),ch:y}}}}}return s-e==(e>0?t.lastLine():t.firstLine())?!1:null}function H(t,r,e){for(var l=t.state.matchBrackets.maxHighlightLineLength||1e3,n=e&&e.highlightNonMatching,c=[],f=t.listSelections(),o=0;o<f.length;o++){var a=f[o].empty()&&L(t,f[o].head,e);if(a&&(a.match||n!==!1)&&t.getLine(a.from.line).length<=l){var v=a.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";c.push(t.markText(a.from,i(a.from.line,a.from.ch+1),{className:v})),a.to&&t.getLine(a.to.line).length<=l&&c.push(t.markText(a.to,i(a.to.line,a.to.ch+1),{className:v}))}}if(c.length){g&&t.state.focused&&t.focus();var s=function(){t.operation(function(){for(var h=0;h<c.length;h++)c[h].clear()})};if(r)setTimeout(s,800);else return s}}function d(t){t.operation(function(){t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null),t.state.matchBrackets.currentlyHighlighted=H(t,!1,t.state.matchBrackets)})}function b(t){t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)}u.defineOption("matchBrackets",!1,function(t,r,e){e&&e!=u.Init&&(t.off("cursorActivity",d),t.off("focus",d),t.off("blur",b),b(t)),r&&(t.state.matchBrackets=typeof r=="object"?r:{},t.on("cursorActivity",d),t.on("focus",d),t.on("blur",b))}),u.defineExtension("matchBrackets",function(){H(this,!0)}),u.defineExtension("findMatchingBracket",function(t,r,e){return(e||typeof r=="boolean")&&(e?(e.strict=r,r=e):r=r?{strict:!0}:null),L(this,t,r)}),u.defineExtension("scanForBracket",function(t,r,e,l){return A(this,t,r,e,l)})})})();var M=_.exports;const P=T(M),D=O({__proto__:null,default:P},[M]);export{M as a,D as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o}from"./index-
|
|
1
|
+
import{o}from"./index-bfe4aca1.js";import{a as c}from"./codemirror-209aaaaa.js";import{r as p}from"./index-273ac92b.js";function d(t,r){for(var a=0;a<r.length;a++){const l=r[a];if(typeof l!="string"&&!Array.isArray(l)){for(const n in l)if(n!=="default"&&!(n in t)){const u=Object.getOwnPropertyDescriptor(l,n);u&&Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:()=>l[n]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var i={},f=o&&o.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(i,"__esModule",{value:!0});var b=f(c),e=p;b.default.defineMode("graphql-variables",function(t){var r=e.onlineParser({eatWhitespace:function(a){return a.eatSpace()},lexRules:m,parseRules:g,editorConfig:{tabSize:t.tabSize}});return{config:t,startState:r.startState,token:r.token,indent:v,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});function v(t,r){var a,l,n=t.levels,u=!n||n.length===0?t.indentLevel:n[n.length-1]-(!((a=this.electricInput)===null||a===void 0)&&a.test(r)?1:0);return(u||0)*(((l=this.config)===null||l===void 0?void 0:l.indentUnit)||0)}var m={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},g={Document:[e.p("{"),e.list("Variable",e.opt(e.p(","))),e.p("}")],Variable:[s("variable"),e.p(":"),"Value"],Value:function(t){switch(t.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(t.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(t.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[e.t("Number","number")],StringValue:[e.t("String","string")],BooleanValue:[e.t("Keyword","builtin")],NullValue:[e.t("Keyword","keyword")],ListValue:[e.p("["),e.list("Value",e.opt(e.p(","))),e.p("]")],ObjectValue:[e.p("{"),e.list("ObjectField",e.opt(e.p(","))),e.p("}")],ObjectField:[s("attribute"),e.p(":"),"Value"]};function s(t){return{style:t,match:function(r){return r.kind==="String"},update:function(r,a){r.name=a.value.slice(1,-1)}}}const S=d({__proto__:null,default:i},[i]);export{S as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as i}from"./index-
|
|
1
|
+
import{o as i}from"./index-bfe4aca1.js";import{a as c}from"./codemirror-209aaaaa.js";import{r as _}from"./index-273ac92b.js";function p(e,a){for(var r=0;r<a.length;r++){const o=a[r];if(typeof o!="string"&&!Array.isArray(o)){for(const t in o)if(t!=="default"&&!(t in e)){const n=Object.getOwnPropertyDescriptor(o,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>o[t]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var u={},s={},d={};Object.defineProperty(d,"__esModule",{value:!0});function v(e,a){var r,o,t=e.levels,n=!t||t.length===0?e.indentLevel:t[t.length-1]-(!((r=this.electricInput)===null||r===void 0)&&r.test(a)?1:0);return(n||0)*(((o=this.config)===null||o===void 0?void 0:o.indentUnit)||0)}d.default=v;var m=i&&i.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0});var l=_,g=m(d),b=function(e){var a=l.onlineParser({eatWhitespace:function(r){return r.eatWhile(l.isIgnored)},lexRules:l.LexRules,parseRules:l.ParseRules,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:a.startState,token:a.token,indent:g.default,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}};s.default=b;var f=i&&i.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(u,"__esModule",{value:!0});var y=f(c),h=f(s);y.default.defineMode("graphql",h.default);const P=p({__proto__:null,default:u},[u]);export{P as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o}from"./index-
|
|
1
|
+
import{o}from"./index-bfe4aca1.js";import{a as s}from"./codemirror-209aaaaa.js";import{r as c}from"./index-273ac92b.js";function p(r,n){for(var a=0;a<n.length;a++){const l=n[a];if(typeof l!="string"&&!Array.isArray(l)){for(const t in l)if(t!=="default"&&!(t in r)){const u=Object.getOwnPropertyDescriptor(l,t);u&&Object.defineProperty(r,t,u.get?u:{enumerable:!0,get:()=>l[t]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var i={},d=o&&o.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:!0});var f=d(s),e=c;f.default.defineMode("graphql-results",function(r){var n=e.onlineParser({eatWhitespace:function(a){return a.eatSpace()},lexRules:g,parseRules:v,editorConfig:{tabSize:r.tabSize}});return{config:r,startState:n.startState,token:n.token,indent:b,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});function b(r,n){var a,l,t=r.levels,u=!t||t.length===0?r.indentLevel:t[t.length-1]-(!((a=this.electricInput)===null||a===void 0)&&a.test(n)?1:0);return(u||0)*(((l=this.config)===null||l===void 0?void 0:l.indentUnit)||0)}var g={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},v={Document:[e.p("{"),e.list("Entry",e.p(",")),e.p("}")],Entry:[e.t("String","def"),e.p(":"),"Value"],Value:function(r){switch(r.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(r.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(r.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[e.t("Number","number")],StringValue:[e.t("String","string")],BooleanValue:[e.t("Keyword","builtin")],NullValue:[e.t("Keyword","keyword")],ListValue:[e.p("["),e.list("Value",e.p(",")),e.p("]")],ObjectValue:[e.p("{"),e.list("ObjectField",e.p(",")),e.p("}")],ObjectField:[e.t("String","property"),e.p(":"),"Value"]};const V=p({__proto__:null,default:i},[i]);export{V as m};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as I}from"./index-
|
|
1
|
+
import{g as I}from"./index-bfe4aca1.js";import{a as V}from"./codemirror-209aaaaa.js";import{r as K}from"./searchcursor-4418e4ab.js";import{r as L}from"./dialog-d8e24f8a.js";function z(b,D){for(var a=0;a<D.length;a++){const d=D[a];if(typeof d!="string"&&!Array.isArray(d)){for(const y in d)if(y!=="default"&&!(y in b)){const g=Object.getOwnPropertyDescriptor(d,y);g&&Object.defineProperty(b,y,g.get?g:{enumerable:!0,get:()=>d[y]})}}}return Object.freeze(Object.defineProperty(b,Symbol.toStringTag,{value:"Module"}))}var U={exports:{}};(function(b,D){(function(a){a(V,K(),L())})(function(a){a.defineOption("search",{bottom:!1});function d(e,n){return typeof e=="string"?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var r=e.exec(t.string);if(r&&r.index==t.pos)return t.pos+=r[0].length||1,"searching";r?t.pos=r.index:t.skipToEnd()}}}function y(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function g(e){return e.state.search||(e.state.search=new y)}function O(e){return typeof e=="string"&&e==e.toLowerCase()}function S(e,n,t){return e.getSearchCursor(n,t,{caseFold:O(n),multiline:!0})}function Q(e,n,t,r,o){e.openDialog(n,r,{value:t,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){m(e)},onKeyDown:o,bottom:e.options.search.bottom})}function P(e,n,t,r,o){e.openDialog?e.openDialog(n,o,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):o(prompt(t,r))}function $(e,n,t,r){e.openConfirm?e.openConfirm(n,r):confirm(t)&&r[0]()}function R(e){return e.replace(/\\([nrt\\])/g,function(n,t){return t=="n"?`
|
|
2
2
|
`:t=="r"?"\r":t=="t"?" ":t=="\\"?"\\":n})}function T(e){var n=e.match(/^\/(.*)\/([a-z]*)$/);if(n)try{e=new RegExp(n[1],n[2].indexOf("i")==-1?"":"i")}catch(t){}else e=R(e);return(typeof e=="string"?e=="":e.test(""))&&(e=/x^/),e}function N(e,n,t){n.queryText=t,n.query=T(t),e.removeOverlay(n.overlay,O(n.query)),n.overlay=d(n.query,O(n.query)),e.addOverlay(n.overlay),e.showMatchesOnScrollbar&&(n.annotate&&(n.annotate.clear(),n.annotate=null),n.annotate=e.showMatchesOnScrollbar(n.query,O(n.query)))}function x(e,n,t,r){var o=g(e);if(o.query)return w(e,n);var i=e.getSelection()||o.lastQuery;if(i instanceof RegExp&&i.source=="x^"&&(i=null),t&&e.openDialog){var u=null,f=function(l,v){a.e_stop(v),l&&(l!=o.queryText&&(N(e,o,l),o.posFrom=o.posTo=e.getCursor()),u&&(u.style.opacity=1),w(e,v.shiftKey,function(h,c){var p;c.line<3&&document.querySelector&&(p=e.display.wrapper.querySelector(".CodeMirror-dialog"))&&p.getBoundingClientRect().bottom-4>e.cursorCoords(c,"window").top&&((u=p).style.opacity=.4)}))};Q(e,C(e),i,f,function(l,v){var h=a.keyName(l),c=e.getOption("extraKeys"),p=c&&c[h]||a.keyMap[e.getOption("keyMap")][h];p=="findNext"||p=="findPrev"||p=="findPersistentNext"||p=="findPersistentPrev"?(a.e_stop(l),N(e,g(e),v),e.execCommand(p)):(p=="find"||p=="findPersistent")&&(a.e_stop(l),f(v,l))}),r&&i&&(N(e,o,i),w(e,n))}else P(e,C(e),"Search for:",i,function(l){l&&!o.query&&e.operation(function(){N(e,o,l),o.posFrom=o.posTo=e.getCursor(),w(e,n)})})}function w(e,n,t){e.operation(function(){var r=g(e),o=S(e,r.query,n?r.posFrom:r.posTo);!o.find(n)&&(o=S(e,r.query,n?a.Pos(e.lastLine()):a.Pos(e.firstLine(),0)),!o.find(n))||(e.setSelection(o.from(),o.to()),e.scrollIntoView({from:o.from(),to:o.to()},20),r.posFrom=o.from(),r.posTo=o.to(),t&&t(o.from(),o.to()))})}function m(e){e.operation(function(){var n=g(e);n.lastQuery=n.query,n.query&&(n.query=n.queryText=null,e.removeOverlay(n.overlay),n.annotate&&(n.annotate.clear(),n.annotate=null))})}function s(e,n){var t=e?document.createElement(e):document.createDocumentFragment();for(var r in n)t[r]=n[r];for(var o=2;o<arguments.length;o++){var i=arguments[o];t.appendChild(typeof i=="string"?document.createTextNode(i):i)}return t}function C(e){return s("",null,s("span",{className:"CodeMirror-search-label"},e.phrase("Search:"))," ",s("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",s("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function j(e){return s("",null," ",s("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",s("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function k(e){return s("",null,s("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",s("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}function A(e){return s("",null,s("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",s("button",{},e.phrase("Yes"))," ",s("button",{},e.phrase("No"))," ",s("button",{},e.phrase("All"))," ",s("button",{},e.phrase("Stop")))}function E(e,n,t){e.operation(function(){for(var r=S(e,n);r.findNext();)if(typeof n!="string"){var o=e.getRange(r.from(),r.to()).match(n);r.replace(t.replace(/\$(\d)/g,function(i,u){return o[u]}))}else r.replace(t)})}function _(e,n){if(!e.getOption("readOnly")){var t=e.getSelection()||g(e).lastQuery,r=n?e.phrase("Replace all:"):e.phrase("Replace:"),o=s("",null,s("span",{className:"CodeMirror-search-label"},r),j(e));P(e,o,r,t,function(i){i&&(i=T(i),P(e,k(e),e.phrase("Replace with:"),"",function(u){if(u=R(u),n)E(e,i,u);else{m(e);var f=S(e,i,e.getCursor("from")),l=function(){var h=f.from(),c;!(c=f.findNext())&&(f=S(e,i),!(c=f.findNext())||h&&f.from().line==h.line&&f.from().ch==h.ch)||(e.setSelection(f.from(),f.to()),e.scrollIntoView({from:f.from(),to:f.to()}),$(e,A(e),e.phrase("Replace?"),[function(){v(c)},l,function(){E(e,i,u)}]))},v=function(h){f.replace(typeof i=="string"?u:u.replace(/\$(\d)/g,function(c,p){return h[p]})),l()};l()}}))})}}a.commands.find=function(e){m(e),x(e)},a.commands.findPersistent=function(e){m(e),x(e,!1,!0)},a.commands.findPersistentNext=function(e){x(e,!1,!0,!0)},a.commands.findPersistentPrev=function(e){x(e,!0,!0,!0)},a.commands.findNext=x,a.commands.findPrev=function(e){x(e,!0)},a.commands.clearSearch=m,a.commands.replace=_,a.commands.replaceAll=function(e){_(e,!0)}})})();var F=U.exports;const B=I(F),J=z({__proto__:null,default:B},[F]);export{J as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as A}from"./codemirror-
|
|
1
|
+
import{a as A}from"./codemirror-209aaaaa.js";var I={exports:{}},z;function G(){return z||(z=1,function(y,W){(function(v){v(A)})(function(v){var s=v.Pos;function D(e){var t=e.flags;return t!=null?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function O(e,t){for(var n=D(e),r=n,l=0;l<t.length;l++)r.indexOf(t.charAt(l))==-1&&(r+=t.charAt(l));return n==r?e:new RegExp(e.source,r)}function E(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function S(e,t,n){t=O(t,"g");for(var r=n.line,l=n.ch,i=e.lastLine();r<=i;r++,l=0){t.lastIndex=l;var h=e.getLine(r),f=t.exec(h);if(f)return{from:s(r,f.index),to:s(r,f.index+f[0].length),match:f}}}function N(e,t,n){if(!E(t))return S(e,t,n);t=O(t,"gm");for(var r,l=1,i=n.line,h=e.lastLine();i<=h;){for(var f=0;f<l&&!(i>h);f++){var L=e.getLine(i++);r=r==null?L:r+`
|
|
2
2
|
`+L}l=l*2,t.lastIndex=n.ch;var c=t.exec(r);if(c){var a=r.slice(0,c.index).split(`
|
|
3
3
|
`),u=c[0].split(`
|
|
4
4
|
`),o=n.line+a.length-1,g=a[a.length-1].length;return{from:s(o,g),to:s(o+u.length-1,u.length==1?g+u[0].length:u[u.length-1].length),match:c}}}}function d(e,t,n){for(var r,l=0;l<=e.length;){t.lastIndex=l;var i=t.exec(e);if(!i)break;var h=i.index+i[0].length;if(h>e.length-n)break;(!r||h>r.index+r[0].length)&&(r=i),l=i.index+1}return r}function R(e,t,n){t=O(t,"g");for(var r=n.line,l=n.ch,i=e.firstLine();r>=i;r--,l=-1){var h=e.getLine(r),f=d(h,t,l<0?0:h.length-l);if(f)return{from:s(r,f.index),to:s(r,f.index+f[0].length),match:f}}}function b(e,t,n){if(!E(t))return R(e,t,n);t=O(t,"gm");for(var r,l=1,i=e.getLine(n.line).length-n.ch,h=n.line,f=e.firstLine();h>=f;){for(var L=0;L<l&&h>=f;L++){var c=e.getLine(h--);r=r==null?c:c+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as n}from"./index-
|
|
1
|
+
import{g as n}from"./index-bfe4aca1.js";import{r as f}from"./searchcursor-4418e4ab.js";function u(t,c){for(var o=0;o<c.length;o++){const r=c[o];if(typeof r!="string"&&!Array.isArray(r)){for(const e in r)if(e!=="default"&&!(e in t)){const s=Object.getOwnPropertyDescriptor(r,e);s&&Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>r[e]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var a=f();const i=n(a),l=u({__proto__:null,default:i},[a]);export{l as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as ot}from"./index-f32c771c.js";import{a as rt}from"./codemirror-3e55eb16.js";function ct(x,I){for(var r=0;r<I.length;r++){const y=I[r];if(typeof y!="string"&&!Array.isArray(y)){for(const m in y)if(m!=="default"&&!(m in x)){const w=Object.getOwnPropertyDescriptor(y,m);w&&Object.defineProperty(x,m,w.get?w:{enumerable:!0,get:()=>y[m]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var lt={exports:{}};(function(x,I){(function(r){r(rt)})(function(r){var y="CodeMirror-hint",m="CodeMirror-hint-active";r.showHint=function(t,e,i){if(!e)return t.showHint(i);i&&i.async&&(e.async=!0);var n={hint:e};if(i)for(var s in i)n[s]=i[s];return t.showHint(n)},r.defineExtension("showHint",function(t){t=Q(this,this.getCursor("start"),t);var e=this.listSelections();if(!(e.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;i<e.length;i++)if(e[i].head.line!=e[i].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var n=this.state.completionActive=new w(this,t);n.options.hint&&(r.signal(this,"startCompletion",this),n.update(!0))}}),r.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function w(t,e){if(this.cm=t,this.options=e,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var i=this;t.on("cursorActivity",this.activityFunc=function(){i.cursorActivity()})}}var G=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},J=window.cancelAnimationFrame||clearTimeout;w.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&r.signal(this.data,"close"),this.widget&&this.widget.close(),r.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,e){var i=t.list[e],n=this;this.cm.operation(function(){i.hint?i.hint(n.cm,t,i):n.cm.replaceRange(R(i),i.from||t.from,i.to||t.to,"complete"),r.signal(t,"pick",i),n.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(J(this.debounce),this.debounce=0);var t=this.startPos;this.data&&(t=this.data.from);var e=this.cm.getCursor(),i=this.cm.getLine(e.line);if(e.line!=this.startPos.line||i.length-e.ch!=this.startLen-this.startPos.ch||e.ch<t.ch||this.cm.somethingSelected()||!e.ch||this.options.closeCharacters.test(i.charAt(e.ch-1)))this.close();else{var n=this;this.debounce=G(function(){n.update()}),this.widget&&this.widget.disable()}},update:function(t){if(this.tick!=null){var e=this,i=++this.tick;K(this.options.hint,this.cm,this.options,function(n){e.tick==i&&e.finishUpdate(n,t)})}},finishUpdate:function(t,e){this.data&&r.signal(this.data,"update");var i=this.widget&&this.widget.picked||e&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(i&&t.list.length==1?this.pick(t,0):(this.widget=new B(this,t),r.signal(t,"shown")))}};function Q(t,e,i){var n=t.options.hintOptions,s={};for(var c in U)s[c]=U[c];if(n)for(var c in n)n[c]!==void 0&&(s[c]=n[c]);if(i)for(var c in i)i[c]!==void 0&&(s[c]=i[c]);return s.hint.resolve&&(s.hint=s.hint.resolve(t,e)),s}function R(t){return typeof t=="string"?t:t.text}function Z(t,e){var i={Up:function(){e.moveFocus(-1)},Down:function(){e.moveFocus(1)},PageUp:function(){e.moveFocus(-e.menuSize()+1,!0)},PageDown:function(){e.moveFocus(e.menuSize()-1,!0)},Home:function(){e.setFocus(0)},End:function(){e.setFocus(e.length-1)},Enter:e.pick,Tab:e.pick,Esc:e.close},n=/Mac/.test(navigator.platform);n&&(i["Ctrl-P"]=function(){e.moveFocus(-1)},i["Ctrl-N"]=function(){e.moveFocus(1)});var s=t.options.customKeys,c=s?{}:i;function o(u,l){var h;typeof l!="string"?h=function(H){return l(H,e)}:i.hasOwnProperty(l)?h=i[l]:h=l,c[u]=h}if(s)for(var f in s)s.hasOwnProperty(f)&&o(f,s[f]);var a=t.options.extraKeys;if(a)for(var f in a)a.hasOwnProperty(f)&&o(f,a[f]);return c}function _(t,e){for(;e&&e!=t;){if(e.nodeName.toUpperCase()==="LI"&&e.parentNode==t)return e;e=e.parentNode}}function B(t,e){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=t,this.data=e,this.picked=!1;var i=this,n=t.cm,s=n.getInputField().ownerDocument,c=s.defaultView||s.parentWindow,o=this.hints=s.createElement("ul");o.setAttribute("role","listbox"),o.setAttribute("aria-expanded","true"),o.id=this.id;var f=t.cm.options.theme;o.className="CodeMirror-hints "+f,this.selectedHint=e.selectedHint||0;for(var a=e.list,u=0;u<a.length;++u){var l=o.appendChild(s.createElement("li")),h=a[u],H=y+(u!=this.selectedHint?"":" "+m);h.className!=null&&(H=h.className+" "+H),l.className=H,u==this.selectedHint&&l.setAttribute("aria-selected","true"),l.id=this.id+"-"+u,l.setAttribute("role","option"),h.render?h.render(l,e,h):l.appendChild(s.createTextNode(h.displayText||R(h))),l.hintId=u}var b=t.options.container||s.body,v=n.cursorCoords(t.options.alignWithWord?e.from:null),S=v.left,T=v.bottom,D=!0,k=0,O=0;if(b!==s.body){var it=["absolute","relative","fixed"].indexOf(c.getComputedStyle(b).position)!==-1,C=it?b:b.offsetParent,j=C.getBoundingClientRect(),M=s.body.getBoundingClientRect();k=j.left-M.left-C.scrollLeft,O=j.top-M.top-C.scrollTop}o.style.left=S-k+"px",o.style.top=T-O+"px";var F=c.innerWidth||Math.max(s.body.offsetWidth,s.documentElement.offsetWidth),W=c.innerHeight||Math.max(s.body.offsetHeight,s.documentElement.offsetHeight);b.appendChild(o),n.getInputField().setAttribute("aria-autocomplete","list"),n.getInputField().setAttribute("aria-owns",this.id),n.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var g=t.options.moveOnOverlap?o.getBoundingClientRect():new DOMRect,z=t.options.paddingForScrollbar?o.scrollHeight>o.clientHeight+1:!1,A;setTimeout(function(){A=n.getScrollInfo()});var nt=g.bottom-W;if(nt>0){var L=g.bottom-g.top,st=v.top-(v.bottom-g.top);if(st-L>0)o.style.top=(T=v.top-L-O)+"px",D=!1;else if(L>W){o.style.height=W-5+"px",o.style.top=(T=v.bottom-g.top-O)+"px";var V=n.getCursor();e.from.ch!=V.ch&&(v=n.cursorCoords(V),o.style.left=(S=v.left-k)+"px",g=o.getBoundingClientRect())}}var E=g.right-F;if(z&&(E+=n.display.nativeBarWidth),E>0&&(g.right-g.left>F&&(o.style.width=F-5+"px",E-=g.right-g.left-F),o.style.left=(S=v.left-E-k)+"px"),z)for(var N=o.firstChild;N;N=N.nextSibling)N.style.paddingRight=n.display.nativeBarWidth+"px";if(n.addKeyMap(this.keyMap=Z(t,{moveFocus:function(p,d){i.changeActive(i.selectedHint+p,d)},setFocus:function(p){i.changeActive(p)},menuSize:function(){return i.screenAmount()},length:a.length,close:function(){t.close()},pick:function(){i.pick()},data:e})),t.options.closeOnUnfocus){var q;n.on("blur",this.onBlur=function(){q=setTimeout(function(){t.close()},100)}),n.on("focus",this.onFocus=function(){clearTimeout(q)})}n.on("scroll",this.onScroll=function(){var p=n.getScrollInfo(),d=n.getWrapperElement().getBoundingClientRect();A||(A=n.getScrollInfo());var $=T+A.top-p.top,P=$-(c.pageYOffset||(s.documentElement||s.body).scrollTop);if(D||(P+=o.offsetHeight),P<=d.top||P>=d.bottom)return t.close();o.style.top=$+"px",o.style.left=S+A.left-p.left+"px"}),r.on(o,"dblclick",function(p){var d=_(o,p.target||p.srcElement);d&&d.hintId!=null&&(i.changeActive(d.hintId),i.pick())}),r.on(o,"click",function(p){var d=_(o,p.target||p.srcElement);d&&d.hintId!=null&&(i.changeActive(d.hintId),t.options.completeOnSingleClick&&i.pick())}),r.on(o,"mousedown",function(){setTimeout(function(){n.focus()},20)});var Y=this.getSelectedHintRange();return(Y.from!==0||Y.to!==0)&&this.scrollToActive(),r.signal(e,"select",a[this.selectedHint],o.childNodes[this.selectedHint]),!0}B.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var t=this.completion.cm.getInputField();t.removeAttribute("aria-activedescendant"),t.removeAttribute("aria-owns");var e=this.completion.cm;this.completion.options.closeOnUnfocus&&(e.off("blur",this.onBlur),e.off("focus",this.onFocus)),e.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var t=this;this.keyMap={Enter:function(){t.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,e){if(t>=this.data.list.length?t=e?this.data.list.length-1:0:t<0&&(t=e?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+m,""),i.removeAttribute("aria-selected")),i=this.hints.childNodes[this.selectedHint=t],i.className+=" "+m,i.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",i.id),this.scrollToActive(),r.signal(this.data,"select",this.data.list[this.selectedHint],i)}},scrollToActive:function(){var t=this.getSelectedHintRange(),e=this.hints.childNodes[t.from],i=this.hints.childNodes[t.to],n=this.hints.firstChild;e.offsetTop<this.hints.scrollTop?this.hints.scrollTop=e.offsetTop-n.offsetTop:i.offsetTop+i.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=i.offsetTop+i.offsetHeight-this.hints.clientHeight+n.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var t=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-t),to:Math.min(this.data.list.length-1,this.selectedHint+t)}}};function tt(t,e){if(!t.somethingSelected())return e;for(var i=[],n=0;n<e.length;n++)e[n].supportsSelection&&i.push(e[n]);return i}function K(t,e,i,n){if(t.async)t(e,n,i);else{var s=t(e,i);s&&s.then?s.then(n):n(s)}}function et(t,e){var i=t.getHelpers(e,"hint"),n;if(i.length){var s=function(c,o,f){var a=tt(c,i);function u(l){if(l==a.length)return o(null);K(a[l],c,f,function(h){h&&h.list.length>0?o(h):u(l+1)})}u(0)};return s.async=!0,s.supportsSelection=!0,s}else return(n=t.getHelper(t.getCursor(),"hintWords"))?function(c){return r.hint.fromList(c,{words:n})}:r.hint.anyword?function(c,o){return r.hint.anyword(c,o)}:function(){}}r.registerHelper("hint","auto",{resolve:et}),r.registerHelper("hint","fromList",function(t,e){var i=t.getCursor(),n=t.getTokenAt(i),s,c=r.Pos(i.line,n.start),o=i;n.start<i.ch&&/\w/.test(n.string.charAt(i.ch-n.start-1))?s=n.string.substr(0,i.ch-n.start):(s="",c=i);for(var f=[],a=0;a<e.words.length;a++){var u=e.words[a];u.slice(0,s.length)==s&&f.push(u)}if(f.length)return{list:f,from:c,to:o}}),r.commands.autocomplete=r.showHint;var U={hint:r.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};r.defineOption("hintOptions",null)})})();var X=lt.exports;const at=ot(X),ut=ct({__proto__:null,default:at},[X]);export{ut as s};
|
|
1
|
+
import{g as ot}from"./index-bfe4aca1.js";import{a as rt}from"./codemirror-209aaaaa.js";function ct(x,I){for(var r=0;r<I.length;r++){const y=I[r];if(typeof y!="string"&&!Array.isArray(y)){for(const m in y)if(m!=="default"&&!(m in x)){const w=Object.getOwnPropertyDescriptor(y,m);w&&Object.defineProperty(x,m,w.get?w:{enumerable:!0,get:()=>y[m]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var lt={exports:{}};(function(x,I){(function(r){r(rt)})(function(r){var y="CodeMirror-hint",m="CodeMirror-hint-active";r.showHint=function(t,e,i){if(!e)return t.showHint(i);i&&i.async&&(e.async=!0);var n={hint:e};if(i)for(var s in i)n[s]=i[s];return t.showHint(n)},r.defineExtension("showHint",function(t){t=Q(this,this.getCursor("start"),t);var e=this.listSelections();if(!(e.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;i<e.length;i++)if(e[i].head.line!=e[i].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var n=this.state.completionActive=new w(this,t);n.options.hint&&(r.signal(this,"startCompletion",this),n.update(!0))}}),r.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function w(t,e){if(this.cm=t,this.options=e,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var i=this;t.on("cursorActivity",this.activityFunc=function(){i.cursorActivity()})}}var G=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},J=window.cancelAnimationFrame||clearTimeout;w.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&r.signal(this.data,"close"),this.widget&&this.widget.close(),r.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,e){var i=t.list[e],n=this;this.cm.operation(function(){i.hint?i.hint(n.cm,t,i):n.cm.replaceRange(R(i),i.from||t.from,i.to||t.to,"complete"),r.signal(t,"pick",i),n.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(J(this.debounce),this.debounce=0);var t=this.startPos;this.data&&(t=this.data.from);var e=this.cm.getCursor(),i=this.cm.getLine(e.line);if(e.line!=this.startPos.line||i.length-e.ch!=this.startLen-this.startPos.ch||e.ch<t.ch||this.cm.somethingSelected()||!e.ch||this.options.closeCharacters.test(i.charAt(e.ch-1)))this.close();else{var n=this;this.debounce=G(function(){n.update()}),this.widget&&this.widget.disable()}},update:function(t){if(this.tick!=null){var e=this,i=++this.tick;K(this.options.hint,this.cm,this.options,function(n){e.tick==i&&e.finishUpdate(n,t)})}},finishUpdate:function(t,e){this.data&&r.signal(this.data,"update");var i=this.widget&&this.widget.picked||e&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(i&&t.list.length==1?this.pick(t,0):(this.widget=new B(this,t),r.signal(t,"shown")))}};function Q(t,e,i){var n=t.options.hintOptions,s={};for(var c in U)s[c]=U[c];if(n)for(var c in n)n[c]!==void 0&&(s[c]=n[c]);if(i)for(var c in i)i[c]!==void 0&&(s[c]=i[c]);return s.hint.resolve&&(s.hint=s.hint.resolve(t,e)),s}function R(t){return typeof t=="string"?t:t.text}function Z(t,e){var i={Up:function(){e.moveFocus(-1)},Down:function(){e.moveFocus(1)},PageUp:function(){e.moveFocus(-e.menuSize()+1,!0)},PageDown:function(){e.moveFocus(e.menuSize()-1,!0)},Home:function(){e.setFocus(0)},End:function(){e.setFocus(e.length-1)},Enter:e.pick,Tab:e.pick,Esc:e.close},n=/Mac/.test(navigator.platform);n&&(i["Ctrl-P"]=function(){e.moveFocus(-1)},i["Ctrl-N"]=function(){e.moveFocus(1)});var s=t.options.customKeys,c=s?{}:i;function o(u,l){var h;typeof l!="string"?h=function(H){return l(H,e)}:i.hasOwnProperty(l)?h=i[l]:h=l,c[u]=h}if(s)for(var f in s)s.hasOwnProperty(f)&&o(f,s[f]);var a=t.options.extraKeys;if(a)for(var f in a)a.hasOwnProperty(f)&&o(f,a[f]);return c}function _(t,e){for(;e&&e!=t;){if(e.nodeName.toUpperCase()==="LI"&&e.parentNode==t)return e;e=e.parentNode}}function B(t,e){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=t,this.data=e,this.picked=!1;var i=this,n=t.cm,s=n.getInputField().ownerDocument,c=s.defaultView||s.parentWindow,o=this.hints=s.createElement("ul");o.setAttribute("role","listbox"),o.setAttribute("aria-expanded","true"),o.id=this.id;var f=t.cm.options.theme;o.className="CodeMirror-hints "+f,this.selectedHint=e.selectedHint||0;for(var a=e.list,u=0;u<a.length;++u){var l=o.appendChild(s.createElement("li")),h=a[u],H=y+(u!=this.selectedHint?"":" "+m);h.className!=null&&(H=h.className+" "+H),l.className=H,u==this.selectedHint&&l.setAttribute("aria-selected","true"),l.id=this.id+"-"+u,l.setAttribute("role","option"),h.render?h.render(l,e,h):l.appendChild(s.createTextNode(h.displayText||R(h))),l.hintId=u}var b=t.options.container||s.body,v=n.cursorCoords(t.options.alignWithWord?e.from:null),S=v.left,T=v.bottom,D=!0,k=0,O=0;if(b!==s.body){var it=["absolute","relative","fixed"].indexOf(c.getComputedStyle(b).position)!==-1,C=it?b:b.offsetParent,j=C.getBoundingClientRect(),M=s.body.getBoundingClientRect();k=j.left-M.left-C.scrollLeft,O=j.top-M.top-C.scrollTop}o.style.left=S-k+"px",o.style.top=T-O+"px";var F=c.innerWidth||Math.max(s.body.offsetWidth,s.documentElement.offsetWidth),W=c.innerHeight||Math.max(s.body.offsetHeight,s.documentElement.offsetHeight);b.appendChild(o),n.getInputField().setAttribute("aria-autocomplete","list"),n.getInputField().setAttribute("aria-owns",this.id),n.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var g=t.options.moveOnOverlap?o.getBoundingClientRect():new DOMRect,z=t.options.paddingForScrollbar?o.scrollHeight>o.clientHeight+1:!1,A;setTimeout(function(){A=n.getScrollInfo()});var nt=g.bottom-W;if(nt>0){var L=g.bottom-g.top,st=v.top-(v.bottom-g.top);if(st-L>0)o.style.top=(T=v.top-L-O)+"px",D=!1;else if(L>W){o.style.height=W-5+"px",o.style.top=(T=v.bottom-g.top-O)+"px";var V=n.getCursor();e.from.ch!=V.ch&&(v=n.cursorCoords(V),o.style.left=(S=v.left-k)+"px",g=o.getBoundingClientRect())}}var E=g.right-F;if(z&&(E+=n.display.nativeBarWidth),E>0&&(g.right-g.left>F&&(o.style.width=F-5+"px",E-=g.right-g.left-F),o.style.left=(S=v.left-E-k)+"px"),z)for(var N=o.firstChild;N;N=N.nextSibling)N.style.paddingRight=n.display.nativeBarWidth+"px";if(n.addKeyMap(this.keyMap=Z(t,{moveFocus:function(p,d){i.changeActive(i.selectedHint+p,d)},setFocus:function(p){i.changeActive(p)},menuSize:function(){return i.screenAmount()},length:a.length,close:function(){t.close()},pick:function(){i.pick()},data:e})),t.options.closeOnUnfocus){var q;n.on("blur",this.onBlur=function(){q=setTimeout(function(){t.close()},100)}),n.on("focus",this.onFocus=function(){clearTimeout(q)})}n.on("scroll",this.onScroll=function(){var p=n.getScrollInfo(),d=n.getWrapperElement().getBoundingClientRect();A||(A=n.getScrollInfo());var $=T+A.top-p.top,P=$-(c.pageYOffset||(s.documentElement||s.body).scrollTop);if(D||(P+=o.offsetHeight),P<=d.top||P>=d.bottom)return t.close();o.style.top=$+"px",o.style.left=S+A.left-p.left+"px"}),r.on(o,"dblclick",function(p){var d=_(o,p.target||p.srcElement);d&&d.hintId!=null&&(i.changeActive(d.hintId),i.pick())}),r.on(o,"click",function(p){var d=_(o,p.target||p.srcElement);d&&d.hintId!=null&&(i.changeActive(d.hintId),t.options.completeOnSingleClick&&i.pick())}),r.on(o,"mousedown",function(){setTimeout(function(){n.focus()},20)});var Y=this.getSelectedHintRange();return(Y.from!==0||Y.to!==0)&&this.scrollToActive(),r.signal(e,"select",a[this.selectedHint],o.childNodes[this.selectedHint]),!0}B.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var t=this.completion.cm.getInputField();t.removeAttribute("aria-activedescendant"),t.removeAttribute("aria-owns");var e=this.completion.cm;this.completion.options.closeOnUnfocus&&(e.off("blur",this.onBlur),e.off("focus",this.onFocus)),e.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var t=this;this.keyMap={Enter:function(){t.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,e){if(t>=this.data.list.length?t=e?this.data.list.length-1:0:t<0&&(t=e?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+m,""),i.removeAttribute("aria-selected")),i=this.hints.childNodes[this.selectedHint=t],i.className+=" "+m,i.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",i.id),this.scrollToActive(),r.signal(this.data,"select",this.data.list[this.selectedHint],i)}},scrollToActive:function(){var t=this.getSelectedHintRange(),e=this.hints.childNodes[t.from],i=this.hints.childNodes[t.to],n=this.hints.firstChild;e.offsetTop<this.hints.scrollTop?this.hints.scrollTop=e.offsetTop-n.offsetTop:i.offsetTop+i.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=i.offsetTop+i.offsetHeight-this.hints.clientHeight+n.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var t=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-t),to:Math.min(this.data.list.length-1,this.selectedHint+t)}}};function tt(t,e){if(!t.somethingSelected())return e;for(var i=[],n=0;n<e.length;n++)e[n].supportsSelection&&i.push(e[n]);return i}function K(t,e,i,n){if(t.async)t(e,n,i);else{var s=t(e,i);s&&s.then?s.then(n):n(s)}}function et(t,e){var i=t.getHelpers(e,"hint"),n;if(i.length){var s=function(c,o,f){var a=tt(c,i);function u(l){if(l==a.length)return o(null);K(a[l],c,f,function(h){h&&h.list.length>0?o(h):u(l+1)})}u(0)};return s.async=!0,s.supportsSelection=!0,s}else return(n=t.getHelper(t.getCursor(),"hintWords"))?function(c){return r.hint.fromList(c,{words:n})}:r.hint.anyword?function(c,o){return r.hint.anyword(c,o)}:function(){}}r.registerHelper("hint","auto",{resolve:et}),r.registerHelper("hint","fromList",function(t,e){var i=t.getCursor(),n=t.getTokenAt(i),s,c=r.Pos(i.line,n.start),o=i;n.start<i.ch&&/\w/.test(n.string.charAt(i.ch-n.start-1))?s=n.string.substr(0,i.ch-n.start):(s="",c=i);for(var f=[],a=0;a<e.words.length;a++){var u=e.words[a];u.slice(0,s.length)==s&&f.push(u)}if(f.length)return{list:f,from:c,to:o}}),r.commands.autocomplete=r.showHint;var U={hint:r.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};r.defineOption("hintOptions",null)})})();var X=lt.exports;const at=ot(X),ut=ct({__proto__:null,default:at},[X]);export{ut as s};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{g as V}from"./index-
|
|
2
|
-
`,s,null,"+insertLine"),e.indentLine(s.line,null,!0),r.push({head:s,anchor:s}),l=o.line+1}}e.setSelections(r)}),e.execCommand("indentAuto")}a.insertLineAfter=function(e){return F(e,!1)},a.insertLineBefore=function(e){return F(e,!0)};function R(e,t){for(var n=t.ch,r=n,l=e.getLine(t.line);n&&h.isWordChar(l.charAt(n-1));)--n;for(;r<l.length&&h.isWordChar(l.charAt(r));)++r;return{from:f(t.line,n),to:f(t.line,r),word:l.slice(n,r)}}a.selectNextOccurrence=function(e){var t=e.getCursor("from"),n=e.getCursor("to"),r=e.state.sublimeFindFullWord==e.doc.sel;if(h.cmpPos(t,n)==0){var l=R(e,t);if(!l.word)return;e.setSelection(l.from,l.to),r=!0}else{var i=e.getRange(t,n),o=r?new RegExp("\\b"+i+"\\b"):i,s=e.getSearchCursor(o,n),u=s.findNext();if(u||(s=e.getSearchCursor(o,f(e.firstLine(),0)),u=s.findNext()),!u||
|
|
1
|
+
import{g as V}from"./index-bfe4aca1.js";import{a as _}from"./codemirror-209aaaaa.js";import{r as Y}from"./searchcursor-4418e4ab.js";import{a as q}from"./matchbrackets-ced66c94.js";function z(w,A){for(var h=0;h<A.length;h++){const a=A[h];if(typeof a!="string"&&!Array.isArray(a)){for(const f in a)if(f!=="default"&&!(f in w)){const b=Object.getOwnPropertyDescriptor(a,f);b&&Object.defineProperty(w,f,b.get?b:{enumerable:!0,get:()=>a[f]})}}}return Object.freeze(Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}))}var J={exports:{}};(function(w,A){(function(h){h(_,Y(),q)})(function(h){var a=h.commands,f=h.Pos;function b(e,t,n){if(n<0&&t.ch==0)return e.clipPos(f(t.line-1));var r=e.getLine(t.line);if(n>0&&t.ch>=r.length)return e.clipPos(f(t.line+1,0));for(var l="start",i,o=t.ch,s=o,u=n<0?0:r.length,d=0;s!=u;s+=n,d++){var p=r.charAt(n<0?s-1:s),c=p!="_"&&h.isWordChar(p)?"w":"o";if(c=="w"&&p.toUpperCase()==p&&(c="W"),l=="start")c!="o"?(l="in",i=c):o=s+n;else if(l=="in"&&i!=c){if(i=="w"&&c=="W"&&n<0&&s--,i=="W"&&c=="w"&&n>0)if(s==o+1){i="w";continue}else s--;break}}return f(t.line,s)}function K(e,t){e.extendSelectionsBy(function(n){return e.display.shift||e.doc.extend||n.empty()?b(e.doc,n.head,t):t<0?n.from():n.to()})}a.goSubwordLeft=function(e){K(e,-1)},a.goSubwordRight=function(e){K(e,1)},a.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},a.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},a.splitSelectionByLine=function(e){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)for(var l=t[r].from(),i=t[r].to(),o=l.line;o<=i.line;++o)i.line>l.line&&o==i.line&&i.ch==0||n.push({anchor:o==l.line?l:f(o,0),head:o==i.line?i:f(o)});e.setSelections(n,0)},a.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},a.selectLine=function(e){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){var l=t[r];n.push({anchor:f(l.from().line,0),head:f(l.to().line+1,0)})}e.setSelections(n)};function F(e,t){if(e.isReadOnly())return h.Pass;e.operation(function(){for(var n=e.listSelections().length,r=[],l=-1,i=0;i<n;i++){var o=e.listSelections()[i].head;if(!(o.line<=l)){var s=f(o.line+(t?0:1),0);e.replaceRange(`
|
|
2
|
+
`,s,null,"+insertLine"),e.indentLine(s.line,null,!0),r.push({head:s,anchor:s}),l=o.line+1}}e.setSelections(r)}),e.execCommand("indentAuto")}a.insertLineAfter=function(e){return F(e,!1)},a.insertLineBefore=function(e){return F(e,!0)};function R(e,t){for(var n=t.ch,r=n,l=e.getLine(t.line);n&&h.isWordChar(l.charAt(n-1));)--n;for(;r<l.length&&h.isWordChar(l.charAt(r));)++r;return{from:f(t.line,n),to:f(t.line,r),word:l.slice(n,r)}}a.selectNextOccurrence=function(e){var t=e.getCursor("from"),n=e.getCursor("to"),r=e.state.sublimeFindFullWord==e.doc.sel;if(h.cmpPos(t,n)==0){var l=R(e,t);if(!l.word)return;e.setSelection(l.from,l.to),r=!0}else{var i=e.getRange(t,n),o=r?new RegExp("\\b"+i+"\\b"):i,s=e.getSearchCursor(o,n),u=s.findNext();if(u||(s=e.getSearchCursor(o,f(e.firstLine(),0)),u=s.findNext()),!u||M(e.listSelections(),s.from(),s.to()))return;e.addSelection(s.from(),s.to())}r&&(e.state.sublimeFindFullWord=e.doc.sel)},a.skipAndSelectNextOccurrence=function(e){var t=e.getCursor("anchor"),n=e.getCursor("head");a.selectNextOccurrence(e),h.cmpPos(t,n)!=0&&e.doc.setSelections(e.doc.listSelections().filter(function(r){return r.anchor!=t||r.head!=n}))};function T(e,t){for(var n=e.listSelections(),r=[],l=0;l<n.length;l++){var i=n[l],o=e.findPosV(i.anchor,t,"line",i.anchor.goalColumn),s=e.findPosV(i.head,t,"line",i.head.goalColumn);o.goalColumn=i.anchor.goalColumn!=null?i.anchor.goalColumn:e.cursorCoords(i.anchor,"div").left,s.goalColumn=i.head.goalColumn!=null?i.head.goalColumn:e.cursorCoords(i.head,"div").left;var u={anchor:o,head:s};r.push(i),r.push(u)}e.setSelections(r)}a.addCursorToPrevLine=function(e){T(e,-1)},a.addCursorToNextLine=function(e){T(e,1)};function M(e,t,n){for(var r=0;r<e.length;r++)if(h.cmpPos(e[r].from(),t)==0&&h.cmpPos(e[r].to(),n)==0)return!0;return!1}var y="(){}[]";function P(e){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){var l=t[r],i=l.head,o=e.scanForBracket(i,-1);if(!o)return!1;for(;;){var s=e.scanForBracket(i,1);if(!s)return!1;if(s.ch==y.charAt(y.indexOf(o.ch)+1)){var u=f(o.pos.line,o.pos.ch+1);if(h.cmpPos(u,l.from())==0&&h.cmpPos(s.pos,l.to())==0){if(o=e.scanForBracket(o.pos,-1),!o)return!1}else{n.push({anchor:u,head:s.pos});break}}i=f(s.pos.line,s.pos.ch+1)}}return e.setSelections(n),!0}a.selectScope=function(e){P(e)||e.execCommand("selectAll")},a.selectBetweenBrackets=function(e){if(!P(e))return h.Pass};function U(e){return e?/\bpunctuation\b/.test(e)?e:void 0:null}a.goToBracket=function(e){e.extendSelectionsBy(function(t){var n=e.scanForBracket(t.head,1,U(e.getTokenTypeAt(t.head)));if(n&&h.cmpPos(n.pos,t.head)!=0)return n.pos;var r=e.scanForBracket(t.head,-1,U(e.getTokenTypeAt(f(t.head.line,t.head.ch+1))));return r&&f(r.pos.line,r.pos.ch+1)||t.head})},a.swapLineUp=function(e){if(e.isReadOnly())return h.Pass;for(var t=e.listSelections(),n=[],r=e.firstLine()-1,l=[],i=0;i<t.length;i++){var o=t[i],s=o.from().line-1,u=o.to().line;l.push({anchor:f(o.anchor.line-1,o.anchor.ch),head:f(o.head.line-1,o.head.ch)}),o.to().ch==0&&!o.empty()&&--u,s>r?n.push(s,u):n.length&&(n[n.length-1]=u),r=u}e.operation(function(){for(var d=0;d<n.length;d+=2){var p=n[d],c=n[d+1],L=e.getLine(p);e.replaceRange("",f(p,0),f(p+1,0),"+swapLine"),c>e.lastLine()?e.replaceRange(`
|
|
3
3
|
`+L,f(e.lastLine()),null,"+swapLine"):e.replaceRange(L+`
|
|
4
4
|
`,f(c,0),null,"+swapLine")}e.setSelections(l),e.scrollIntoView()})},a.swapLineDown=function(e){if(e.isReadOnly())return h.Pass;for(var t=e.listSelections(),n=[],r=e.lastLine()+1,l=t.length-1;l>=0;l--){var i=t[l],o=i.to().line+1,s=i.from().line;i.to().ch==0&&!i.empty()&&o--,o<r?n.push(o,s):n.length&&(n[n.length-1]=s),r=s}e.operation(function(){for(var u=n.length-2;u>=0;u-=2){var d=n[u],p=n[u+1],c=e.getLine(d);d==e.lastLine()?e.replaceRange("",f(d-1),f(d),"+swapLine"):e.replaceRange("",f(d,0),f(d+1,0),"+swapLine"),e.replaceRange(c+`
|
|
5
5
|
`,f(p,0),null,"+swapLine")}e.scrollIntoView()})},a.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},a.joinLines=function(e){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){for(var l=t[r],i=l.from(),o=i.line,s=l.to().line;r<t.length-1&&t[r+1].from().line==s;)s=t[++r].to().line;n.push({start:o,end:s,anchor:!l.empty()&&i})}e.operation(function(){for(var u=0,d=[],p=0;p<n.length;p++){for(var c=n[p],L=c.anchor&&f(c.anchor.line-u,c.anchor.ch),m,S=c.start;S<=c.end;S++){var C=S-u;S==c.end&&(m=f(C,e.getLine(C).length+1)),C<e.lastLine()&&(e.replaceRange(" ",f(C),f(C+1,/^\s*/.exec(e.getLine(C+1))[0].length)),++u)}d.push({anchor:L||m,head:m})}e.setSelections(d,0)})},a.duplicateLine=function(e){e.operation(function(){for(var t=e.listSelections().length,n=0;n<t;n++){var r=e.listSelections()[n];r.empty()?e.replaceRange(e.getLine(r.head.line)+`
|
|
6
|
-
`,f(r.head.line,0)):e.replaceRange(e.getRange(r.from(),r.to()),r.from())}e.scrollIntoView()})};function B(e,t,n){if(e.isReadOnly())return h.Pass;for(var r=e.listSelections(),l=[],i,o=0;o<r.length;o++){var s=r[o];if(!s.empty()){for(var u=s.from().line,d=s.to().line;o<r.length-1&&r[o+1].from().line==d;)d=r[++o].to().line;r[o].to().ch||d--,l.push(u,d)}}l.length?i=!0:l.push(e.firstLine(),e.lastLine()),e.operation(function(){for(var p=[],c=0;c<l.length;c+=2){var L=l[c],m=l[c+1],S=f(L,0),C=f(m),x=e.getRange(S,C,!1);t?x.sort(function(g,k){return g<k?-n:g==k?0:n}):x.sort(function(g,k){var O=g.toUpperCase(),W=k.toUpperCase();return O!=W&&(g=O,k=W),g<k?-n:g==k?0:n}),e.replaceRange(x,S,C),i&&p.push({anchor:S,head:f(m+1,0)})}i&&e.setSelections(p,0)})}a.sortLines=function(e){B(e,!0,1)},a.reverseSortLines=function(e){B(e,!0,-1)},a.sortLinesInsensitive=function(e){B(e,!1,1)},a.reverseSortLinesInsensitive=function(e){B(e,!1,-1)},a.nextBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var n=t.shift(),r=n.find();if(r)return t.push(n),e.setSelection(r.from,r.to)}},a.prevBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var n=t[t.length-1].find();if(!n)t.pop();else return e.setSelection(n.from,n.to)}},a.toggleBookmark=function(e){for(var t=e.listSelections(),n=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),r=0;r<t.length;r++){for(var l=t[r].from(),i=t[r].to(),o=t[r].empty()?e.findMarksAt(l):e.findMarks(l,i),s=0;s<o.length;s++)if(o[s].sublimeBookmark){o[s].clear();for(var u=0;u<n.length;u++)n[u]==o[s]&&n.splice(u--,1);break}s==o.length&&n.push(e.markText(l,i,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},a.clearBookmarks=function(e){var t=e.state.sublimeBookmarks;if(t)for(var n=0;n<t.length;n++)t[n].clear();t.length=0},a.selectBookmarks=function(e){var t=e.state.sublimeBookmarks,n=[];if(t)for(var r=0;r<t.length;r++){var l=t[r].find();l?n.push({anchor:l.from,head:l.to}):t.splice(r--,0)}n.length&&e.setSelections(n,0)};function I(e,t){e.operation(function(){for(var n=e.listSelections(),r=[],l=[],i=0;i<n.length;i++){var o=n[i];o.empty()?(r.push(i),l.push("")):l.push(t(e.getRange(o.from(),o.to())))}e.replaceSelections(l,"around","case");for(var i=r.length-1,s;i>=0;i--){var o=n[r[i]];if(!(s&&h.cmpPos(o.head,s)>0)){var u=R(e,o.head);s=u.from,e.replaceRange(t(u.word),u.from,u.to)}}})}a.smartBackspace=function(e){if(e.somethingSelected())return h.Pass;e.operation(function(){for(var t=e.listSelections(),n=e.getOption("indentUnit"),r=t.length-1;r>=0;r--){var l=t[r].head,i=e.getRange({line:l.line,ch:0},l),o=h.countColumn(i,null,e.getOption("tabSize")),s=e.findPosH(l,-1,"char",!1);if(i&&!/\S/.test(i)&&o%n==0){var u=new f(l.line,h.findColumn(i,o-n,n));u.ch!=l.ch&&(s=u)}e.replaceRange("",s,l,"+delete")}})},a.delLineRight=function(e){e.operation(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange("",t[n].anchor,f(t[n].to().line),"+delete");e.scrollIntoView()})},a.upcaseAtCursor=function(e){I(e,function(t){return t.toUpperCase()})},a.downcaseAtCursor=function(e){I(e,function(t){return t.toLowerCase()})},a.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},a.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},a.deleteToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();if(t){var n=e.getCursor(),r=t;if(h.cmpPos(n,r)>0){var l=r;r=n,n=l}e.state.sublimeKilled=e.getRange(n,r),e.replaceRange("",n,r)}},a.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},a.sublimeYank=function(e){e.state.sublimeKilled!=null&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},a.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)};function D(e){var t=e.getCursor("from"),n=e.getCursor("to");if(h.cmpPos(t,n)==0){var r=R(e,t);if(!r.word)return;t=r.from,n=r.to}return{from:t,to:n,query:e.getRange(t,n),word:r}}function N(e,t){var n=D(e);if(n){var r=n.query,l=e.getSearchCursor(r,t?n.to:n.from);(t?l.findNext():l.findPrevious())?e.setSelection(l.from(),l.to()):(l=e.getSearchCursor(r,t?f(e.firstLine(),0):e.clipPos(f(e.lastLine()))),(t?l.findNext():l.findPrevious())?e.setSelection(l.from(),l.to()):n.word&&e.setSelection(n.from,n.to))}}a.findUnder=function(e){N(e,!0)},a.findUnderPrevious=function(e){N(e,!1)},a.findAllUnder=function(e){var t=D(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],l=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&l++;e.setSelections(r,l)}};var v=h.keyMap;v.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},h.normalizeKeyMap(v.macSublime),v.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},h.normalizeKeyMap(v.pcSublime);var H=v.default==v.macDefault;v.sublime=H?v.macSublime:v.pcSublime})})();var
|
|
6
|
+
`,f(r.head.line,0)):e.replaceRange(e.getRange(r.from(),r.to()),r.from())}e.scrollIntoView()})};function B(e,t,n){if(e.isReadOnly())return h.Pass;for(var r=e.listSelections(),l=[],i,o=0;o<r.length;o++){var s=r[o];if(!s.empty()){for(var u=s.from().line,d=s.to().line;o<r.length-1&&r[o+1].from().line==d;)d=r[++o].to().line;r[o].to().ch||d--,l.push(u,d)}}l.length?i=!0:l.push(e.firstLine(),e.lastLine()),e.operation(function(){for(var p=[],c=0;c<l.length;c+=2){var L=l[c],m=l[c+1],S=f(L,0),C=f(m),x=e.getRange(S,C,!1);t?x.sort(function(g,k){return g<k?-n:g==k?0:n}):x.sort(function(g,k){var O=g.toUpperCase(),W=k.toUpperCase();return O!=W&&(g=O,k=W),g<k?-n:g==k?0:n}),e.replaceRange(x,S,C),i&&p.push({anchor:S,head:f(m+1,0)})}i&&e.setSelections(p,0)})}a.sortLines=function(e){B(e,!0,1)},a.reverseSortLines=function(e){B(e,!0,-1)},a.sortLinesInsensitive=function(e){B(e,!1,1)},a.reverseSortLinesInsensitive=function(e){B(e,!1,-1)},a.nextBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var n=t.shift(),r=n.find();if(r)return t.push(n),e.setSelection(r.from,r.to)}},a.prevBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var n=t[t.length-1].find();if(!n)t.pop();else return e.setSelection(n.from,n.to)}},a.toggleBookmark=function(e){for(var t=e.listSelections(),n=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),r=0;r<t.length;r++){for(var l=t[r].from(),i=t[r].to(),o=t[r].empty()?e.findMarksAt(l):e.findMarks(l,i),s=0;s<o.length;s++)if(o[s].sublimeBookmark){o[s].clear();for(var u=0;u<n.length;u++)n[u]==o[s]&&n.splice(u--,1);break}s==o.length&&n.push(e.markText(l,i,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},a.clearBookmarks=function(e){var t=e.state.sublimeBookmarks;if(t)for(var n=0;n<t.length;n++)t[n].clear();t.length=0},a.selectBookmarks=function(e){var t=e.state.sublimeBookmarks,n=[];if(t)for(var r=0;r<t.length;r++){var l=t[r].find();l?n.push({anchor:l.from,head:l.to}):t.splice(r--,0)}n.length&&e.setSelections(n,0)};function I(e,t){e.operation(function(){for(var n=e.listSelections(),r=[],l=[],i=0;i<n.length;i++){var o=n[i];o.empty()?(r.push(i),l.push("")):l.push(t(e.getRange(o.from(),o.to())))}e.replaceSelections(l,"around","case");for(var i=r.length-1,s;i>=0;i--){var o=n[r[i]];if(!(s&&h.cmpPos(o.head,s)>0)){var u=R(e,o.head);s=u.from,e.replaceRange(t(u.word),u.from,u.to)}}})}a.smartBackspace=function(e){if(e.somethingSelected())return h.Pass;e.operation(function(){for(var t=e.listSelections(),n=e.getOption("indentUnit"),r=t.length-1;r>=0;r--){var l=t[r].head,i=e.getRange({line:l.line,ch:0},l),o=h.countColumn(i,null,e.getOption("tabSize")),s=e.findPosH(l,-1,"char",!1);if(i&&!/\S/.test(i)&&o%n==0){var u=new f(l.line,h.findColumn(i,o-n,n));u.ch!=l.ch&&(s=u)}e.replaceRange("",s,l,"+delete")}})},a.delLineRight=function(e){e.operation(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange("",t[n].anchor,f(t[n].to().line),"+delete");e.scrollIntoView()})},a.upcaseAtCursor=function(e){I(e,function(t){return t.toUpperCase()})},a.downcaseAtCursor=function(e){I(e,function(t){return t.toLowerCase()})},a.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},a.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},a.deleteToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();if(t){var n=e.getCursor(),r=t;if(h.cmpPos(n,r)>0){var l=r;r=n,n=l}e.state.sublimeKilled=e.getRange(n,r),e.replaceRange("",n,r)}},a.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},a.sublimeYank=function(e){e.state.sublimeKilled!=null&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},a.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)};function D(e){var t=e.getCursor("from"),n=e.getCursor("to");if(h.cmpPos(t,n)==0){var r=R(e,t);if(!r.word)return;t=r.from,n=r.to}return{from:t,to:n,query:e.getRange(t,n),word:r}}function N(e,t){var n=D(e);if(n){var r=n.query,l=e.getSearchCursor(r,t?n.to:n.from);(t?l.findNext():l.findPrevious())?e.setSelection(l.from(),l.to()):(l=e.getSearchCursor(r,t?f(e.firstLine(),0):e.clipPos(f(e.lastLine()))),(t?l.findNext():l.findPrevious())?e.setSelection(l.from(),l.to()):n.word&&e.setSelection(n.from,n.to))}}a.findUnder=function(e){N(e,!0)},a.findUnderPrevious=function(e){N(e,!1)},a.findAllUnder=function(e){var t=D(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],l=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&l++;e.setSelections(r,l)}};var v=h.keyMap;v.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},h.normalizeKeyMap(v.macSublime),v.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},h.normalizeKeyMap(v.pcSublime);var H=v.default==v.macDefault;v.sublime=H?v.macSublime:v.pcSublime})})();var E=J.exports;const G=V(E),j=z({__proto__:null,default:G},[E]);export{j as s};
|
package/playground/index.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
</style>
|
|
25
25
|
<title>Cube Playground</title>
|
|
26
|
-
<script type="module" crossorigin src="/assets/index-
|
|
26
|
+
<script type="module" crossorigin src="/assets/index-bfe4aca1.js"></script>
|
|
27
27
|
<link rel="stylesheet" href="/assets/index-af3b87a2.css">
|
|
28
28
|
</head>
|
|
29
29
|
<body>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as n}from"./index-f32c771c.js";import{r as f}from"./matchbrackets-8cf1c673.js";function i(r,c){for(var o=0;o<c.length;o++){const e=c[o];if(typeof e!="string"&&!Array.isArray(e)){for(const t in e)if(t!=="default"&&!(t in r)){const a=Object.getOwnPropertyDescriptor(e,t);a&&Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var s=f();const m=n(s),b=i({__proto__:null,default:m},[s]);export{b as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as T}from"./codemirror-3e55eb16.js";var H={exports:{}},M;function F(){return M||(M=1,function(S,R){(function(f){f(T)})(function(f){var m=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),o=f.Pos,p={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function B(t){return t&&t.bracketRegex||/[(){}[\]]/}function L(t,a,e){var i=t.getLineHandle(a.line),n=a.ch-1,l=e&&e.afterCursor;l==null&&(l=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var h=B(e),u=!l&&n>=0&&h.test(i.text.charAt(n))&&p[i.text.charAt(n)]||h.test(i.text.charAt(n+1))&&p[i.text.charAt(++n)];if(!u)return null;var r=u.charAt(1)==">"?1:-1;if(e&&e.strict&&r>0!=(n==a.ch))return null;var g=t.getTokenTypeAt(o(a.line,n+1)),s=y(t,o(a.line,n+(r>0?1:0)),r,g,e);return s==null?null:{from:o(a.line,n),to:s&&s.pos,match:s&&s.ch==u.charAt(0),forward:r>0}}function y(t,a,e,i,n){for(var l=n&&n.maxScanLineLength||1e4,h=n&&n.maxScanLines||1e3,u=[],r=B(n),g=e>0?Math.min(a.line+h,t.lastLine()+1):Math.max(t.firstLine()-1,a.line-h),s=a.line;s!=g;s+=e){var c=t.getLine(s);if(c){var k=e>0?0:c.length-1,E=e>0?c.length:-1;if(!(c.length>l))for(s==a.line&&(k=a.ch-(e<0?1:0));k!=E;k+=e){var x=c.charAt(k);if(r.test(x)&&(i===void 0||(t.getTokenTypeAt(o(s,k+1))||"")==(i||""))){var b=p[x];if(b&&b.charAt(1)==">"==e>0)u.push(x);else if(u.length)u.pop();else return{pos:o(s,k),ch:x}}}}}return s-e==(e>0?t.lastLine():t.firstLine())?!1:null}function A(t,a,e){for(var i=t.state.matchBrackets.maxHighlightLineLength||1e3,n=e&&e.highlightNonMatching,l=[],h=t.listSelections(),u=0;u<h.length;u++){var r=h[u].empty()&&L(t,h[u].head,e);if(r&&(r.match||n!==!1)&&t.getLine(r.from.line).length<=i){var g=r.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(t.markText(r.from,o(r.from.line,r.from.ch+1),{className:g})),r.to&&t.getLine(r.to.line).length<=i&&l.push(t.markText(r.to,o(r.to.line,r.to.ch+1),{className:g}))}}if(l.length){m&&t.state.focused&&t.focus();var s=function(){t.operation(function(){for(var c=0;c<l.length;c++)l[c].clear()})};if(a)setTimeout(s,800);else return s}}function v(t){t.operation(function(){t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null),t.state.matchBrackets.currentlyHighlighted=A(t,!1,t.state.matchBrackets)})}function d(t){t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)}f.defineOption("matchBrackets",!1,function(t,a,e){e&&e!=f.Init&&(t.off("cursorActivity",v),t.off("focus",v),t.off("blur",d),d(t)),a&&(t.state.matchBrackets=typeof a=="object"?a:{},t.on("cursorActivity",v),t.on("focus",v),t.on("blur",d))}),f.defineExtension("matchBrackets",function(){A(this,!0)}),f.defineExtension("findMatchingBracket",function(t,a,e){return(e||typeof a=="boolean")&&(e?(e.strict=a,a=e):a=a?{strict:!0}:null),L(this,t,a)}),f.defineExtension("scanForBracket",function(t,a,e,i){return y(this,t,a,e,i)})})}()),H.exports}export{F as r};
|