mybuddy/static/admin/js/vendor/xregexp/xregexp.min.js

18 lines
159 KiB
JavaScript
Raw Permalink Normal View History

!function(u){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=u();else if("function"==typeof define&&define.amd)define([],u);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).XRegExp=u()}}((function(){return function r(u,d,t){function o(c,i){if(!d[c]){if(!u[c]){var l="function"==typeof require&&require;if(!i&&l)return l(c,!0);if(a)return a(c,!0);var D=new Error("Cannot find module '"+c+"'");throw D.code="MODULE_NOT_FOUND",D}var p=d[c]={exports:{}};u[c][0].call(p.exports,(function(d){return o(u[c][1][d]||d)}),p,p.exports,r,u,d,t)}return d[c].exports}for(var a="function"==typeof require&&require,c=0;c<t.length;c++)o(t[c]);return o}({1:[function(u,d,t){"use strict";var a=u("@babel/runtime-corejs3/core-js-stable/instance/slice"),c=u("@babel/runtime-corejs3/core-js-stable/array/from"),i=u("@babel/runtime-corejs3/core-js-stable/symbol"),l=u("@babel/runtime-corejs3/core-js/get-iterator-method"),D=u("@babel/runtime-corejs3/core-js-stable/array/is-array"),p=u("@babel/runtime-corejs3/core-js-stable/object/define-property"),b=u("@babel/runtime-corejs3/helpers/interopRequireDefault");p(t,"__esModule",{value:!0}),t.default=void 0;var y=b(u("@babel/runtime-corejs3/helpers/slicedToArray")),m=b(u("@babel/runtime-corejs3/core-js-stable/instance/for-each")),A=b(u("@babel/runtime-corejs3/core-js-stable/instance/concat")),E=b(u("@babel/runtime-corejs3/core-js-stable/instance/index-of"));function _createForOfIteratorHelper(u,d){var t=void 0!==i&&l(u)||u["@@iterator"];if(!t){if(D(u)||(t=function _unsupportedIterableToArray(u,d){var t;if(!u)return;if("string"==typeof u)return _arrayLikeToArray(u,d);var i=a(t=Object.prototype.toString.call(u)).call(t,8,-1);"Object"===i&&u.constructor&&(i=u.constructor.name);if("Map"===i||"Set"===i)return c(u);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(u,d)}(u))||d&&u&&"number"==typeof u.length){t&&(u=t);var p=0,b=function F(){};return{s:b,n:function n(){return p>=u.length?{done:!0}:{done:!1,value:u[p++]}},e:function e(u){throw u},f:b}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var y,m=!0,A=!1;return{s:function s(){t=t.call(u)},n:function n(){var u=t.next();return m=u.done,u},e:function e(u){A=!0,y=u},f:function f(){try{m||null==t.return||t.return()}finally{if(A)throw y}}}}function _arrayLikeToArray(u,d){(null==d||d>u.length)&&(d=u.length);for(var t=0,a=new Array(d);t<d;t++)a[t]=u[t];return a}
/*!
* XRegExp Unicode Base 5.1.1
* <xregexp.com>
* Steven Levithan (c) 2008-present MIT License
*/t.default=function _default(u){var d={},t={},a=u._dec,c=u._hex,i=u._pad4;function normalize(u){return u.replace(/[- _]+/g,"").toLowerCase()}function charCode(u){var d=/^\\[xu](.+)/.exec(u);return d?a(d[1]):u.charCodeAt("\\"===u[0]?1:0)}function cacheInvertedBmp(t){return d[t]["b!"]||(d[t]["b!"]=function invertBmp(d){var t="",a=-1;return(0,m.default)(u).call(u,d,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,(function(u){var d=charCode(u[1]);d>a+1&&(t+="\\u".concat(i(c(a+1))),d>a+2&&(t+="-\\u".concat(i(c(d-1))))),a=charCode(u[2]||u[1])})),a<65535&&(t+="\\u".concat(i(c(a+1))),a<65534&&(t+="-\\uFFFF")),t}(d[t].bmp))}function cacheAstral(u,t){var a=t?"a!":"a=";return d[u][a]||(d[u][a]=function buildAstral(u,t){var a,c,i=d[u],l="";return i.bmp&&!i.isBmpLast&&(l=(0,A.default)(a="[".concat(i.bmp,"]")).call(a,i.astral?"|":"")),i.astral&&(l+=i.astral),i.isBmpLast&&i.bmp&&(l+=(0,A.default)(c="".concat(i.astral?"|":"","[")).call(c,i.bmp,"]")),t?"(?:(?!".concat(l,")(?:[\ud800-\udbff][\udc00-\udfff]|[\0-￿]))"):"(?:".concat(l,")")}(u,t))}u.addToken(/\\([pP])(?:{(\^?)(?:(\w+)=)?([^}]*)}|([A-Za-z]))/,(function(u,a,c){var i="Unknown Unicode token ",l=(0,y.default)(u,6),D=l[0],p=l[1],b=l[2],m=l[3],C=l[4],g=l[5],h="P"===p||!!b,x=-1!==(0,E.default)(c).call(c,"A"),v=normalize(g||C),B=d[v];if("P"===p&&b)throw new SyntaxError("Invalid double negation "+D);if(!d.hasOwnProperty(v))throw new SyntaxError(i+D);if(m&&(!t[m]||!t[m][v]))throw new SyntaxError(i+D);if(B.inverseOf){var w;if(v=normalize(B.inverseOf),!d.hasOwnProperty(v))throw new ReferenceError((0,A.default)(w="".concat("Unicode token missing data "+D," -> ")).call(w,B.inverseOf));B=d[v],h=!h}if(!B.bmp&&!x)throw new SyntaxError("Astral mode required for Unicode token "+D);if(x){if("class"===a)throw new SyntaxError("Astral mode does not support Unicode tokens within character classes");return cacheAstral(v,h)}return"class"===a?h?cacheInvertedBmp(v):B.bmp:"".concat((h?"[^":"[")+B.bmp,"]")}),{scope:"all",optionalFlags:"A",leadChar:"\\"}),u.addUnicodeData=function(a,c){c&&(t[c]={});var i,l=_createForOfIteratorHelper(a);try{for(l.s();!(i=l.n()).done;){var D=i.value;if(!D.name)throw new Error("Unicode token requires name");if(!(D.inverseOf||D.bmp||D.astral))throw new Error("Unicode token has no character data "+D.name);var p=normalize(D.name);if(d[p]=D,c&&(t[c][p]=!0),D.alias){var b=normalize(D.alias);d[b]=D,c&&(t[c][b]=!0)}}}catch(u){l.e(u)}finally{l.f()}u.cache.flush("patterns")},u._getUnicodeProperty=function(u){var t=normalize(u);return d[t]}},d.exports=t.default},{"@babel/runtime-corejs3/core-js-stable/array/from":5,"@babel/runtime-corejs3/core-js-stable/array/is-array":6,"@babel/runtime-corejs3/core-js-stable/instance/concat":7,"@babel/runtime-corejs3/core-js-stable/instance/for-each":9,"@babel/runtime-corejs3/core-js-stable/instance/index-of":10,"@babel/runtime-corejs3/core-js-stable/instance/slice":11,"@babel/runtime-corejs3/core-js-stable/object/define-property":14,"@babel/runtime-corejs3/core-js-stable/symbol":16,"@babel/runtime-corejs3/core-js/get-iterator-method":19,"@babel/runtime-corejs3/helpers/interopRequireDefault":24,"@babel/runtime-corejs3/helpers/slicedToArray":27}],2:[function(u,d,t){"use strict";var a=u("@babel/runtime-corejs3/core-js-stable/object/define-property"),c=u("@babel/runtime-corejs3/helpers/interopRequireDefault");a(t,"__esModule",{value:!0}),t.default=void 0;var i=c(u("../../tools/output/categories"));
/*!
* XRegExp Unicode Categories 5.1.1
* <xregexp.com>
* Steven Levithan (c) 2010-present MIT License
* Unicode data by Mathias Bynens <mathiasbynens.be>
*/t.default=function _default(u){if(!u.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");u.addUnicodeData(i.default)},d.exports=t.default},{"../../tools/output/categories":222,"@babel/runtime-corejs3/core-js-stable/object/define-property":14,"@babel/runtime-corejs3/helpers/interopRequireDefault":24}],3:[function(u,d,t){"use strict";var a=u("@babel/runtime-corejs3/core-js-stable/object/define-property"),c=u("@babel/runtime-corejs3/helpers/interopRequireDefault");a(t,"__esModule",{value:!0}),t.default=void 0;var i=c(u("./xregexp")),l=c(u("./addons/unicode-base")),D=c(u("./addons/unicode-categories"));(0,l.default)(i.default),(0,D.default)(i.default);var p=i.default;t.default=p,d.exports=t.default},{"./addons/unicode-base":1,"./addons/unicode-categories":2,"./xregexp":4,"@babel/runtime-corejs3/core-js-stable/object/define-property":14,"@babel/runtime-corejs3/helpers/interopRequireDefault":24}],4:[function(u,d,t){"use strict";var a=u("@babel/runtime-corejs3/core-js-stable/instance/slice"),c=u("@babel/runtime-corejs3/core-js-stable/array/from"),i=u("@babel/runtime-corejs3/core-js-stable/symbol"),l=u("@babel/runtime-corejs3/core-js/get-iterator-method"),D=u("@babel/runtime-corejs3/core-js-stable/array/is-array"),p=u("@babel/runtime-corejs3/core-js-stable/object/define-property"),b=u("@babel/runtime-corejs3/helpers/interopRequireDefault");p(t,"__esModule",{value:!0}),t.default=void 0;var y=b(u("@babel/runtime-corejs3/helpers/slicedToArray")),m=b(u("@babel/runtime-corejs3/core-js-stable/instance/flags")),A=b(u("@babel/runtime-corejs3/core-js-stable/instance/sort")),E=b(u("@babel/runtime-corejs3/core-js-stable/instance/slice")),C=b(u("@babel/runtime-corejs3/core-js-stable/parse-int")),g=b(u("@babel/runtime-corejs3/core-js-stable/instance/index-of")),h=b(u("@babel/runtime-corejs3/core-js-stable/instance/for-each")),x=b(u("@babel/runtime-corejs3/core-js-stable/object/create")),v=b(u("@babel/runtime-corejs3/core-js-stable/instance/concat"));function _createForOfIteratorHelper(u,d){var t=void 0!==i&&l(u)||u["@@iterator"];if(!t){if(D(u)||(t=function _unsupportedIterableToArray(u,d){var t;if(!u)return;if("string"==typeof u)return _arrayLikeToArray(u,d);var i=a(t=Object.prototype.toString.call(u)).call(t,8,-1);"Object"===i&&u.constructor&&(i=u.constructor.name);if("Map"===i||"Set"===i)return c(u);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(u,d)}(u))||d&&u&&"number"==typeof u.length){t&&(u=t);var p=0,b=function F(){};return{s:b,n:function n(){return p>=u.length?{done:!0}:{done:!1,value:u[p++]}},e:function e(u){throw u},f:b}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var y,m=!0,A=!1;return{s:function s(){t=t.call(u)},n:function n(){var u=t.next();return m=u.done,u},e:function e(u){A=!0,y=u},f:function f(){try{m||null==t.return||t.return()}finally{if(A)throw y}}}}function _arrayLikeToArray(u,d){(null==d||d>u.length)&&(d=u.length);for(var t=0,a=new Array(d);t<d;t++)a[t]=u[t];return a}
/*!
* XRegExp 5.1.1
* <xregexp.com>
* Steven Levithan (c) 2007-present MIT License
*/var B={astral:!1,namespacing:!0},w={},j={},k={},S=[],O="default",R="class",_={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},T=/\$(?:\{([^\}]+)\}|<([^>]+)>|(\d\d?|[\s\S]?))/g,I=void 0===/()??/.exec("")[1],P=void 0!==(0,m.default)(/x/);function hasNativeFlag(u){var d=!0;try{if(new RegExp("",u),"y"===u){".."===".a".replace(new RegExp("a","gy"),".")&&(d=!1)}}catch(u){d=!1}return d}var X=hasNativeFlag("d"),L=hasNativeFlag("s"),N=hasNativeFlag("u"),M=hasNativeFlag("y"),U={d:X,g:!0,i:!0,m:!0,s:L,u:N,y:M},G=L?/[^dgimsuy]+/g:/[^dgimuy]+/g;function augment(u,d,t,a,c){var i;if(u.xregexp={captureNames:d},c)return u;if(u.__proto__)u.__proto__=XRegExp.prototype;else for(var l in XRegExp.prototype)u[l]=XRegExp.prototype[l];return u.xregexp.source=t,u.xregexp.flags=a?(0,A.default)(i=a.split("")).call(i).join(""):a,u}function clipDuplicates(u){return u.replace(/([\s\S])(?=[\s\S]*\1)/g,"")}function copyRegex(u,d){var t;if(!XRegExp.isRegExp(u))throw new TypeError("Type RegExp expected");var a=u.xregexp||{},c=function getNativeFlags(u){return P?(0,m.default)(u):/\/([a-z]*)$/i.exec(RegExp.prototype.toString.call(u))[1]}(u),i="",l="",D=null,p=null;return(d=d||{}).removeG&&(l+="g"),d.removeY&&(l+="y"),l&&(c=c.replace(new RegExp("[".concat(l,"]+"),"g"),"")),d.addG&&(i+="g"),d.addY&&(i+="y"),i&&(c=clipDuplicates(c+i)),d.isInternalOnly||(void 0!==a.source&&(D=a.source),null!=(0,m.default)(a)&&(p=i?clipDuplicates((0,m.default)(a)+i):(0,m.default)(a))),u=augment(new RegExp(d.source||u.source,c),function hasNamedCapture(u){return!(!u.xregexp||!u.xregexp.captureNames)}(u)?(0,E.default)(t=a.captureNames).call(t,0):null,D,p,d.isInternalOnly)}function dec(u){return(0,C.default)(u,16)}function getContextualTokenSeparator(u,d,t){var a=u.index+u[0].length,c=u.input[u.index-1],i=u.input[a];return/^[()|]$/.test(c)||/^[()|]$/.test(i)||0===u.index||a===u.input.length||/\(\?(?:[:=!]|<[=!])$/.test(u.input.substring(u.index-4,u.index))||function isQuantifierNext(u,d,t){return(-1!==(0,g.default)(t).call(t,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/).test((0,E.default)(u).call(u,d))}(u.input,a,t)?"":"(?:)"}function hex(u){return(0,C.default)(u,10).toString(16)}function isType(u,d){return Object.prototype.toString.call(u)==="[object ".concat(d,"]")}function nullThrows(u){if(null==u)throw new TypeError("Cannot convert null or undefined to object");return u}function pad4(u){for(;u.length<4;)u="0".concat(u);return u}function prepareOptions(u){var d={};return isType(u,"String")?((0,h.default)(XRegExp).call(XRegExp,u,/[^\s,]+/,(function(u){d[u]=!0})),d):u}function registerFlag(u){if(!/^[\w$]$/.test(u))throw new Error("Flag must be a single character A-Za-z0-9_$");U[u]=!0}function runTokens(u,d,t,a,c){for(var i,l,D=S.length,p=u[t],b=null;D--;)if(!((l=S[D]).leadChar&&l.leadChar!==p||l.scope!==a&&"all"!==l.scope||l.flag&&-1===(0,g.default)(d).call(d,l.flag))&&(i=XRegExp.exec(u,l.regex,t,"sticky"))){b={matchLength:i[0].length,output:l.handler.call(c,i,a,d),reparse:l.reparse};break}return b}function setAstral(u){B.astral=u}function setNamespacing(u){B.namespacing=u}function XRegExp(u,d){if(XRegExp.isRegExp(u)){if(void 0!==d)throw new TypeError("Cannot supply flags when copying a RegExp");return copyRegex(u)}if(u=void 0===u?"":String(u),d=void 0===d?"":String(d),XRegExp.isInstalled("astral")&&-1===(0,g.default)(d).call(d,"A")&&(d+="A"),k[u]||(k[u]={}),!k[u][d]){for(var t,a={hasNamedCapture:!1,captureNames:[]},c=O,i="",l=0,D=function prepareFlags(u,d){if(clipDuplicates(d)!==d)throw new SyntaxError("Invalid duplicate regex flag ".concat(d));u=u.replace(/^\(\?([\w$]+)\)/,(function(u,t){if(/[dgy]/.test(t))throw new SyntaxError("Cannot use flags dgy in mode modifier ".concat(u));return d=clipDuplicates(d+t),""}));var t,a=_createForOfIteratorHelper(d);try{for(a.s();!(t=a.n())