UNPKG

fa-toolkit

Version:

a devtool for fast app

1 lines 3.31 kB
"use strict";var _0xfabc0=_0x5d16;function _typeof(t){var r=_0x5d16;return(_typeof=r(157)==typeof Symbol&&r(145)==typeof Symbol[r(133)]?function(t){return typeof t}:function(t){var e=r;return t&&e(157)==typeof Symbol&&t[e(129)]===Symbol&&t!==Symbol[e(158)]?e(145):typeof t})(t)}function _0x5d16(t,e){var r=_0x2d48();return(_0x5d16=function(t,e){return r[t-=120]})(t,e)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(_0x5d16(142))}function _defineProperties(t,e){for(var r=_0x5d16,n=0;n<e.length;n++){var i=e[n];i[r(152)]=i[r(152)]||!1,i[r(136)]=!0,"value"in i&&(i[r(156)]=!0),Object[r(138)](t,_toPropertyKey(i.key),i)}}function _createClass(t,e,r){var n=_0x5d16;return e&&_defineProperties(t[n(158)],e),r&&_defineProperties(t,r),Object[n(138)](t,n(158),{writable:!1}),t}function _toPropertyKey(t){var e=_0x5d16,t=_toPrimitive(t,e(123));return _typeof(t)===e(145)?t:String(t)}function _toPrimitive(t,e){var r=_0x5d16;if(_typeof(t)!==r(127)||null===t)return t;var n=t[Symbol[r(155)]];if(void 0===n)return(e===r(123)?String:Number)(t);r=n.call(t,e||r(130));if("object"!==_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}function _0x2d48(){var t=["character","28oggIpE","Cannot call a class as a function","_content","5288368IakiHO","symbol","getLineOffsets","line","max","exports","509538cWBJSe","496851GgqSua","enumerable","5011750IrvDVH","781602Raovms","toPrimitive","writable","function","prototype","9820hFauNN","4383OQTBdc","4UjBHfw","computeLineOffsets","string","_uri","charCodeAt","floor","object","4194808UgrvFp","constructor","default","uri","offsetAt","iterator","push","length","configurable","min","defineProperty","_lineOffsets"];return(_0x2d48=function(){return t})()}!function(){for(var t=_0x5d16,e=_0x2d48();;)try{if(591688==-parseInt(t(151))*(-parseInt(t(121))/2)+parseInt(t(150))/3+parseInt(t(128))/4+-parseInt(t(153))/5+parseInt(t(154))/6*(parseInt(t(141))/7)+-parseInt(t(144))/8+-parseInt(t(120))/9*(parseInt(t(159))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();var TextDocument=function(){var u=_0x5d16;function n(t,e){var r=_0x5d16;_classCallCheck(this,n),this[r(124)]=t,this[r(143)]=e,this[r(139)]=void 0}return _createClass(n,[{key:"getText",value:function(){return this[_0x5d16(143)]}},{key:u(131),value:function(){return this[u(124)]}},{key:u(132),value:function(t){var e=u,r=this[e(146)]();if(t[e(147)]>=r[e(135)])return this[e(143)][e(135)];if(t.line<0)return 0;var n=r[t.line],r=t[e(147)]+1<r[e(135)]?r[t.line+1]:this[e(143)][e(135)];return Math[e(148)](Math.min(n+t[e(140)],r),n)}},{key:u(146),value:function(){var t=u;return void 0===this._lineOffsets&&(this[t(139)]=this.computeLineOffsets(this[t(143)],!0)),this[t(139)]}},{key:u(122),value:function(t,e,r){var n=u;void 0===r&&(r=0);for(var i=e?[r]:[],a=0;a<t[n(135)];a++){var o=t[n(125)](a);13!==o&&10!==o||(13===o&&a+1<t[n(135)]&&10===t[n(125)](a+1)&&a++,i[n(134)](r+a+1))}return i}},{key:"positionAt",value:function(t){var e=u;t=Math[e(148)](Math[e(137)](t,this[e(143)].length),0);var r=this[e(146)](),n=0,i=r[e(135)];if(0===i)return{line:0,character:t};for(;n<i;){var a=Math[e(126)]((n+i)/2);r[a]>t?i=a:n=a+1}var o=n-1;return{line:o,character:t-r[o]}}}]),n}();function create(t,e){return new TextDocument(t,e)}module[_0xfabc0(149)]={create:create};