Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sql-formatter-plus

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sql-formatter-plus - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

dist/sql-formatter.min.js

@@ -1,1 +0,1 @@

!function(e,E){"object"==typeof exports&&"object"==typeof module?module.exports=E():"function"==typeof define&&define.amd?define([],E):"object"==typeof exports?exports.sqlFormatter=E():e.sqlFormatter=E()}(window,(function(){return function(e){var E={};function t(n){if(E[n])return E[n].exports;var r=E[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=E,t.d=function(e,E,n){t.o(e,E)||Object.defineProperty(e,E,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,E){if(1&E&&(e=t(e)),8&E)return e;if(4&E&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&E&&"string"!=typeof e)for(var r in e)t.d(n,r,function(E){return e[E]}.bind(null,r));return n},t.n=function(e){var E=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(E,"a",E),E},t.o=function(e,E){return Object.prototype.hasOwnProperty.call(e,E)},t.p="",t(t.s=72)}([function(e,E,t){var n=t(13),r="object"==typeof self&&self&&self.Object===Object&&self,o=n||r||Function("return this")();e.exports=o},function(e,E,t){var n=t(9),r=t(35),o=t(36),T="[object Null]",R="[object Undefined]",i=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?R:T:i&&i in Object(e)?r(e):o(e)}},function(e,E){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,E,t){var n=t(64),r=t(67);e.exports=function(e,E){var t=r(e,E);return n(t)?t:void 0}},function(e,E,t){var n=t(25),r=t(52),o=t(54),T=t(55),R=t(10),i=/\s+$/;e.exports=function(e,E,t){if((e=R(e))&&(t||void 0===E))return e.replace(i,"");if(!e||!(E=n(E)))return e;var N=T(e),A=o(N,T(E))+1;return r(N,0,A).join("")}},function(e,E,t){var n=t(10),r=/[\\^$.*+?()[\]{}|]/g,o=RegExp(r.source);e.exports=function(e){return(e=n(e))&&o.test(e)?e.replace(r,"\\$&"):e}},function(e,E,t){var n=t(12),r=t(14);e.exports=function(e){return null!=e&&r(e.length)&&!n(e)}},function(e,E){e.exports=function(e){var E=typeof e;return null!=e&&("object"==E||"function"==E)}},function(e,E){var t=Array.isArray;e.exports=t},function(e,E,t){var n=t(0).Symbol;e.exports=n},function(e,E,t){var n=t(25);e.exports=function(e){return null==e?"":n(e)}},function(e,E,t){var n=t(31),r=t(32),o=t(33);e.exports=function(e,E,t){return E==E?o(e,E,t):n(e,r,t)}},function(e,E,t){var n=t(1),r=t(7),o="[object AsyncFunction]",T="[object Function]",R="[object GeneratorFunction]",i="[object Proxy]";e.exports=function(e){if(!r(e))return!1;var E=n(e);return E==T||E==R||E==o||E==i}},function(e,E,t){(function(E){var t="object"==typeof E&&E&&E.Object===Object&&E;e.exports=t}).call(this,t(34))},function(e,E){var t=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=t}},function(e,E,t){var n=t(38);e.exports=function(e){var E=n(e),t=E%1;return E==E?t?E-t:E:0}},function(e,E,t){var n=t(1),r=t(2),o="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||r(e)&&n(e)==o}},function(e,E){e.exports=function(e,E){for(var t=-1,n=null==e?0:e.length,r=Array(n);++t<n;)r[t]=E(e[t],t,e);return r}},function(e,E,t){var n=t(45),r=t(2),o=Object.prototype,T=o.hasOwnProperty,R=o.propertyIsEnumerable,i=n(function(){return arguments}())?n:function(e){return r(e)&&T.call(e,"callee")&&!R.call(e,"callee")};e.exports=i},function(e,E,t){(function(e){var n=t(0),r=t(46),o=E&&!E.nodeType&&E,T=o&&"object"==typeof e&&e&&!e.nodeType&&e,R=T&&T.exports===o?n.Buffer:void 0,i=(R?R.isBuffer:void 0)||r;e.exports=i}).call(this,t(20)(e))},function(e,E){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,E){var t=9007199254740991,n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,E){var r=typeof e;return!!(E=null==E?t:E)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<E}},function(e,E,t){var n=t(47),r=t(48),o=t(49),T=o&&o.isTypedArray,R=T?r(T):n;e.exports=R},function(e,E,t){var n=t(24),r=t(50),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return r(e);var E=[];for(var t in Object(e))o.call(e,t)&&"constructor"!=t&&E.push(t);return E}},function(e,E){var t=Object.prototype;e.exports=function(e){var E=e&&e.constructor;return e===("function"==typeof E&&E.prototype||t)}},function(e,E,t){var n=t(9),r=t(17),o=t(8),T=t(16),R=1/0,i=n?n.prototype:void 0,N=i?i.toString:void 0;e.exports=function e(E){if("string"==typeof E)return E;if(o(E))return r(E,e)+"";if(T(E))return N?N.call(E):"";var t=E+"";return"0"==t&&1/E==-R?"-0":t}},function(e,E){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,E,t){var n=t(11),r=t(6),o=t(37),T=t(15),R=t(40),i=Math.max;e.exports=function(e,E,t,N){e=r(e)?e:R(e),t=t&&!N?T(t):0;var A=e.length;return t<0&&(t=i(A+t,0)),o(e)?t<=A&&e.indexOf(E,t)>-1:!!A&&n(e,E,t)>-1}},function(e,E,t){var n=t(59),r=t(60),o=t(15),T=t(10);e.exports=function(e,E,t){return E=(t?r(e,E,t):void 0===E)?1:o(E),n(T(e),E)}},function(e,E){e.exports=function(e){var E=null==e?0:e.length;return E?e[E-1]:void 0}},function(e,E,t){var n=t(23),r=t(62),o=t(18),T=t(8),R=t(6),i=t(19),N=t(24),A=t(22),O="[object Map]",I="[object Set]",u=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(R(e)&&(T(e)||"string"==typeof e||"function"==typeof e.splice||i(e)||A(e)||o(e)))return!e.length;var E=r(e);if(E==O||E==I)return!e.size;if(N(e))return!n(e).length;for(var t in e)if(u.call(e,t))return!1;return!0}},function(e,E){e.exports=function(e,E,t,n){for(var r=e.length,o=t+(n?1:-1);n?o--:++o<r;)if(E(e[o],o,e))return o;return-1}},function(e,E){e.exports=function(e){return e!=e}},function(e,E){e.exports=function(e,E,t){for(var n=t-1,r=e.length;++n<r;)if(e[n]===E)return n;return-1}},function(e,E){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(e){"object"==typeof window&&(t=window)}e.exports=t},function(e,E,t){var n=t(9),r=Object.prototype,o=r.hasOwnProperty,T=r.toString,R=n?n.toStringTag:void 0;e.exports=function(e){var E=o.call(e,R),t=e[R];try{e[R]=void 0;var n=!0}catch(e){}var r=T.call(e);return n&&(E?e[R]=t:delete e[R]),r}},function(e,E){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},function(e,E,t){var n=t(1),r=t(8),o=t(2),T="[object String]";e.exports=function(e){return"string"==typeof e||!r(e)&&o(e)&&n(e)==T}},function(e,E,t){var n=t(39),r=1/0,o=17976931348623157e292;e.exports=function(e){return e?(e=n(e))===r||e===-r?(e<0?-1:1)*o:e==e?e:0:0===e?e:0}},function(e,E,t){var n=t(7),r=t(16),o=NaN,T=/^\s+|\s+$/g,R=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,N=/^0o[0-7]+$/i,A=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return o;if(n(e)){var E="function"==typeof e.valueOf?e.valueOf():e;e=n(E)?E+"":E}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(T,"");var t=i.test(e);return t||N.test(e)?A(e.slice(2),t?2:8):R.test(e)?o:+e}},function(e,E,t){var n=t(41),r=t(42);e.exports=function(e){return null==e?[]:n(e,r(e))}},function(e,E,t){var n=t(17);e.exports=function(e,E){return n(E,(function(E){return e[E]}))}},function(e,E,t){var n=t(43),r=t(23),o=t(6);e.exports=function(e){return o(e)?n(e):r(e)}},function(e,E,t){var n=t(44),r=t(18),o=t(8),T=t(19),R=t(21),i=t(22),N=Object.prototype.hasOwnProperty;e.exports=function(e,E){var t=o(e),A=!t&&r(e),O=!t&&!A&&T(e),I=!t&&!A&&!O&&i(e),u=t||A||O||I,a=u?n(e.length,String):[],S=a.length;for(var c in e)!E&&!N.call(e,c)||u&&("length"==c||O&&("offset"==c||"parent"==c)||I&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||R(c,S))||a.push(c);return a}},function(e,E){e.exports=function(e,E){for(var t=-1,n=Array(e);++t<e;)n[t]=E(t);return n}},function(e,E,t){var n=t(1),r=t(2),o="[object Arguments]";e.exports=function(e){return r(e)&&n(e)==o}},function(e,E){e.exports=function(){return!1}},function(e,E,t){var n=t(1),r=t(14),o=t(2),T={};T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Arguments]"]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object Boolean]"]=T["[object DataView]"]=T["[object Date]"]=T["[object Error]"]=T["[object Function]"]=T["[object Map]"]=T["[object Number]"]=T["[object Object]"]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&r(e.length)&&!!T[n(e)]}},function(e,E){e.exports=function(e){return function(E){return e(E)}}},function(e,E,t){(function(e){var n=t(13),r=E&&!E.nodeType&&E,o=r&&"object"==typeof e&&e&&!e.nodeType&&e,T=o&&o.exports===r&&n.process,R=function(){try{var e=o&&o.require&&o.require("util").types;return e||T&&T.binding&&T.binding("util")}catch(e){}}();e.exports=R}).call(this,t(20)(e))},function(e,E,t){var n=t(51)(Object.keys,Object);e.exports=n},function(e,E){e.exports=function(e,E){return function(t){return e(E(t))}}},function(e,E,t){var n=t(53);e.exports=function(e,E,t){var r=e.length;return t=void 0===t?r:t,!E&&t>=r?e:n(e,E,t)}},function(e,E){e.exports=function(e,E,t){var n=-1,r=e.length;E<0&&(E=-E>r?0:r+E),(t=t>r?r:t)<0&&(t+=r),r=E>t?0:t-E>>>0,E>>>=0;for(var o=Array(r);++n<r;)o[n]=e[n+E];return o}},function(e,E,t){var n=t(11);e.exports=function(e,E){for(var t=e.length;t--&&n(E,e[t],0)>-1;);return t}},function(e,E,t){var n=t(56),r=t(57),o=t(58);e.exports=function(e){return r(e)?o(e):n(e)}},function(e,E){e.exports=function(e){return e.split("")}},function(e,E){var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},function(e,E){var t="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",T="(?:\\ud83c[\\udde6-\\uddff]){2}",R="[\\ud800-\\udbff][\\udc00-\\udfff]",i="(?:"+n+"|"+r+")"+"?",N="[\\ufe0e\\ufe0f]?"+i+("(?:\\u200d(?:"+[o,T,R].join("|")+")[\\ufe0e\\ufe0f]?"+i+")*"),A="(?:"+[o+n+"?",n,T,R,t].join("|")+")",O=RegExp(r+"(?="+r+")|"+A+N,"g");e.exports=function(e){return e.match(O)||[]}},function(e,E){var t=9007199254740991,n=Math.floor;e.exports=function(e,E){var r="";if(!e||E<1||E>t)return r;do{E%2&&(r+=e),(E=n(E/2))&&(e+=e)}while(E);return r}},function(e,E,t){var n=t(61),r=t(6),o=t(21),T=t(7);e.exports=function(e,E,t){if(!T(t))return!1;var R=typeof E;return!!("number"==R?r(t)&&o(E,t.length):"string"==R&&E in t)&&n(t[E],e)}},function(e,E){e.exports=function(e,E){return e===E||e!=e&&E!=E}},function(e,E,t){var n=t(63),r=t(68),o=t(69),T=t(70),R=t(71),i=t(1),N=t(26),A=N(n),O=N(r),I=N(o),u=N(T),a=N(R),S=i;(n&&"[object DataView]"!=S(new n(new ArrayBuffer(1)))||r&&"[object Map]"!=S(new r)||o&&"[object Promise]"!=S(o.resolve())||T&&"[object Set]"!=S(new T)||R&&"[object WeakMap]"!=S(new R))&&(S=function(e){var E=i(e),t="[object Object]"==E?e.constructor:void 0,n=t?N(t):"";if(n)switch(n){case A:return"[object DataView]";case O:return"[object Map]";case I:return"[object Promise]";case u:return"[object Set]";case a:return"[object WeakMap]"}return E}),e.exports=S},function(e,E,t){var n=t(3)(t(0),"DataView");e.exports=n},function(e,E,t){var n=t(12),r=t(65),o=t(7),T=t(26),R=/^\[object .+?Constructor\]$/,i=Function.prototype,N=Object.prototype,A=i.toString,O=N.hasOwnProperty,I=RegExp("^"+A.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||r(e))&&(n(e)?I:R).test(T(e))}},function(e,E,t){var n,r=t(66),o=(n=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},function(e,E,t){var n=t(0)["__core-js_shared__"];e.exports=n},function(e,E){e.exports=function(e,E){return null==e?void 0:e[E]}},function(e,E,t){var n=t(3)(t(0),"Map");e.exports=n},function(e,E,t){var n=t(3)(t(0),"Promise");e.exports=n},function(e,E,t){var n=t(3)(t(0),"Set");e.exports=n},function(e,E,t){var n=t(3)(t(0),"WeakMap");e.exports=n},function(e,E,t){"use strict";t.r(E);var n=t(27),r=t.n(n),o=t(4),T=t.n(o),R={WHITESPACE:"whitespace",WORD:"word",STRING:"string",RESERVED:"reserved",RESERVED_TOPLEVEL:"reserved-toplevel",RESERVED_NEWLINE:"reserved-newline",OPERATOR:"operator",OPEN_PAREN:"open-paren",CLOSE_PAREN:"close-paren",LINE_COMMENT:"line-comment",BLOCK_COMMENT:"block-comment",NUMBER:"number",PLACEHOLDER:"placeholder"},i=t(28),N=t.n(i),A=t(29),O=t.n(A);function I(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(){function e(E){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.indent=E||" ",this.indentTypes=[]}var E,t,n;return E=e,(t=[{key:"getIndent",value:function(){return N()(this.indent,this.indentTypes.length)}},{key:"increaseToplevel",value:function(){this.indentTypes.push("top-level")}},{key:"increaseBlockLevel",value:function(){this.indentTypes.push("block-level")}},{key:"decreaseTopLevel",value:function(){"top-level"===O()(this.indentTypes)&&this.indentTypes.pop()}},{key:"decreaseBlockLevel",value:function(){for(;this.indentTypes.length>0&&"top-level"===this.indentTypes.pop(););}}])&&I(E.prototype,t),n&&I(E,n),e}();function a(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var S=function(){function e(){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.level=0}var E,t,n;return E=e,(t=[{key:"beginIfPossible",value:function(e,E){0===this.level&&this.isInlineBlock(e,E)?this.level=1:this.level>0?this.level++:this.level=0}},{key:"end",value:function(){this.level--}},{key:"isActive",value:function(){return this.level>0}},{key:"isInlineBlock",value:function(e,E){for(var t=0,n=0,r=E;r<e.length;r++){var o=e[r];if((t+=o.value.length)>50)return!1;if(o.type===R.OPEN_PAREN)n++;else if(o.type===R.CLOSE_PAREN&&0==--n)return!0;if(this.isForbiddenToken(o))return!1}return!1}},{key:"isForbiddenToken",value:function(e){var E=e.type,t=e.value;return E===R.RESERVED_TOPLEVEL||E===R.RESERVED_NEWLINE||E===R.COMMENT||E===R.BLOCK_COMMENT||";"===t}}])&&a(E.prototype,t),n&&a(E,n),e}();function c(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(E){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.params=E,this.index=0}var E,t,n;return E=e,(t=[{key:"get",value:function(e){var E=e.key,t=e.value;return this.params?E?this.params[E]:this.params[this.index++]:t}}])&&c(E.prototype,t),n&&c(E,n),e}();function L(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var C=function(){function e(E,t){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.cfg=E||{},this.indentation=new u(this.cfg.indent),this.inlineBlock=new S,this.params=new s(this.cfg.params),this.tokenizer=t,this.previousReservedWord={},this.tokens=[],this.index=0}var E,t,n;return E=e,(t=[{key:"format",value:function(e){return this.tokens=this.tokenizer.tokenize(e),this.getFormattedQueryFromTokens().trim()}},{key:"getFormattedQueryFromTokens",value:function(){var e=this,E="";return this.tokens.forEach((function(t,n){e.index=n,t.type===R.WHITESPACE||(t.type===R.LINE_COMMENT?E=e.formatLineComment(t,E):t.type===R.BLOCK_COMMENT?E=e.formatBlockComment(t,E):t.type===R.RESERVED_TOPLEVEL?(E=e.formatToplevelReservedWord(t,E),e.previousReservedWord=t):t.type===R.RESERVED_NEWLINE?(E=e.formatNewlineReservedWord(t,E),e.previousReservedWord=t):t.type===R.RESERVED?(E=e.formatWithSpaces(t,E),e.previousReservedWord=t):E=t.type===R.OPEN_PAREN?e.formatOpeningParentheses(t,E):t.type===R.CLOSE_PAREN?e.formatClosingParentheses(t,E):t.type===R.PLACEHOLDER?e.formatPlaceholder(t,E):","===t.value?e.formatComma(t,E):":"===t.value?e.formatWithSpaceAfter(t,E):"."===t.value?e.formatWithoutSpaces(t,E):";"===t.value?e.formatQuerySeparator(t,E):e.formatWithSpaces(t,E))})),E}},{key:"formatLineComment",value:function(e,E){return this.addNewline(E+e.value)}},{key:"formatBlockComment",value:function(e,E){return this.addNewline(this.addNewline(E)+this.indentComment(e.value))}},{key:"indentComment",value:function(e){return e.replace(/\n/g,"\n"+this.indentation.getIndent())}},{key:"formatToplevelReservedWord",value:function(e,E){return this.indentation.decreaseTopLevel(),E=this.addNewline(E),this.indentation.increaseToplevel(),E+=this.equalizeWhitespace(this.formatReservedWord(e.value)),this.addNewline(E)}},{key:"formatNewlineReservedWord",value:function(e,E){return this.addNewline(E)+this.equalizeWhitespace(this.formatReservedWord(e.value))+" "}},{key:"equalizeWhitespace",value:function(e){return e.replace(/\s+/g," ")}},{key:"formatOpeningParentheses",value:function(e,E){var t=[R.WHITESPACE,R.OPEN_PAREN,R.LINE_COMMENT];return r()(t,this.previousToken().type)||(E=T()(E)),E+=e.value,this.inlineBlock.beginIfPossible(this.tokens,this.index),this.inlineBlock.isActive()||(this.indentation.increaseBlockLevel(),E=this.addNewline(E)),E}},{key:"formatClosingParentheses",value:function(e,E){return this.inlineBlock.isActive()?(this.inlineBlock.end(),this.formatWithSpaceAfter(e,E)):(this.indentation.decreaseBlockLevel(),this.formatWithSpaces(e,this.addNewline(E)))}},{key:"formatPlaceholder",value:function(e,E){return E+this.params.get(e)+" "}},{key:"formatComma",value:function(e,E){return E=this.trimTrailingWhitespace(E)+e.value+" ",this.inlineBlock.isActive()?E:/^LIMIT$/i.test(this.previousReservedWord.value)?E:this.addNewline(E)}},{key:"formatWithSpaceAfter",value:function(e,E){return this.trimTrailingWhitespace(E)+e.value+" "}},{key:"formatWithoutSpaces",value:function(e,E){return this.trimTrailingWhitespace(E)+e.value}},{key:"formatWithSpaces",value:function(e,E){return E+("reserved"===e.type?this.formatReservedWord(e.value):e.value)+" "}},{key:"formatReservedWord",value:function(e){return this.cfg.uppercase?e.toUpperCase():e}},{key:"formatQuerySeparator",value:function(e,E){return this.trimTrailingWhitespace(E)+e.value+"\n"}},{key:"addNewline",value:function(e){return T()(e)+"\n"+this.indentation.getIndent()}},{key:"trimTrailingWhitespace",value:function(e){return this.previousNonWhitespaceToken().type===R.LINE_COMMENT?T()(e)+"\n":T()(e)}},{key:"previousNonWhitespaceToken",value:function(){for(var e=1;this.previousToken(e).type===R.WHITESPACE;)e++;return this.previousToken(e)}},{key:"previousToken",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.tokens[this.index-e]||{}}}])&&L(E.prototype,t),n&&L(E,n),e}(),f=t(30),l=t.n(f),p=t(5),P=t.n(p);function D(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var U=function(){function e(E){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.WHITESPACE_REGEX=/^(\s+)/,this.NUMBER_REGEX=/^((-\s*)?[0-9]+(\.[0-9]+)?|0x[0-9a-fA-F]+|0b[01]+)\b/,this.OPERATOR_REGEX=/^(!=|<>|==|<=|>=|!<|!>|\|\||::|->>|->|~~\*|~~|!~~\*|!~~|~\*|!~\*|!~|.)/,this.BLOCK_COMMENT_REGEX=/^(\/\*[^]*?(?:\*\/|$))/,this.LINE_COMMENT_REGEX=this.createLineCommentRegex(E.lineCommentTypes),this.RESERVED_TOPLEVEL_REGEX=this.createReservedWordRegex(E.reservedToplevelWords),this.RESERVED_NEWLINE_REGEX=this.createReservedWordRegex(E.reservedNewlineWords),this.RESERVED_PLAIN_REGEX=this.createReservedWordRegex(E.reservedWords),this.WORD_REGEX=this.createWordRegex(E.specialWordChars),this.STRING_REGEX=this.createStringRegex(E.stringTypes),this.OPEN_PAREN_REGEX=this.createParenRegex(E.openParens),this.CLOSE_PAREN_REGEX=this.createParenRegex(E.closeParens),this.INDEXED_PLACEHOLDER_REGEX=this.createPlaceholderRegex(E.indexedPlaceholderTypes,"[0-9]*"),this.IDENT_NAMED_PLACEHOLDER_REGEX=this.createPlaceholderRegex(E.namedPlaceholderTypes,"[a-zA-Z0-9._$]+"),this.STRING_NAMED_PLACEHOLDER_REGEX=this.createPlaceholderRegex(E.namedPlaceholderTypes,this.createStringPattern(E.stringTypes))}var E,t,n;return E=e,(t=[{key:"createLineCommentRegex",value:function(e){return new RegExp("^((?:".concat(e.map((function(e){return P()(e)})).join("|"),").*?(?:\r\n|\r|\n|$))"))}},{key:"createReservedWordRegex",value:function(e){var E=e.join("|").replace(/ /g,"\\s+");return new RegExp("^(".concat(E,")\\b"),"i")}},{key:"createWordRegex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new RegExp("^([\\p{Alphabetic}\\p{Mark}\\p{Decimal_Number}\\p{Connector_Punctuation}\\p{Join_Control}".concat(e.join(""),"]+)"),"u")}},{key:"createStringRegex",value:function(e){return new RegExp("^("+this.createStringPattern(e)+")")}},{key:"createStringPattern",value:function(e){var E={"``":"((`[^`]*($|`))+)","[]":"((\\[[^\\]]*($|\\]))(\\][^\\]]*($|\\]))*)",'""':'(("[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)',"''":"(('[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)","N''":"((N'[^N'\\\\]*(?:\\\\.[^N'\\\\]*)*('|$))+)"};return e.map((function(e){return E[e]})).join("|")}},{key:"createParenRegex",value:function(e){var E=this;return new RegExp("^("+e.map((function(e){return E.escapeParen(e)})).join("|")+")","i")}},{key:"escapeParen",value:function(e){return 1===e.length?P()(e):"\\b"+e+"\\b"}},{key:"createPlaceholderRegex",value:function(e,E){if(l()(e))return!1;var t=e.map(P.a).join("|");return new RegExp("^((?:".concat(t,")(?:").concat(E,"))"))}},{key:"tokenize",value:function(e){if(!e)return[];for(var E,t=[];e.length;)E=this.getNextToken(e,E),e=e.substring(E.value.length),t.push(E);return t}},{key:"getNextToken",value:function(e,E){return this.getWhitespaceToken(e)||this.getCommentToken(e)||this.getStringToken(e)||this.getOpenParenToken(e)||this.getCloseParenToken(e)||this.getPlaceholderToken(e)||this.getNumberToken(e)||this.getReservedWordToken(e,E)||this.getWordToken(e)||this.getOperatorToken(e)}},{key:"getWhitespaceToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.WHITESPACE,regex:this.WHITESPACE_REGEX})}},{key:"getCommentToken",value:function(e){return this.getLineCommentToken(e)||this.getBlockCommentToken(e)}},{key:"getLineCommentToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.LINE_COMMENT,regex:this.LINE_COMMENT_REGEX})}},{key:"getBlockCommentToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.BLOCK_COMMENT,regex:this.BLOCK_COMMENT_REGEX})}},{key:"getStringToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.STRING,regex:this.STRING_REGEX})}},{key:"getOpenParenToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.OPEN_PAREN,regex:this.OPEN_PAREN_REGEX})}},{key:"getCloseParenToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.CLOSE_PAREN,regex:this.CLOSE_PAREN_REGEX})}},{key:"getPlaceholderToken",value:function(e){return this.getIdentNamedPlaceholderToken(e)||this.getStringNamedPlaceholderToken(e)||this.getIndexedPlaceholderToken(e)}},{key:"getIdentNamedPlaceholderToken",value:function(e){return this.getPlaceholderTokenWithKey({input:e,regex:this.IDENT_NAMED_PLACEHOLDER_REGEX,parseKey:function(e){return e.slice(1)}})}},{key:"getStringNamedPlaceholderToken",value:function(e){var E=this;return this.getPlaceholderTokenWithKey({input:e,regex:this.STRING_NAMED_PLACEHOLDER_REGEX,parseKey:function(e){return E.getEscapedPlaceholderKey({key:e.slice(2,-1),quoteChar:e.slice(-1)})}})}},{key:"getIndexedPlaceholderToken",value:function(e){return this.getPlaceholderTokenWithKey({input:e,regex:this.INDEXED_PLACEHOLDER_REGEX,parseKey:function(e){return e.slice(1)}})}},{key:"getPlaceholderTokenWithKey",value:function(e){var E=e.input,t=e.regex,n=e.parseKey,r=this.getTokenOnFirstMatch({input:E,regex:t,type:R.PLACEHOLDER});return r&&(r.key=n(r.value)),r}},{key:"getEscapedPlaceholderKey",value:function(e){var E=e.key,t=e.quoteChar;return E.replace(new RegExp(P()("\\")+t,"g"),t)}},{key:"getNumberToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.NUMBER,regex:this.NUMBER_REGEX})}},{key:"getOperatorToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.OPERATOR,regex:this.OPERATOR_REGEX})}},{key:"getReservedWordToken",value:function(e,E){if(!E||!E.value||"."!==E.value)return this.getToplevelReservedToken(e)||this.getNewlineReservedToken(e)||this.getPlainReservedToken(e)}},{key:"getToplevelReservedToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.RESERVED_TOPLEVEL,regex:this.RESERVED_TOPLEVEL_REGEX})}},{key:"getNewlineReservedToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.RESERVED_NEWLINE,regex:this.RESERVED_NEWLINE_REGEX})}},{key:"getPlainReservedToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.RESERVED,regex:this.RESERVED_PLAIN_REGEX})}},{key:"getWordToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.WORD,regex:this.WORD_REGEX})}},{key:"getTokenOnFirstMatch",value:function(e){var E=e.input,t=e.type,n=e.regex,r=E.match(n);if(r)return{type:t,value:r[1]}}}])&&D(E.prototype,t),n&&D(E,n),e}();function v(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var M,h=["ABS","ACTIVATE","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","ANY","ARE","ARRAY","AS","ASC","ASENSITIVE","ASSOCIATE","ASUTIME","ASYMMETRIC","AT","ATOMIC","ATTRIBUTES","AUDIT","AUTHORIZATION","AUX","AUXILIARY","AVG","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BUFFERPOOL","BY","CACHE","CALL","CALLED","CAPTURE","CARDINALITY","CASCADED","CASE","CAST","CCSID","CEIL","CEILING","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOB","CLONE","CLOSE","CLUSTER","COALESCE","COLLATE","COLLECT","COLLECTION","COLLID","COLUMN","COMMENT","COMMIT","CONCAT","CONDITION","CONNECT","CONNECTION","CONSTRAINT","CONTAINS","CONTINUE","CONVERT","CORR","CORRESPONDING","COUNT","COUNT_BIG","COVAR_POP","COVAR_SAMP","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DATE","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFINITION","DELETE","DENSERANK","DENSE_RANK","DEREF","DESCRIBE","DESCRIPTOR","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DOUBLE","DROP","DSSIZE","DYNAMIC","EACH","EDITPROC","ELEMENT","ELSE","ELSEIF","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ERASE","ESCAPE","EVERY","EXCEPTION","EXCLUDING","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXP","EXPLAIN","EXTENDED","EXTERNAL","EXTRACT","FALSE","FENCED","FETCH","FIELDPROC","FILE","FILTER","FINAL","FIRST","FLOAT","FLOOR","FOR","FOREIGN","FREE","FULL","FUNCTION","FUSION","GENERAL","GENERATED","GET","GLOBAL","GOTO","GRANT","GRAPHIC","GROUP","GROUPING","HANDLER","HASH","HASHED_VALUE","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IMMEDIATE","IN","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDICATOR","INDICATORS","INF","INFINITY","INHERIT","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTEGRITY","INTERSECTION","INTERVAL","INTO","IS","ISOBID","ISOLATION","ITERATE","JAR","JAVA","KEEP","KEY","LABEL","LANGUAGE","LARGE","LATERAL","LC_CTYPE","LEADING","LEAVE","LEFT","LIKE","LINKTYPE","LN","LOCAL","LOCALDATE","LOCALE","LOCALTIME","LOCALTIMESTAMP","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LONG","LOOP","LOWER","MAINTAINED","MATCH","MATERIALIZED","MAX","MAXVALUE","MEMBER","MERGE","METHOD","MICROSECOND","MICROSECONDS","MIN","MINUTE","MINUTES","MINVALUE","MOD","MODE","MODIFIES","MODULE","MONTH","MONTHS","MULTISET","NAN","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZE","NORMALIZED","NOT","NULL","NULLIF","NULLS","NUMERIC","NUMPARTS","OBID","OCTET_LENGTH","OF","OFFSET","OLD","OLD_TABLE","ON","ONLY","OPEN","OPTIMIZATION","OPTIMIZE","OPTION","ORDER","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","PACKAGE","PADDED","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSWORD","PATH","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","PIECESIZE","PLAN","POSITION","POWER","PRECISION","PREPARE","PREVVAL","PRIMARY","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","RANGE","RANK","READ","READS","REAL","RECOVERY","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROUTINE","ROW","ROWNUMBER","ROWS","ROWSET","ROW_NUMBER","RRN","RUN","SAVEPOINT","SCHEMA","SCOPE","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURITY","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SIGNAL","SIMILAR","SIMPLE","SMALLINT","SNAN","SOME","SOURCE","SPECIFIC","SPECIFICTYPE","SQL","SQLEXCEPTION","SQLID","SQLSTATE","SQLWARNING","SQRT","STACKED","STANDARD","START","STARTING","STATEMENT","STATIC","STATMENT","STAY","STDDEV_POP","STDDEV_SAMP","STOGROUP","STORES","STYLE","SUBMULTISET","SUBSTRING","SUM","SUMMARY","SYMMETRIC","SYNONYM","SYSFUN","SYSIBM","SYSPROC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","TABLESPACE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSACTION","TRANSLATE","TRANSLATION","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TYPE","UESCAPE","UNDO","UNIQUE","UNKNOWN","UNNEST","UNTIL","UPPER","USAGE","USER","USING","VALIDPROC","VALUE","VARCHAR","VARIABLE","VARIANT","VARYING","VAR_POP","VAR_SAMP","VCAT","VERSION","VIEW","VOLATILE","VOLUMES","WHEN","WHENEVER","WHILE","WIDTH_BUCKET","WINDOW","WITH","WITHIN","WITHOUT","WLM","WRITE","XMLELEMENT","XMLEXISTS","XMLNAMESPACES","YEAR","YEARS"],d=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GROUP BY","GO","HAVING","INSERT INTO","INTERSECT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNION ALL","UPDATE","VALUES","WHERE"],y=["AND","CROSS JOIN","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN"],_=function(){function e(E){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.cfg=E}var E,t,n;return E=e,(t=[{key:"format",value:function(e){return M||(M=new U({reservedWords:h,reservedToplevelWords:d,reservedNewlineWords:y,stringTypes:['""',"''","``","[]"],openParens:["("],closeParens:[")"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["#","@"]})),new C(this.cfg,M).format(e)}}])&&v(E.prototype,t),n&&v(E,n),e}();function g(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var G,F=["ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","CONNECT","CONTINUE","CORRELATE","COVER","CREATE","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FIRST","FLATTEN","FOR","FORCE","FROM","FUNCTION","GRANT","GROUP","GSI","HAVING","IF","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LAST","LEFT","LET","LETTING","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MINUS","MISSING","NAMESPACE","NEST","NOT","NULL","NUMBER","OBJECT","OFFSET","ON","OPTION","OR","ORDER","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROCEDURE","PUBLIC","RAW","REALM","REDUCE","RENAME","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","SATISFIES","SCHEMA","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TO","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WITH","WITHIN","WORK","XOR"],k=["DELETE FROM","EXCEPT ALL","EXCEPT","EXPLAIN DELETE FROM","EXPLAIN UPDATE","EXPLAIN UPSERT","FROM","GROUP BY","HAVING","INFER","INSERT INTO","INTERSECT ALL","INTERSECT","LET","LIMIT","MERGE","NEST","ORDER BY","PREPARE","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNION ALL","UNION","UNNEST","UPDATE","UPSERT","USE KEYS","VALUES","WHERE"],B=["AND","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","XOR"],H=function(){function e(E){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.cfg=E}var E,t,n;return E=e,(t=[{key:"format",value:function(e){return G||(G=new U({reservedWords:F,reservedToplevelWords:k,reservedNewlineWords:B,stringTypes:['""',"''","``"],openParens:["(","[","{"],closeParens:[")","]","}"],namedPlaceholderTypes:["$"],lineCommentTypes:["#","--"]})),new C(this.cfg,G).format(e)}}])&&g(E.prototype,t),n&&g(E,n),e}();function b(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var m,W=["A","ACCESSIBLE","AGENT","AGGREGATE","ALL","ALTER","ANY","ARRAY","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BETWEEN","BFILE_BASE","BINARY_INTEGER","BINARY","BLOB_BASE","BLOCK","BODY","BOOLEAN","BOTH","BOUND","BULK","BY","BYTE","C","CALL","CALLING","CASCADE","CASE","CHAR_BASE","CHAR","CHARACTER","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOB_BASE","CLONE","CLOSE","CLUSTER","CLUSTERS","COALESCE","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONTINUE","CONVERT","COUNT","CRASH","CREATE","CREDENTIAL","CURRENT","CURRVAL","CURSOR","CUSTOMDATUM","DANGLING","DATA","DATE_BASE","DATE","DAY","DECIMAL","DEFAULT","DEFINE","DELETE","DESC","DETERMINISTIC","DIRECTORY","DISTINCT","DO","DOUBLE","DROP","DURATION","ELEMENT","ELSIF","EMPTY","ESCAPE","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTENDS","EXTERNAL","EXTRACT","FALSE","FETCH","FINAL","FIRST","FIXED","FLOAT","FOR","FORALL","FORCE","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSTANTIABLE","INT","INTEGER","INTERFACE","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMITED","LOCAL","LOCK","LONG","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUS","MINUTE","MLSLABEL","MOD","MODE","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NATURAL","NATURALN","NCHAR","NEW","NEXTVAL","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","NULLIF","NUMBER_BASE","NUMBER","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","OLD","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","ORACLE","ORADATA","ORDER","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERLAPS","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARENT","PARTITION","PASCAL","PCTFREE","PIPE","PIPELINED","PLS_INTEGER","PLUGGABLE","POSITIVE","POSITIVEN","PRAGMA","PRECISION","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","RAW","READ","REAL","RECORD","REF","REFERENCE","RELEASE","RELIES_ON","REM","REMAINDER","RENAME","RESOURCE","RESULT_CACHE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","ROWID","ROWNUM","ROWTYPE","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SECOND","SEGMENT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SHARE","SHORT","SIZE_T","SIZE","SMALLINT","SOME","SPACE","SPARSE","SQL","SQLCODE","SQLDATA","SQLERRM","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUCCESSFUL","SUM","SYNONYM","SYSDATE","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMESTAMP","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSACTION","TRANSACTIONAL","TRIGGER","TRUE","TRUSTED","TYPE","UB1","UB2","UB4","UID","UNDER","UNIQUE","UNPLUG","UNSIGNED","UNTRUSTED","USE","USER","USING","VALIDATE","VALIST","VALUE","VARCHAR","VARCHAR2","VARIABLE","VARIANCE","VARRAY","VARYING","VIEW","VIEWS","VOID","WHENEVER","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"],x=["ADD","ALTER COLUMN","ALTER TABLE","BEGIN","CONNECT BY","DECLARE","DELETE FROM","DELETE","END","EXCEPT","EXCEPTION","FETCH FIRST","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","INTERSECT","LIMIT","LOOP","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","START WITH","UNION ALL","UNION","UPDATE","VALUES","WHERE"],V=["AND","CROSS APPLY","CROSS JOIN","ELSE","END","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN","XOR"],Y=function(){function e(E){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.cfg=E}var E,t,n;return E=e,(t=[{key:"format",value:function(e){return m||(m=new U({reservedWords:W,reservedToplevelWords:x,reservedNewlineWords:V,stringTypes:['""',"N''","''","``"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["_","$","#",".","@"]})),new C(this.cfg,m).format(e)}}])&&b(E.prototype,t),n&&b(E,n),e}();function X(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var j,w=["ACCESSIBLE","ACTION","AGAINST","AGGREGATE","ALGORITHM","ALL","ALTER","ANALYSE","ANALYZE","AS","ASC","AUTOCOMMIT","AUTO_INCREMENT","BACKUP","BEGIN","BETWEEN","BINLOG","BOTH","CASCADE","CASE","CHANGE","CHANGED","CHARACTER SET","CHARSET","CHECK","CHECKSUM","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPRESSED","CONCURRENT","CONSTRAINT","CONTAINS","CONVERT","CREATE","CROSS","CURRENT_TIMESTAMP","DATABASE","DATABASES","DAY","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DEFAULT","DEFINER","DELAYED","DELETE","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DO","DROP","DUMPFILE","DUPLICATE","DYNAMIC","ELSE","ENCLOSED","END","ENGINE","ENGINES","ENGINE_TYPE","ESCAPE","ESCAPED","EVENTS","EXEC","EXECUTE","EXISTS","EXPLAIN","EXTENDED","FAST","FETCH","FIELDS","FILE","FIRST","FIXED","FLUSH","FOR","FORCE","FOREIGN","FULL","FULLTEXT","FUNCTION","GLOBAL","GRANT","GRANTS","GROUP_CONCAT","HEAP","HIGH_PRIORITY","HOSTS","HOUR","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IFNULL","IGNORE","IN","INDEX","INDEXES","INFILE","INSERT","INSERT_ID","INSERT_METHOD","INTERVAL","INTO","INVOKER","IS","ISOLATION","KEY","KEYS","KILL","LAST_INSERT_ID","LEADING","LEVEL","LIKE","LINEAR","LINES","LOAD","LOCAL","LOCK","LOCKS","LOGS","LOW_PRIORITY","MARIA","MASTER","MASTER_CONNECT_RETRY","MASTER_HOST","MASTER_LOG_FILE","MATCH","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MEDIUM","MERGE","MINUTE","MINUTE_SECOND","MIN_ROWS","MODE","MODIFY","MONTH","MRG_MYISAM","MYISAM","NAMES","NATURAL","NOT","NOW()","NULL","OFFSET","ON DELETE","ON UPDATE","ON","ONLY","OPEN","OPTIMIZE","OPTION","OPTIONALLY","OUTFILE","PACK_KEYS","PAGE","PARTIAL","PARTITION","PARTITIONS","PASSWORD","PRIMARY","PRIVILEGES","PROCEDURE","PROCESS","PROCESSLIST","PURGE","QUICK","RAID0","RAID_CHUNKS","RAID_CHUNKSIZE","RAID_TYPE","RANGE","READ","READ_ONLY","READ_WRITE","REFERENCES","REGEXP","RELOAD","RENAME","REPAIR","REPEATABLE","REPLACE","REPLICATION","RESET","RESTORE","RESTRICT","RETURN","RETURNS","REVOKE","RLIKE","ROLLBACK","ROW","ROWS","ROW_FORMAT","SECOND","SECURITY","SEPARATOR","SERIALIZABLE","SESSION","SHARE","SHOW","SHUTDOWN","SLAVE","SONAME","SOUNDS","SQL","SQL_AUTO_IS_NULL","SQL_BIG_RESULT","SQL_BIG_SELECTS","SQL_BIG_TABLES","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQL_LOG_BIN","SQL_LOG_OFF","SQL_LOG_UPDATE","SQL_LOW_PRIORITY_UPDATES","SQL_MAX_JOIN_SIZE","SQL_NO_CACHE","SQL_QUOTE_SHOW_CREATE","SQL_SAFE_UPDATES","SQL_SELECT_LIMIT","SQL_SLAVE_SKIP_COUNTER","SQL_SMALL_RESULT","SQL_WARNINGS","START","STARTING","STATUS","STOP","STORAGE","STRAIGHT_JOIN","STRING","STRIPED","SUPER","TABLE","TABLES","TEMPORARY","TERMINATED","THEN","TO","TRAILING","TRANSACTIONAL","TRUE","TRUNCATE","TYPE","TYPES","UNCOMMITTED","UNIQUE","UNLOCK","UNSIGNED","USAGE","USE","USING","VARIABLES","VIEW","WHEN","WITH","WORK","WRITE","YEAR_MONTH"],K=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GROUP BY","GO","HAVING","INSERT INTO","INSERT","INTERSECT","LIMIT","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNION ALL","UNION","UPDATE","VALUES","WHERE"],Q=["AND","CROSS APPLY","CROSS JOIN","ELSE","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN","XOR"],J=function(){function e(E){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.cfg=E}var E,t,n;return E=e,(t=[{key:"format",value:function(e){return j||(j=new U({reservedWords:w,reservedToplevelWords:K,reservedNewlineWords:Q,stringTypes:['""',"N''","''","``","[]"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["@",":"],lineCommentTypes:["#","--"]})),new C(this.cfg,j).format(e)}}])&&X(E.prototype,t),n&&X(E,n),e}();E.default={format:function(e,E){switch((E=E||{}).language){case"db2":return new _(E).format(e);case"n1ql":return new H(E).format(e);case"pl/sql":return new Y(E).format(e);case"sql":case void 0:return new J(E).format(e);default:throw Error("Unsupported SQL dialect: ".concat(E.language))}}}}])}));
!function(e,E){"object"==typeof exports&&"object"==typeof module?module.exports=E():"function"==typeof define&&define.amd?define([],E):"object"==typeof exports?exports.sqlFormatter=E():e.sqlFormatter=E()}(window,(function(){return function(e){var E={};function t(n){if(E[n])return E[n].exports;var r=E[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=E,t.d=function(e,E,n){t.o(e,E)||Object.defineProperty(e,E,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,E){if(1&E&&(e=t(e)),8&E)return e;if(4&E&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&E&&"string"!=typeof e)for(var r in e)t.d(n,r,function(E){return e[E]}.bind(null,r));return n},t.n=function(e){var E=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(E,"a",E),E},t.o=function(e,E){return Object.prototype.hasOwnProperty.call(e,E)},t.p="",t(t.s=72)}([function(e,E,t){var n=t(13),r="object"==typeof self&&self&&self.Object===Object&&self,o=n||r||Function("return this")();e.exports=o},function(e,E,t){var n=t(9),r=t(35),o=t(36),T="[object Null]",R="[object Undefined]",i=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?R:T:i&&i in Object(e)?r(e):o(e)}},function(e,E){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,E,t){var n=t(64),r=t(67);e.exports=function(e,E){var t=r(e,E);return n(t)?t:void 0}},function(e,E,t){var n=t(25),r=t(52),o=t(54),T=t(55),R=t(10),i=/\s+$/;e.exports=function(e,E,t){if((e=R(e))&&(t||void 0===E))return e.replace(i,"");if(!e||!(E=n(E)))return e;var N=T(e),u=o(N,T(E))+1;return r(N,0,u).join("")}},function(e,E,t){var n=t(10),r=/[\\^$.*+?()[\]{}|]/g,o=RegExp(r.source);e.exports=function(e){return(e=n(e))&&o.test(e)?e.replace(r,"\\$&"):e}},function(e,E,t){var n=t(12),r=t(14);e.exports=function(e){return null!=e&&r(e.length)&&!n(e)}},function(e,E){e.exports=function(e){var E=typeof e;return null!=e&&("object"==E||"function"==E)}},function(e,E){var t=Array.isArray;e.exports=t},function(e,E,t){var n=t(0).Symbol;e.exports=n},function(e,E,t){var n=t(25);e.exports=function(e){return null==e?"":n(e)}},function(e,E,t){var n=t(31),r=t(32),o=t(33);e.exports=function(e,E,t){return E==E?o(e,E,t):n(e,r,t)}},function(e,E,t){var n=t(1),r=t(7),o="[object AsyncFunction]",T="[object Function]",R="[object GeneratorFunction]",i="[object Proxy]";e.exports=function(e){if(!r(e))return!1;var E=n(e);return E==T||E==R||E==o||E==i}},function(e,E,t){(function(E){var t="object"==typeof E&&E&&E.Object===Object&&E;e.exports=t}).call(this,t(34))},function(e,E){var t=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=t}},function(e,E,t){var n=t(38);e.exports=function(e){var E=n(e),t=E%1;return E==E?t?E-t:E:0}},function(e,E,t){var n=t(1),r=t(2),o="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||r(e)&&n(e)==o}},function(e,E){e.exports=function(e,E){for(var t=-1,n=null==e?0:e.length,r=Array(n);++t<n;)r[t]=E(e[t],t,e);return r}},function(e,E,t){var n=t(45),r=t(2),o=Object.prototype,T=o.hasOwnProperty,R=o.propertyIsEnumerable,i=n(function(){return arguments}())?n:function(e){return r(e)&&T.call(e,"callee")&&!R.call(e,"callee")};e.exports=i},function(e,E,t){(function(e){var n=t(0),r=t(46),o=E&&!E.nodeType&&E,T=o&&"object"==typeof e&&e&&!e.nodeType&&e,R=T&&T.exports===o?n.Buffer:void 0,i=(R?R.isBuffer:void 0)||r;e.exports=i}).call(this,t(20)(e))},function(e,E){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,E){var t=9007199254740991,n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,E){var r=typeof e;return!!(E=null==E?t:E)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<E}},function(e,E,t){var n=t(47),r=t(48),o=t(49),T=o&&o.isTypedArray,R=T?r(T):n;e.exports=R},function(e,E,t){var n=t(24),r=t(50),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return r(e);var E=[];for(var t in Object(e))o.call(e,t)&&"constructor"!=t&&E.push(t);return E}},function(e,E){var t=Object.prototype;e.exports=function(e){var E=e&&e.constructor;return e===("function"==typeof E&&E.prototype||t)}},function(e,E,t){var n=t(9),r=t(17),o=t(8),T=t(16),R=1/0,i=n?n.prototype:void 0,N=i?i.toString:void 0;e.exports=function e(E){if("string"==typeof E)return E;if(o(E))return r(E,e)+"";if(T(E))return N?N.call(E):"";var t=E+"";return"0"==t&&1/E==-R?"-0":t}},function(e,E){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,E,t){var n=t(11),r=t(6),o=t(37),T=t(15),R=t(40),i=Math.max;e.exports=function(e,E,t,N){e=r(e)?e:R(e),t=t&&!N?T(t):0;var u=e.length;return t<0&&(t=i(u+t,0)),o(e)?t<=u&&e.indexOf(E,t)>-1:!!u&&n(e,E,t)>-1}},function(e,E,t){var n=t(59),r=t(60),o=t(15),T=t(10);e.exports=function(e,E,t){return E=(t?r(e,E,t):void 0===E)?1:o(E),n(T(e),E)}},function(e,E){e.exports=function(e){var E=null==e?0:e.length;return E?e[E-1]:void 0}},function(e,E,t){var n=t(23),r=t(62),o=t(18),T=t(8),R=t(6),i=t(19),N=t(24),u=t(22),A="[object Map]",O="[object Set]",I=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(R(e)&&(T(e)||"string"==typeof e||"function"==typeof e.splice||i(e)||u(e)||o(e)))return!e.length;var E=r(e);if(E==A||E==O)return!e.size;if(N(e))return!n(e).length;for(var t in e)if(I.call(e,t))return!1;return!0}},function(e,E){e.exports=function(e,E,t,n){for(var r=e.length,o=t+(n?1:-1);n?o--:++o<r;)if(E(e[o],o,e))return o;return-1}},function(e,E){e.exports=function(e){return e!=e}},function(e,E){e.exports=function(e,E,t){for(var n=t-1,r=e.length;++n<r;)if(e[n]===E)return n;return-1}},function(e,E){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(e){"object"==typeof window&&(t=window)}e.exports=t},function(e,E,t){var n=t(9),r=Object.prototype,o=r.hasOwnProperty,T=r.toString,R=n?n.toStringTag:void 0;e.exports=function(e){var E=o.call(e,R),t=e[R];try{e[R]=void 0;var n=!0}catch(e){}var r=T.call(e);return n&&(E?e[R]=t:delete e[R]),r}},function(e,E){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},function(e,E,t){var n=t(1),r=t(8),o=t(2),T="[object String]";e.exports=function(e){return"string"==typeof e||!r(e)&&o(e)&&n(e)==T}},function(e,E,t){var n=t(39),r=1/0,o=17976931348623157e292;e.exports=function(e){return e?(e=n(e))===r||e===-r?(e<0?-1:1)*o:e==e?e:0:0===e?e:0}},function(e,E,t){var n=t(7),r=t(16),o=NaN,T=/^\s+|\s+$/g,R=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,N=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return o;if(n(e)){var E="function"==typeof e.valueOf?e.valueOf():e;e=n(E)?E+"":E}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(T,"");var t=i.test(e);return t||N.test(e)?u(e.slice(2),t?2:8):R.test(e)?o:+e}},function(e,E,t){var n=t(41),r=t(42);e.exports=function(e){return null==e?[]:n(e,r(e))}},function(e,E,t){var n=t(17);e.exports=function(e,E){return n(E,(function(E){return e[E]}))}},function(e,E,t){var n=t(43),r=t(23),o=t(6);e.exports=function(e){return o(e)?n(e):r(e)}},function(e,E,t){var n=t(44),r=t(18),o=t(8),T=t(19),R=t(21),i=t(22),N=Object.prototype.hasOwnProperty;e.exports=function(e,E){var t=o(e),u=!t&&r(e),A=!t&&!u&&T(e),O=!t&&!u&&!A&&i(e),I=t||u||A||O,a=I?n(e.length,String):[],S=a.length;for(var c in e)!E&&!N.call(e,c)||I&&("length"==c||A&&("offset"==c||"parent"==c)||O&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||R(c,S))||a.push(c);return a}},function(e,E){e.exports=function(e,E){for(var t=-1,n=Array(e);++t<e;)n[t]=E(t);return n}},function(e,E,t){var n=t(1),r=t(2),o="[object Arguments]";e.exports=function(e){return r(e)&&n(e)==o}},function(e,E){e.exports=function(){return!1}},function(e,E,t){var n=t(1),r=t(14),o=t(2),T={};T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Arguments]"]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object Boolean]"]=T["[object DataView]"]=T["[object Date]"]=T["[object Error]"]=T["[object Function]"]=T["[object Map]"]=T["[object Number]"]=T["[object Object]"]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&r(e.length)&&!!T[n(e)]}},function(e,E){e.exports=function(e){return function(E){return e(E)}}},function(e,E,t){(function(e){var n=t(13),r=E&&!E.nodeType&&E,o=r&&"object"==typeof e&&e&&!e.nodeType&&e,T=o&&o.exports===r&&n.process,R=function(){try{var e=o&&o.require&&o.require("util").types;return e||T&&T.binding&&T.binding("util")}catch(e){}}();e.exports=R}).call(this,t(20)(e))},function(e,E,t){var n=t(51)(Object.keys,Object);e.exports=n},function(e,E){e.exports=function(e,E){return function(t){return e(E(t))}}},function(e,E,t){var n=t(53);e.exports=function(e,E,t){var r=e.length;return t=void 0===t?r:t,!E&&t>=r?e:n(e,E,t)}},function(e,E){e.exports=function(e,E,t){var n=-1,r=e.length;E<0&&(E=-E>r?0:r+E),(t=t>r?r:t)<0&&(t+=r),r=E>t?0:t-E>>>0,E>>>=0;for(var o=Array(r);++n<r;)o[n]=e[n+E];return o}},function(e,E,t){var n=t(11);e.exports=function(e,E){for(var t=e.length;t--&&n(E,e[t],0)>-1;);return t}},function(e,E,t){var n=t(56),r=t(57),o=t(58);e.exports=function(e){return r(e)?o(e):n(e)}},function(e,E){e.exports=function(e){return e.split("")}},function(e,E){var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},function(e,E){var t="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",T="(?:\\ud83c[\\udde6-\\uddff]){2}",R="[\\ud800-\\udbff][\\udc00-\\udfff]",i="(?:"+n+"|"+r+")"+"?",N="[\\ufe0e\\ufe0f]?"+i+("(?:\\u200d(?:"+[o,T,R].join("|")+")[\\ufe0e\\ufe0f]?"+i+")*"),u="(?:"+[o+n+"?",n,T,R,t].join("|")+")",A=RegExp(r+"(?="+r+")|"+u+N,"g");e.exports=function(e){return e.match(A)||[]}},function(e,E){var t=9007199254740991,n=Math.floor;e.exports=function(e,E){var r="";if(!e||E<1||E>t)return r;do{E%2&&(r+=e),(E=n(E/2))&&(e+=e)}while(E);return r}},function(e,E,t){var n=t(61),r=t(6),o=t(21),T=t(7);e.exports=function(e,E,t){if(!T(t))return!1;var R=typeof E;return!!("number"==R?r(t)&&o(E,t.length):"string"==R&&E in t)&&n(t[E],e)}},function(e,E){e.exports=function(e,E){return e===E||e!=e&&E!=E}},function(e,E,t){var n=t(63),r=t(68),o=t(69),T=t(70),R=t(71),i=t(1),N=t(26),u=N(n),A=N(r),O=N(o),I=N(T),a=N(R),S=i;(n&&"[object DataView]"!=S(new n(new ArrayBuffer(1)))||r&&"[object Map]"!=S(new r)||o&&"[object Promise]"!=S(o.resolve())||T&&"[object Set]"!=S(new T)||R&&"[object WeakMap]"!=S(new R))&&(S=function(e){var E=i(e),t="[object Object]"==E?e.constructor:void 0,n=t?N(t):"";if(n)switch(n){case u:return"[object DataView]";case A:return"[object Map]";case O:return"[object Promise]";case I:return"[object Set]";case a:return"[object WeakMap]"}return E}),e.exports=S},function(e,E,t){var n=t(3)(t(0),"DataView");e.exports=n},function(e,E,t){var n=t(12),r=t(65),o=t(7),T=t(26),R=/^\[object .+?Constructor\]$/,i=Function.prototype,N=Object.prototype,u=i.toString,A=N.hasOwnProperty,O=RegExp("^"+u.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||r(e))&&(n(e)?O:R).test(T(e))}},function(e,E,t){var n,r=t(66),o=(n=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},function(e,E,t){var n=t(0)["__core-js_shared__"];e.exports=n},function(e,E){e.exports=function(e,E){return null==e?void 0:e[E]}},function(e,E,t){var n=t(3)(t(0),"Map");e.exports=n},function(e,E,t){var n=t(3)(t(0),"Promise");e.exports=n},function(e,E,t){var n=t(3)(t(0),"Set");e.exports=n},function(e,E,t){var n=t(3)(t(0),"WeakMap");e.exports=n},function(e,E,t){"use strict";t.r(E);var n=t(27),r=t.n(n),o=t(4),T=t.n(o),R={WHITESPACE:"whitespace",WORD:"word",STRING:"string",RESERVED:"reserved",RESERVED_TOPLEVEL:"reserved-toplevel",RESERVED_NEWLINE:"reserved-newline",OPERATOR:"operator",OPEN_PAREN:"open-paren",CLOSE_PAREN:"close-paren",LINE_COMMENT:"line-comment",BLOCK_COMMENT:"block-comment",NUMBER:"number",PLACEHOLDER:"placeholder"},i=t(28),N=t.n(i),u=t(29),A=t.n(u);function O(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var I=function(){function e(E){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.indent=E||" ",this.indentTypes=[]}var E,t,n;return E=e,(t=[{key:"getIndent",value:function(){return N()(this.indent,this.indentTypes.length)}},{key:"increaseToplevel",value:function(){this.indentTypes.push("top-level")}},{key:"increaseBlockLevel",value:function(){this.indentTypes.push("block-level")}},{key:"decreaseTopLevel",value:function(){"top-level"===A()(this.indentTypes)&&this.indentTypes.pop()}},{key:"decreaseBlockLevel",value:function(){for(;this.indentTypes.length>0&&"top-level"===this.indentTypes.pop(););}}])&&O(E.prototype,t),n&&O(E,n),e}();function a(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var S=function(){function e(){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.level=0}var E,t,n;return E=e,(t=[{key:"beginIfPossible",value:function(e,E){0===this.level&&this.isInlineBlock(e,E)?this.level=1:this.level>0?this.level++:this.level=0}},{key:"end",value:function(){this.level--}},{key:"isActive",value:function(){return this.level>0}},{key:"isInlineBlock",value:function(e,E){for(var t=0,n=0,r=E;r<e.length;r++){var o=e[r];if((t+=o.value.length)>50)return!1;if(o.type===R.OPEN_PAREN)n++;else if(o.type===R.CLOSE_PAREN&&0==--n)return!0;if(this.isForbiddenToken(o))return!1}return!1}},{key:"isForbiddenToken",value:function(e){var E=e.type,t=e.value;return E===R.RESERVED_TOPLEVEL||E===R.RESERVED_NEWLINE||E===R.COMMENT||E===R.BLOCK_COMMENT||";"===t}}])&&a(E.prototype,t),n&&a(E,n),e}();function c(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var L=function(){function e(E){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.params=E,this.index=0}var E,t,n;return E=e,(t=[{key:"get",value:function(e){var E=e.key,t=e.value;return this.params?E?this.params[E]:this.params[this.index++]:t}}])&&c(E.prototype,t),n&&c(E,n),e}();function s(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var C=function(){function e(E,t){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.cfg=E||{},this.indentation=new I(this.cfg.indent),this.inlineBlock=new S,this.params=new L(this.cfg.params),this.tokenizer=t,this.previousReservedWord={},this.tokens=[],this.index=0}var E,t,n;return E=e,(t=[{key:"format",value:function(e){return this.tokens=this.tokenizer.tokenize(e),this.getFormattedQueryFromTokens().trim()}},{key:"getFormattedQueryFromTokens",value:function(){var e=this,E="";return this.tokens.forEach((function(t,n){e.index=n,t.type===R.WHITESPACE||(t.type===R.LINE_COMMENT?E=e.formatLineComment(t,E):t.type===R.BLOCK_COMMENT?E=e.formatBlockComment(t,E):t.type===R.RESERVED_TOPLEVEL?(E=e.formatToplevelReservedWord(t,E),e.previousReservedWord=t):t.type===R.RESERVED_NEWLINE?(E=e.formatNewlineReservedWord(t,E),e.previousReservedWord=t):t.type===R.RESERVED?(E=e.formatWithSpaces(t,E),e.previousReservedWord=t):E=t.type===R.OPEN_PAREN?e.formatOpeningParentheses(t,E):t.type===R.CLOSE_PAREN?e.formatClosingParentheses(t,E):t.type===R.PLACEHOLDER?e.formatPlaceholder(t,E):","===t.value?e.formatComma(t,E):":"===t.value?e.formatWithSpaceAfter(t,E):"."===t.value?e.formatWithoutSpaces(t,E):";"===t.value?e.formatQuerySeparator(t,E):e.formatWithSpaces(t,E))})),E}},{key:"formatLineComment",value:function(e,E){return this.addNewline(E+e.value)}},{key:"formatBlockComment",value:function(e,E){return this.addNewline(this.addNewline(E)+this.indentComment(e.value))}},{key:"indentComment",value:function(e){return e.replace(/\n/g,"\n"+this.indentation.getIndent())}},{key:"formatToplevelReservedWord",value:function(e,E){return this.indentation.decreaseTopLevel(),E=this.addNewline(E),this.indentation.increaseToplevel(),E+=this.equalizeWhitespace(this.formatReservedWord(e.value)),this.addNewline(E)}},{key:"formatNewlineReservedWord",value:function(e,E){return this.addNewline(E)+this.equalizeWhitespace(this.formatReservedWord(e.value))+" "}},{key:"equalizeWhitespace",value:function(e){return e.replace(/[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+/g," ")}},{key:"formatOpeningParentheses",value:function(e,E){var t=[R.WHITESPACE,R.OPEN_PAREN,R.LINE_COMMENT];return r()(t,this.previousToken().type)||(E=T()(E)),E+=e.value,this.inlineBlock.beginIfPossible(this.tokens,this.index),this.inlineBlock.isActive()||(this.indentation.increaseBlockLevel(),E=this.addNewline(E)),E}},{key:"formatClosingParentheses",value:function(e,E){return this.inlineBlock.isActive()?(this.inlineBlock.end(),this.formatWithSpaceAfter(e,E)):(this.indentation.decreaseBlockLevel(),this.formatWithSpaces(e,this.addNewline(E)))}},{key:"formatPlaceholder",value:function(e,E){return E+this.params.get(e)+" "}},{key:"formatComma",value:function(e,E){return E=this.trimTrailingWhitespace(E)+e.value+" ",this.inlineBlock.isActive()?E:/^LIMIT$/i.test(this.previousReservedWord.value)?E:this.addNewline(E)}},{key:"formatWithSpaceAfter",value:function(e,E){return this.trimTrailingWhitespace(E)+e.value+" "}},{key:"formatWithoutSpaces",value:function(e,E){return this.trimTrailingWhitespace(E)+e.value}},{key:"formatWithSpaces",value:function(e,E){return E+("reserved"===e.type?this.formatReservedWord(e.value):e.value)+" "}},{key:"formatReservedWord",value:function(e){return this.cfg.uppercase?e.toUpperCase():e}},{key:"formatQuerySeparator",value:function(e,E){return this.trimTrailingWhitespace(E)+e.value+"\n"}},{key:"addNewline",value:function(e){return T()(e)+"\n"+this.indentation.getIndent()}},{key:"trimTrailingWhitespace",value:function(e){return this.previousNonWhitespaceToken().type===R.LINE_COMMENT?T()(e)+"\n":T()(e)}},{key:"previousNonWhitespaceToken",value:function(){for(var e=1;this.previousToken(e).type===R.WHITESPACE;)e++;return this.previousToken(e)}},{key:"previousToken",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.tokens[this.index-e]||{}}}])&&s(E.prototype,t),n&&s(E,n),e}(),f=t(30),l=t.n(f),p=t(5),D=t.n(p);function P(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var U=function(){function e(E){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.WHITESPACE_REGEX=/^([\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+)/,this.NUMBER_REGEX=/^((\x2D[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)?[0-9]+(\.[0-9]+)?|0x[0-9A-Fa-f]+|0b[01]+)\b/,this.OPERATOR_REGEX=/^(!=|<>|==|<=|>=|!<|!>|\|\||::|\x2D>>|\x2D>|~~\*|~~|!~~\*|!~~|~\*|!~\*|!~|(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/,this.BLOCK_COMMENT_REGEX=/^(\/\*(?:[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?(?:\*\/|$))/,this.LINE_COMMENT_REGEX=this.createLineCommentRegex(E.lineCommentTypes),this.RESERVED_TOPLEVEL_REGEX=this.createReservedWordRegex(E.reservedToplevelWords),this.RESERVED_NEWLINE_REGEX=this.createReservedWordRegex(E.reservedNewlineWords),this.RESERVED_PLAIN_REGEX=this.createReservedWordRegex(E.reservedWords),this.WORD_REGEX=this.createWordRegex(E.specialWordChars),this.STRING_REGEX=this.createStringRegex(E.stringTypes),this.OPEN_PAREN_REGEX=this.createParenRegex(E.openParens),this.CLOSE_PAREN_REGEX=this.createParenRegex(E.closeParens),this.INDEXED_PLACEHOLDER_REGEX=this.createPlaceholderRegex(E.indexedPlaceholderTypes,"[0-9]*"),this.IDENT_NAMED_PLACEHOLDER_REGEX=this.createPlaceholderRegex(E.namedPlaceholderTypes,"[a-zA-Z0-9._$]+"),this.STRING_NAMED_PLACEHOLDER_REGEX=this.createPlaceholderRegex(E.namedPlaceholderTypes,this.createStringPattern(E.stringTypes))}var E,t,n;return E=e,(t=[{key:"createLineCommentRegex",value:function(e){return new RegExp("^((?:".concat(e.map((function(e){return D()(e)})).join("|"),").*?(?:\r\n|\r|\n|$))"),"u")}},{key:"createReservedWordRegex",value:function(e){var E=e.join("|").replace(/ /g,"\\s+");return new RegExp("^(".concat(E,")\\b"),"iu")}},{key:"createWordRegex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new RegExp("^([\\p{Alphabetic}\\p{Mark}\\p{Decimal_Number}\\p{Connector_Punctuation}\\p{Join_Control}".concat(e.join(""),"]+)"),"u")}},{key:"createStringRegex",value:function(e){return new RegExp("^("+this.createStringPattern(e)+")","u")}},{key:"createStringPattern",value:function(e){var E={"``":"((`[^`]*($|`))+)","[]":"((\\[[^\\]]*($|\\]))(\\][^\\]]*($|\\]))*)",'""':'(("[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)',"''":"(('[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)","N''":"((N'[^N'\\\\]*(?:\\\\.[^N'\\\\]*)*('|$))+)"};return e.map((function(e){return E[e]})).join("|")}},{key:"createParenRegex",value:function(e){var E=this;return new RegExp("^("+e.map((function(e){return E.escapeParen(e)})).join("|")+")","iu")}},{key:"escapeParen",value:function(e){return 1===e.length?D()(e):"\\b"+e+"\\b"}},{key:"createPlaceholderRegex",value:function(e,E){if(l()(e))return!1;var t=e.map(D.a).join("|");return new RegExp("^((?:".concat(t,")(?:").concat(E,"))"),"u")}},{key:"tokenize",value:function(e){if(!e)return[];for(var E,t=[];e.length;)E=this.getNextToken(e,E),e=e.substring(E.value.length),t.push(E);return t}},{key:"getNextToken",value:function(e,E){return this.getWhitespaceToken(e)||this.getCommentToken(e)||this.getStringToken(e)||this.getOpenParenToken(e)||this.getCloseParenToken(e)||this.getPlaceholderToken(e)||this.getNumberToken(e)||this.getReservedWordToken(e,E)||this.getWordToken(e)||this.getOperatorToken(e)}},{key:"getWhitespaceToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.WHITESPACE,regex:this.WHITESPACE_REGEX})}},{key:"getCommentToken",value:function(e){return this.getLineCommentToken(e)||this.getBlockCommentToken(e)}},{key:"getLineCommentToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.LINE_COMMENT,regex:this.LINE_COMMENT_REGEX})}},{key:"getBlockCommentToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.BLOCK_COMMENT,regex:this.BLOCK_COMMENT_REGEX})}},{key:"getStringToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.STRING,regex:this.STRING_REGEX})}},{key:"getOpenParenToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.OPEN_PAREN,regex:this.OPEN_PAREN_REGEX})}},{key:"getCloseParenToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.CLOSE_PAREN,regex:this.CLOSE_PAREN_REGEX})}},{key:"getPlaceholderToken",value:function(e){return this.getIdentNamedPlaceholderToken(e)||this.getStringNamedPlaceholderToken(e)||this.getIndexedPlaceholderToken(e)}},{key:"getIdentNamedPlaceholderToken",value:function(e){return this.getPlaceholderTokenWithKey({input:e,regex:this.IDENT_NAMED_PLACEHOLDER_REGEX,parseKey:function(e){return e.slice(1)}})}},{key:"getStringNamedPlaceholderToken",value:function(e){var E=this;return this.getPlaceholderTokenWithKey({input:e,regex:this.STRING_NAMED_PLACEHOLDER_REGEX,parseKey:function(e){return E.getEscapedPlaceholderKey({key:e.slice(2,-1),quoteChar:e.slice(-1)})}})}},{key:"getIndexedPlaceholderToken",value:function(e){return this.getPlaceholderTokenWithKey({input:e,regex:this.INDEXED_PLACEHOLDER_REGEX,parseKey:function(e){return e.slice(1)}})}},{key:"getPlaceholderTokenWithKey",value:function(e){var E=e.input,t=e.regex,n=e.parseKey,r=this.getTokenOnFirstMatch({input:E,regex:t,type:R.PLACEHOLDER});return r&&(r.key=n(r.value)),r}},{key:"getEscapedPlaceholderKey",value:function(e){var E=e.key,t=e.quoteChar;return E.replace(new RegExp(D()("\\"+t),"gu"),t)}},{key:"getNumberToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.NUMBER,regex:this.NUMBER_REGEX})}},{key:"getOperatorToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.OPERATOR,regex:this.OPERATOR_REGEX})}},{key:"getReservedWordToken",value:function(e,E){if(!E||!E.value||"."!==E.value)return this.getToplevelReservedToken(e)||this.getNewlineReservedToken(e)||this.getPlainReservedToken(e)}},{key:"getToplevelReservedToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.RESERVED_TOPLEVEL,regex:this.RESERVED_TOPLEVEL_REGEX})}},{key:"getNewlineReservedToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.RESERVED_NEWLINE,regex:this.RESERVED_NEWLINE_REGEX})}},{key:"getPlainReservedToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.RESERVED,regex:this.RESERVED_PLAIN_REGEX})}},{key:"getWordToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:R.WORD,regex:this.WORD_REGEX})}},{key:"getTokenOnFirstMatch",value:function(e){var E=e.input,t=e.type,n=e.regex,r=E.match(n);if(r)return{type:t,value:r[1]}}}])&&P(E.prototype,t),n&&P(E,n),e}();function v(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var M,h=["ABS","ACTIVATE","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","ANY","ARE","ARRAY","AS","ASC","ASENSITIVE","ASSOCIATE","ASUTIME","ASYMMETRIC","AT","ATOMIC","ATTRIBUTES","AUDIT","AUTHORIZATION","AUX","AUXILIARY","AVG","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BUFFERPOOL","BY","CACHE","CALL","CALLED","CAPTURE","CARDINALITY","CASCADED","CASE","CAST","CCSID","CEIL","CEILING","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOB","CLONE","CLOSE","CLUSTER","COALESCE","COLLATE","COLLECT","COLLECTION","COLLID","COLUMN","COMMENT","COMMIT","CONCAT","CONDITION","CONNECT","CONNECTION","CONSTRAINT","CONTAINS","CONTINUE","CONVERT","CORR","CORRESPONDING","COUNT","COUNT_BIG","COVAR_POP","COVAR_SAMP","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DATE","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFINITION","DELETE","DENSERANK","DENSE_RANK","DEREF","DESCRIBE","DESCRIPTOR","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DOUBLE","DROP","DSSIZE","DYNAMIC","EACH","EDITPROC","ELEMENT","ELSE","ELSEIF","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ERASE","ESCAPE","EVERY","EXCEPTION","EXCLUDING","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXP","EXPLAIN","EXTENDED","EXTERNAL","EXTRACT","FALSE","FENCED","FETCH","FIELDPROC","FILE","FILTER","FINAL","FIRST","FLOAT","FLOOR","FOR","FOREIGN","FREE","FULL","FUNCTION","FUSION","GENERAL","GENERATED","GET","GLOBAL","GOTO","GRANT","GRAPHIC","GROUP","GROUPING","HANDLER","HASH","HASHED_VALUE","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IMMEDIATE","IN","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDICATOR","INDICATORS","INF","INFINITY","INHERIT","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTEGRITY","INTERSECTION","INTERVAL","INTO","IS","ISOBID","ISOLATION","ITERATE","JAR","JAVA","KEEP","KEY","LABEL","LANGUAGE","LARGE","LATERAL","LC_CTYPE","LEADING","LEAVE","LEFT","LIKE","LINKTYPE","LN","LOCAL","LOCALDATE","LOCALE","LOCALTIME","LOCALTIMESTAMP","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LONG","LOOP","LOWER","MAINTAINED","MATCH","MATERIALIZED","MAX","MAXVALUE","MEMBER","MERGE","METHOD","MICROSECOND","MICROSECONDS","MIN","MINUTE","MINUTES","MINVALUE","MOD","MODE","MODIFIES","MODULE","MONTH","MONTHS","MULTISET","NAN","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZE","NORMALIZED","NOT","NULL","NULLIF","NULLS","NUMERIC","NUMPARTS","OBID","OCTET_LENGTH","OF","OFFSET","OLD","OLD_TABLE","ON","ONLY","OPEN","OPTIMIZATION","OPTIMIZE","OPTION","ORDER","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","PACKAGE","PADDED","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSWORD","PATH","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","PIECESIZE","PLAN","POSITION","POWER","PRECISION","PREPARE","PREVVAL","PRIMARY","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","RANGE","RANK","READ","READS","REAL","RECOVERY","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROUTINE","ROW","ROWNUMBER","ROWS","ROWSET","ROW_NUMBER","RRN","RUN","SAVEPOINT","SCHEMA","SCOPE","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURITY","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SIGNAL","SIMILAR","SIMPLE","SMALLINT","SNAN","SOME","SOURCE","SPECIFIC","SPECIFICTYPE","SQL","SQLEXCEPTION","SQLID","SQLSTATE","SQLWARNING","SQRT","STACKED","STANDARD","START","STARTING","STATEMENT","STATIC","STATMENT","STAY","STDDEV_POP","STDDEV_SAMP","STOGROUP","STORES","STYLE","SUBMULTISET","SUBSTRING","SUM","SUMMARY","SYMMETRIC","SYNONYM","SYSFUN","SYSIBM","SYSPROC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","TABLESPACE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSACTION","TRANSLATE","TRANSLATION","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TYPE","UESCAPE","UNDO","UNIQUE","UNKNOWN","UNNEST","UNTIL","UPPER","USAGE","USER","USING","VALIDPROC","VALUE","VARCHAR","VARIABLE","VARIANT","VARYING","VAR_POP","VAR_SAMP","VCAT","VERSION","VIEW","VOLATILE","VOLUMES","WHEN","WHENEVER","WHILE","WIDTH_BUCKET","WINDOW","WITH","WITHIN","WITHOUT","WLM","WRITE","XMLELEMENT","XMLEXISTS","XMLNAMESPACES","YEAR","YEARS"],d=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GROUP BY","GO","HAVING","INSERT INTO","INTERSECT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNION ALL","UPDATE","VALUES","WHERE"],y=["AND","CROSS JOIN","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN"],_=function(){function e(E){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.cfg=E}var E,t,n;return E=e,(t=[{key:"format",value:function(e){return M||(M=new U({reservedWords:h,reservedToplevelWords:d,reservedNewlineWords:y,stringTypes:['""',"''","``","[]"],openParens:["("],closeParens:[")"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["#","@"]})),new C(this.cfg,M).format(e)}}])&&v(E.prototype,t),n&&v(E,n),e}();function F(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g,G=["ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","CONNECT","CONTINUE","CORRELATE","COVER","CREATE","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FIRST","FLATTEN","FOR","FORCE","FROM","FUNCTION","GRANT","GROUP","GSI","HAVING","IF","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LAST","LEFT","LET","LETTING","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MINUS","MISSING","NAMESPACE","NEST","NOT","NULL","NUMBER","OBJECT","OFFSET","ON","OPTION","OR","ORDER","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROCEDURE","PUBLIC","RAW","REALM","REDUCE","RENAME","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","SATISFIES","SCHEMA","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TO","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WITH","WITHIN","WORK","XOR"],B=["DELETE FROM","EXCEPT ALL","EXCEPT","EXPLAIN DELETE FROM","EXPLAIN UPDATE","EXPLAIN UPSERT","FROM","GROUP BY","HAVING","INFER","INSERT INTO","INTERSECT ALL","INTERSECT","LET","LIMIT","MERGE","NEST","ORDER BY","PREPARE","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNION ALL","UNION","UNNEST","UPDATE","UPSERT","USE KEYS","VALUES","WHERE"],k=["AND","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","XOR"],H=function(){function e(E){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.cfg=E}var E,t,n;return E=e,(t=[{key:"format",value:function(e){return g||(g=new U({reservedWords:G,reservedToplevelWords:B,reservedNewlineWords:k,stringTypes:['""',"''","``"],openParens:["(","[","{"],closeParens:[")","]","}"],namedPlaceholderTypes:["$"],lineCommentTypes:["#","--"]})),new C(this.cfg,g).format(e)}}])&&F(E.prototype,t),n&&F(E,n),e}();function b(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var m,W=["A","ACCESSIBLE","AGENT","AGGREGATE","ALL","ALTER","ANY","ARRAY","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BETWEEN","BFILE_BASE","BINARY_INTEGER","BINARY","BLOB_BASE","BLOCK","BODY","BOOLEAN","BOTH","BOUND","BULK","BY","BYTE","C","CALL","CALLING","CASCADE","CASE","CHAR_BASE","CHAR","CHARACTER","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOB_BASE","CLONE","CLOSE","CLUSTER","CLUSTERS","COALESCE","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONTINUE","CONVERT","COUNT","CRASH","CREATE","CREDENTIAL","CURRENT","CURRVAL","CURSOR","CUSTOMDATUM","DANGLING","DATA","DATE_BASE","DATE","DAY","DECIMAL","DEFAULT","DEFINE","DELETE","DESC","DETERMINISTIC","DIRECTORY","DISTINCT","DO","DOUBLE","DROP","DURATION","ELEMENT","ELSIF","EMPTY","ESCAPE","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTENDS","EXTERNAL","EXTRACT","FALSE","FETCH","FINAL","FIRST","FIXED","FLOAT","FOR","FORALL","FORCE","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSTANTIABLE","INT","INTEGER","INTERFACE","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMITED","LOCAL","LOCK","LONG","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUS","MINUTE","MLSLABEL","MOD","MODE","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NATURAL","NATURALN","NCHAR","NEW","NEXTVAL","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","NULLIF","NUMBER_BASE","NUMBER","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","OLD","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","ORACLE","ORADATA","ORDER","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERLAPS","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARENT","PARTITION","PASCAL","PCTFREE","PIPE","PIPELINED","PLS_INTEGER","PLUGGABLE","POSITIVE","POSITIVEN","PRAGMA","PRECISION","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","RAW","READ","REAL","RECORD","REF","REFERENCE","RELEASE","RELIES_ON","REM","REMAINDER","RENAME","RESOURCE","RESULT_CACHE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","ROWID","ROWNUM","ROWTYPE","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SECOND","SEGMENT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SHARE","SHORT","SIZE_T","SIZE","SMALLINT","SOME","SPACE","SPARSE","SQL","SQLCODE","SQLDATA","SQLERRM","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUCCESSFUL","SUM","SYNONYM","SYSDATE","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMESTAMP","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSACTION","TRANSACTIONAL","TRIGGER","TRUE","TRUSTED","TYPE","UB1","UB2","UB4","UID","UNDER","UNIQUE","UNPLUG","UNSIGNED","UNTRUSTED","USE","USER","USING","VALIDATE","VALIST","VALUE","VARCHAR","VARCHAR2","VARIABLE","VARIANCE","VARRAY","VARYING","VIEW","VIEWS","VOID","WHENEVER","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"],x=["ADD","ALTER COLUMN","ALTER TABLE","BEGIN","CONNECT BY","DECLARE","DELETE FROM","DELETE","END","EXCEPT","EXCEPTION","FETCH FIRST","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","INTERSECT","LIMIT","LOOP","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","START WITH","UNION ALL","UNION","UPDATE","VALUES","WHERE"],V=["AND","CROSS APPLY","CROSS JOIN","ELSE","END","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN","XOR"],Y=function(){function e(E){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.cfg=E}var E,t,n;return E=e,(t=[{key:"format",value:function(e){return m||(m=new U({reservedWords:W,reservedToplevelWords:x,reservedNewlineWords:V,stringTypes:['""',"N''","''","``"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["_","$","#",".","@"]})),new C(this.cfg,m).format(e)}}])&&b(E.prototype,t),n&&b(E,n),e}();function X(e,E){for(var t=0;t<E.length;t++){var n=E[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var j,w=["ACCESSIBLE","ACTION","AGAINST","AGGREGATE","ALGORITHM","ALL","ALTER","ANALYSE","ANALYZE","AS","ASC","AUTOCOMMIT","AUTO_INCREMENT","BACKUP","BEGIN","BETWEEN","BINLOG","BOTH","CASCADE","CASE","CHANGE","CHANGED","CHARACTER SET","CHARSET","CHECK","CHECKSUM","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPRESSED","CONCURRENT","CONSTRAINT","CONTAINS","CONVERT","CREATE","CROSS","CURRENT_TIMESTAMP","DATABASE","DATABASES","DAY","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DEFAULT","DEFINER","DELAYED","DELETE","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DO","DROP","DUMPFILE","DUPLICATE","DYNAMIC","ELSE","ENCLOSED","END","ENGINE","ENGINES","ENGINE_TYPE","ESCAPE","ESCAPED","EVENTS","EXEC","EXECUTE","EXISTS","EXPLAIN","EXTENDED","FAST","FETCH","FIELDS","FILE","FIRST","FIXED","FLUSH","FOR","FORCE","FOREIGN","FULL","FULLTEXT","FUNCTION","GLOBAL","GRANT","GRANTS","GROUP_CONCAT","HEAP","HIGH_PRIORITY","HOSTS","HOUR","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IFNULL","IGNORE","IN","INDEX","INDEXES","INFILE","INSERT","INSERT_ID","INSERT_METHOD","INTERVAL","INTO","INVOKER","IS","ISOLATION","KEY","KEYS","KILL","LAST_INSERT_ID","LEADING","LEVEL","LIKE","LINEAR","LINES","LOAD","LOCAL","LOCK","LOCKS","LOGS","LOW_PRIORITY","MARIA","MASTER","MASTER_CONNECT_RETRY","MASTER_HOST","MASTER_LOG_FILE","MATCH","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MEDIUM","MERGE","MINUTE","MINUTE_SECOND","MIN_ROWS","MODE","MODIFY","MONTH","MRG_MYISAM","MYISAM","NAMES","NATURAL","NOT","NOW()","NULL","OFFSET","ON DELETE","ON UPDATE","ON","ONLY","OPEN","OPTIMIZE","OPTION","OPTIONALLY","OUTFILE","PACK_KEYS","PAGE","PARTIAL","PARTITION","PARTITIONS","PASSWORD","PRIMARY","PRIVILEGES","PROCEDURE","PROCESS","PROCESSLIST","PURGE","QUICK","RAID0","RAID_CHUNKS","RAID_CHUNKSIZE","RAID_TYPE","RANGE","READ","READ_ONLY","READ_WRITE","REFERENCES","REGEXP","RELOAD","RENAME","REPAIR","REPEATABLE","REPLACE","REPLICATION","RESET","RESTORE","RESTRICT","RETURN","RETURNS","REVOKE","RLIKE","ROLLBACK","ROW","ROWS","ROW_FORMAT","SECOND","SECURITY","SEPARATOR","SERIALIZABLE","SESSION","SHARE","SHOW","SHUTDOWN","SLAVE","SONAME","SOUNDS","SQL","SQL_AUTO_IS_NULL","SQL_BIG_RESULT","SQL_BIG_SELECTS","SQL_BIG_TABLES","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQL_LOG_BIN","SQL_LOG_OFF","SQL_LOG_UPDATE","SQL_LOW_PRIORITY_UPDATES","SQL_MAX_JOIN_SIZE","SQL_NO_CACHE","SQL_QUOTE_SHOW_CREATE","SQL_SAFE_UPDATES","SQL_SELECT_LIMIT","SQL_SLAVE_SKIP_COUNTER","SQL_SMALL_RESULT","SQL_WARNINGS","START","STARTING","STATUS","STOP","STORAGE","STRAIGHT_JOIN","STRING","STRIPED","SUPER","TABLE","TABLES","TEMPORARY","TERMINATED","THEN","TO","TRAILING","TRANSACTIONAL","TRUE","TRUNCATE","TYPE","TYPES","UNCOMMITTED","UNIQUE","UNLOCK","UNSIGNED","USAGE","USE","USING","VARIABLES","VIEW","WHEN","WITH","WORK","WRITE","YEAR_MONTH"],K=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GROUP BY","GO","HAVING","INSERT INTO","INSERT","INTERSECT","LIMIT","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNION ALL","UNION","UPDATE","VALUES","WHERE"],Q=["AND","CROSS APPLY","CROSS JOIN","ELSE","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN","XOR"],J=function(){function e(E){!function(e,E){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")}(this,e),this.cfg=E}var E,t,n;return E=e,(t=[{key:"format",value:function(e){return j||(j=new U({reservedWords:w,reservedToplevelWords:K,reservedNewlineWords:Q,stringTypes:['""',"N''","''","``","[]"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["@",":"],lineCommentTypes:["#","--"]})),new C(this.cfg,j).format(e)}}])&&X(E.prototype,t),n&&X(E,n),e}();E.default={format:function(e,E){switch((E=E||{}).language){case"db2":return new _(E).format(e);case"n1ql":return new H(E).format(e);case"pl/sql":return new Y(E).format(e);case"sql":case void 0:return new J(E).format(e);default:throw Error("Unsupported SQL dialect: ".concat(E.language))}}}}])}));

@@ -140,3 +140,3 @@ "use strict";

value: function equalizeWhitespace(string) {
return string.replace(/\s+/g, ' ');
return string.replace(/[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+/g, ' ');
} // Opening parentheses increase the block indent level and start a new line

@@ -143,0 +143,0 @@

@@ -41,6 +41,6 @@ "use strict";

this.WHITESPACE_REGEX = /^(\s+)/;
this.NUMBER_REGEX = /^((-\s*)?[0-9]+(\.[0-9]+)?|0x[0-9a-fA-F]+|0b[01]+)\b/;
this.OPERATOR_REGEX = /^(!=|<>|==|<=|>=|!<|!>|\|\||::|->>|->|~~\*|~~|!~~\*|!~~|~\*|!~\*|!~|.)/;
this.BLOCK_COMMENT_REGEX = /^(\/\*[^]*?(?:\*\/|$))/;
this.WHITESPACE_REGEX = /^([\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+)/;
this.NUMBER_REGEX = /^((\x2D[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)?[0-9]+(\.[0-9]+)?|0x[0-9A-Fa-f]+|0b[01]+)\b/;
this.OPERATOR_REGEX = /^(!=|<>|==|<=|>=|!<|!>|\|\||::|\x2D>>|\x2D>|~~\*|~~|!~~\*|!~~|~\*|!~\*|!~|(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/;
this.BLOCK_COMMENT_REGEX = /^(\/\*(?:[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?(?:\*\/|$))/;
this.LINE_COMMENT_REGEX = this.createLineCommentRegex(cfg.lineCommentTypes);

@@ -64,3 +64,3 @@ this.RESERVED_TOPLEVEL_REGEX = this.createReservedWordRegex(cfg.reservedToplevelWords);

return (0, _escapeRegExp["default"])(c);
}).join('|'), ").*?(?:\r\n|\r|\n|$))"));
}).join('|'), ").*?(?:\r\n|\r|\n|$))"), 'u');
}

