PromoCursed/node_modules/.cache/babel-loader/b870b9dd5673c4b02a7874498f90278c9610300d12b114a7d391b86088fb8390.json
2024-08-20 23:25:37 +04:00

1 line
16 KiB
JSON

{"ast":null,"code":"import { from, trim, charat, strlen, substr, append, assign } from './Utility.js';\nexport var line = 1;\nexport var column = 1;\nexport var length = 0;\nexport var position = 0;\nexport var character = 0;\nexport var characters = '';\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {object[]} siblings\n * @param {number} length\n */\nexport function node(value, root, parent, type, props, children, length, siblings) {\n return {\n value: value,\n root: root,\n parent: parent,\n type: type,\n props: props,\n children: children,\n line: line,\n column: column,\n length: length,\n return: '',\n siblings: siblings\n };\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy(root, props) {\n return assign(node('', null, null, '', null, null, 0, root.siblings), root, {\n length: -root.length\n }, props);\n}\n\n/**\n * @param {object} root\n */\nexport function lift(root) {\n while (root.root) root = copy(root.root, {\n children: [root]\n });\n append(root, root.siblings);\n}\n\n/**\n * @return {number}\n */\nexport function char() {\n return character;\n}\n\n/**\n * @return {number}\n */\nexport function prev() {\n character = position > 0 ? charat(characters, --position) : 0;\n if (column--, character === 10) column = 1, line--;\n return character;\n}\n\n/**\n * @return {number}\n */\nexport function next() {\n character = position < length ? charat(characters, position++) : 0;\n if (column++, character === 10) column = 1, line++;\n return character;\n}\n\n/**\n * @return {number}\n */\nexport function peek() {\n return charat(characters, position);\n}\n\n/**\n * @return {number}\n */\nexport function caret() {\n return position;\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice(begin, end) {\n return substr(characters, begin, end);\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token(type) {\n switch (type) {\n // \\0 \\t \\n \\r \\s whitespace token\n case 0:\n case 9:\n case 10:\n case 13:\n case 32:\n return 5;\n // ! + , / > @ ~ isolate token\n case 33:\n case 43:\n case 44:\n case 47:\n case 62:\n case 64:\n case 126:\n // ; { } breakpoint token\n case 59:\n case 123:\n case 125:\n return 4;\n // : accompanied token\n case 58:\n return 3;\n // \" ' ( [ opening delimit token\n case 34:\n case 39:\n case 40:\n case 91:\n return 2;\n // ) ] closing delimit token\n case 41:\n case 93:\n return 1;\n }\n return 0;\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc(value) {\n return line = column = 1, length = strlen(characters = value), position = 0, [];\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc(value) {\n return characters = '', value;\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit(type) {\n return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize(value) {\n return dealloc(tokenizer(alloc(value)));\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace(type) {\n while (character = peek()) if (character < 33) next();else break;\n return token(type) > 2 || token(character) > 3 ? '' : ' ';\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer(children) {\n while (next()) switch (token(character)) {\n case 0:\n append(identifier(position - 1), children);\n break;\n case 2:\n append(delimit(character), children);\n break;\n default:\n append(from(character), children);\n }\n return children;\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping(index, count) {\n while (--count && next())\n // not 0-9 A-F a-f\n if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97) break;\n return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter(type) {\n while (next()) switch (character) {\n // ] ) \" '\n case type:\n return position;\n // \" '\n case 34:\n case 39:\n if (type !== 34 && type !== 39) delimiter(character);\n break;\n // (\n case 40:\n if (type === 41) delimiter(type);\n break;\n // \\\n case 92:\n next();\n break;\n }\n return position;\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter(type, index) {\n while (next())\n // //\n if (type + character === 47 + 10) break;\n // /*\n else if (type + character === 42 + 42 && peek() === 47) break;\n return '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next());\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier(index) {\n while (!token(peek())) next();\n return slice(index, position);\n}","map":{"version":3,"names":["from","trim","charat","strlen","substr","append","assign","line","column","length","position","character","characters","node","value","root","parent","type","props","children","siblings","return","copy","lift","char","prev","next","peek","caret","slice","begin","end","token","alloc","dealloc","delimit","delimiter","tokenize","tokenizer","whitespace","identifier","escaping","index","count","commenter"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/stylis/src/Tokenizer.js"],"sourcesContent":["import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {object[]} siblings\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length, siblings) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props)\n}\n\n/**\n * @param {object} root\n */\nexport function lift (root) {\n\twhile (root.root)\n\t\troot = copy(root.root, {children: [root]})\n\n\tappend(root, root.siblings)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n"],"mappings":"AAAA,SAAQA,IAAI,EAAEC,IAAI,EAAEC,MAAM,EAAEC,MAAM,EAAEC,MAAM,EAAEC,MAAM,EAAEC,MAAM,QAAO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