mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 05:21:02 +00:00
1 line
16 KiB
Plaintext
1 line
16 KiB
Plaintext
{"dependencies":[{"name":"../tokenizer","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":1,"column":17,"index":17},"end":{"line":1,"column":40,"index":40}},{"start":{"line":2,"column":14,"index":67},"end":{"line":2,"column":37,"index":90}},{"start":{"line":3,"column":11,"index":111},"end":{"line":3,"column":34,"index":134}}],"key":"CeLPNCNjt8y0xnwsIyTQzXoUUj0=","exportNames":["*"],"imports":3}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n var isHexDigit = require(_dependencyMap[0], \"../tokenizer\").isHexDigit;\n var cmpChar = require(_dependencyMap[0], \"../tokenizer\").cmpChar;\n var TYPE = require(_dependencyMap[0], \"../tokenizer\").TYPE;\n var IDENT = TYPE.Ident;\n var DELIM = TYPE.Delim;\n var NUMBER = TYPE.Number;\n var DIMENSION = TYPE.Dimension;\n var PLUSSIGN = 0x002B; // U+002B PLUS SIGN (+)\n var HYPHENMINUS = 0x002D; // U+002D HYPHEN-MINUS (-)\n var QUESTIONMARK = 0x003F; // U+003F QUESTION MARK (?)\n var U = 0x0075; // U+0075 LATIN SMALL LETTER U (u)\n\n function isDelim(token, code) {\n return token !== null && token.type === DELIM && token.value.charCodeAt(0) === code;\n }\n function startsWith(token, code) {\n return token.value.charCodeAt(0) === code;\n }\n function hexSequence(token, offset, allowDash) {\n for (var pos = offset, hexlen = 0; pos < token.value.length; pos++) {\n var code = token.value.charCodeAt(pos);\n if (code === HYPHENMINUS && allowDash && hexlen !== 0) {\n if (hexSequence(token, offset + hexlen + 1, false) > 0) {\n return 6; // dissallow following question marks\n }\n return 0; // dash at the ending of a hex sequence is not allowed\n }\n if (!isHexDigit(code)) {\n return 0; // not a hex digit\n }\n if (++hexlen > 6) {\n return 0; // too many hex digits\n }\n ;\n }\n return hexlen;\n }\n function withQuestionMarkSequence(consumed, length, getNextToken) {\n if (!consumed) {\n return 0; // nothing consumed\n }\n while (isDelim(getNextToken(length), QUESTIONMARK)) {\n if (++consumed > 6) {\n return 0; // too many question marks\n }\n length++;\n }\n return length;\n }\n\n // https://drafts.csswg.org/css-syntax/#urange\n // Informally, the <urange> production has three forms:\n // U+0001\n // Defines a range consisting of a single code point, in this case the code point \"1\".\n // U+0001-00ff\n // Defines a range of codepoints between the first and the second value, in this case\n // the range between \"1\" and \"ff\" (255 in decimal) inclusive.\n // U+00??\n // Defines a range of codepoints where the \"?\" characters range over all hex digits,\n // in this case defining the same as the value U+0000-00ff.\n // In each form, a maximum of 6 digits is allowed for each hexadecimal number (if you treat \"?\" as a hexadecimal digit).\n //\n // <urange> =\n // u '+' <ident-token> '?'* |\n // u <dimension-token> '?'* |\n // u <number-token> '?'* |\n // u <number-token> <dimension-token> |\n // u <number-token> <number-token> |\n // u '+' '?'+\n module.exports = function urange(token, getNextToken) {\n var length = 0;\n\n // should start with `u` or `U`\n if (token === null || token.type !== IDENT || !cmpChar(token.value, 0, U)) {\n return 0;\n }\n token = getNextToken(++length);\n if (token === null) {\n return 0;\n }\n\n // u '+' <ident-token> '?'*\n // u '+' '?'+\n if (isDelim(token, PLUSSIGN)) {\n token = getNextToken(++length);\n if (token === null) {\n return 0;\n }\n if (token.type === IDENT) {\n // u '+' <ident-token> '?'*\n return withQuestionMarkSequence(hexSequence(token, 0, true), ++length, getNextToken);\n }\n if (isDelim(token, QUESTIONMARK)) {\n // u '+' '?'+\n return withQuestionMarkSequence(1, ++length, getNextToken);\n }\n\n // Hex digit or question mark is expected\n return 0;\n }\n\n // u <number-token> '?'*\n // u <number-token> <dimension-token>\n // u <number-token> <number-token>\n if (token.type === NUMBER) {\n if (!startsWith(token, PLUSSIGN)) {\n return 0;\n }\n var consumedHexLength = hexSequence(token, 1, true);\n if (consumedHexLength === 0) {\n return 0;\n }\n token = getNextToken(++length);\n if (token === null) {\n // u <number-token> <eof>\n return length;\n }\n if (token.type === DIMENSION || token.type === NUMBER) {\n // u <number-token> <dimension-token>\n // u <number-token> <number-token>\n if (!startsWith(token, HYPHENMINUS) || !hexSequence(token, 1, false)) {\n return 0;\n }\n return length + 1;\n }\n\n // u <number-token> '?'*\n return withQuestionMarkSequence(consumedHexLength, length, getNextToken);\n }\n\n // u <dimension-token> '?'*\n if (token.type === DIMENSION) {\n if (!startsWith(token, PLUSSIGN)) {\n return 0;\n }\n return withQuestionMarkSequence(hexSequence(token, 1, true), ++length, getNextToken);\n }\n return 0;\n };\n});","lineCount":141,"map":[[2,2,1,0],[2,6,1,4,"isHexDigit"],[2,16,1,14],[2,19,1,17,"require"],[2,26,1,24],[2,27,1,24,"_dependencyMap"],[2,41,1,24],[2,60,1,39],[2,61,1,40],[2,62,1,41,"isHexDigit"],[2,72,1,51],[3,2,2,0],[3,6,2,4,"cmpChar"],[3,13,2,11],[3,16,2,14,"require"],[3,23,2,21],[3,24,2,21,"_dependencyMap"],[3,38,2,21],[3,57,2,36],[3,58,2,37],[3,59,2,38,"cmpChar"],[3,66,2,45],[4,2,3,0],[4,6,3,4,"TYPE"],[4,10,3,8],[4,13,3,11,"require"],[4,20,3,18],[4,21,3,18,"_dependencyMap"],[4,35,3,18],[4,54,3,33],[4,55,3,34],[4,56,3,35,"TYPE"],[4,60,3,39],[5,2,5,0],[5,6,5,4,"IDENT"],[5,11,5,9],[5,14,5,12,"TYPE"],[5,18,5,16],[5,19,5,17,"Ident"],[5,24,5,22],[6,2,6,0],[6,6,6,4,"DELIM"],[6,11,6,9],[6,14,6,12,"TYPE"],[6,18,6,16],[6,19,6,17,"Delim"],[6,24,6,22],[7,2,7,0],[7,6,7,4,"NUMBER"],[7,12,7,10],[7,15,7,13,"TYPE"],[7,19,7,17],[7,20,7,18,"Number"],[7,26,7,24],[8,2,8,0],[8,6,8,4,"DIMENSION"],[8,15,8,13],[8,18,8,16,"TYPE"],[8,22,8,20],[8,23,8,21,"Dimension"],[8,32,8,30],[9,2,9,0],[9,6,9,4,"PLUSSIGN"],[9,14,9,12],[9,17,9,15],[9,23,9,21],[9,24,9,22],[9,25,9,27],[10,2,10,0],[10,6,10,4,"HYPHENMINUS"],[10,17,10,15],[10,20,10,18],[10,26,10,24],[10,27,10,25],[10,28,10,27],[11,2,11,0],[11,6,11,4,"QUESTIONMARK"],[11,18,11,16],[11,21,11,19],[11,27,11,25],[11,28,11,26],[11,29,11,27],[12,2,12,0],[12,6,12,4,"U"],[12,7,12,5],[12,10,12,8],[12,16,12,14],[12,17,12,15],[12,18,12,27],[14,2,14,0],[14,11,14,9,"isDelim"],[14,18,14,16,"isDelim"],[14,19,14,17,"token"],[14,24,14,22],[14,26,14,24,"code"],[14,30,14,28],[14,32,14,30],[15,4,15,4],[15,11,15,11,"token"],[15,16,15,16],[15,21,15,21],[15,25,15,25],[15,29,15,29,"token"],[15,34,15,34],[15,35,15,35,"type"],[15,39,15,39],[15,44,15,44,"DELIM"],[15,49,15,49],[15,53,15,53,"token"],[15,58,15,58],[15,59,15,59,"value"],[15,64,15,64],[15,65,15,65,"charCodeAt"],[15,75,15,75],[15,76,15,76],[15,77,15,77],[15,78,15,78],[15,83,15,83,"code"],[15,87,15,87],[16,2,16,0],[17,2,18,0],[17,11,18,9,"startsWith"],[17,21,18,19,"startsWith"],[17,22,18,20,"token"],[17,27,18,25],[17,29,18,27,"code"],[17,33,18,31],[17,35,18,33],[18,4,19,4],[18,11,19,11,"token"],[18,16,19,16],[18,17,19,17,"value"],[18,22,19,22],[18,23,19,23,"charCodeAt"],[18,33,19,33],[18,34,19,34],[18,35,19,35],[18,36,19,36],[18,41,19,41,"code"],[18,45,19,45],[19,2,20,0],[20,2,22,0],[20,11,22,9,"hexSequence"],[20,22,22,20,"hexSequence"],[20,23,22,21,"token"],[20,28,22,26],[20,30,22,28,"offset"],[20,36,22,34],[20,38,22,36,"allowDash"],[20,47,22,45],[20,49,22,47],[21,4,23,4],[21,9,23,9],[21,13,23,13,"pos"],[21,16,23,16],[21,19,23,19,"offset"],[21,25,23,25],[21,27,23,27,"hexlen"],[21,33,23,33],[21,36,23,36],[21,37,23,37],[21,39,23,39,"pos"],[21,42,23,42],[21,45,23,45,"token"],[21,50,23,50],[21,51,23,51,"value"],[21,56,23,56],[21,57,23,57,"length"],[21,63,23,63],[21,65,23,65,"pos"],[21,68,23,68],[21,70,23,70],[21,72,23,72],[22,6,24,8],[22,10,24,12,"code"],[22,14,24,16],[22,17,24,19,"token"],[22,22,24,24],[22,23,24,25,"value"],[22,28,24,30],[22,29,24,31,"charCodeAt"],[22,39,24,41],[22,40,24,42,"pos"],[22,43,24,45],[22,44,24,46],[23,6,26,8],[23,10,26,12,"code"],[23,14,26,16],[23,19,26,21,"HYPHENMINUS"],[23,30,26,32],[23,34,26,36,"allowDash"],[23,43,26,45],[23,47,26,49,"hexlen"],[23,53,26,55],[23,58,26,60],[23,59,26,61],[23,61,26,63],[24,8,27,12],[24,12,27,16,"hexSequence"],[24,23,27,27],[24,24,27,28,"token"],[24,29,27,33],[24,31,27,35,"offset"],[24,37,27,41],[24,40,27,44,"hexlen"],[24,46,27,50],[24,49,27,53],[24,50,27,54],[24,52,27,56],[24,57,27,61],[24,58,27,62],[24,61,27,65],[24,62,27,66],[24,64,27,68],[25,10,28,16],[25,17,28,23],[25,18,28,24],[25,19,28,25],[25,20,28,26],[26,8,29,12],[27,8,31,12],[27,15,31,19],[27,16,31,20],[27,17,31,21],[27,18,31,22],[28,6,32,8],[29,6,34,8],[29,10,34,12],[29,11,34,13,"isHexDigit"],[29,21,34,23],[29,22,34,24,"code"],[29,26,34,28],[29,27,34,29],[29,29,34,31],[30,8,35,12],[30,15,35,19],[30,16,35,20],[30,17,35,21],[30,18,35,22],[31,6,36,8],[32,6,38,8],[32,10,38,12],[32,12,38,14,"hexlen"],[32,18,38,20],[32,21,38,23],[32,22,38,24],[32,24,38,26],[33,8,39,12],[33,15,39,19],[33,16,39,20],[33,17,39,21],[33,18,39,22],[34,6,40,8],[35,6,40,9],[36,4,41,4],[37,4,43,4],[37,11,43,11,"hexlen"],[37,17,43,17],[38,2,44,0],[39,2,46,0],[39,11,46,9,"withQuestionMarkSequence"],[39,35,46,33,"withQuestionMarkSequence"],[39,36,46,34,"consumed"],[39,44,46,42],[39,46,46,44,"length"],[39,52,46,50],[39,54,46,52,"getNextToken"],[39,66,46,64],[39,68,46,66],[40,4,47,4],[40,8,47,8],[40,9,47,9,"consumed"],[40,17,47,17],[40,19,47,19],[41,6,48,8],[41,13,48,15],[41,14,48,16],[41,15,48,17],[41,16,48,18],[42,4,49,4],[43,4,51,4],[43,11,51,11,"isDelim"],[43,18,51,18],[43,19,51,19,"getNextToken"],[43,31,51,31],[43,32,51,32,"length"],[43,38,51,38],[43,39,51,39],[43,41,51,41,"QUESTIONMARK"],[43,53,51,53],[43,54,51,54],[43,56,51,56],[44,6,52,8],[44,10,52,12],[44,12,52,14,"consumed"],[44,20,52,22],[44,23,52,25],[44,24,52,26],[44,26,52,28],[45,8,53,12],[45,15,53,19],[45,16,53,20],[45,17,53,21],[45,18,53,22],[46,6,54,8],[47,6,56,8,"length"],[47,12,56,14],[47,14,56,16],[48,4,57,4],[49,4,59,4],[49,11,59,11,"length"],[49,17,59,17],[50,2,60,0],[52,2,62,0],[53,2,63,0],[54,2,64,0],[55,2,65,0],[56,2,66,0],[57,2,67,0],[58,2,68,0],[59,2,69,0],[60,2,70,0],[61,2,71,0],[62,2,72,0],[63,2,73,0],[64,2,74,0],[65,2,75,0],[66,2,76,0],[67,2,77,0],[68,2,78,0],[69,2,79,0],[70,2,80,0],[71,2,81,0,"module"],[71,8,81,6],[71,9,81,7,"exports"],[71,16,81,14],[71,19,81,17],[71,28,81,26,"urange"],[71,34,81,32,"urange"],[71,35,81,33,"token"],[71,40,81,38],[71,42,81,40,"getNextToken"],[71,54,81,52],[71,56,81,54],[72,4,82,4],[72,8,82,8,"length"],[72,14,82,14],[72,17,82,17],[72,18,82,18],[74,4,84,4],[75,4,85,4],[75,8,85,8,"token"],[75,13,85,13],[75,18,85,18],[75,22,85,22],[75,26,85,26,"token"],[75,31,85,31],[75,32,85,32,"type"],[75,36,85,36],[75,41,85,41,"IDENT"],[75,46,85,46],[75,50,85,50],[75,51,85,51,"cmpChar"],[75,58,85,58],[75,59,85,59,"token"],[75,64,85,64],[75,65,85,65,"value"],[75,70,85,70],[75,72,85,72],[75,73,85,73],[75,75,85,75,"U"],[75,76,85,76],[75,77,85,77],[75,79,85,79],[76,6,86,8],[76,13,86,15],[76,14,86,16],[77,4,87,4],[78,4,89,4,"token"],[78,9,89,9],[78,12,89,12,"getNextToken"],[78,24,89,24],[78,25,89,25],[78,27,89,27,"length"],[78,33,89,33],[78,34,89,34],[79,4,90,4],[79,8,90,8,"token"],[79,13,90,13],[79,18,90,18],[79,22,90,22],[79,24,90,24],[80,6,91,8],[80,13,91,15],[80,14,91,16],[81,4,92,4],[83,4,94,4],[84,4,95,4],[85,4,96,4],[85,8,96,8,"isDelim"],[85,15,96,15],[85,16,96,16,"token"],[85,21,96,21],[85,23,96,23,"PLUSSIGN"],[85,31,96,31],[85,32,96,32],[85,34,96,34],[86,6,97,8,"token"],[86,11,97,13],[86,14,97,16,"getNextToken"],[86,26,97,28],[86,27,97,29],[86,29,97,31,"length"],[86,35,97,37],[86,36,97,38],[87,6,98,8],[87,10,98,12,"token"],[87,15,98,17],[87,20,98,22],[87,24,98,26],[87,26,98,28],[88,8,99,12],[88,15,99,19],[88,16,99,20],[89,6,100,8],[90,6,102,8],[90,10,102,12,"token"],[90,15,102,17],[90,16,102,18,"type"],[90,20,102,22],[90,25,102,27,"IDENT"],[90,30,102,32],[90,32,102,34],[91,8,103,12],[92,8,104,12],[92,15,104,19,"withQuestionMarkSequence"],[92,39,104,43],[92,40,104,44,"hexSequence"],[92,51,104,55],[92,52,104,56,"token"],[92,57,104,61],[92,59,104,63],[92,60,104,64],[92,62,104,66],[92,66,104,70],[92,67,104,71],[92,69,104,73],[92,71,104,75,"length"],[92,77,104,81],[92,79,104,83,"getNextToken"],[92,91,104,95],[92,92,104,96],[93,6,105,8],[94,6,107,8],[94,10,107,12,"isDelim"],[94,17,107,19],[94,18,107,20,"token"],[94,23,107,25],[94,25,107,27,"QUESTIONMARK"],[94,37,107,39],[94,38,107,40],[94,40,107,42],[95,8,108,12],[96,8,109,12],[96,15,109,19,"withQuestionMarkSequence"],[96,39,109,43],[96,40,109,44],[96,41,109,45],[96,43,109,47],[96,45,109,49,"length"],[96,51,109,55],[96,53,109,57,"getNextToken"],[96,65,109,69],[96,66,109,70],[97,6,110,8],[99,6,112,8],[100,6,113,8],[100,13,113,15],[100,14,113,16],[101,4,114,4],[103,4,116,4],[104,4,117,4],[105,4,118,4],[106,4,119,4],[106,8,119,8,"token"],[106,13,119,13],[106,14,119,14,"type"],[106,18,119,18],[106,23,119,23,"NUMBER"],[106,29,119,29],[106,31,119,31],[107,6,120,8],[107,10,120,12],[107,11,120,13,"startsWith"],[107,21,120,23],[107,22,120,24,"token"],[107,27,120,29],[107,29,120,31,"PLUSSIGN"],[107,37,120,39],[107,38,120,40],[107,40,120,42],[108,8,121,12],[108,15,121,19],[108,16,121,20],[109,6,122,8],[110,6,124,8],[110,10,124,12,"consumedHexLength"],[110,27,124,29],[110,30,124,32,"hexSequence"],[110,41,124,43],[110,42,124,44,"token"],[110,47,124,49],[110,49,124,51],[110,50,124,52],[110,52,124,54],[110,56,124,58],[110,57,124,59],[111,6,125,8],[111,10,125,12,"consumedHexLength"],[111,27,125,29],[111,32,125,34],[111,33,125,35],[111,35,125,37],[112,8,126,12],[112,15,126,19],[112,16,126,20],[113,6,127,8],[114,6,129,8,"token"],[114,11,129,13],[114,14,129,16,"getNextToken"],[114,26,129,28],[114,27,129,29],[114,29,129,31,"length"],[114,35,129,37],[114,36,129,38],[115,6,130,8],[115,10,130,12,"token"],[115,15,130,17],[115,20,130,22],[115,24,130,26],[115,26,130,28],[116,8,131,12],[117,8,132,12],[117,15,132,19,"length"],[117,21,132,25],[118,6,133,8],[119,6,135,8],[119,10,135,12,"token"],[119,15,135,17],[119,16,135,18,"type"],[119,20,135,22],[119,25,135,27,"DIMENSION"],[119,34,135,36],[119,38,135,40,"token"],[119,43,135,45],[119,44,135,46,"type"],[119,48,135,50],[119,53,135,55,"NUMBER"],[119,59,135,61],[119,61,135,63],[120,8,136,12],[121,8,137,12],[122,8,138,12],[122,12,138,16],[122,13,138,17,"startsWith"],[122,23,138,27],[122,24,138,28,"token"],[122,29,138,33],[122,31,138,35,"HYPHENMINUS"],[122,42,138,46],[122,43,138,47],[122,47,138,51],[122,48,138,52,"hexSequence"],[122,59,138,63],[122,60,138,64,"token"],[122,65,138,69],[122,67,138,71],[122,68,138,72],[122,70,138,74],[122,75,138,79],[122,76,138,80],[122,78,138,82],[123,10,139,16],[123,17,139,23],[123,18,139,24],[124,8,140,12],[125,8,142,12],[125,15,142,19,"length"],[125,21,142,25],[125,24,142,28],[125,25,142,29],[126,6,143,8],[128,6,145,8],[129,6,146,8],[129,13,146,15,"withQuestionMarkSequence"],[129,37,146,39],[129,38,146,40,"consumedHexLength"],[129,55,146,57],[129,57,146,59,"length"],[129,63,146,65],[129,65,146,67,"getNextToken"],[129,77,146,79],[129,78,146,80],[130,4,147,4],[132,4,149,4],[133,4,150,4],[133,8,150,8,"token"],[133,13,150,13],[133,14,150,14,"type"],[133,18,150,18],[133,23,150,23,"DIMENSION"],[133,32,150,32],[133,34,150,34],[134,6,151,8],[134,10,151,12],[134,11,151,13,"startsWith"],[134,21,151,23],[134,22,151,24,"token"],[134,27,151,29],[134,29,151,31,"PLUSSIGN"],[134,37,151,39],[134,38,151,40],[134,40,151,42],[135,8,152,12],[135,15,152,19],[135,16,152,20],[136,6,153,8],[137,6,155,8],[137,13,155,15,"withQuestionMarkSequence"],[137,37,155,39],[137,38,155,40,"hexSequence"],[137,49,155,51],[137,50,155,52,"token"],[137,55,155,57],[137,57,155,59],[137,58,155,60],[137,60,155,62],[137,64,155,66],[137,65,155,67],[137,67,155,69],[137,69,155,71,"length"],[137,75,155,77],[137,77,155,79,"getNextToken"],[137,89,155,91],[137,90,155,92],[138,4,156,4],[139,4,158,4],[139,11,158,11],[139,12,158,12],[140,2,159,0],[140,3,159,1],[141,0,159,2],[141,3]],"functionMap":{"names":["<global>","isDelim","startsWith","hexSequence","withQuestionMarkSequence","urange"],"mappings":"AAA;ACa;CDE;AEE;CFE;AGE;CHsB;AIE;CJc;iBKqB;CL8E"},"hasCjsExports":true},"type":"js/module"}]} |