@@ -71,3 +71,3 @@ }, {

var reservedWordsPattern = reservedWords.join('|').replace(/ /g, '\\s+');
return new RegExp("^(".concat(reservedWordsPattern, ")\\b"), 'i');
return new RegExp("^(".concat(reservedWordsPattern, ")\\b"), 'iu');
}

@@ -83,3 +83,3 @@ }, {

value: function createStringRegex(stringTypes) {
return new RegExp('^(' + this.createStringPattern(stringTypes) + ')');
return new RegExp('^(' + this.createStringPattern(stringTypes) + ')', 'u');
} // This enables the following string patterns:

@@ -113,3 +113,3 @@ // 1. backtick quoted string using `` to escape

return _this.escapeParen(p);
}).join('|') + ')', 'i');
}).join('|') + ')', 'iu');
}

@@ -135,3 +135,3 @@ }, {

var typesRegex = types.map(_escapeRegExp["default"]).join('|');
return new RegExp("^((?:".concat(typesRegex, ")(?:").concat(pattern, "))"));
return new RegExp("^((?:".concat(typesRegex, ")(?:").concat(pattern, "))"), 'u');
}

@@ -295,3 +295,3 @@ /**

quoteChar = _ref2.quoteChar;
return key.replace(new RegExp((0, _escapeRegExp["default"])('\\') + quoteChar, 'g'), quoteChar);
return key.replace(new RegExp((0, _escapeRegExp["default"])('\\' + quoteChar), 'gu'), quoteChar);
} // Decimal, binary, or hex numbers

@@ -298,0 +298,0 @@

{
"name": "sql-formatter-plus",
"version": "1.1.0",
"version": "1.1.1",
"description": "Formats whitespaces in a SQL query to make it more readable",

@@ -55,3 +55,3 @@ "license": "MIT",

"eslint": "^6.5.1",
"eslint-config-adpyke-es6": "^1.4.12",
"eslint-config-adpyke-es6": "^1.4.13",
"eslint-config-prettier": "^6.4.0",

@@ -58,0 +58,0 @@ "jest": "^24.9.0",

@@ -90,3 +90,3 @@ import includes from 'lodash/includes';

indentComment(comment) {
return comment.replace(/\n/g, '\n' + this.indentation.getIndent());
return comment.replace(/\n/gu, '\n' + this.indentation.getIndent());
}

@@ -113,3 +113,3 @@

equalizeWhitespace(string) {
return string.replace(/\s+/g, ' ');
return string.replace(/\s+/gu, ' ');
}

@@ -161,3 +161,3 @@

return query;
} else if (/^LIMIT$/i.test(this.previousReservedWord.value)) {
} else if (/^LIMIT$/iu.test(this.previousReservedWord.value)) {
return query;

@@ -164,0 +164,0 @@ } else {

@@ -20,7 +20,7 @@ import isEmpty from 'lodash/isEmpty';

constructor(cfg) {
this.WHITESPACE_REGEX = /^(\s+)/;
this.NUMBER_REGEX = /^((-\s*)?[0-9]+(\.[0-9]+)?|0x[0-9a-fA-F]+|0b[01]+)\b/;
this.OPERATOR_REGEX = /^(!=|<>|==|<=|>=|!<|!>|\|\||::|->>|->|~~\*|~~|!~~\*|!~~|~\*|!~\*|!~|.)/;
this.WHITESPACE_REGEX = /^(\s+)/u;
this.NUMBER_REGEX = /^((-\s*)?[0-9]+(\.[0-9]+)?|0x[0-9a-fA-F]+|0b[01]+)\b/u;
this.OPERATOR_REGEX = /^(!=|<>|==|<=|>=|!<|!>|\|\||::|->>|->|~~\*|~~|!~~\*|!~~|~\*|!~\*|!~|.)/u;
this.BLOCK_COMMENT_REGEX = /^(\/\*[^]*?(?:\*\/|$))/;
this.BLOCK_COMMENT_REGEX = /^(\/\*[^]*?(?:\*\/|$))/u;
this.LINE_COMMENT_REGEX = this.createLineCommentRegex(cfg.lineCommentTypes);

@@ -54,3 +54,4 @@

return new RegExp(
`^((?:${lineCommentTypes.map(c => escapeRegExp(c)).join('|')}).*?(?:\r\n|\r|\n|$))`
`^((?:${lineCommentTypes.map(c => escapeRegExp(c)).join('|')}).*?(?:\r\n|\r|\n|$))`,
'u'
);

@@ -60,4 +61,4 @@ }

createReservedWordRegex(reservedWords) {
const reservedWordsPattern = reservedWords.join('|').replace(/ /g, '\\s+');
return new RegExp(`^(${reservedWordsPattern})\\b`, 'i');
const reservedWordsPattern = reservedWords.join('|').replace(/ /gu, '\\s+');
return new RegExp(`^(${reservedWordsPattern})\\b`, 'iu');
}

@@ -75,3 +76,3 @@

createStringRegex(stringTypes) {
return new RegExp('^(' + this.createStringPattern(stringTypes) + ')');
return new RegExp('^(' + this.createStringPattern(stringTypes) + ')', 'u');
}

@@ -98,3 +99,3 @@

createParenRegex(parens) {
return new RegExp('^(' + parens.map(p => this.escapeParen(p)).join('|') + ')', 'i');
return new RegExp('^(' + parens.map(p => this.escapeParen(p)).join('|') + ')', 'iu');
}

@@ -118,3 +119,3 @@

return new RegExp(`^((?:${typesRegex})(?:${pattern}))`);
return new RegExp(`^((?:${typesRegex})(?:${pattern}))`, 'u');
}

@@ -257,3 +258,3 @@

getEscapedPlaceholderKey({ key, quoteChar }) {
return key.replace(new RegExp(escapeRegExp('\\') + quoteChar, 'g'), quoteChar);
return key.replace(new RegExp(escapeRegExp('\\' + quoteChar), 'gu'), quoteChar);
}

@@ -260,0 +261,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc