@sap/cds 9.0.3 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";function peg$subclass(t,u){function r(){this.constructor=t}r.prototype=u.prototype,t.prototype=new r}function peg$SyntaxError(t,u,r,e){var n=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(n,peg$SyntaxError.prototype),n.expected=u,n.found=r,n.location=e,n.name="SyntaxError",n}function peg$padEnd(t,u,r){return r=r||" ",t.length>u?t:(u-=t.length,t+(r+=r.repeat(u)).slice(0,u))}function peg$parse(t,u){var r,e={},n=(u=void 0!==u?u:{}).grammarSource,s={ODataRelativeURI:ka},o=ka,a="/",c="?",i="&",f="$count",l="$ref",A="$value",h="=",p="$skiptoken=",d="$search=",C="$select=",v="$expand=",g="$filter=",F="$orderby=",b="$top=",m="$skip=",B="$count=",E="$apply=",y="$at",D="$from",x="$toInclusive",w="$to",$="*",L="/$count",S=";",T='"',j="\\\\",k='\\"',O=":",I="any",Z="all",_="asc",N="desc",z="$deltatoken=",R="'",P=",",q="[",H="]",M="@",Q="$format=",U="eq",G="ne",J="lt",K="gt",V="le",W="ge",X="in",Y="null",tt="{",ut="}",rt="contains",et="endswith",nt="startswith",st="matchespattern",ot="not",at="and",ct="or",it="aggregate",ft="groupby",lt="filter",At="search",ht="concat",pt="compute",dt="top",Ct="skip",vt="orderby",gt="com.sap.vocabularies.Hierarchy.v1.TopLevels",Ft="ancestors",bt="descendants",mt="topcount",Bt="bottomcount",Et="topsum",yt="bottomsum",Dt="toppercent",xt="bottompercent",wt="with",$t="from",Lt="as",St="rollup",Tt="$all",jt="identity",kt="HierarchyNodes",Ot="$root/",It="HierarchyQualifier",Zt="NodeProperty",_t="Levels",Nt="ExpandLevels",zt='"NodeID"',Rt='"Levels"',Pt="filter(",qt=")",Ht="search(",Mt="keep start",Qt="true",Ut="false",Gt="''",Jt="-",Kt="T",Vt=".",Wt="Z",Xt="e",Yt="binary'",tu="==",uu="(",ru=/^[^&]/,eu=/^[ ]/,nu=/^[^"&]/,su=/^[^"]/,ou=/^[^;)]/,au=/^[[a-zA-Z0-9\-_.~![\]]/,cu=/^[^}]/,iu=/^[^\]]/,fu=/^[a-zA-Z]/,lu=/^[^)]/,Au=/^[^']/,hu=/^[0-9]/,pu=/^[+\-]/,du=/^[_a-zA-Z]/,Cu=/^[_a-zA-Z0-9"."A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,vu=/^[0-9a-fA-F]/,gu=/^[^\/?]/,Fu=/^[a-zA-Z0-9\-"."_~!$'()*+,;=:@"\/""?"]/,bu=/^[a-zA-Z0-9\-_]/,mu=/^[ \t\n]/,Bu=xa("/",!1),Eu=xa("?",!1),yu=xa("&",!1),Du=xa("$count",!1),xu=xa("$ref",!1),wu=xa("$value",!1),$u=xa("=",!1),Lu=xa("$skiptoken=",!1),Su=xa("$search=",!1),Tu=xa("$select=",!1),ju=xa("$expand=",!1),ku=xa("$filter=",!1),Ou=xa("$orderby=",!1),Iu=xa("$top=",!1),Zu=xa("$skip=",!1),_u=xa("$count=",!1),Nu=xa("$apply=",!1),zu=wa(["&"],!0,!1),Ru=xa("$at",!1),Pu=xa("$from",!1),qu=xa("$toInclusive",!1),Hu=xa("$to",!1),Mu=xa("*",!1),Qu=xa("/$count",!1),Uu=xa(";",!1),Gu=wa([" "],!1,!1),Ju=wa(['"',"&"],!0,!1),Ku=xa('"',!1),Vu=xa("\\\\",!1),Wu=xa('\\"',!1),Xu=wa(['"'],!0,!1),Yu=wa([";",")"],!0,!1),tr=xa(":",!1),ur=xa("any",!1),rr=xa("all",!1),er=xa("asc",!1),nr=xa("desc",!1),sr=xa("$deltatoken=",!1),or=$a("value with double-quoted string"),ar=xa("'",!1),cr=xa(",",!1),ir=xa("[",!1),fr=xa("]",!1),lr=wa(["[",["a","z"],["A","Z"],["0","9"],"-","_",".","~","!","[","]"],!1,!1),Ar=$a("an aliased parameter (@param)"),hr=xa("@",!1),pr=xa("$format=",!1),dr=xa("eq",!1),Cr=xa("ne",!1),vr=xa("lt",!1),gr=xa("gt",!1),Fr=xa("le",!1),br=xa("ge",!1),mr=xa("in",!1),Br=(xa("add",!1),xa("sub",!1),xa("mul",!1),xa("div",!1),xa("mod",!1),$a("navigation with $count")),Er=$a("a reference"),yr=$a("null"),Dr=xa("null",!1),xr=$a("a json object"),wr=xa("{",!1),$r=wa(["}"],!0,!1),Lr=xa("}",!1),Sr=$a("a json array"),Tr=wa(["]"],!0,!1),jr=$a("a list"),kr=$a("a function name"),Or=wa([["a","z"],["A","Z"]],!1,!1),Ir=xa("contains",!0),Zr=xa("endswith",!0),_r=xa("startswith",!0),Nr=xa("matchespattern",!0),zr=xa("NOT",!0),Rr=xa("AND",!0),Pr=xa("OR",!0),qr=xa("aggregate",!1),Hr=xa("groupby",!1),Mr=xa("filter",!1),Qr=xa("search",!1),Ur=xa("concat",!1),Gr=xa("compute",!1),Jr=xa("top",!1),Kr=xa("skip",!1),Vr=xa("orderby",!1),Wr=xa("com.sap.vocabularies.Hierarchy.v1.TopLevels",!1),Xr=xa("ancestors",!1),Yr=xa("descendants",!1),te=xa("topcount",!0),ue=xa("bottomcount",!0),re=xa("topsum",!0),ee=xa("bottomsum",!0),ne=xa("toppercent",!0),se=xa("bottompercent",!0),oe=xa("with",!1),ae=xa("from",!1),ce=xa("as",!1),ie=xa("rollup",!1),fe=xa("$all",!1),le=wa([")"],!0,!1),Ae=xa("identity",!1),he=xa("HierarchyNodes",!1),pe=xa("$root/",!1),de=xa("HierarchyQualifier",!1),Ce=xa("NodeProperty",!1),ve=xa("Levels",!1),ge=xa("ExpandLevels",!1),Fe=xa('"NodeID"',!1),be=xa('"Levels"',!1),me=xa("filter(",!1),Be=xa(")",!1),Ee=xa("search(",!1),ye=xa("keep start",!1),De=$a("a boolean"),xe=xa("true",!1),we=xa("false",!1),$e=$a("a single quoted string"),Le=xa("''",!1),Se=wa(["'"],!0,!1),Te=$a("a doubled quoted string"),je=($a("a string"),wa([" ","\t","\n","(",")",'"',"&",";"],!0,!1),$a("a time")),ke=wa([["0","9"]],!1,!1),Oe=$a("a date"),Ie=xa("-",!1),Ze=xa("T",!1),_e=xa(".",!1),Ne=xa("Z",!1),ze=wa(["+","-"],!1,!1),Re=$a("a number"),Pe=xa("e",!1),qe=$a("an integer"),He=$a("an identifier"),Me=wa(["_",["a","z"],["A","Z"]],!1,!1),Qe=wa(["_",["a","z"],["A","Z"],["0","9"],'"',".",'"',["A","Z"],["a","z"],"ª","µ","º",["À","Ö"],["Ø","ö"],["ø","ˁ"],["ˆ","ˑ"],["ˠ","ˤ"],"ˬ","ˮ",["Ͱ","ʹ"],"Ͷ","ͷ",["ͺ","ͽ"],"Ά",["Έ","Ί"],"Ό",["Ύ","Ρ"],["Σ","ϵ"],["Ϸ","ҁ"],["Ҋ","ԧ"],["Ա","Ֆ"],"ՙ",["ա","և"],["א","ת"],["װ","ײ"],["ؠ","ي"],"ٮ","ٯ",["ٱ","ۓ"],"ە","ۥ","ۦ","ۮ","ۯ",["ۺ","ۼ"],"ۿ","ܐ",["ܒ","ܯ"],["ݍ","ޥ"],"ޱ",["ߊ","ߪ"],"ߴ","ߵ","ߺ",["ࠀ","ࠕ"],"ࠚ","ࠤ","ࠨ",["ࡀ","ࡘ"],"ࢠ",["ࢢ","ࢬ"],["ऄ","ह"],"ऽ","ॐ",["क़","ॡ"],["ॱ","ॷ"],["ॹ","ॿ"],["অ","ঌ"],"এ","ঐ",["ও","ন"],["প","র"],"ল",["শ","হ"],"ঽ","ৎ","ড়","ঢ়",["য়","ৡ"],"ৰ","ৱ",["ਅ","ਊ"],"ਏ","ਐ",["ਓ","ਨ"],["ਪ","ਰ"],"ਲ","ਲ਼","ਵ","ਸ਼","ਸ","ਹ",["ਖ਼","ੜ"],"ਫ਼",["ੲ","ੴ"],["અ","ઍ"],["એ","ઑ"],["ઓ","ન"],["પ","ર"],"લ","ળ",["વ","હ"],"ઽ","ૐ","ૠ","ૡ",["ଅ","ଌ"],"ଏ","ଐ",["ଓ","ନ"],["ପ","ର"],"ଲ","ଳ",["ଵ","ହ"],"ଽ","ଡ଼","ଢ଼",["ୟ","ୡ"],"ୱ","ஃ",["அ","ஊ"],["எ","ஐ"],["ஒ","க"],"ங","ச","ஜ","ஞ","ட","ண","த",["ந","ப"],["ம","ஹ"],"ௐ",["అ","ఌ"],["ఎ","ఐ"],["ఒ","న"],["ప","ళ"],["వ","హ"],"ఽ","ౘ","ౙ","ౠ","ౡ",["ಅ","ಌ"],["ಎ","ಐ"],["ಒ","ನ"],["ಪ","ಳ"],["ವ","ಹ"],"ಽ","ೞ","ೠ","ೡ","ೱ","ೲ",["അ","ഌ"],["എ","ഐ"],["ഒ","ഺ"],"ഽ","ൎ","ൠ","ൡ",["ൺ","ൿ"],["අ","ඖ"],["ක","න"],["ඳ","ර"],"ල",["ව","ෆ"],["ก","ะ"],"า","ำ",["เ","ๆ"],"ກ","ຂ","ຄ","ງ","ຈ","ຊ","ຍ",["ດ","ທ"],["ນ","ຟ"],["ມ","ຣ"],"ລ","ວ","ສ","ຫ",["ອ","ະ"],"າ","ຳ","ຽ",["ເ","ໄ"],"ໆ",["ໜ","ໟ"],"ༀ",["ཀ","ཇ"],["ཉ","ཬ"],["ྈ","ྌ"],["က","ဪ"],"ဿ",["ၐ","ၕ"],["ၚ","ၝ"],"ၡ","ၥ","ၦ",["ၮ","ၰ"],["ၵ","ႁ"],"ႎ",["Ⴀ","Ⴥ"],"Ⴧ","Ⴭ",["ა","ჺ"],["ჼ","ቈ"],["ቊ","ቍ"],["ቐ","ቖ"],"ቘ",["ቚ","ቝ"],["በ","ኈ"],["ኊ","ኍ"],["ነ","ኰ"],["ኲ","ኵ"],["ኸ","ኾ"],"ዀ",["ዂ","ዅ"],["ወ","ዖ"],["ዘ","ጐ"],["ጒ","ጕ"],["ጘ","ፚ"],["ᎀ","ᎏ"],["Ꭰ","Ᏼ"],["ᐁ","ᙬ"],["ᙯ","ᙿ"],["ᚁ","ᚚ"],["ᚠ","ᛪ"],["ᜀ","ᜌ"],["ᜎ","ᜑ"],["ᜠ","ᜱ"],["ᝀ","ᝑ"],["ᝠ","ᝬ"],["ᝮ","ᝰ"],["ក","ឳ"],"ៗ","ៜ",["ᠠ","ᡷ"],["ᢀ","ᢨ"],"ᢪ",["ᢰ","ᣵ"],["ᤀ","ᤜ"],["ᥐ","ᥭ"],["ᥰ","ᥴ"],["ᦀ","ᦫ"],["ᧁ","ᧇ"],["ᨀ","ᨖ"],["ᨠ","ᩔ"],"ᪧ",["ᬅ","ᬳ"],["ᭅ","ᭋ"],["ᮃ","ᮠ"],"ᮮ","ᮯ",["ᮺ","ᯥ"],["ᰀ","ᰣ"],["ᱍ","ᱏ"],["ᱚ","ᱽ"],["ᳩ","ᳬ"],["ᳮ","ᳱ"],"ᳵ","ᳶ",["ᴀ","ᶿ"],["Ḁ","ἕ"],["Ἐ","Ἕ"],["ἠ","ὅ"],["Ὀ","Ὅ"],["ὐ","ὗ"],"Ὑ","Ὓ","Ὕ",["Ὗ","ώ"],["ᾀ","ᾴ"],["ᾶ","ᾼ"],"ι",["ῂ","ῄ"],["ῆ","ῌ"],["ῐ","ΐ"],["ῖ","Ί"],["ῠ","Ῥ"],["ῲ","ῴ"],["ῶ","ῼ"],"ⁱ","ⁿ",["ₐ","ₜ"],"ℂ","ℇ",["ℊ","ℓ"],"ℕ",["ℙ","ℝ"],"ℤ","Ω","ℨ",["K","ℭ"],["ℯ","ℹ"],["ℼ","ℿ"],["ⅅ","ⅉ"],"ⅎ","Ↄ","ↄ",["Ⰰ","Ⱞ"],["ⰰ","ⱞ"],["Ⱡ","ⳤ"],["Ⳬ","ⳮ"],"Ⳳ","ⳳ",["ⴀ","ⴥ"],"ⴧ","ⴭ",["ⴰ","ⵧ"],"ⵯ",["ⶀ","ⶖ"],["ⶠ","ⶦ"],["ⶨ","ⶮ"],["ⶰ","ⶶ"],["ⶸ","ⶾ"],["ⷀ","ⷆ"],["ⷈ","ⷎ"],["ⷐ","ⷖ"],["ⷘ","ⷞ"],"ⸯ","々","〆",["〱","〵"],"〻","〼",["ぁ","ゖ"],["ゝ","ゟ"],["ァ","ヺ"],["ー","ヿ"],["ㄅ","ㄭ"],["ㄱ","ㆎ"],["ㆠ","ㆺ"],["ㇰ","ㇿ"],["㐀","䶵"],["一","鿌"],["ꀀ","ꒌ"],["ꓐ","ꓽ"],["ꔀ","ꘌ"],["ꘐ","ꘟ"],"ꘪ","ꘫ",["Ꙁ","ꙮ"],["ꙿ","ꚗ"],["ꚠ","ꛥ"],["ꜗ","ꜟ"],["Ꜣ","ꞈ"],["Ꞌ","ꞎ"],["Ꞑ","ꞓ"],["Ꞡ","Ɦ"],["ꟸ","ꠁ"],["ꠃ","ꠅ"],["ꠇ","ꠊ"],["ꠌ","ꠢ"],["ꡀ","ꡳ"],["ꢂ","ꢳ"],["ꣲ","ꣷ"],"ꣻ",["ꤊ","ꤥ"],["ꤰ","ꥆ"],["ꥠ","ꥼ"],["ꦄ","ꦲ"],"ꧏ",["ꨀ","ꨨ"],["ꩀ","ꩂ"],["ꩄ","ꩋ"],["ꩠ","ꩶ"],"ꩺ",["ꪀ","ꪯ"],"ꪱ","ꪵ","ꪶ",["ꪹ","ꪽ"],"ꫀ","ꫂ",["ꫛ","ꫝ"],["ꫠ","ꫪ"],["ꫲ","ꫴ"],["ꬁ","ꬆ"],["ꬉ","ꬎ"],["ꬑ","ꬖ"],["ꬠ","ꬦ"],["ꬨ","ꬮ"],["ꯀ","ꯢ"],["가","힣"],["ힰ","ퟆ"],["ퟋ","ퟻ"],["豈","舘"],["並","龎"],["ff","st"],["ﬓ","ﬗ"],"יִ",["ײַ","ﬨ"],["שׁ","זּ"],["טּ","לּ"],"מּ","נּ","סּ","ףּ","פּ",["צּ","ﮱ"],["ﯓ","ﴽ"],["ﵐ","ﶏ"],["ﶒ","ﷇ"],["ﷰ","ﷻ"],["ﹰ","ﹴ"],["ﹶ","ﻼ"],["A","Z"],["a","z"],["ヲ","ᄒ"],["ᅡ","ᅦ"],["ᅧ","ᅬ"],["ᅭ","ᅲ"],["ᅳ","ᅵ"]],!1,!1),Ue=$a("a guid"),Ge=$a("a hex value"),Je=wa([["0","9"],["a","f"],["A","F"]],!1,!1),Ke=wa(["/","?"],!0,!1),Ve=wa([["a","z"],["A","Z"],["0","9"],"-",'"',".",'"',"_","~","!","$","'","(",")","*","+",",",";","=",":","@",'"',"/",'"','"',"?",'"'],!1,!1),We=$a("a binary"),Xe=xa("binary'",!1),Ye=wa([["a","z"],["A","Z"],["0","9"],"-","_"],!1,!1),tn=xa("==",!1),un=xa("(",!1),rn=$a("an optional whitespace"),en=wa([" ","\t","\n"],!1,!1),nn=$a("a whitespace"),sn=function(t){Gc=t},on=function(){if(Jc)return Gc.columns=[{args:[{val:1}],as:"$count",func:"count"}],delete Gc.expand,delete Gc.limit,delete Gc.orderBy,Gc.apply?ni(Gc,Gc.apply):{SELECT:Gc};let t;if(Gc.expand){Gc.columns||(Gc.columns=["*"],t=!0);for(const t of Gc.expand){const u=Gc.columns.findIndex(Xc(t));u>-1&&Gc.columns.splice(u,1),Gc.columns.push(t)}delete Gc.expand}return Gc.count&&Gc.apply&&(Gc.__countAggregated=!0),Gc.apply?ni(Gc,Gc.apply,t):{SELECT:Gc}},an=function(){Jc=!0},cn=function(t){return!Rc.includes(t)&&{from:{ref:[t]}}},fn=function(t){return[t]},ln=function(t,u){return u},An=function(t,u){if(u=u&&u[1],!t&&!u)return{from:{ref:[""]}};if(!t&&u&&u.from)return u.from.ref.unshift(""),u;const[r,e]=t,n=[];if(e?e.length>2?n.push({id:r,where:e[1].map((t=>t.val&&t.val.match&&t.val.match(/^"(.*)"$/)?{val:t.val.match(/^"(.*)"$/)[1]}:t))}):n.push({id:r,where:[]}):Qc?n.push(`${"object"==typeof r&&"val"in r?r.val:r}`):"object"==typeof r&&"string"==typeof r.val&&r.val.match(/^[1-9]\d*$|^0$/)?n.push({val:Kc(r.val)}):n.push(r),u&&u.from){const t=u.from.ref;Object.prototype.hasOwnProperty.call(t[0],"val")&&(n[n.length-1]={id:n[n.length-1],where:[t.shift()]}),n.push(...t)}const s={from:{ref:n}};return u&&u.columns&&(s.columns=u.columns),s},hn=function(t){return[t]},pn=function(t,u,r){const e=[t,"=",u];return r&&e.push("and",...r[1]),e},dn=function(t,u){return u},Cn=function(t,u,r){return r},vn=function(t,u,r){const e=[u?{id:t,where:u}:t];return r.length&&e.push(...r.map((t=>t.from.ref[0]))),{from:{ref:e}}},gn=function(t){t&&(Gc.search=t)},Fn=function(t){t&&t.apply&&(Gc.apply=t.apply)},bn=function(t){Gc.where=t},mn=function(t,u){ci(u)},Bn=function(t){ci(t,!0)},En=function(t){(Gc.limit||(Gc.limit={})).rows={val:t}},yn=function(t){ai(t)},Dn=function(t){t&&(Gc.search=t)},xn=function(){return cds.env.features.skip_apply_parsing},wn=function(){return null},$n=function(t){return t},Ln=function(){return null},Sn=function(t){return Gc.columns=Array.isArray(Gc.columns)?Gc.columns:[],Gc.columns.find(Xc(t))||Gc.columns.push(t),t},Tn=function(){const t=new Error('"/$count" is not supported for expand operation');throw t.statusCode=501,t},jn=function(t){return t},kn=function(t){if(t.find((t=>t&&void 0!==t.apply))){const t=new Error('"$apply" is not supported for expand operation');throw t.statusCode=501,t}if(Gc.columns){for(const t of Gc.columns)Gc.expand.find(Xc(t))||Gc.expand.push(t);delete Gc.columns}else Array.isArray(Gc.expand)&&-1===Gc.expand.indexOf("*")&&Gc.expand.unshift("*")},On=function(){Uc.push(Gc),Gc=Gc.expand[Gc.expand.length-1],Gc.expand=[]},In=function(){Gc.expand.length||Gc.expand.push("*"),Gc=Uc.pop()},Zn=function(t){const u="*"===t?{}:t;return u.expand=["*"],Array.isArray(Gc.expand)||(Gc.expand=[]),Gc.expand.find(Xc(u))||Gc.expand.push(u),u},_n=function(t){return t},Nn=function(t){Vc(t,{SELECT:Gc})},zn=function(t){return t},Rn=function(t){return t},Pn=function(t){return[{val:t}]},qn=function(t){return[{val:t}]},Hn=function(t){return t},Mn=function(t){return t?[t]:[]},Qn=function(t,u){t.push({xpr:u})},Un=function(t,u){t.push(...u)},Gn=function(t,u){"not"===t[t.length-1]&&"not"===u[0]?t.push({xpr:u}):t.push(...u)},Jn=function(t,u){t.push(u)},Kn=function(t,u){t.push({val:u})},Vn=function(t,u){t.push(...u)},Wn=function(t,u,r){t.push(u,...r)},Xn=function(t){return t},Yn=function(t){return[t]},ts=function(t,u){t.push(u)},us=function(t,u){let r=t.pop();if(!u)return["exists",{ref:[...t,{id:r}]}];let e=[];for(let t=0,n=0;t<u.length;++t){let s=u[t];s.ref&&0===s.ref.length&&"="===u[t+1]?e[n++]={func:"contains",args:[{ref:[r]},u[t+=2]]}:e[n++]=s}return e.length<u.length?t.length?(r=t.pop(),["exists",{ref:[...t,{id:r,where:e}]}]):e:["exists",{ref:[...t,{id:r,where:u}]}]},rs=function(t,u){let r=t.pop();return["not","exists",{ref:[...t,{id:r,where:["not",{xpr:[...u]}]}]}]},es=function(t,u){return u},ns=function(t){return t?[t]:[]},ss=function(t,u){t.push({xpr:u})},os=function(t,u){t.push(...u)},as=function(t,u){t.push(u)},cs=function(t,u){t.push(...u)},is=function(t,u){t.push(...u)},fs=function(t,u,r){t.push(u,...r)},ls=function(t){return t},As=function(t,u){return ii(t,u)},hs=function(t){return t},ps=function(t){return t},ds=function(){const t=new Error('"$orderby" does not support lambda');throw t.statusCode=501,t},Cs=function(t,u){return u},vs=function(t,u){return Hc(t,u&&{sort:u})},gs=function(t){t&&(Gc.count=!0)},Fs=function(t,u){return u},bs=function(t,u){if(void 0!==t){u=Array.isArray(u)?u:[u];for(let r of u)for(const u in r)if("limit"===u&&r.limit&&t.limit&&t.limit.offset&&r.limit.rows)t.limit.rows=r.limit.rows;else if(t[u]||"groupBy"===u&&(t.where||t.search)||"aggregate"===u&&"groupBy"in t&&!("groupBy"in r)){let e=t;t={apply:e},"limit"===u&&r[u].offset&&e.limit&&e.limit.offset&&e.limit.offset.val&&(r[u].offset+=e.limit.offset.val),e=t,e[u]=r[u]}else t[u]=r[u];return{apply:t}}},ms=function(t){return t},Bs=function(t){return{val:t}},Es=function(t){return t},ys=function(t,u){return u},Ds=function(t,u){return[t,...u]},xs=function(t){return{list:t}},ws=function(t,u){fi(t,u)},$s=function(t){return"@"+t},Ls=function(t,u){Ai(Gc,t,u)||(u.val?u=u.val:u.list&&Array.isArray(u.list)&&(u=u.list.map((t=>t.val))),fi(t,u))},Ss=function(t){if("json"!==t.toLowerCase()){const t=new Error('Only query parameter "json" is allowed in "$format".');throw t.statusCode=501,t}},Ts=function(t,u,r){return[t,Pc[u]||u,r]},js=function(t){return{list:t}},ks=function(t,u){return[t,"in",u]},Os=function(t,u){return u},Is=function(t,u){return u?{id:t,where:u}:t},Zs=function(t,u){return{func:"count",as:"$count",args:[{ref:t}]}},_s=function(t,u){return u},Ns=function(t,u){return"null"===t?{val:null}:{ref:[t,...u]}},zs=function(t){return{val:t}},Rs=function(t){return{val:t}},Ps=function(t){return{val:t}},qs=function(t){return{val:t}},Hs=function(t){return"number"==typeof t?{val:t}:{val:t,literal:"number"}},Ms=function(t){return{val:t}},Qs=function(t){return{val:t}},Us=function(t){return{val:t}},Gs=function(){return{val:null}},Js=function(t){return{val:t}},Ks=function(t){return{val:t}},Vs=function(t){return{list:t.replace(/"/g,"").split(",").map((t=>({val:t})))}},Ws=function(t,u){return u},Xs=function(t,u){return[t,...u]},Ys=function(t){return{list:t}},to=function(t,u){if(Mc&&!(t.toLowerCase()in Mc.functions))throw Object.assign(new Error(`Function "${t}" is not supported`),{statusCode:501});return{func:t.toLowerCase(),args:u}},uo=function(t,u){return u},ro=function(t,u){return[t,...u]},eo=function(t){return t.length?t[0]:t},no=function(t,u,r){return{func:t.toLowerCase(),args:[u,r]}},so=function(){return"not"},oo=function(){return"and"},ao=function(){return"or"},co=function(t){return t},io=function(t){return t},fo=function(t){return t},lo=function(t){return t},Ao=function(t){return t},ho=function(t){return t},po=function(t){return t},Co=function(t){return t},vo=function(t){return t},go=function(t){return t},Fo=function(t){return{ancestors:t}},bo=function(t){return{descendants:t}},mo=function(t,u){if(t=t.toLowerCase(),!qc[t])throw Object.assign(new Error(`Transformation "${t}" in $apply is not yet supported.`),{statusCode:501});return{aggregate:[{func:t,args:u}]}},Bo=function(t){return t},Eo=function(t,u){return u},yo=function(t,u){return{aggregate:[t,...u]}},Do=function(t){return{func:"count",args:[{val:1}],as:t}},xo=function(t){return t},wo=function(t,u,r){return{func:u,args:[t],as:r??t.ref[0]}},$o=function(t){return t.toLowerCase()},Lo=function(t){return t},So=function(t,u){return u},To=function(t,u){return{groupBy:[t,...u]}},jo=function(t,u,r){return r},ko=function(t,u,r){let e={};return e=r?{groupBy:[t,...u],...r.apply}:{groupBy:[t,...u]},e},Oo=function(t){return t},Io=function(t){const u=new Error("Rollup in groupby is not supported yet.");throw u.statusCode=501,u},Zo=function(t){return t},_o=function(t){return{where:t}},No=function(t){if(t=t.trim())return{search:[{val:t}]}},zo=function(t,u){return u},Ro=function(t,u){return{concat:[t,...u]}},Po=function(t,u){return[t,u]},qo=function(){return{identity:!0}},Ho=function(t){return{limit:{rows:{val:t}}}},Mo=function(t){return{limit:{offset:{val:t}}}},Qo=function(t,u){return u},Uo=function(t,u){return{orderBy:[t,...u]}},Go=function(t,u){return u},Jo=function(t,u){return u.forEach((u=>Object.assign(t,u))),{topLevels:t}},Ko=function(t){return{hierarchyNodes:t}},Vo=function(t){return{hierarchyQualifier:t}},Wo=function(t){return{nodeProperty:t}},Xo=function(t){return{levels:t}},Yo=function(t,u){return u},ta=function(t,u){return{expandLevels:[t,...u]}},ua=function(t,u){return Object.assign(t,u)},ra=function(t){return{nodeID:t}},ea=function(t){return{levels:t}},na=function(t){return t},sa=function(){return null},oa=function(t,u,r,e,n,s){return{path:t,hierarchy:u,id:r,nodes:e,distance:n,keepStart:s?.keepStart||!1}},aa=function(t,u){return u},ca=function(t,u){return[t,...u]},ia=function(t){return{filter:t}},fa=function(t){return{search:t}},la=function(){return{keepStart:!0}},Aa=function(t){return"true"===t},ha=function(t){return t.replace(/''/g,"'")},pa=function(t){return t.replace(/\\\\/g,"\\").replace(/\\"/g,'"')},da=function(t){if(t.split("-")[0].length>4)throw Object.assign(new Error(`The type Edm.DateTimeOffset is not compatible with "${t}"`),{statusCode:400});return t},Ca=function(t){return Kc(t)},va=function(t){return parseInt(t)},ga=function(t){return t},Fa=function(t){return{val:t}},ba=function(t){return cds.env.features.base64_binaries?Wc(t):Buffer.from(t,"base64")},ma=0|u.peg$currPos,Ba=[{line:1,column:1}],Ea=ma,ya=u.peg$maxFailExpected||[],Da=0|u.peg$silentFails;if(u.startRule){if(!(u.startRule in s))throw new Error("Can't start parsing from rule \""+u.startRule+'".');o=s[u.startRule]}function xa(t,u){return{type:"literal",text:t,ignoreCase:u}}function wa(t,u,r){return{type:"class",parts:t,inverted:u,ignoreCase:r}}function $a(t){return{type:"other",description:t}}function La(u){var r,e=Ba[u];if(e)return e;if(u>=Ba.length)r=Ba.length-1;else for(r=u;!Ba[--r];);for(e={line:(e=Ba[r]).line,column:e.column};r<u;)10===t.charCodeAt(r)?(e.line++,e.column=1):e.column++,r++;return Ba[u]=e,e}function Sa(t,u,r){var e=La(t),s=La(u),o={source:n,start:{offset:t,line:e.line,column:e.column},end:{offset:u,line:s.line,column:s.column}};return r&&n&&"function"==typeof n.offset&&(o.start=n.offset(o.start),o.end=n.offset(o.end)),o}function Ta(t){ma<Ea||(ma>Ea&&(Ea=ma,ya=[]),ya.push(t))}function ja(t,u,r){return new peg$SyntaxError(peg$SyntaxError.buildMessage(t,u),t,u,r)}function ka(){var u,r,n,s,o,f,l,A,h,p,d,C,v,g,F,b,m;if(u=ma,47===t.charCodeAt(ma)?(r=a,ma++):(r=e,0===Da&&Ta(Bu)),r===e&&(r=null),n=ma,(s=Oa())!==e&&(s=sn(s)),(n=s)!==e){if(s=ma,o=Nc(),63===t.charCodeAt(ma)?(f=c,ma++):(f=e,0===Da&&Ta(Eu)),f!==e){if(l=Nc(),A=ma,38===t.charCodeAt(ma)?(h=i,ma++):(h=e,0===Da&&Ta(yu)),h===e&&(h=null),p=Nc(),(d=_a())!==e){if(C=[],v=ma,g=Nc(),F=[],38===t.charCodeAt(ma)?(b=i,ma++):(b=e,0===Da&&Ta(yu)),b!==e)for(;b!==e;)F.push(b),38===t.charCodeAt(ma)?(b=i,ma++):(b=e,0===Da&&Ta(yu));else F=e;for(F!==e?(b=Nc(),(m=_a())!==e?v=g=[g,F,b,m]:(ma=v,v=e)):(ma=v,v=e);v!==e;){if(C.push(v),v=ma,g=Nc(),F=[],38===t.charCodeAt(ma)?(b=i,ma++):(b=e,0===Da&&Ta(yu)),b!==e)for(;b!==e;)F.push(b),38===t.charCodeAt(ma)?(b=i,ma++):(b=e,0===Da&&Ta(yu));else F=e;F!==e?(b=Nc(),(m=_a())!==e?v=g=[g,F,b,m]:(ma=v,v=e)):(ma=v,v=e)}A=h=[h,p,d,C]}else ma=A,A=e;A===e&&(A=null),s=o=[o,f,l,A]}else ma=s,s=e;s===e&&(s=null),o=Nc(),u=on()}else ma=u,u=e;return u}function Oa(){var u,r,n,s,o,c,i;return u=ma,t.substr(ma,6)===f?(r=f,ma+=6):(r=e,0===Da&&Ta(Du)),r!==e&&(r=an()),(u=r)===e&&(u=ma,r=ma,t.substr(ma,4)===l?(n=l,ma+=4):(n=e,0===Da&&Ta(xu)),n===e&&(t.substr(ma,6)===A?(n=A,ma+=6):(n=e,0===Da&&Ta(wu))),(r=n!==e?t.substring(r,ma):n)!==e&&(r=cn(r)),(u=r)===e&&(u=ma,r=ma,(n=Tc())!==e?(s=ma,(o=Zc())!==e&&(c=_c())!==e?s=o=[o,c]:(ma=s,s=e),s===e&&(s=ma,(o=Zc())!==e&&(c=Ia())!==e&&(i=_c())!==e?s=o=[o,c,i]:(ma=s,s=e)),s===e&&(s=null),o=ma,Da++,c=Oc(),Da--,c===e?o=void 0:(ma=o,o=e),o!==e?r=n=[n,s,o]:(ma=r,r=e)):(ma=r,r=e),r===e&&(r=ma,(n=Oc())!==e&&(n=fn(n)),r=n),r===e&&(r=null),n=ma,s=ma,47===t.charCodeAt(ma)?(o=a,ma++):(o=e,0===Da&&Ta(Bu)),o!==e&&(o=ln(r,o)),(s=o)!==e?((o=Oa())===e&&(o=null),n=s=[s,o]):(ma=n,n=e),n===e&&(n=null),u=An(r,n))),u}function Ia(){var u,r,n,s,o,a,c;return u=ma,(r=sc())!==e&&(r=hn(r)),(u=r)===e&&(u=ma,(r=nc())!==e?(Nc(),61===t.charCodeAt(ma)?(n=h,ma++):(n=e,0===Da&&Ta($u)),n!==e?(Nc(),(s=sc())!==e?(o=ma,(a=Ic())!==e&&(c=Ia())!==e?o=a=[a,c]:(ma=o,o=e),o===e&&(o=null),u=pn(r,s,o)):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e)),u}function Za(){var u,r,n,s,o,c,i;if(u=ma,(r=Tc())!==e){for(n=ma,(s=Zc())!==e&&(o=_c())!==e?n=s=[s,o]:(ma=n,n=e),n===e&&(n=ma,(s=Zc())!==e&&(o=Ia())!==e&&(c=_c())!==e?n=dn(r,o):(ma=n,n=e)),n===e&&(n=null),s=[],o=ma,47===t.charCodeAt(ma)?(c=a,ma++):(c=e,0===Da&&Ta(Bu)),c!==e&&(i=Za())!==e?o=Cn(r,n,i):(ma=o,o=e);o!==e;)s.push(o),o=ma,47===t.charCodeAt(ma)?(c=a,ma++):(c=e,0===Da&&Ta(Bu)),c!==e&&(i=Za())!==e?o=Cn(r,n,i):(ma=o,o=e);u=vn(r,n,s)}else ma=u,u=e;return u}function _a(){var u,r,n,s;return u=ma,t.substr(ma,11)===p?(r=p,ma+=11):(r=e,0===Da&&Ta(Lu)),r!==e?(n=Nc(),s=function(){var u,r;u=ma,r=function(){var u,r,n;u=ma,r=[],n=t.charAt(ma),Fu.test(n)?ma++:(n=e,0===Da&&Ta(Ve));if(n!==e)for(;n!==e;)r.push(n),n=t.charAt(ma),Fu.test(n)?ma++:(n=e,0===Da&&Ta(Ve));else r=e;u=r!==e?t.substring(u,ma):r;return u}(),r===e&&(r=null);return r=Nn(r),u=r,u}(),u=r=[r,n,s]):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,8)===d?(r=d,ma+=8):(r=e,0===Da&&Ta(Su)),r!==e?(n=Nc(),s=function(){var u,r;u=ma,r=function(){var u,r,n,s,o,a,c,i,f,l,A,h;u=ma,r=ma,n=[],s=ma,o=ma,a=[],c=t.charAt(ma),eu.test(c)?ma++:(c=e,0===Da&&Ta(Gu));for(;c!==e;)a.push(c),c=t.charAt(ma),eu.test(c)?ma++:(c=e,0===Da&&Ta(Gu));o=t.substring(o,ma),a=[],c=t.charAt(ma),nu.test(c)?ma++:(c=e,0===Da&&Ta(Ju));if(c!==e)for(;c!==e;)a.push(c),c=t.charAt(ma),nu.test(c)?ma++:(c=e,0===Da&&Ta(Ju));else a=e;if(a===e){if(a=[],c=ma,34===t.charCodeAt(ma)?(i=T,ma++):(i=e,0===Da&&Ta(Ku)),i!==e){if(f=[],t.substr(ma,2)===j?(l=j,ma+=2):(l=e,0===Da&&Ta(Vu)),l===e&&(t.substr(ma,2)===k?(l=k,ma+=2):(l=e,0===Da&&Ta(Wu)),l===e&&(l=t.charAt(ma),su.test(l)?ma++:(l=e,0===Da&&Ta(Xu)))),l!==e)for(;l!==e;)f.push(l),t.substr(ma,2)===j?(l=j,ma+=2):(l=e,0===Da&&Ta(Vu)),l===e&&(t.substr(ma,2)===k?(l=k,ma+=2):(l=e,0===Da&&Ta(Wu)),l===e&&(l=t.charAt(ma),su.test(l)?ma++:(l=e,0===Da&&Ta(Xu))));else f=e;if(f!==e)if(34===t.charCodeAt(ma)?(l=T,ma++):(l=e,0===Da&&Ta(Ku)),l!==e){for(A=[],h=t.charAt(ma),eu.test(h)?ma++:(h=e,0===Da&&Ta(Gu));h!==e;)A.push(h),h=t.charAt(ma),eu.test(h)?ma++:(h=e,0===Da&&Ta(Gu));c=i=[i,f,l,A]}else ma=c,c=e;else ma=c,c=e}else ma=c,c=e;if(c!==e)for(;c!==e;)if(a.push(c),c=ma,34===t.charCodeAt(ma)?(i=T,ma++):(i=e,0===Da&&Ta(Ku)),i!==e){if(f=[],t.substr(ma,2)===j?(l=j,ma+=2):(l=e,0===Da&&Ta(Vu)),l===e&&(t.substr(ma,2)===k?(l=k,ma+=2):(l=e,0===Da&&Ta(Wu)),l===e&&(l=t.charAt(ma),su.test(l)?ma++:(l=e,0===Da&&Ta(Xu)))),l!==e)for(;l!==e;)f.push(l),t.substr(ma,2)===j?(l=j,ma+=2):(l=e,0===Da&&Ta(Vu)),l===e&&(t.substr(ma,2)===k?(l=k,ma+=2):(l=e,0===Da&&Ta(Wu)),l===e&&(l=t.charAt(ma),su.test(l)?ma++:(l=e,0===Da&&Ta(Xu))));else f=e;if(f!==e)if(34===t.charCodeAt(ma)?(l=T,ma++):(l=e,0===Da&&Ta(Ku)),l!==e){for(A=[],h=t.charAt(ma),eu.test(h)?ma++:(h=e,0===Da&&Ta(Gu));h!==e;)A.push(h),h=t.charAt(ma),eu.test(h)?ma++:(h=e,0===Da&&Ta(Gu));c=i=[i,f,l,A]}else ma=c,c=e;else ma=c,c=e}else ma=c,c=e;else a=e}a!==e?s=o=[o,a]:(ma=s,s=e);if(s!==e)for(;s!==e;){for(n.push(s),s=ma,o=ma,a=[],c=t.charAt(ma),eu.test(c)?ma++:(c=e,0===Da&&Ta(Gu));c!==e;)a.push(c),c=t.charAt(ma),eu.test(c)?ma++:(c=e,0===Da&&Ta(Gu));if(o=t.substring(o,ma),a=[],c=t.charAt(ma),nu.test(c)?ma++:(c=e,0===Da&&Ta(Ju)),c!==e)for(;c!==e;)a.push(c),c=t.charAt(ma),nu.test(c)?ma++:(c=e,0===Da&&Ta(Ju));else a=e;if(a===e){if(a=[],c=ma,34===t.charCodeAt(ma)?(i=T,ma++):(i=e,0===Da&&Ta(Ku)),i!==e){if(f=[],t.substr(ma,2)===j?(l=j,ma+=2):(l=e,0===Da&&Ta(Vu)),l===e&&(t.substr(ma,2)===k?(l=k,ma+=2):(l=e,0===Da&&Ta(Wu)),l===e&&(l=t.charAt(ma),su.test(l)?ma++:(l=e,0===Da&&Ta(Xu)))),l!==e)for(;l!==e;)f.push(l),t.substr(ma,2)===j?(l=j,ma+=2):(l=e,0===Da&&Ta(Vu)),l===e&&(t.substr(ma,2)===k?(l=k,ma+=2):(l=e,0===Da&&Ta(Wu)),l===e&&(l=t.charAt(ma),su.test(l)?ma++:(l=e,0===Da&&Ta(Xu))));else f=e;if(f!==e)if(34===t.charCodeAt(ma)?(l=T,ma++):(l=e,0===Da&&Ta(Ku)),l!==e){for(A=[],h=t.charAt(ma),eu.test(h)?ma++:(h=e,0===Da&&Ta(Gu));h!==e;)A.push(h),h=t.charAt(ma),eu.test(h)?ma++:(h=e,0===Da&&Ta(Gu));c=i=[i,f,l,A]}else ma=c,c=e;else ma=c,c=e}else ma=c,c=e;if(c!==e)for(;c!==e;)if(a.push(c),c=ma,34===t.charCodeAt(ma)?(i=T,ma++):(i=e,0===Da&&Ta(Ku)),i!==e){if(f=[],t.substr(ma,2)===j?(l=j,ma+=2):(l=e,0===Da&&Ta(Vu)),l===e&&(t.substr(ma,2)===k?(l=k,ma+=2):(l=e,0===Da&&Ta(Wu)),l===e&&(l=t.charAt(ma),su.test(l)?ma++:(l=e,0===Da&&Ta(Xu)))),l!==e)for(;l!==e;)f.push(l),t.substr(ma,2)===j?(l=j,ma+=2):(l=e,0===Da&&Ta(Vu)),l===e&&(t.substr(ma,2)===k?(l=k,ma+=2):(l=e,0===Da&&Ta(Wu)),l===e&&(l=t.charAt(ma),su.test(l)?ma++:(l=e,0===Da&&Ta(Xu))));else f=e;if(f!==e)if(34===t.charCodeAt(ma)?(l=T,ma++):(l=e,0===Da&&Ta(Ku)),l!==e){for(A=[],h=t.charAt(ma),eu.test(h)?ma++:(h=e,0===Da&&Ta(Gu));h!==e;)A.push(h),h=t.charAt(ma),eu.test(h)?ma++:(h=e,0===Da&&Ta(Gu));c=i=[i,f,l,A]}else ma=c,c=e;else ma=c,c=e}else ma=c,c=e;else a=e}a!==e?s=o=[o,a]:(ma=s,s=e)}else n=e;r=n!==e?t.substring(r,ma):n;r!==e&&(r=Pn(r));return u=r,u}(),r!==e&&(r=Rn(r));u=r,u===e&&(u=Nc());return u}(),s!==e?u=gn(s):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,(r=Na())!==e&&(r=Fn(r)),(u=r)===e&&(u=function(){var u,r,n,s;u=ma,t.substr(ma,3)===y?(r=y,ma+=3):(r=e,0===Da&&Ta(Ru));r===e&&(t.substr(ma,5)===D?(r=D,ma+=5):(r=e,0===Da&&Ta(Pu)),r===e&&(t.substr(ma,12)===x?(r=x,ma+=12):(r=e,0===Da&&Ta(qu)),r===e&&(t.substr(ma,3)===w?(r=w,ma+=3):(r=e,0===Da&&Ta(Hu)))));r!==e?(61===t.charCodeAt(ma)?(n=h,ma++):(n=e,0===Da&&Ta($u)),n!==e&&(s=Lc())!==e?u=r=[r,n,s]:(ma=u,u=e)):(ma=u,u=e);return u}(),u===e&&(u=function(){var u,r,n,s,o;u=ma,t.substr(ma,8)===Q?(r=Q,ma+=8):(r=e,0===Da&&Ta(pr));if(r!==e){for(n=ma,s=[],o=t.charAt(ma),ru.test(o)?ma++:(o=e,0===Da&&Ta(zu));o!==e;)s.push(o),o=t.charAt(ma),ru.test(o)?ma++:(o=e,0===Da&&Ta(zu));n=t.substring(n,ma),u=Ss(n)}else ma=u,u=e;return u}(),u===e&&(u=function(){var u,r,n,s,o,a;u=ma,r=ma,n=[],s=t.charAt(ma),au.test(s)?ma++:(s=e,0===Da&&Ta(lr));if(s!==e)for(;s!==e;)n.push(s),s=t.charAt(ma),au.test(s)?ma++:(s=e,0===Da&&Ta(lr));else n=e;r=n!==e?t.substring(r,ma):n;if(r!==e){for(61===t.charCodeAt(ma)?(n=h,ma++):(n=e,0===Da&&Ta($u)),n===e&&(n=null),s=ma,o=[],a=t.charAt(ma),ru.test(a)?ma++:(a=e,0===Da&&Ta(zu));a!==e;)o.push(a),a=t.charAt(ma),ru.test(a)?ma++:(a=e,0===Da&&Ta(zu));s=t.substring(s,ma),u=ws(r,s)}else ma=u,u=e;return u}(),u===e&&(u=function(){var u,r,n,s,o;u=ma,r=Ya(),r!==e?(61===t.charCodeAt(ma)?(n=h,ma++):(n=e,0===Da&&Ta($u)),n!==e?(s=ma,Da++,o=Ya(),Da--,o===e?s=void 0:(ma=s,s=e),s!==e?(o=function(){var u,r,n,s;u=sc(),u===e&&(u=ac())===e&&(u=cc())===e&&(u=ma,91===t.charCodeAt(ma)?(r=q,ma++):(r=e,0===Da&&Ta(ir)),r!==e?(n=function(){var u,r,n,s,o,a;if(u=ma,r=Xa(),r!==e){for(n=[],s=ma,44===t.charCodeAt(ma)?(o=P,ma++):(o=e,0===Da&&Ta(cr)),o!==e&&(a=Xa())!==e?s=ys(r,a):(ma=s,s=e);s!==e;)n.push(s),s=ma,44===t.charCodeAt(ma)?(o=P,ma++):(o=e,0===Da&&Ta(cr)),o!==e&&(a=Xa())!==e?s=ys(r,a):(ma=s,s=e);u=Ds(r,n)}else ma=u,u=e;return u}(),n!==e?(93===t.charCodeAt(ma)?(s=H,ma++):(s=e,0===Da&&Ta(fr)),s!==e?u=xs(n):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e));return u}(),o!==e?u=Ls(r,o):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e);return u}(),u===e&&(u=function(){var u,r,n,s;u=ma,t.substr(ma,12)===z?(r=z,ma+=12):(r=e,0===Da&&Ta(sr));if(r!==e){for(Nc(),n=[],s=t.charAt(ma),ru.test(s)?ma++:(s=e,0===Da&&Ta(zu));s!==e;)n.push(s),s=t.charAt(ma),ru.test(s)?ma++:(s=e,0===Da&&Ta(zu));u=ms(n)}else ma=u,u=e;return u}()))))))),u}function Na(){var u,r,n,s,o,a,c,i;if(u=ma,t.substr(ma,8)===C?(r=C,ma+=8):(r=e,0===Da&&Ta(Tu)),r!==e)if(n=Nc(),(s=za())!==e){for(o=[],a=ma,(c=Ic())!==e&&(i=za())!==e?a=c=[c,i]:(ma=a,a=e);a!==e;)o.push(a),a=ma,(c=Ic())!==e&&(i=za())!==e?a=c=[c,i]:(ma=a,a=e);u=r=[r,n,s,o]}else ma=u,u=e;else ma=u,u=e;if(u===e){if(u=ma,t.substr(ma,8)===v?(r=v,ma+=8):(r=e,0===Da&&Ta(ju)),r!==e)if(n=Nc(),(s=Pa())!==e){for(o=[],a=ma,(c=Ic())!==e&&(i=Pa())!==e?a=c=[c,i]:(ma=a,a=e);a!==e;)o.push(a),a=ma,(c=Ic())!==e&&(i=Pa())!==e?a=c=[c,i]:(ma=a,a=e);a=function(){var u,r;u=ma,t.substr(ma,7)===L?(r=L,ma+=7):(r=e,0===Da&&Ta(Qu));r!==e&&(r=Tn());return u=r,u}(),a===e&&(a=null),u=r=[r,n,s,o,a]}else ma=u,u=e;else ma=u,u=e;if(u===e&&(u=ma,t.substr(ma,8)===g?(r=g,ma+=8):(r=e,0===Da&&Ta(ku)),r!==e?(n=Nc(),(s=Qa())!==e?u=bn(s):(ma=u,u=e)):(ma=u,u=e),u===e)){if(u=ma,t.substr(ma,9)===F?(r=F,ma+=9):(r=e,0===Da&&Ta(Ou)),r!==e)if(n=Nc(),(s=Va())!==e){for(o=[],a=ma,(c=Ic())!==e&&(i=Va())!==e?a=mn(s,i):(ma=a,a=e);a!==e;)o.push(a),a=ma,(c=Ic())!==e&&(i=Va())!==e?a=mn(s,i):(ma=a,a=e);u=Bn(s)}else ma=u,u=e;else ma=u,u=e;if(u===e&&(u=ma,t.substr(ma,5)===b?(r=b,ma+=5):(r=e,0===Da&&Ta(Iu)),r!==e?(n=Nc(),(s=qa())!==e?u=En(s):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,6)===m?(r=m,ma+=6):(r=e,0===Da&&Ta(Zu)),r!==e?(n=Nc(),(s=Ha())!==e?u=yn(s):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,8)===d?(r=d,ma+=8):(r=e,0===Da&&Ta(Su)),r!==e?(n=Nc(),(s=Ma())!==e?u=Dn(s):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,7)===B?(r=B,ma+=7):(r=e,0===Da&&Ta(_u)),r!==e?(n=Nc(),s=function(){var t,u;t=ma,u=xc(),u!==e&&(u=gs(u));return t=u,t}(),s!==e?u=r=[r,n,s]:(ma=u,u=e)):(ma=u,u=e),u===e))))){if(u=ma,t.substr(ma,7)===E?(r=E,ma+=7):(r=e,0===Da&&Ta(Nu)),r!==e)if((n=(n=xn())?void 0:e)!==e){for(s=Nc(),o=[],a=t.charAt(ma),ru.test(a)?ma++:(a=e,0===Da&&Ta(zu));a!==e;)o.push(a),a=t.charAt(ma),ru.test(a)?ma++:(a=e,0===Da&&Ta(zu));u=wn()}else ma=u,u=e;else ma=u,u=e;u===e&&(u=ma,t.substr(ma,7)===E?(r=E,ma+=7):(r=e,0===Da&&Ta(Nu)),r!==e?(n=Nc(),(s=Wa())!==e?u=$n(s):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,8)===v?(r=v,ma+=8):(r=e,0===Da&&Ta(ju)),r!==e&&(r=Ln()),u=r))}}}return u}function za(){var u,r;return u=ma,42===t.charCodeAt(ma)?(r=$,ma++):(r=e,0===Da&&Ta(Mu)),r===e&&(r=nc()),r!==e&&(r=Sn(r)),u=r}function Ra(){var u,r,n,s,o;return u=ma,r=ma,(n=Zc())!==e&&(n=On()),(r=n)!==e?(n=function(){var u,r,n,s,o;for(u=ma,r=[],n=ma,(s=Na())!==e?(Nc(),59===t.charCodeAt(ma)?(o=S,ma++):(o=e,0===Da&&Ta(Uu)),o===e&&(o=null),n=jn(s)):(ma=n,n=e);n!==e;)r.push(n),n=ma,(s=Na())!==e?(Nc(),59===t.charCodeAt(ma)?(o=S,ma++):(o=e,0===Da&&Ta(Uu)),o===e&&(o=null),n=jn(s)):(ma=n,n=e);return kn(r)}(),s=ma,(o=_c())!==e&&(o=In()),(s=o)!==e?u=r=[r,n,s]:(ma=u,u=e)):(ma=u,u=e),u}function Pa(){var u,r,n;return u=ma,r=ma,42===t.charCodeAt(ma)?(n=$,ma++):(n=e,0===Da&&Ta(Mu)),n===e&&(n=nc()),n!==e&&(n=Zn(n)),(r=n)!==e?((n=Ra())===e&&(n=null),u=r=[r,n]):(ma=u,u=e),u}function qa(){var t,u;return t=ma,(u=Sc())!==e&&(u=_n(u)),t=u}function Ha(){var t,u;return t=ma,(u=Sc())!==e&&(u=zn(u)),t=u}function Ma(){var u,r,n,s;if(u=ma,r=ma,n=[],s=t.charAt(ma),ou.test(s)?ma++:(s=e,0===Da&&Ta(Yu)),s!==e)for(;s!==e;)n.push(s),s=t.charAt(ma),ou.test(s)?ma++:(s=e,0===Da&&Ta(Yu));else n=e;return(r=n!==e?t.substring(r,ma):n)!==e&&(r=qn(r)),(u=r)===e&&(u=Nc()),u}function Qa(){var t,u;return t=ma,(u=Ua())!==e&&(u=Hn(u)),t=u}function Ua(){var u,r,n,s,o,a,c;if(u=ma,r=ma,(n=fc())===e&&(n=null),r=n=Mn(n),n=ma,(s=Zc())!==e&&(o=Ua())!==e&&(a=_c())!==e?n=Qn(r,o):(ma=n,n=e),n===e&&(n=ma,(s=tc())!==e&&(s=Un(r,s)),(n=s)===e&&(n=ma,(s=Ga())!==e&&(s=Gn(r,s)),(n=s)===e&&(n=ma,s=function(){var u,r,n,s;u=ma,r=t.substr(ma,8),r.toLowerCase()===rt?ma+=8:(r=e,0===Da&&Ta(Ir));r===e&&((r=t.substr(ma,8)).toLowerCase()===et?ma+=8:(r=e,0===Da&&Ta(Zr)),r===e&&((r=t.substr(ma,10)).toLowerCase()===nt?ma+=10:(r=e,0===Da&&Ta(_r)),r===e&&((r=t.substr(ma,14)).toLowerCase()===st?ma+=14:(r=e,0===Da&&Ta(Nr)))));r!==e&&Zc()!==e&&(n=ec())!==e&&Ic()!==e&&(s=ec())!==e&&_c()!==e?u=no(r,n,s):(ma=u,u=e);return u}(),s!==e&&(s=Jn(r,s)),(n=s)===e&&(n=ma,(s=xc())!==e&&(s=Kn(r,s)),(n=s)===e&&(n=ma,(s=rc())!==e&&(s=Vn(r,s)),n=s))))),n!==e){for(s=[],o=ma,(a=lc())===e&&(a=Ac()),a!==e&&(c=Ua())!==e?o=Wn(r,a,c):(ma=o,o=e);o!==e;)s.push(o),o=ma,(a=lc())===e&&(a=Ac()),a!==e&&(c=Ua())!==e?o=Wn(r,a,c):(ma=o,o=e);u=Xn(r)}else ma=u,u=e;return u}function Ga(){var u,r,n,s,o,c,i;if(u=ma,r=ma,(n=Tc())!==e&&(n=Yn(n)),(r=n)!==e)if(47===t.charCodeAt(ma)?(n=a,ma++):(n=e,0===Da&&Ta(Bu)),n!==e){for(s=[],o=ma,(c=Tc())!==e?(47===t.charCodeAt(ma)?(i=a,ma++):(i=e,0===Da&&Ta(Bu)),i!==e?o=ts(r,c):(ma=o,o=e)):(ma=o,o=e);o!==e;)s.push(o),o=ma,(c=Tc())!==e?(47===t.charCodeAt(ma)?(i=a,ma++):(i=e,0===Da&&Ta(Bu)),i!==e?o=ts(r,c):(ma=o,o=e)):(ma=o,o=e);o=ma,c=function(){var u,r,n;u=ma,t.substr(ma,3)===I?(r=I,ma+=3):(r=e,0===Da&&Ta(ur));r!==e&&Zc()!==e?((n=Ka())===e&&(n=null),_c()!==e?u=hs(n):(ma=u,u=e)):(ma=u,u=e);return u}(),c!==e&&(c=us(r,c)),(o=c)===e&&(o=ma,c=function(){var u,r,n;u=ma,t.substr(ma,3)===Z?(r=Z,ma+=3):(r=e,0===Da&&Ta(rr));r!==e&&Zc()!==e&&(n=Ka())!==e&&_c()!==e?u=ps(n):(ma=u,u=e);return u}(),c!==e&&(c=rs(r,c)),o=c),o!==e?u=es(r,o):(ma=u,u=e)}else ma=u,u=e;else ma=u,u=e;return u}function Ja(){var t,u,r,n,s,o,a;if(t=ma,u=ma,(r=fc())===e&&(r=null),u=r=ns(r),r=ma,(n=Zc())!==e&&(s=Ja())!==e&&(o=_c())!==e?r=ss(u,s):(ma=r,r=e),r===e&&(r=ma,(n=tc())!==e&&(n=os(u,n)),(r=n)===e&&(r=ma,(n=ic())!==e&&(n=as(u,n)),(r=n)===e&&(r=ma,(n=Ga())!==e&&(n=cs(u,n)),(r=n)===e&&(r=ma,(n=rc())!==e&&(n=is(u,n)),r=n)))),r!==e){for(n=[],s=ma,(o=lc())===e&&(o=Ac()),o!==e&&(a=Ja())!==e?s=fs(u,o,a):(ma=s,s=e);s!==e;)n.push(s),s=ma,(o=lc())===e&&(o=Ac()),o!==e&&(a=Ja())!==e?s=fs(u,o,a):(ma=s,s=e);t=ls(u)}else ma=t,t=e;return t}function Ka(){var u,r,n,s;return u=ma,(r=Tc())!==e?(58===t.charCodeAt(ma)?(n=O,ma++):(n=e,0===Da&&Ta(tr)),n!==e&&(s=Ja())!==e?u=As(r,s):(ma=u,u=e)):(ma=u,u=e),u}function Va(){var u,r,n,s,o;return u=ma,r=ma,(n=Ga())!==e&&(n=ds()),(r=n)===e&&(r=ic())===e&&(r=nc()),r!==e?(n=ma,zc()!==e?(s=ma,t.substr(ma,3)===_?(o=_,ma+=3):(o=e,0===Da&&Ta(er)),o===e&&(t.substr(ma,4)===N?(o=N,ma+=4):(o=e,0===Da&&Ta(nr))),(s=o!==e?t.substring(s,ma):o)!==e?n=Cs(r,s):(ma=n,n=e)):(ma=n,n=e),n===e&&(n=null),u=vs(r,n)):(ma=u,u=e),u}function Wa(){var u,r,n,s,o,c;if(u=ma,(r=hc())!==e){for(n=[],s=ma,47===t.charCodeAt(ma)?(o=a,ma++):(o=e,0===Da&&Ta(Bu)),o!==e&&(c=hc())!==e?s=Fs(r,c):(ma=s,s=e);s!==e;)n.push(s),s=ma,47===t.charCodeAt(ma)?(o=a,ma++):(o=e,0===Da&&Ta(Bu)),o!==e&&(c=hc())!==e?s=Fs(r,c):(ma=s,s=e);u=bs(r,n)}else ma=u,u=e;return u}function Xa(){var u,r,n;return Da++,u=ma,(r=$c())!==e&&(r=Bs(r)),(u=r)===e&&(u=ma,r=ma,Da++,39===t.charCodeAt(ma)?(n=R,ma++):(n=e,0===Da&&Ta(ar)),Da--,n===e?r=void 0:(ma=r,r=e),r!==e&&(n=sc())!==e?u=Es(n):(ma=u,u=e)),Da--,u===e&&(r=e,0===Da&&Ta(or)),u}function Ya(){var u,r,n;return Da++,u=ma,64===t.charCodeAt(ma)?(r=M,ma++):(r=e,0===Da&&Ta(hr)),r!==e&&(n=Tc())!==e?u=$s(n):(ma=u,u=e),Da--,u===e&&(r=e,0===Da&&Ta(Ar)),u}function tc(){var u,r,n,s,o;return u=ma,(r=ec())!==e&&zc()!==e?(n=ma,t.substr(ma,2)===U?(s=U,ma+=2):(s=e,0===Da&&Ta(dr)),s===e&&(t.substr(ma,2)===G?(s=G,ma+=2):(s=e,0===Da&&Ta(Cr)),s===e&&(t.substr(ma,2)===J?(s=J,ma+=2):(s=e,0===Da&&Ta(vr)),s===e&&(t.substr(ma,2)===K?(s=K,ma+=2):(s=e,0===Da&&Ta(gr)),s===e&&(t.substr(ma,2)===V?(s=V,ma+=2):(s=e,0===Da&&Ta(Fr)),s===e&&(t.substr(ma,2)===W?(s=W,ma+=2):(s=e,0===Da&&Ta(br))))))),(n=s!==e?t.substring(n,ma):s)!==e&&(s=zc())!==e&&(o=ec())!==e?u=Ts(r,n,o):(ma=u,u=e)):(ma=u,u=e),u}function uc(){var u,r;return u=ma,(r=Ya())!==e&&(r=js(r)),(u=r)===e&&(u=function(){var u,r,n;Da++,u=ma,r=Zc(),r!==e?(n=function(){var u,r,n,s,o,a;if(u=ma,r=sc(),r!==e){for(n=[],s=ma,44===t.charCodeAt(ma)?(o=P,ma++):(o=e,0===Da&&Ta(cr)),o!==e&&(a=sc())!==e?s=Ws(r,a):(ma=s,s=e);s!==e;)n.push(s),s=ma,44===t.charCodeAt(ma)?(o=P,ma++):(o=e,0===Da&&Ta(cr)),o!==e&&(a=sc())!==e?s=Ws(r,a):(ma=s,s=e);u=Xs(r,n)}else ma=u,u=e;return u}(),n!==e&&_c()!==e?u=Ys(n):(ma=u,u=e)):(ma=u,u=e);Da--,u===e&&(r=e,0===Da&&Ta(jr));return u}()),u}function rc(){var u,r,n,s;return u=ma,(r=ec())!==e&&zc()!==e?(t.substr(ma,2)===X?(n=X,ma+=2):(n=e,0===Da&&Ta(mr)),n!==e&&zc()!==e&&(s=uc())!==e?u=ks(r,s):(ma=u,u=e)):(ma=u,u=e),u}function ec(){var u;return(u=function(){var u,r,n,s,o,c,i;Da++,u=ma,r=[],n=ma,(s=Tc())!==e?(o=ma,(c=Zc())!==e&&(i=Ia())!==e&&_c()!==e?o=Os(s,i):(ma=o,o=e),o===e&&(o=null),47===t.charCodeAt(ma)?(c=a,ma++):(c=e,0===Da&&Ta(Bu)),c!==e?n=Is(s,o):(ma=n,n=e)):(ma=n,n=e);if(n!==e)for(;n!==e;)r.push(n),n=ma,(s=Tc())!==e?(o=ma,(c=Zc())!==e&&(i=Ia())!==e&&_c()!==e?o=Os(s,i):(ma=o,o=e),o===e&&(o=null),47===t.charCodeAt(ma)?(c=a,ma++):(c=e,0===Da&&Ta(Bu)),c!==e?n=Is(s,o):(ma=n,n=e)):(ma=n,n=e);else r=e;r!==e?(t.substr(ma,6)===f?(n=f,ma+=6):(n=e,0===Da&&Ta(Du)),n!==e?u=Zs(r,n):(ma=u,u=e)):(ma=u,u=e);Da--,u===e&&(r=e,0===Da&&Ta(Br));return u}())===e&&(u=ic())===e&&(u=sc())===e&&(u=nc())===e&&(u=ac())===e&&(u=cc())===e&&(u=function(){var u,r,n,s,o;Da++,u=ma,91===t.charCodeAt(ma)?(r=q,ma++):(r=e,0===Da&&Ta(ir));if(r!==e){for(n=ma,s=[],o=t.charAt(ma),iu.test(o)?ma++:(o=e,0===Da&&Ta(Tr));o!==e;)s.push(o),o=t.charAt(ma),iu.test(o)?ma++:(o=e,0===Da&&Ta(Tr));n=t.substring(n,ma),93===t.charCodeAt(ma)?(s=H,ma++):(s=e,0===Da&&Ta(fr)),s!==e?u=Vs(n):(ma=u,u=e)}else ma=u,u=e;Da--,u===e&&(r=e,0===Da&&Ta(jr));return u}()),u}function nc(){var u,r,n,s,o,c;if(Da++,u=ma,(r=Tc())!==e){for(n=[],s=ma,47===t.charCodeAt(ma)?(o=a,ma++):(o=e,0===Da&&Ta(Bu)),o!==e&&(c=Tc())!==e?s=_s(r,c):(ma=s,s=e);s!==e;)n.push(s),s=ma,47===t.charCodeAt(ma)?(o=a,ma++):(o=e,0===Da&&Ta(Bu)),o!==e&&(c=Tc())!==e?s=_s(r,c):(ma=s,s=e);u=Ns(r,n)}else ma=u,u=e;return Da--,u===e&&(r=e,0===Da&&Ta(Er)),u}function sc(){var u,r;return u=ma,(r=xc())!==e&&(r=zs(r)),(u=r)===e&&(u=ma,(r=Lc())!==e&&(r=Rs(r)),(u=r)===e&&(u=ma,r=function(){var u,r,n,s,o,a,c,i,f,l;Da++,u=ma,r=ma,n=t.charAt(ma),hu.test(n)?ma++:(n=e,0===Da&&Ta(ke));n!==e?(s=t.charAt(ma),hu.test(s)?ma++:(s=e,0===Da&&Ta(ke)),s!==e?(58===t.charCodeAt(ma)?(o=O,ma++):(o=e,0===Da&&Ta(tr)),o!==e?(a=t.charAt(ma),hu.test(a)?ma++:(a=e,0===Da&&Ta(ke)),a!==e?(c=t.charAt(ma),hu.test(c)?ma++:(c=e,0===Da&&Ta(ke)),c!==e?(58===t.charCodeAt(ma)?(i=O,ma++):(i=e,0===Da&&Ta(tr)),i!==e?(f=t.charAt(ma),hu.test(f)?ma++:(f=e,0===Da&&Ta(ke)),f!==e?(l=t.charAt(ma),hu.test(l)?ma++:(l=e,0===Da&&Ta(ke)),l!==e?r=n=[n,s,o,a,c,i,f,l]:(ma=r,r=e)):(ma=r,r=e)):(ma=r,r=e)):(ma=r,r=e)):(ma=r,r=e)):(ma=r,r=e)):(ma=r,r=e)):(ma=r,r=e);u=r!==e?t.substring(u,ma):r;Da--,u===e&&(r=e,0===Da&&Ta(je));return u}(),r!==e&&(r=Ps(r)),(u=r)===e&&(u=ma,(r=jc())!==e&&(r=qs(r)),(u=r)===e&&(u=ma,r=function(){var u,r,n,s,o,a,c,i,f,l,A;Da++,u=ma,r=ma,Da++,n=function(){var u,r,n;u=ma,r=[],n=t.charAt(ma),hu.test(n)?ma++:(n=e,0===Da&&Ta(ke));if(n!==e)for(;n!==e;)r.push(n),n=t.charAt(ma),hu.test(n)?ma++:(n=e,0===Da&&Ta(ke));else r=e;r!==e?(45===t.charCodeAt(ma)?(n=Jt,ma++):(n=e,0===Da&&Ta(Ie)),n!==e?u=r=[r,n]:(ma=u,u=e)):(ma=u,u=e);return u}(),Da--,n===e?r=void 0:(ma=r,r=e);if(r!==e){if(n=ma,s=ma,o=t.charAt(ma),pu.test(o)?ma++:(o=e,0===Da&&Ta(ze)),o===e&&(o=null),a=[],c=t.charAt(ma),hu.test(c)?ma++:(c=e,0===Da&&Ta(ke)),c!==e)for(;c!==e;)a.push(c),c=t.charAt(ma),hu.test(c)?ma++:(c=e,0===Da&&Ta(ke));else a=e;if(a!==e){if(c=ma,46===t.charCodeAt(ma)?(i=Vt,ma++):(i=e,0===Da&&Ta(_e)),i!==e){if(f=[],l=t.charAt(ma),hu.test(l)?ma++:(l=e,0===Da&&Ta(ke)),l!==e)for(;l!==e;)f.push(l),l=t.charAt(ma),hu.test(l)?ma++:(l=e,0===Da&&Ta(ke));else f=e;f!==e?c=i=[i,f]:(ma=c,c=e)}else ma=c,c=e;if(c===e&&(c=null),i=ma,101===t.charCodeAt(ma)?(f=Xt,ma++):(f=e,0===Da&&Ta(Pe)),f!==e){if(l=[],A=t.charAt(ma),hu.test(A)?ma++:(A=e,0===Da&&Ta(ke)),A!==e)for(;A!==e;)l.push(A),A=t.charAt(ma),hu.test(A)?ma++:(A=e,0===Da&&Ta(ke));else l=e;l!==e?i=f=[f,l]:(ma=i,i=e)}else ma=i,i=e;i===e&&(i=null),s=o=[o,a,c,i]}else ma=s,s=e;(n=s!==e?t.substring(n,ma):s)!==e?u=Ca(n):(ma=u,u=e)}else ma=u,u=e;Da--,u===e&&(r=e,0===Da&&Ta(Re));return u}(),r!==e&&(r=Hs(r)),(u=r)===e&&(u=ma,(r=wc())!==e&&(r=Ms(r)),(u=r)===e&&(u=ma,r=function(){var u,r,n,s,o,a;Da++,u=ma,t.substr(ma,7)===Yt?(r=Yt,ma+=7):(r=e,0===Da&&Ta(Xe));if(r!==e){if(n=ma,s=ma,o=[],a=t.charAt(ma),bu.test(a)?ma++:(a=e,0===Da&&Ta(Ye)),a!==e)for(;a!==e;)o.push(a),a=t.charAt(ma),bu.test(a)?ma++:(a=e,0===Da&&Ta(Ye));else o=e;o!==e?(t.substr(ma,2)===tu?(a=tu,ma+=2):(a=e,0===Da&&Ta(tn)),a===e&&(61===t.charCodeAt(ma)?(a=h,ma++):(a=e,0===Da&&Ta($u))),a===e&&(a=null),s=o=[o,a]):(ma=s,s=e),(n=s!==e?t.substring(n,ma):s)!==e?(39===t.charCodeAt(ma)?(s=R,ma++):(s=e,0===Da&&Ta(ar)),s!==e?u=ba(n):(ma=u,u=e)):(ma=u,u=e)}else ma=u,u=e;Da--,u===e&&(r=e,0===Da&&Ta(We));return u}(),r!==e&&(r=Qs(r)),(u=r)===e&&(u=ma,(r=Ya())!==e&&(r=Us(r)),(u=r)===e&&(u=oc())))))))),u}function oc(){var u,r;return Da++,u=ma,t.substr(ma,4)===Y?(r=Y,ma+=4):(r=e,0===Da&&Ta(Dr)),r!==e&&(r=Gs()),Da--,(u=r)===e&&(r=e,0===Da&&Ta(yr)),u}function ac(){var u,r,n,s,o,a;if(Da++,u=ma,r=ma,n=ma,123===t.charCodeAt(ma)?(s=tt,ma++):(s=e,0===Da&&Ta(wr)),s!==e){for(o=[],(a=ac())===e&&(a=t.charAt(ma),cu.test(a)?ma++:(a=e,0===Da&&Ta($r)));a!==e;)o.push(a),(a=ac())===e&&(a=t.charAt(ma),cu.test(a)?ma++:(a=e,0===Da&&Ta($r)));125===t.charCodeAt(ma)?(a=ut,ma++):(a=e,0===Da&&Ta(Lr)),a!==e?n=s=[s,o,a]:(ma=n,n=e)}else ma=n,n=e;return(r=n!==e?t.substring(r,ma):n)!==e&&(r=Js(r)),Da--,(u=r)===e&&(r=e,0===Da&&Ta(xr)),u}function cc(){var u,r,n,s,o,a,c,i;if(Da++,u=ma,r=ma,n=ma,91===t.charCodeAt(ma)?(s=q,ma++):(s=e,0===Da&&Ta(ir)),s!==e?(o=Nc(),93===t.charCodeAt(ma)?(a=H,ma++):(a=e,0===Da&&Ta(fr)),a!==e?n=s=[s,o,a]:(ma=n,n=e)):(ma=n,n=e),n===e)if(n=ma,91===t.charCodeAt(ma)?(s=q,ma++):(s=e,0===Da&&Ta(ir)),s!==e)if(o=Nc(),123===t.charCodeAt(ma)?(a=tt,ma++):(a=e,0===Da&&Ta(wr)),a!==e){for(c=[],(i=cc())===e&&(i=t.charAt(ma),iu.test(i)?ma++:(i=e,0===Da&&Ta(Tr)));i!==e;)c.push(i),(i=cc())===e&&(i=t.charAt(ma),iu.test(i)?ma++:(i=e,0===Da&&Ta(Tr)));93===t.charCodeAt(ma)?(i=H,ma++):(i=e,0===Da&&Ta(fr)),i!==e?n=s=[s,o,a,c,i]:(ma=n,n=e)}else ma=n,n=e;else ma=n,n=e;return(r=n!==e?t.substring(r,ma):n)!==e&&(r=Ks(r)),Da--,(u=r)===e&&(r=e,0===Da&&Ta(Sr)),u}function ic(){var u,r,n;return u=ma,r=function(){var u,r,n;if(Da++,u=ma,r=[],n=t.charAt(ma),fu.test(n)?ma++:(n=e,0===Da&&Ta(Or)),n!==e)for(;n!==e;)r.push(n),n=t.charAt(ma),fu.test(n)?ma++:(n=e,0===Da&&Ta(Or));else r=e;return u=r!==e?t.substring(u,ma):r,Da--,u===e&&(r=e,0===Da&&Ta(kr)),u}(),r!==e&&Zc()!==e?(n=function(){var t,u,r,n,s,o,a;if(t=ma,u=[],r=ma,n=ec(),n!==e){for(s=[],o=ma,Ic()!==e&&(a=ec())!==e?o=uo(n,a):(ma=o,o=e);o!==e;)s.push(o),o=ma,Ic()!==e&&(a=ec())!==e?o=uo(n,a):(ma=o,o=e);r=ro(n,s)}else ma=r,r=e;for(;r!==e;)if(u.push(r),r=ma,(n=ec())!==e){for(s=[],o=ma,Ic()!==e&&(a=ec())!==e?o=uo(n,a):(ma=o,o=e);o!==e;)s.push(o),o=ma,Ic()!==e&&(a=ec())!==e?o=uo(n,a):(ma=o,o=e);r=ro(n,s)}else ma=r,r=e;return u=eo(u),t=u,t}(),_c()!==e?u=to(r,n):(ma=u,u=e)):(ma=u,u=e),u}function fc(){var u,r;return u=ma,Nc(),(r=t.substr(ma,3)).toLowerCase()===ot?ma+=3:(r=e,0===Da&&Ta(zr)),r!==e&&zc()!==e?u=so():(ma=u,u=e),u}function lc(){var u,r;return u=ma,zc()!==e?((r=t.substr(ma,3)).toLowerCase()===at?ma+=3:(r=e,0===Da&&Ta(Rr)),r!==e&&zc()!==e?u=oo():(ma=u,u=e)):(ma=u,u=e),u}function Ac(){var u,r;return u=ma,zc()!==e?((r=t.substr(ma,2)).toLowerCase()===ct?ma+=2:(r=e,0===Da&&Ta(Pr)),r!==e&&zc()!==e?u=ao():(ma=u,u=e)):(ma=u,u=e),u}function hc(){var u,r,n;return u=ma,t.substr(ma,9)===it?(r=it,ma+=9):(r=e,0===Da&&Ta(qr)),r!==e?(n=function(){var t,u,r,n,s,o;if(t=ma,u=Zc(),u!==e)if(Nc(),(r=pc())!==e){for(n=[],s=ma,Nc(),Ic()!==e?(Nc(),(o=pc())!==e?s=Eo(r,o):(ma=s,s=e)):(ma=s,s=e);s!==e;)n.push(s),s=ma,Nc(),Ic()!==e?(Nc(),(o=pc())!==e?s=Eo(r,o):(ma=s,s=e)):(ma=s,s=e);s=Nc(),_c()!==e?t=yo(r,n):(ma=t,t=e)}else ma=t,t=e;else ma=t,t=e;return t}(),n!==e?u=co(n):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,7)===ft?(r=ft,ma+=7):(r=e,0===Da&&Ta(Hr)),r!==e?(n=function(){var t,u,r,n,s,o,a,c;if(t=ma,u=Zc(),u!==e)if(Zc()!==e)if((r=Fc())!==e){for(n=[],s=ma,(o=Ic())!==e&&(a=Fc())!==e?s=So(r,a):(ma=s,s=e);s!==e;)n.push(s),s=ma,(o=Ic())!==e&&(a=Fc())!==e?s=So(r,a):(ma=s,s=e);s=ma,(o=_c())!==e&&(o=To(r,n)),(s=o)!==e?(o=ma,(a=Ic())!==e&&(c=Wa())!==e?o=jo(r,n,c):(ma=o,o=e),o===e&&(o=null),(a=_c())!==e?t=ko(r,n,o):(ma=t,t=e)):(ma=t,t=e)}else ma=t,t=e;else ma=t,t=e;else ma=t,t=e;return t}(),n!==e?u=io(n):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,6)===lt?(r=lt,ma+=6):(r=e,0===Da&&Ta(Mr)),r!==e?(n=function(){var t,u,r,n;t=ma,u=Zc(),u!==e?(Nc(),r=ma,(n=Qa())!==e&&(n=Zo(n)),(r=n)!==e?(n=Nc(),_c()!==e?t=_o(r):(ma=t,t=e)):(ma=t,t=e)):(ma=t,t=e);return t}(),n!==e?u=fo(n):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,6)===At?(r=At,ma+=6):(r=e,0===Da&&Ta(Qr)),r!==e?(n=function(){var u,r,n,s,o;if(u=ma,r=Zc(),r!==e){for(n=ma,s=[],o=t.charAt(ma),lu.test(o)?ma++:(o=e,0===Da&&Ta(le));o!==e;)s.push(o),o=t.charAt(ma),lu.test(o)?ma++:(o=e,0===Da&&Ta(le));n=t.substring(n,ma),(s=_c())!==e?u=No(n):(ma=u,u=e)}else ma=u,u=e;return u}(),n!==e?u=lo(n):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,6)===ht?(r=ht,ma+=6):(r=e,0===Da&&Ta(Ur)),r!==e?(n=function(){var t,u,r,n,s,o;if(t=ma,u=Zc(),u!==e)if(Nc(),(r=Wa())!==e){if(n=[],s=ma,Nc(),Ic()!==e?(Nc(),(o=Wa())!==e?s=zo(r,o):(ma=s,s=e)):(ma=s,s=e),s!==e)for(;s!==e;)n.push(s),s=ma,Nc(),Ic()!==e?(Nc(),(o=Wa())!==e?s=zo(r,o):(ma=s,s=e)):(ma=s,s=e);else n=e;n!==e?(s=Nc(),_c()!==e?t=Ro(r,n):(ma=t,t=e)):(ma=t,t=e)}else ma=t,t=e;else ma=t,t=e;return t}(),n!==e?u=Ao(n):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,7)===pt?(r=pt,ma+=7):(r=e,0===Da&&Ta(Gr)),r!==e?(n=function(){var t,u,r,n,s,o,a,c,i,f;if(t=ma,u=Zc(),u!==e)if(r=Nc(),(n=bc())!==e){for(s=[],o=ma,a=Nc(),(c=Ic())!==e?(i=Nc(),(f=bc())!==e?o=a=[a,c,i,f]:(ma=o,o=e)):(ma=o,o=e);o!==e;)s.push(o),o=ma,a=Nc(),(c=Ic())!==e?(i=Nc(),(f=bc())!==e?o=a=[a,c,i,f]:(ma=o,o=e)):(ma=o,o=e);o=Nc(),(a=_c())!==e?t=u=[u,r,n,s,o,a]:(ma=t,t=e)}else ma=t,t=e;else ma=t,t=e;return t}(),n!==e?u=ho(n):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,3)===dt?(r=dt,ma+=3):(r=e,0===Da&&Ta(Jr)),r!==e?(n=function(){var t,u,r;t=ma,u=Zc(),u!==e?(Nc(),(r=qa())!==e?(Nc(),_c()!==e?t=Ho(r):(ma=t,t=e)):(ma=t,t=e)):(ma=t,t=e);return t}(),n!==e?u=po(n):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,4)===Ct?(r=Ct,ma+=4):(r=e,0===Da&&Ta(Kr)),r!==e?(n=function(){var t,u,r;t=ma,u=Zc(),u!==e?(Nc(),(r=Ha())!==e?(Nc(),_c()!==e?t=Mo(r):(ma=t,t=e)):(ma=t,t=e)):(ma=t,t=e);return t}(),n!==e?u=Co(n):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,7)===vt?(r=vt,ma+=7):(r=e,0===Da&&Ta(Vr)),r!==e?(n=function(){var t,u,r,n,s,o;if(t=ma,u=Zc(),u!==e)if(Nc(),(r=Va())!==e){for(n=[],s=ma,Ic()!==e&&(o=Va())!==e?s=Qo(r,o):(ma=s,s=e);s!==e;)n.push(s),s=ma,Ic()!==e&&(o=Va())!==e?s=Qo(r,o):(ma=s,s=e);s=Nc(),_c()!==e?t=Uo(r,n):(ma=t,t=e)}else ma=t,t=e;else ma=t,t=e;return t}(),n!==e?u=vo(n):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,43)===gt?(r=gt,ma+=43):(r=e,0===Da&&Ta(Wr)),r!==e?(n=function(){var t,u,r,n,s,o;if(t=ma,u=Zc(),u!==e)if(Nc(),(r=mc())!==e){for(n=[],s=ma,Nc(),Ic()!==e?(Nc(),(o=mc())!==e?s=Go(r,o):(ma=s,s=e)):(ma=s,s=e);s!==e;)n.push(s),s=ma,Nc(),Ic()!==e?(Nc(),(o=mc())!==e?s=Go(r,o):(ma=s,s=e)):(ma=s,s=e);s=Nc(),_c()!==e?t=Jo(r,n):(ma=t,t=e)}else ma=t,t=e;else ma=t,t=e;return t}(),n!==e?u=go(n):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,9)===Ft?(r=Ft,ma+=9):(r=e,0===Da&&Ta(Xr)),r!==e&&(n=yc())!==e?u=Fo(n):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,11)===bt?(r=bt,ma+=11):(r=e,0===Da&&Ta(Yr)),r!==e&&(n=yc())!==e?u=bo(n):(ma=u,u=e),u===e&&(u=ma,(r=t.substr(ma,8)).toLowerCase()===mt?ma+=8:(r=e,0===Da&&Ta(te)),r===e&&((r=t.substr(ma,11)).toLowerCase()===Bt?ma+=11:(r=e,0===Da&&Ta(ue)),r===e&&((r=t.substr(ma,6)).toLowerCase()===Et?ma+=6:(r=e,0===Da&&Ta(re)),r===e&&((r=t.substr(ma,9)).toLowerCase()===yt?ma+=9:(r=e,0===Da&&Ta(ee)),r===e&&((r=t.substr(ma,10)).toLowerCase()===Dt?ma+=10:(r=e,0===Da&&Ta(ne)),r===e&&((r=t.substr(ma,13)).toLowerCase()===xt?ma+=13:(r=e,0===Da&&Ta(se))))))),r!==e?(n=function(){var t,u,r,n;t=ma,u=Zc(),u!==e?(Nc(),(r=ec())!==e?(Nc(),Ic()!==e?(Nc(),(n=ec())!==e?(Nc(),_c()!==e?t=Po(r,n):(ma=t,t=e)):(ma=t,t=e)):(ma=t,t=e)):(ma=t,t=e)):(ma=t,t=e);return t}(),n!==e?u=mo(r,n):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,r=function(){var u,r;u=ma,t.substr(ma,8)===jt?(r=jt,ma+=8):(r=e,0===Da&&Ta(Ae));r!==e&&(r=qo());return u=r,u}(),r!==e&&(r=Bo(r)),u=r))))))))))))),u}function pc(){var u,r,n,s;return u=ma,r=ma,t.substr(ma,6)===f?(n=f,ma+=6):(n=e,0===Da&&Ta(Du)),n!==e&&(s=gc())!==e?r=Do(s):(ma=r,r=e),r===e&&(r=dc()),r!==e&&(r=xo(r)),u=r}function dc(){var t,u,r,n,s;return t=ma,(u=nc())!==e?((r=Cc())===e&&(r=null),(n=vc())===e&&(n=null),(s=gc())===e&&(s=null),t=wo(u,r,s)):(ma=t,t=e),t===e&&(t=ma,(u=Tc())!==e&&(r=Zc())!==e&&(n=dc())!==e&&(s=_c())!==e?t=u=[u,r,n,s]:(ma=t,t=e)),t}function Cc(){var u,r,n,s,o;if(u=ma,zc()!==e)if(t.substr(ma,4)===wt?(r=wt,ma+=4):(r=e,0===Da&&Ta(oe)),r!==e)if(zc()!==e){if(n=ma,s=[],o=t.charAt(ma),fu.test(o)?ma++:(o=e,0===Da&&Ta(Or)),o!==e)for(;o!==e;)s.push(o),o=t.charAt(ma),fu.test(o)?ma++:(o=e,0===Da&&Ta(Or));else s=e;(n=s!==e?t.substring(n,ma):s)!==e?u=$o(n):(ma=u,u=e)}else ma=u,u=e;else ma=u,u=e;else ma=u,u=e;return u}function vc(){var u,r,n,s,o,a,c;return u=ma,(r=zc())!==e?(t.substr(ma,4)===$t?(n=$t,ma+=4):(n=e,0===Da&&Ta(ae)),n!==e&&(s=zc())!==e&&(o=nc())!==e&&(a=Cc())!==e?((c=vc())===e&&(c=null),u=r=[r,n,s,o,a,c]):(ma=u,u=e)):(ma=u,u=e),u}function gc(){var u,r,n;return u=ma,zc()!==e?(t.substr(ma,2)===Lt?(r=Lt,ma+=2):(r=e,0===Da&&Ta(ce)),r!==e&&zc()!==e&&(n=Tc())!==e?u=Lo(n):(ma=u,u=e)):(ma=u,u=e),u}function Fc(){var u,r;return u=ma,r=function(){var u,r,n,s,o,a,c,i,f,l,A;u=ma,r=ma,t.substr(ma,6)===St?(n=St,ma+=6):(n=e,0===Da&&Ta(ie));if(n!==e)if((s=Zc())!==e)if(o=Nc(),t.substr(ma,4)===Tt?(a=Tt,ma+=4):(a=e,0===Da&&Ta(fe)),a===e&&(a=nc()),a!==e){if(c=[],i=ma,f=Nc(),(l=Ic())!==e&&(A=nc())!==e?i=f=[f,l,A]:(ma=i,i=e),i!==e)for(;i!==e;)c.push(i),i=ma,f=Nc(),(l=Ic())!==e&&(A=nc())!==e?i=f=[f,l,A]:(ma=i,i=e);else c=e;c!==e?(i=Nc(),(f=_c())!==e?r=n=[n,s,o,a,c,i,f]:(ma=r,r=e)):(ma=r,r=e)}else ma=r,r=e;else ma=r,r=e;else ma=r,r=e;r!==e&&(r=Io(r));return u=r,u}(),r===e&&(r=nc()),r!==e&&(r=Oo(r)),u=r}function bc(){var t,u,r;return t=ma,(u=Ua())!==e&&(r=gc())!==e?t=u=[u,r]:(ma=t,t=e),t}function mc(){var u;return(u=function(){var u,r,n,s,o;u=ma,Nc(),t.substr(ma,14)===kt?(r=kt,ma+=14):(r=e,0===Da&&Ta(he));r!==e?(Nc(),61===t.charCodeAt(ma)?(n=h,ma++):(n=e,0===Da&&Ta($u)),n!==e?(Nc(),t.substr(ma,6)===Ot?(s=Ot,ma+=6):(s=e,0===Da&&Ta(pe)),s!==e&&(o=Za())!==e?(Nc(),u=Ko(o)):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e);return u}())===e&&(u=function(){var u,r,n,s;u=ma,Nc(),t.substr(ma,18)===It?(r=It,ma+=18):(r=e,0===Da&&Ta(de));r!==e?(Nc(),61===t.charCodeAt(ma)?(n=h,ma++):(n=e,0===Da&&Ta($u)),n!==e?(Nc(),(s=wc())!==e?(Nc(),u=Vo(s)):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e);return u}())===e&&(u=function(){var u,r,n,s;u=ma,Nc(),t.substr(ma,12)===Zt?(r=Zt,ma+=12):(r=e,0===Da&&Ta(Ce));r!==e?(Nc(),61===t.charCodeAt(ma)?(n=h,ma++):(n=e,0===Da&&Ta($u)),n!==e?(Nc(),(s=wc())!==e?(Nc(),u=Wo(s)):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e);return u}())===e&&(u=function(){var u,r,n,s;u=ma,Nc(),t.substr(ma,6)===_t?(r=_t,ma+=6):(r=e,0===Da&&Ta(ve));r!==e?(Nc(),61===t.charCodeAt(ma)?(n=h,ma++):(n=e,0===Da&&Ta($u)),n!==e?(Nc(),(s=Sc())!==e?(Nc(),u=Xo(s)):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e);return u}())===e&&(u=function(){var u,r,n,s,o,a,c,i;u=ma,Nc(),t.substr(ma,12)===Nt?(r=Nt,ma+=12):(r=e,0===Da&&Ta(ge));if(r!==e)if(Nc(),61===t.charCodeAt(ma)?(n=h,ma++):(n=e,0===Da&&Ta($u)),n!==e)if(Nc(),91===t.charCodeAt(ma)?(s=q,ma++):(s=e,0===Da&&Ta(ir)),s!==e)if(Nc(),(o=Bc())!==e){for(a=[],c=ma,Nc(),Ic()!==e?(Nc(),(i=Bc())!==e?c=Yo(o,i):(ma=c,c=e)):(ma=c,c=e);c!==e;)a.push(c),c=ma,Nc(),Ic()!==e?(Nc(),(i=Bc())!==e?c=Yo(o,i):(ma=c,c=e)):(ma=c,c=e);93===t.charCodeAt(ma)?(c=H,ma++):(c=e,0===Da&&Ta(fr)),c!==e?u=ta(o,a):(ma=u,u=e)}else ma=u,u=e;else ma=u,u=e;else ma=u,u=e;else ma=u,u=e;return u}()),u}function Bc(){var u,r,n,s,o,a;return u=ma,Nc(),123===t.charCodeAt(ma)?(r=tt,ma++):(r=e,0===Da&&Ta(wr)),r!==e?(Nc(),(n=Ec())!==e?(Nc(),44===t.charCodeAt(ma)?(s=P,ma++):(s=e,0===Da&&Ta(cr)),s!==e?(Nc(),(o=Ec())!==e?(Nc(),125===t.charCodeAt(ma)?(a=ut,ma++):(a=e,0===Da&&Ta(Lr)),a!==e?u=ua(n,o):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e),u}function Ec(){var u,r,n,s;return u=ma,t.substr(ma,8)===zt?(r=zt,ma+=8):(r=e,0===Da&&Ta(Fe)),r!==e?(Nc(),58===t.charCodeAt(ma)?(n=O,ma++):(n=e,0===Da&&Ta(tr)),n!==e?(Nc(),(s=$c())!==e?u=ra(s):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e),u===e&&(u=ma,t.substr(ma,8)===Rt?(r=Rt,ma+=8):(r=e,0===Da&&Ta(be)),r!==e?(Nc(),58===t.charCodeAt(ma)?(n=O,ma++):(n=e,0===Da&&Ta(tr)),n!==e?(Nc(),s=function(){var t,u;t=ma,u=Sc(),u!==e&&(u=na(u));t=u,t===e&&(t=ma,(u=oc())!==e&&(u=sa()),t=u);return t}(),s!==e?u=ea(s):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e)),u}function yc(){var u,r,n,s,o,c,i,f;return u=ma,Zc()!==e?(Nc(),t.substr(ma,6)===Ot?(r=Ot,ma+=6):(r=e,0===Da&&Ta(pe)),r!==e&&(n=Za())!==e?(Nc(),Ic()!==e?(Nc(),(s=Tc())!==e?(Nc(),Ic()!==e?(Nc(),(o=Tc())!==e?(Nc(),Ic()===e&&null,c=function(){var u,r,n,s,o,c;if(u=ma,r=Dc(),r!==e){for(n=[],s=ma,Nc(),47===t.charCodeAt(ma)?(o=a,ma++):(o=e,0===Da&&Ta(Bu)),o!==e?(Nc(),(c=Dc())!==e?s=aa(r,c):(ma=s,s=e)):(ma=s,s=e);s!==e;)n.push(s),s=ma,Nc(),47===t.charCodeAt(ma)?(o=a,ma++):(o=e,0===Da&&Ta(Bu)),o!==e?(Nc(),(c=Dc())!==e?s=aa(r,c):(ma=s,s=e)):(ma=s,s=e);u=ca(r,n)}else ma=u,u=e;return u}(),c===e&&(c=null),Nc(),Ic()===e&&null,(i=Sc())===e&&(i=null),Nc(),Ic()===e&&null,f=function(){var u,r;u=ma,t.substr(ma,10)===Mt?(r=Mt,ma+=10):(r=e,0===Da&&Ta(ye));r!==e&&(r=la());return u=r,u}(),f===e&&(f=null),_c()!==e?u=oa(n,s,o,c,i,f):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e)):(ma=u,u=e),u}function Dc(){var u;return(u=function(){var u,r,n,s;u=ma,t.substr(ma,7)===Ht?(r=Ht,ma+=7):(r=e,0===Da&&Ta(Ee));r!==e&&(n=Ma())!==e?(41===t.charCodeAt(ma)?(s=qt,ma++):(s=e,0===Da&&Ta(Be)),s!==e?u=fa(n):(ma=u,u=e)):(ma=u,u=e);return u}())===e&&(u=function(){var u,r,n,s;u=ma,t.substr(ma,7)===Pt?(r=Pt,ma+=7):(r=e,0===Da&&Ta(me));r!==e&&(n=Qa())!==e?(41===t.charCodeAt(ma)?(s=qt,ma++):(s=e,0===Da&&Ta(Be)),s!==e?u=ia(n):(ma=u,u=e)):(ma=u,u=e);return u}()),u}function xc(){var u,r;return Da++,u=ma,t.substr(ma,4)===Qt?(r=Qt,ma+=4):(r=e,0===Da&&Ta(xe)),r===e&&(t.substr(ma,5)===Ut?(r=Ut,ma+=5):(r=e,0===Da&&Ta(we))),r!==e&&(r=Aa(r)),Da--,(u=r)===e&&(r=e,0===Da&&Ta(De)),u}function wc(){var u,r,n,s,o;if(Da++,u=ma,39===t.charCodeAt(ma)?(r=R,ma++):(r=e,0===Da&&Ta(ar)),r!==e){for(n=ma,s=[],t.substr(ma,2)===Gt?(o=Gt,ma+=2):(o=e,0===Da&&Ta(Le)),o===e&&(o=t.charAt(ma),Au.test(o)?ma++:(o=e,0===Da&&Ta(Se)));o!==e;)s.push(o),t.substr(ma,2)===Gt?(o=Gt,ma+=2):(o=e,0===Da&&Ta(Le)),o===e&&(o=t.charAt(ma),Au.test(o)?ma++:(o=e,0===Da&&Ta(Se)));n=t.substring(n,ma),39===t.charCodeAt(ma)?(s=R,ma++):(s=e,0===Da&&Ta(ar)),s!==e?u=ha(n):(ma=u,u=e)}else ma=u,u=e;return Da--,u===e&&(r=e,0===Da&&Ta($e)),u}function $c(){var u,r,n,s,o;if(Da++,u=ma,34===t.charCodeAt(ma)?(r=T,ma++):(r=e,0===Da&&Ta(Ku)),r!==e){for(n=ma,s=[],t.substr(ma,2)===k?(o=k,ma+=2):(o=e,0===Da&&Ta(Wu)),o===e&&(t.substr(ma,2)===j?(o=j,ma+=2):(o=e,0===Da&&Ta(Vu)),o===e&&(o=t.charAt(ma),su.test(o)?ma++:(o=e,0===Da&&Ta(Xu))));o!==e;)s.push(o),t.substr(ma,2)===k?(o=k,ma+=2):(o=e,0===Da&&Ta(Wu)),o===e&&(t.substr(ma,2)===j?(o=j,ma+=2):(o=e,0===Da&&Ta(Vu)),o===e&&(o=t.charAt(ma),su.test(o)?ma++:(o=e,0===Da&&Ta(Xu))));n=t.substring(n,ma),34===t.charCodeAt(ma)?(s=T,ma++):(s=e,0===Da&&Ta(Ku)),s!==e?u=pa(n):(ma=u,u=e)}else ma=u,u=e;return Da--,u===e&&(r=e,0===Da&&Ta(Te)),u}function Lc(){var u,r,n,s,o,a,c,i,f,l,A,h,p,d,C,v,g,F,b,m,B,E,y,D,x;if(Da++,u=ma,r=ma,n=ma,s=[],o=t.charAt(ma),hu.test(o)?ma++:(o=e,0===Da&&Ta(ke)),o!==e)for(;o!==e;)s.push(o),o=t.charAt(ma),hu.test(o)?ma++:(o=e,0===Da&&Ta(ke));else s=e;if(s!==e)if(45===t.charCodeAt(ma)?(o=Jt,ma++):(o=e,0===Da&&Ta(Ie)),o!==e)if(a=t.charAt(ma),hu.test(a)?ma++:(a=e,0===Da&&Ta(ke)),a!==e)if(c=t.charAt(ma),hu.test(c)?ma++:(c=e,0===Da&&Ta(ke)),c!==e)if(45===t.charCodeAt(ma)?(i=Jt,ma++):(i=e,0===Da&&Ta(Ie)),i!==e)if(f=t.charAt(ma),hu.test(f)?ma++:(f=e,0===Da&&Ta(ke)),f!==e)if(l=t.charAt(ma),hu.test(l)?ma++:(l=e,0===Da&&Ta(ke)),l!==e){if(A=ma,84===t.charCodeAt(ma)?(h=Kt,ma++):(h=e,0===Da&&Ta(Ze)),h!==e)if(p=t.charAt(ma),hu.test(p)?ma++:(p=e,0===Da&&Ta(ke)),p!==e)if(d=t.charAt(ma),hu.test(d)?ma++:(d=e,0===Da&&Ta(ke)),d!==e)if(58===t.charCodeAt(ma)?(C=O,ma++):(C=e,0===Da&&Ta(tr)),C!==e)if(v=t.charAt(ma),hu.test(v)?ma++:(v=e,0===Da&&Ta(ke)),v!==e)if(g=t.charAt(ma),hu.test(g)?ma++:(g=e,0===Da&&Ta(ke)),g!==e){if(F=ma,58===t.charCodeAt(ma)?(b=O,ma++):(b=e,0===Da&&Ta(tr)),b!==e)if(m=t.charAt(ma),hu.test(m)?ma++:(m=e,0===Da&&Ta(ke)),m!==e)if(B=t.charAt(ma),hu.test(B)?ma++:(B=e,0===Da&&Ta(ke)),B!==e){if(E=ma,46===t.charCodeAt(ma)?(y=Vt,ma++):(y=e,0===Da&&Ta(_e)),y!==e){if(D=[],x=t.charAt(ma),hu.test(x)?ma++:(x=e,0===Da&&Ta(ke)),x!==e)for(;x!==e;)D.push(x),x=t.charAt(ma),hu.test(x)?ma++:(x=e,0===Da&&Ta(ke));else D=e;D!==e?E=y=[y,D]:(ma=E,E=e)}else ma=E,E=e;E===e&&(E=null),F=b=[b,m,B,E]}else ma=F,F=e;else ma=F,F=e;else ma=F,F=e;F===e&&(F=null),90===t.charCodeAt(ma)?(b=Wt,ma++):(b=e,0===Da&&Ta(Ne)),b===e&&(b=ma,m=t.charAt(ma),pu.test(m)?ma++:(m=e,0===Da&&Ta(ze)),m!==e?(B=t.charAt(ma),hu.test(B)?ma++:(B=e,0===Da&&Ta(ke)),B!==e?(E=t.charAt(ma),hu.test(E)?ma++:(E=e,0===Da&&Ta(ke)),E!==e?(58===t.charCodeAt(ma)?(y=O,ma++):(y=e,0===Da&&Ta(tr)),y!==e?(D=t.charAt(ma),hu.test(D)?ma++:(D=e,0===Da&&Ta(ke)),D!==e?(x=t.charAt(ma),hu.test(x)?ma++:(x=e,0===Da&&Ta(ke)),x!==e?b=m=[m,B,E,y,D,x]:(ma=b,b=e)):(ma=b,b=e)):(ma=b,b=e)):(ma=b,b=e)):(ma=b,b=e)):(ma=b,b=e)),b===e&&(b=null),A=h=[h,p,d,C,v,g,F,b]}else ma=A,A=e;else ma=A,A=e;else ma=A,A=e;else ma=A,A=e;else ma=A,A=e;else ma=A,A=e;A===e&&(A=null),n=s=[s,o,a,c,i,f,l,A]}else ma=n,n=e;else ma=n,n=e;else ma=n,n=e;else ma=n,n=e;else ma=n,n=e;else ma=n,n=e;else ma=n,n=e;return(r=n!==e?t.substring(r,ma):n)!==e&&(r=da(r)),Da--,(u=r)===e&&(r=e,0===Da&&Ta(Oe)),u}function Sc(){var u,r,n,s,o,a;if(Da++,u=ma,r=ma,n=ma,s=t.charAt(ma),pu.test(s)?ma++:(s=e,0===Da&&Ta(ze)),s===e&&(s=null),o=[],a=t.charAt(ma),hu.test(a)?ma++:(a=e,0===Da&&Ta(ke)),a!==e)for(;a!==e;)o.push(a),a=t.charAt(ma),hu.test(a)?ma++:(a=e,0===Da&&Ta(ke));else o=e;return o!==e?n=s=[s,o]:(ma=n,n=e),(r=n!==e?t.substring(r,ma):n)!==e&&(r=va(r)),Da--,(u=r)===e&&(r=e,0===Da&&Ta(qe)),u}function Tc(){var u,r,n,s,o,a,c,i;if(Da++,u=ma,r=ma,Da++,n=xc(),Da--,n===e?r=void 0:(ma=r,r=e),r!==e)if(n=ma,Da++,s=jc(),Da--,s===e?n=void 0:(ma=n,n=e),n!==e){if(s=ma,o=ma,a=t.charAt(ma),du.test(a)?ma++:(a=e,0===Da&&Ta(Me)),a!==e){for(c=[],i=t.charAt(ma),Cu.test(i)?ma++:(i=e,0===Da&&Ta(Qe));i!==e;)c.push(i),i=t.charAt(ma),Cu.test(i)?ma++:(i=e,0===Da&&Ta(Qe));o=a=[a,c]}else ma=o,o=e;(s=o!==e?t.substring(s,ma):o)!==e?u=ga(s):(ma=u,u=e)}else ma=u,u=e;else ma=u,u=e;return Da--,u===e&&(r=e,0===Da&&Ta(He)),u}function jc(){var u,r,n,s,o,a,c,i,f,l,A,h,p,d;return Da++,u=ma,r=ma,(n=kc())!==e&&(s=kc())!==e?(45===t.charCodeAt(ma)?(o=Jt,ma++):(o=e,0===Da&&Ta(Ie)),o===e&&(o=null),(a=kc())!==e?(45===t.charCodeAt(ma)?(c=Jt,ma++):(c=e,0===Da&&Ta(Ie)),c===e&&(c=null),(i=kc())!==e?(45===t.charCodeAt(ma)?(f=Jt,ma++):(f=e,0===Da&&Ta(Ie)),f===e&&(f=null),(l=kc())!==e?(45===t.charCodeAt(ma)?(A=Jt,ma++):(A=e,0===Da&&Ta(Ie)),A===e&&(A=null),(h=kc())!==e&&(p=kc())!==e&&(d=kc())!==e?r=n=[n,s,o,a,c,i,f,l,A,h,p,d]:(ma=r,r=e)):(ma=r,r=e)):(ma=r,r=e)):(ma=r,r=e)):(ma=r,r=e),u=r!==e?t.substring(u,ma):r,Da--,u===e&&(r=e,0===Da&&Ta(Ue)),u}function kc(){var u,r,n,s,o,a;return Da++,u=ma,r=ma,n=t.charAt(ma),vu.test(n)?ma++:(n=e,0===Da&&Ta(Je)),n!==e?(s=t.charAt(ma),vu.test(s)?ma++:(s=e,0===Da&&Ta(Je)),s!==e?(o=t.charAt(ma),vu.test(o)?ma++:(o=e,0===Da&&Ta(Je)),o!==e?(a=t.charAt(ma),vu.test(a)?ma++:(a=e,0===Da&&Ta(Je)),a!==e?r=n=[n,s,o,a]:(ma=r,r=e)):(ma=r,r=e)):(ma=r,r=e)):(ma=r,r=e),u=r!==e?t.substring(u,ma):r,Da--,u===e&&(r=e,0===Da&&Ta(Ge)),u}function Oc(){var u,r,n,s;if(u=ma,r=ma,n=[],s=t.charAt(ma),gu.test(s)?ma++:(s=e,0===Da&&Ta(Ke)),s!==e)for(;s!==e;)n.push(s),s=t.charAt(ma),gu.test(s)?ma++:(s=e,0===Da&&Ta(Ke));else n=e;return(r=n!==e?t.substring(r,ma):n)!==e&&(r=Fa(r)),u=r}function Ic(){var u,r,n;return u=ma,r=Nc(),44===t.charCodeAt(ma)?(n=P,ma++):(n=e,0===Da&&Ta(cr)),n!==e?u=r=[r,n,Nc()]:(ma=u,u=e),u}function Zc(){var u,r,n;return u=ma,r=Nc(),40===t.charCodeAt(ma)?(n=uu,ma++):(n=e,0===Da&&Ta(un)),n!==e?u=r=[r,n,Nc()]:(ma=u,u=e),u}function _c(){var u,r,n;return u=ma,r=Nc(),41===t.charCodeAt(ma)?(n=qt,ma++):(n=e,0===Da&&Ta(Be)),n!==e?u=r=[r,n]:(ma=u,u=e),u}function Nc(){var u,r,n;for(Da++,u=ma,r=[],n=t.charAt(ma),mu.test(n)?ma++:(n=e,0===Da&&Ta(en));n!==e;)r.push(n),n=t.charAt(ma),mu.test(n)?ma++:(n=e,0===Da&&Ta(en));return u=t.substring(u,ma),Da--,r=e,0===Da&&Ta(rn),u}function zc(){var u,r,n;if(Da++,u=ma,r=[],n=t.charAt(ma),mu.test(n)?ma++:(n=e,0===Da&&Ta(en)),n!==e)for(;n!==e;)r.push(n),n=t.charAt(ma),mu.test(n)?ma++:(n=e,0===Da&&Ta(en));else r=e;return u=r!==e?t.substring(u,ma):r,Da--,u===e&&(r=e,0===Da&&Ta(nn)),u}const Rc=["$value"],Pc={eq:"=",ne:"!=",lt:"<",gt:">",le:"<=",ge:">="},qc={topcount:!0,bottomcount:!0,topsum:!1,bottomsum:!1,toppercent:!1,bottompercent:!1},Hc=Object.assign,{strict:Mc,minimal:Qc}=u,Uc=[];let Gc,Jc;const Kc=u.safeNumber||function(t){if("string"!=typeof t)return t;const u=parseFloat(t);if(!isNaN(u)&&String(u)===t)return u;const r=parseInt(t);return isNaN(r)||String(r)!==t.replace(/^-?\d+\.0+$/,t.split(".")[0])?t:r},Vc=u.skipToken,Wc=u.standardBase64||function(t){return Buffer.from(t,"base64").toString("base64")},Xc=t=>u=>t===u||t.as&&u.as&&t.as===u.as||u.as&&t.ref&&u.as===t.ref[t.ref.length-1]||t.ref&&u.ref&&t.ref.join("")===u.ref.join(""),Yc=t=>u=>{if(Array.isArray(u))return u.map(Yc(t));const r=u.ref&&t.find((t=>"func"in t&&t.as&&t.as===u.ref[0]));return r||u},ti=t=>u=>Array.isArray(u)?u.map(ti(t)):u.ref&&!t.find(Xc(u))?{val:null}:u,ui=(t,u)=>{if(1===u.ref.length)t.find(Xc(u))||t.push(u);else{const r=u.ref.shift(),e=t.find((t=>t.ref&&t.ref[0]===r));if(e)ui(e.expand??=[],u);else{const e={ref:[r],expand:[]};ui(e.expand,u),t.push(e)}}},ri=t=>{const u=t.reduce(((t,u)=>{if("string"==typeof u)return t[u]??=[],t;if(!u.ref)return t;const r=u.ref[0];return t[r]??=[],t[r].push(...u.expand??[]),t}),{}),r=[];for(const t in u){if("*"===t){r.push(t);continue}const e={ref:[t]};u[t].length&&(e.expand=ri(u[t])),r.push(e)}return r},ei=(t,u)=>{if(!u.length)return;const r=u.reduce(((t,u)=>{if(!u.ref)return t;const r=u.ref[0];return t[r]??=[],t[r].push(...u.expand??[]),t}),{}),e={},n=[];for(const u in t){const s=t[u],o=s.ref?.[0];Object.keys(r).includes(o)?e[o]=s:s.func||n.push(u)}if(Object.keys(e).length){for(const u of n)t.splice(u,1);for(const t in r){const u=e[t];u&&(r[t].length&&(u.expand?ei(u.expand,r[t]):u.expand=ri(r[t])))}}},ni=(t,u)=>{let r=oi({from:t.from},u);if(Array.isArray(r))for(let u=0;u<r.length;u++)r[u]=si(r[u],t);else r=si(r,t);return r},si=(t,u)=>{if(!u)return t;u.apply&&delete u.apply;let r={};u.columns&&"$count"===u.columns[0].as||t.SELECT.where&&u.where||t.SELECT.limit&&u.limit||t.SELECT.orderBy&&u.orderBy||t.SELECT.search&&u.search?r.from=t:r=t.SELECT;const e=r.columns&&r.columns.length?r.columns.filter((t=>t&&"object"==typeof t&&"func"in t)):[];if(r.columns=e.length?e:[],r.groupBy&&r.groupBy.length){const t=r.groupBy.reduce(((t,u)=>{if(u.ref&&u.ref.length>1){const r={ref:[...u.ref]};u.expand&&u.expand.length&&(r.expand=[...u.expand]),u.as&&(r.as=u.as),ui(t,r,!0)}else t.push({...u});return t}),[]);r.columns??=[],r.columns.push(...t)}for(const t in u)if("columns"===t){const t=[];if(r.columns.length&&t.push(...r.columns),r.groupBy&&r.groupBy.length)ei(t,u.columns);else for(const r of u.columns)t.some(Xc(r))||t.push(r);r.columns=t}else"from"!==t&&(r[t]=u[t]);return r.groupBy&&r.where&&(r.having=r.where.map(Yc(r.columns)).map(ti(r.groupBy)),delete r.where),r.columns.length||delete r.columns,{SELECT:r}},oi=(t,u)=>{if(!u)return;t.apply&&delete t.apply,u.identity&&t.from.SELECT&&(t=t.from.SELECT),(u.apply||u.where&&t.where||u.search&&t.search||u.limit&&t.limit||u.orderBy&&t.orderBy)&&(t.from={SELECT:{...t}});const r=t=>{t.recurse={ref:["parent"]};const r=[],e=[];if(u.topLevels.levels?e.push([{ref:["DistanceFromRoot"]},"<=",{val:u.topLevels.levels-1}]):e.push([{ref:["DistanceFromRoot"]},">=",{val:0}]),u.topLevels.expandLevels)for(const t of u.topLevels.expandLevels)0===t.levels?r.push([{func:"DistanceTo",args:[{val:t.nodeID},{val:null}]}]):e.push([{func:"DistanceTo",args:[{val:t.nodeID},{val:t.levels}]}]);const n=">="===e[0][1]&&0===e[0][2].val?1===e.length?[]:[e[0]]:e,s=n.flatMap(((t,u)=>u<n.length-1?[...t,"or"]:t));if(r.length){const u=r.flatMap(((t,u)=>["and","not",...t]));n.length>1?t.recurse.where=[{xpr:s}].concat(u):1===n.length&&">="===n[0][1]&&0===n[0][2].val?t.recurse.where=u.slice(1):t.recurse.where=s.concat(u)}else s.length&&(t.recurse.where=s)},e=t=>n(t,u.descendants,1),n=(t,r=u.ancestors,e=-1)=>{if(r.nodes)for(const u of r.nodes)u.filter&&-1===e?t.where=u.filter:u.search&&(t.search=u.search);if(t.recurse={ref:["parent"]},1===e){const u=()=>{const t=new Error("For descendants, only the following filter is supported: `<ID> eq <val>`");throw t.statusCode=400,t};1===r.nodes?.length&&r.nodes[0].filter||u();const n=r.nodes[0].filter.findIndex((t=>t.ref?.[0]===r.id));-1===!n&&u();const s=r.nodes[0].filter[n+1],o=r.nodes[0].filter[n+2]?.val;"="===s&&o||u();const a=r.distance&&e*r.distance,c=[{func:"DistanceTo",args:[{val:o},{val:Number.isInteger(a)?a:null}]}];t.recurse.where=c}};if(u.ancestors&&u.topLevels){n(t);const u={...t};r(u),t.recurse=u.recurse}else if(u.ancestors&&u.descendants){n(t);const u={...t};e(u),t.recurse=u.recurse}else u.topLevels?r(t):u.ancestors?n(u):u.descendants&&e(t);if(u.where&&(t.where=u.where),u.search&&(t.search=u.search),u.limit&&(t.limit=u.limit),u.orderBy&&(t.orderBy=u.orderBy),u.groupBy&&(t.groupBy=u.groupBy.reduce(((t,u)=>(t.some(Xc(u))||t.push(u),t)),[])),u.aggregate&&u.aggregate.length&&(t.columns=[...t.columns||[],...u.aggregate]),t.groupBy&&t.groupBy.length&&(t.columns=[...t.columns||[],...t.groupBy]),u.apply&&t.from&&oi(t.from.SELECT,u.apply),u.concat&&Array.isArray(u.concat)){const r=[];for(let e of u.concat){e.from=1===Object.keys(t).length?t.from:{SELECT:t};const u=oi(e,e.apply);Array.isArray(u)?r.push(...u):r.push(u)}t=r}return Array.isArray(t)?t:{SELECT:t}},ai=t=>{Gc.limit&&Gc.limit.offset&&Gc.limit.offset.val&&(t+=Gc.limit.offset.val),(Gc.limit||(Gc.limit={})).offset={val:t}},ci=(t,u=!1)=>{Gc.orderBy=Gc.orderBy?u?[t,...Gc.orderBy]:[...Gc.orderBy,t]:[t]},ii=(t,u)=>{for(const r of u)r.ref&&r.ref[0]===t&&r.ref.shift(),r.func&&ii(t,r.args),r.xpr&&ii(t,r.xpr);return u},fi=(t,u)=>{"null"===u?u=null:"true"===u?u=!0:"false"===u&&(u=!1);let r=Gc.from._params??={},e=t.match(/^(\w+)\[(.*)\]$/);for(;e;)e[1]in r||(r[e[1]]=""===e[2]?[]:{}),r=r[e[1]],e=(t=e[2]).match(/^(\w+)\[(.*)\]$/);Array.isArray(r)?r.push(u):r[t]=u},li=(t,u,r,e=!1)=>{let n=!1;return t?.forEach((t=>{t.val===u?(t.val="list"in r?r.list.map((t=>t.val)):r.val,n=!0):t.list===u?(t.list=r.list,n=!0):t.func?t.args.forEach(((t,s)=>{t.val===u?(t.val=r.val,n=!0):t.func&&li(t.args,u,r,e)})):t.SELECT&&Ai(t.SELECT,u,r,e)})),n},Ai=(t,u,r,e=!1)=>{let n=!1;const{where:s,from:o}=t;return n=li(s,u,r),o?.ref?.forEach((t=>{n=li(t.where,u,r,!0)})),n};if(r=o(),u.peg$library)return{peg$result:r,peg$currPos:ma,peg$FAILED:e,peg$maxFailExpected:ya,peg$maxFailPos:Ea};if(r!==e&&ma===t.length)return r;throw r!==e&&ma<t.length&&Ta({type:"end"}),ja(ya,Ea<t.length?t.charAt(Ea):null,Ea<t.length?Sa(Ea,Ea+1):Sa(Ea,Ea))}peg$subclass(peg$SyntaxError,Error),peg$SyntaxError.prototype.format=function(t){var u="Error: "+this.message;if(this.location){var r,e=null;for(r=0;r<t.length;r++)if(t[r].source===this.location.source){e=t[r].text.split(/\r\n|\n|\r/g);break}var n=this.location.start,s=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(n):n,o=this.location.source+":"+s.line+":"+s.column;if(e){var a=this.location.end,c=peg$padEnd("",s.line.toString().length," "),i=e[n.line-1],f=(n.line===a.line?a.column:i.length+1)-n.column||1;u+="\n --\x3e "+o+"\n"+c+" |\n"+s.line+" | "+i+"\n"+c+" | "+peg$padEnd("",n.column-1," ")+peg$padEnd("",f,"^")}else u+="\n at "+o}return u},peg$SyntaxError.buildMessage=function(t,u){var r={literal:function(t){return'"'+n(t.text)+'"'},class:function(t){var u=t.parts.map((function(t){return Array.isArray(t)?s(t[0])+"-"+s(t[1]):s(t)}));return"["+(t.inverted?"^":"")+u.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(t){return t.description}};function e(t){return t.charCodeAt(0).toString(16).toUpperCase()}function n(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+e(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+e(t)}))}function s(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+e(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+e(t)}))}function o(t){return r[t.type](t)}return"Expected "+function(t){var u,r,e=t.map(o);if(e.sort(),e.length>0){for(u=1,r=1;u<e.length;u++)e[u-1]!==e[u]&&(e[r]=e[u],r++);e.length=r}switch(e.length){case 1:return e[0];case 2:return e[0]+" or "+e[1];default:return e.slice(0,-1).join(", ")+", or "+e[e.length-1]}}(t)+" but "+function(t){return t?'"'+n(t)+'"':"end of input"}(u)+" found."},module.exports={StartRules:["ODataRelativeURI"],SyntaxError:peg$SyntaxError,parse:peg$parse};
1
+ "use strict";function peg$subclass(t,r){function u(){this.constructor=t}u.prototype=r.prototype,t.prototype=new u}function peg$SyntaxError(t,r,u,e){var n=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(n,peg$SyntaxError.prototype),n.expected=r,n.found=u,n.location=e,n.name="SyntaxError",n}function peg$padEnd(t,r,u){return u=u||" ",t.length>r?t:(r-=t.length,t+(u+=u.repeat(r)).slice(0,r))}function peg$parse(t,r){var u,e={},n=(r=void 0!==r?r:{}).grammarSource,s={ODataRelativeURI:Ra},o=Ra,a="/",c="?",i="&",f="$count",l="$ref",h="$value",A="=",p="$skiptoken=",d="$search=",C="$select=",v="$expand=",g="$filter=",E="$orderby=",F="$top=",b="$skip=",m="$count=",B="$apply=",D="$at",y="$from",x="$toInclusive",w="$to",$="*",L="/$count",S=";",T='"',j="\\\\",O='\\"',k=":",I="any",Z="all",_="asc",N="desc",z="$deltatoken=",R="'",P=",",q="[",H="]",M="@",Q="$format=",U="eq",G="ne",J="lt",K="gt",V="le",W="ge",X="in",Y="null",tt="{",rt="}",ut="contains",et="endswith",nt="startswith",st="matchespattern",ot="not",at="and",ct="or",it="aggregate",ft="groupby",lt="filter",ht="search",At="concat",pt="compute",dt="top",Ct="skip",vt="orderby",gt="com.sap.vocabularies.Hierarchy.v1.TopLevels",Et="ancestors",Ft="descendants",bt="topcount",mt="bottomcount",Bt="topsum",Dt="bottomsum",yt="toppercent",xt="bottompercent",wt="with",$t="from",Lt="as",St="rollup",Tt="$all",jt="identity",Ot="HierarchyNodes",kt="$root/",It="HierarchyQualifier",Zt="NodeProperty",_t="Levels",Nt="ExpandLevels",zt='"NodeID"',Rt='"Levels"',Pt="filter(",qt=")",Ht="search(",Mt="keep start",Qt="true",Ut="false",Gt="''",Jt="-",Kt="T",Vt=".",Wt="Z",Xt="e",Yt="binary'",tr="==",rr="(",ur=/^[^&]/,er=/^[ ]/,nr=/^[^"&]/,sr=/^[^"]/,or=/^[^;)]/,ar=/^[a-zA-Z0-9_.~![\]\-]/,cr=/^[^}]/,ir=/^[^\]]/,fr=/^[a-zA-Z]/,lr=/^[^)]/,hr=/^[^']/,Ar=/^[a-zA-Z0-9]/,pr=/^[0-9]/,dr=/^[+\-]/,Cr=/^[_a-zA-Z]/,vr=/^[_a-zA-Z0-9"."\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,gr=/^[0-9a-fA-F]/,Er=/^[^\/?]/,Fr=/^[a-zA-Z0-9\-"."_~!$'()*+,;=:@"\/""?"]/,br=/^[a-zA-Z0-9_\-]/,mr=/^[ \t\n]/,Br=Oa("/",!1),Dr=Oa("?",!1),yr=Oa("&",!1),xr=Oa("$count",!1),wr=Oa("$ref",!1),$r=Oa("$value",!1),Lr=Oa("=",!1),Sr=Oa("$skiptoken=",!1),Tr=Oa("$search=",!1),jr=Oa("$select=",!1),Or=Oa("$expand=",!1),kr=Oa("$filter=",!1),Ir=Oa("$orderby=",!1),Zr=Oa("$top=",!1),_r=Oa("$skip=",!1),Nr=Oa("$count=",!1),zr=Oa("$apply=",!1),Rr=ka(["&"],!0,!1),Pr=Oa("$at",!1),qr=Oa("$from",!1),Hr=Oa("$toInclusive",!1),Mr=Oa("$to",!1),Qr=Oa("*",!1),Ur=Oa("/$count",!1),Gr=Oa(";",!1),Jr=ka([" "],!1,!1),Kr=ka(['"',"&"],!0,!1),Vr=Oa('"',!1),Wr=Oa("\\\\",!1),Xr=Oa('\\"',!1),Yr=ka(['"'],!0,!1),tu=ka([";",")"],!0,!1),ru=Oa(":",!1),uu=Oa("any",!1),eu=Oa("all",!1),nu=Oa("asc",!1),su=Oa("desc",!1),ou=Oa("$deltatoken=",!1),au=Ia("value with double-quoted string"),cu=Oa("'",!1),iu=Oa(",",!1),fu=Oa("[",!1),lu=Oa("]",!1),hu=ka([["a","z"],["A","Z"],["0","9"],"_",".","~","!","[","]","-"],!1,!1),Au=Ia("an aliased parameter (@param)"),pu=Oa("@",!1),du=Oa("$format=",!1),Cu=Oa("eq",!1),vu=Oa("ne",!1),gu=Oa("lt",!1),Eu=Oa("gt",!1),Fu=Oa("le",!1),bu=Oa("ge",!1),mu=Oa("in",!1),Bu=(Oa("add",!1),Oa("sub",!1),Oa("mul",!1),Oa("div",!1),Oa("mod",!1),Ia("navigation with $count")),Du=Ia("a reference"),yu=Ia("null"),xu=Oa("null",!1),wu=Ia("a json object"),$u=Oa("{",!1),Lu=ka(["}"],!0,!1),Su=Oa("}",!1),Tu=Ia("a json array"),ju=ka(["]"],!0,!1),Ou=Ia("a list"),ku=Ia("a function name"),Iu=ka([["a","z"],["A","Z"]],!1,!1),Zu=Oa("contains",!0),_u=Oa("endswith",!0),Nu=Oa("startswith",!0),zu=Oa("matchespattern",!0),Ru=Oa("NOT",!0),Pu=Oa("AND",!0),qu=Oa("OR",!0),Hu=Oa("aggregate",!1),Mu=Oa("groupby",!1),Qu=Oa("filter",!1),Uu=Oa("search",!1),Gu=Oa("concat",!1),Ju=Oa("compute",!1),Ku=Oa("top",!1),Vu=Oa("skip",!1),Wu=Oa("orderby",!1),Xu=Oa("com.sap.vocabularies.Hierarchy.v1.TopLevels",!1),Yu=Oa("ancestors",!1),te=Oa("descendants",!1),re=Oa("topcount",!0),ue=Oa("bottomcount",!0),ee=Oa("topsum",!0),ne=Oa("bottomsum",!0),se=Oa("toppercent",!0),oe=Oa("bottompercent",!0),ae=Oa("with",!1),ce=Oa("from",!1),ie=Oa("as",!1),fe=Oa("rollup",!1),le=Oa("$all",!1),he=ka([")"],!0,!1),Ae=Oa("identity",!1),pe=Oa("HierarchyNodes",!1),de=Oa("$root/",!1),Ce=Oa("HierarchyQualifier",!1),ve=Oa("NodeProperty",!1),ge=Oa("Levels",!1),Ee=Oa("ExpandLevels",!1),Fe=Oa('"NodeID"',!1),be=Oa('"Levels"',!1),me=Oa("filter(",!1),Be=Oa(")",!1),De=Oa("search(",!1),ye=Oa("keep start",!1),xe=Ia("a boolean"),we=Oa("true",!1),$e=Oa("false",!1),Le=Ia("a single quoted string"),Se=Oa("''",!1),Te=ka(["'"],!0,!1),je=Ia("a doubled quoted string"),Oe=(Ia("a string"),ka([" ","\t","\n","(",")",'"',"&",";"],!0,!1),Ia("a string and/or number")),ke=ka([["a","z"],["A","Z"],["0","9"]],!1,!1),Ie=Ia("a time"),Ze=ka([["0","9"]],!1,!1),_e=Ia("a date"),Ne=Oa("-",!1),ze=Oa("T",!1),Re=Oa(".",!1),Pe=Oa("Z",!1),qe=ka(["+","-"],!1,!1),He=Ia("a number"),Me=Oa("e",!1),Qe=Ia("an integer"),Ue=Ia("an identifier"),Ge=ka(["_",["a","z"],["A","Z"]],!1,!1),Je=ka(["_",["a","z"],["A","Z"],["0","9"],'"',".",'"',"ª","µ","º",["À","Ö"],["Ø","ö"],["ø","ˁ"],["ˆ","ˑ"],["ˠ","ˤ"],"ˬ","ˮ",["Ͱ","ʹ"],"Ͷ","ͷ",["ͺ","ͽ"],"Ά",["Έ","Ί"],"Ό",["Ύ","Ρ"],["Σ","ϵ"],["Ϸ","ҁ"],["Ҋ","ԧ"],["Ա","Ֆ"],"ՙ",["ա","և"],["א","ת"],["װ","ײ"],["ؠ","ي"],"ٮ","ٯ",["ٱ","ۓ"],"ە","ۥ","ۦ","ۮ","ۯ",["ۺ","ۼ"],"ۿ","ܐ",["ܒ","ܯ"],["ݍ","ޥ"],"ޱ",["ߊ","ߪ"],"ߴ","ߵ","ߺ",["ࠀ","ࠕ"],"ࠚ","ࠤ","ࠨ",["ࡀ","ࡘ"],"ࢠ",["ࢢ","ࢬ"],["ऄ","ह"],"ऽ","ॐ",["क़","ॡ"],["ॱ","ॷ"],["ॹ","ॿ"],["অ","ঌ"],"এ","ঐ",["ও","ন"],["প","র"],"ল",["শ","হ"],"ঽ","ৎ","ড়","ঢ়",["য়","ৡ"],"ৰ","ৱ",["ਅ","ਊ"],"ਏ","ਐ",["ਓ","ਨ"],["ਪ","ਰ"],"ਲ","ਲ਼","ਵ","ਸ਼","ਸ","ਹ",["ਖ਼","ੜ"],"ਫ਼",["ੲ","ੴ"],["અ","ઍ"],["એ","ઑ"],["ઓ","ન"],["પ","ર"],"લ","ળ",["વ","હ"],"ઽ","ૐ","ૠ","ૡ",["ଅ","ଌ"],"ଏ","ଐ",["ଓ","ନ"],["ପ","ର"],"ଲ","ଳ",["ଵ","ହ"],"ଽ","ଡ଼","ଢ଼",["ୟ","ୡ"],"ୱ","ஃ",["அ","ஊ"],["எ","ஐ"],["ஒ","க"],"ங","ச","ஜ","ஞ","ட","ண","த",["ந","ப"],["ம","ஹ"],"ௐ",["అ","ఌ"],["ఎ","ఐ"],["ఒ","న"],["ప","ళ"],["వ","హ"],"ఽ","ౘ","ౙ","ౠ","ౡ",["ಅ","ಌ"],["ಎ","ಐ"],["ಒ","ನ"],["ಪ","ಳ"],["ವ","ಹ"],"ಽ","ೞ","ೠ","ೡ","ೱ","ೲ",["അ","ഌ"],["എ","ഐ"],["ഒ","ഺ"],"ഽ","ൎ","ൠ","ൡ",["ൺ","ൿ"],["අ","ඖ"],["ක","න"],["ඳ","ර"],"ල",["ව","ෆ"],["ก","ะ"],"า","ำ",["เ","ๆ"],"ກ","ຂ","ຄ","ງ","ຈ","ຊ","ຍ",["ດ","ທ"],["ນ","ຟ"],["ມ","ຣ"],"ລ","ວ","ສ","ຫ",["ອ","ະ"],"າ","ຳ","ຽ",["ເ","ໄ"],"ໆ",["ໜ","ໟ"],"ༀ",["ཀ","ཇ"],["ཉ","ཬ"],["ྈ","ྌ"],["က","ဪ"],"ဿ",["ၐ","ၕ"],["ၚ","ၝ"],"ၡ","ၥ","ၦ",["ၮ","ၰ"],["ၵ","ႁ"],"ႎ",["Ⴀ","Ⴥ"],"Ⴧ","Ⴭ",["ა","ჺ"],["ჼ","ቈ"],["ቊ","ቍ"],["ቐ","ቖ"],"ቘ",["ቚ","ቝ"],["በ","ኈ"],["ኊ","ኍ"],["ነ","ኰ"],["ኲ","ኵ"],["ኸ","ኾ"],"ዀ",["ዂ","ዅ"],["ወ","ዖ"],["ዘ","ጐ"],["ጒ","ጕ"],["ጘ","ፚ"],["ᎀ","ᎏ"],["Ꭰ","Ᏼ"],["ᐁ","ᙬ"],["ᙯ","ᙿ"],["ᚁ","ᚚ"],["ᚠ","ᛪ"],["ᜀ","ᜌ"],["ᜎ","ᜑ"],["ᜠ","ᜱ"],["ᝀ","ᝑ"],["ᝠ","ᝬ"],["ᝮ","ᝰ"],["ក","ឳ"],"ៗ","ៜ",["ᠠ","ᡷ"],["ᢀ","ᢨ"],"ᢪ",["ᢰ","ᣵ"],["ᤀ","ᤜ"],["ᥐ","ᥭ"],["ᥰ","ᥴ"],["ᦀ","ᦫ"],["ᧁ","ᧇ"],["ᨀ","ᨖ"],["ᨠ","ᩔ"],"ᪧ",["ᬅ","ᬳ"],["ᭅ","ᭋ"],["ᮃ","ᮠ"],"ᮮ","ᮯ",["ᮺ","ᯥ"],["ᰀ","ᰣ"],["ᱍ","ᱏ"],["ᱚ","ᱽ"],["ᳩ","ᳬ"],["ᳮ","ᳱ"],"ᳵ","ᳶ",["ᴀ","ᶿ"],["Ḁ","ἕ"],["Ἐ","Ἕ"],["ἠ","ὅ"],["Ὀ","Ὅ"],["ὐ","ὗ"],"Ὑ","Ὓ","Ὕ",["Ὗ","ώ"],["ᾀ","ᾴ"],["ᾶ","ᾼ"],"ι",["ῂ","ῄ"],["ῆ","ῌ"],["ῐ","ΐ"],["ῖ","Ί"],["ῠ","Ῥ"],["ῲ","ῴ"],["ῶ","ῼ"],"ⁱ","ⁿ",["ₐ","ₜ"],"ℂ","ℇ",["ℊ","ℓ"],"ℕ",["ℙ","ℝ"],"ℤ","Ω","ℨ",["K","ℭ"],["ℯ","ℹ"],["ℼ","ℿ"],["ⅅ","ⅉ"],"ⅎ","Ↄ","ↄ",["Ⰰ","Ⱞ"],["ⰰ","ⱞ"],["Ⱡ","ⳤ"],["Ⳬ","ⳮ"],"Ⳳ","ⳳ",["ⴀ","ⴥ"],"ⴧ","ⴭ",["ⴰ","ⵧ"],"ⵯ",["ⶀ","ⶖ"],["ⶠ","ⶦ"],["ⶨ","ⶮ"],["ⶰ","ⶶ"],["ⶸ","ⶾ"],["ⷀ","ⷆ"],["ⷈ","ⷎ"],["ⷐ","ⷖ"],["ⷘ","ⷞ"],"ⸯ","々","〆",["〱","〵"],"〻","〼",["ぁ","ゖ"],["ゝ","ゟ"],["ァ","ヺ"],["ー","ヿ"],["ㄅ","ㄭ"],["ㄱ","ㆎ"],["ㆠ","ㆺ"],["ㇰ","ㇿ"],["㐀","䶵"],["一","鿌"],["ꀀ","ꒌ"],["ꓐ","ꓽ"],["ꔀ","ꘌ"],["ꘐ","ꘟ"],"ꘪ","ꘫ",["Ꙁ","ꙮ"],["ꙿ","ꚗ"],["ꚠ","ꛥ"],["ꜗ","ꜟ"],["Ꜣ","ꞈ"],["Ꞌ","ꞎ"],["Ꞑ","ꞓ"],["Ꞡ","Ɦ"],["ꟸ","ꠁ"],["ꠃ","ꠅ"],["ꠇ","ꠊ"],["ꠌ","ꠢ"],["ꡀ","ꡳ"],["ꢂ","ꢳ"],["ꣲ","ꣷ"],"ꣻ",["ꤊ","ꤥ"],["ꤰ","ꥆ"],["ꥠ","ꥼ"],["ꦄ","ꦲ"],"ꧏ",["ꨀ","ꨨ"],["ꩀ","ꩂ"],["ꩄ","ꩋ"],["ꩠ","ꩶ"],"ꩺ",["ꪀ","ꪯ"],"ꪱ","ꪵ","ꪶ",["ꪹ","ꪽ"],"ꫀ","ꫂ",["ꫛ","ꫝ"],["ꫠ","ꫪ"],["ꫲ","ꫴ"],["ꬁ","ꬆ"],["ꬉ","ꬎ"],["ꬑ","ꬖ"],["ꬠ","ꬦ"],["ꬨ","ꬮ"],["ꯀ","ꯢ"],["가","힣"],["ힰ","ퟆ"],["ퟋ","ퟻ"],["豈","舘"],["並","龎"],["ff","st"],["ﬓ","ﬗ"],"יִ",["ײַ","ﬨ"],["שׁ","זּ"],["טּ","לּ"],"מּ","נּ","סּ","ףּ","פּ",["צּ","ﮱ"],["ﯓ","ﴽ"],["ﵐ","ﶏ"],["ﶒ","ﷇ"],["ﷰ","ﷻ"],["ﹰ","ﹴ"],["ﹶ","ﻼ"],["A","Z"],["a","z"],["ヲ","ᄒ"],["ᅡ","ᅦ"],["ᅧ","ᅬ"],["ᅭ","ᅲ"],["ᅳ","ᅵ"]],!1,!1),Ke=Ia("a guid"),Ve=Ia("a hex value"),We=ka([["0","9"],["a","f"],["A","F"]],!1,!1),Xe=ka(["/","?"],!0,!1),Ye=ka([["a","z"],["A","Z"],["0","9"],"-",'"',".",'"',"_","~","!","$","'","(",")","*","+",",",";","=",":","@",'"',"/",'"','"',"?",'"'],!1,!1),tn=Ia("a binary"),rn=Oa("binary'",!1),un=ka([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),en=Oa("==",!1),nn=Oa("(",!1),sn=Ia("an optional whitespace"),on=ka([" ","\t","\n"],!1,!1),an=Ia("a whitespace"),cn=function(t){ui=t},fn=function(){if(ei)return ui.columns=[{args:[{val:1}],as:"$count",func:"count"}],delete ui.expand,delete ui.limit,delete ui.orderBy,ui.apply?Ai(ui,ui.apply):{SELECT:ui};let t;if(ui.expand){ui.columns||(ui.columns=["*"],t=!0);for(const t of ui.expand){const r=ui.columns.findIndex(ai(t));r>-1&&ui.columns.splice(r,1),ui.columns.push(t)}delete ui.expand}return ui.count&&ui.apply&&(ui.__countAggregated=!0),ui.apply?Ai(ui,ui.apply,t):{SELECT:ui}},ln=function(){ei=!0},hn=function(t){return!Kc.includes(t)&&{from:{ref:[t]}}},An=function(t){return[t]},pn=function(t,r){return r},dn=function(t,r){if(r=r&&r[1],!t&&!r)return{from:{ref:[""]}};if(!t&&r&&r.from)return r.from.ref.unshift(""),r;const[u,e]=t,n=[];if(e?e.length>2?n.push({id:u,where:e[1].map((t=>t.val&&t.val.match&&t.val.match(/^"(.*)"$/)?{val:t.val.match(/^"(.*)"$/)[1]}:t))}):n.push({id:u,where:[]}):ti?n.push(`${"object"==typeof u&&"val"in u?u.val:u}`):"object"==typeof u&&"string"==typeof u.val&&u.val.match(/^[1-9]\d*$|^0$/)?n.push({val:ni(u.val)}):n.push(u),r&&r.from){const t=r.from.ref;Object.prototype.hasOwnProperty.call(t[0],"val")&&(n[n.length-1]={id:n[n.length-1],where:[t.shift()]}),n.push(...t)}const s={from:{ref:n}};return r&&r.columns&&(s.columns=r.columns),s},Cn=function(t){return[t]},vn=function(t,r,u){const e=[t,"=",r];return u&&e.push("and",...u[1]),e},gn=function(t,r,u){const e=[t,"=",r];return u&&e.push("and",...u[1]),e},En=function(t){return[t]},Fn=function(t,r){return r},bn=function(t,r,u){return u},mn=function(t,r,u){const e=[r?{id:t,where:r}:t];return u.length&&e.push(...u.map((t=>t.from.ref[0]))),{from:{ref:e}}},Bn=function(t){t&&(ui.search=t)},Dn=function(t){t&&t.apply&&(ui.apply=t.apply)},yn=function(t){ui.where=t},xn=function(t,r){vi(r)},wn=function(t){vi(t,!0)},$n=function(t){(ui.limit||(ui.limit={})).rows={val:t}},Ln=function(t){Ci(t)},Sn=function(t){t&&(ui.search=t)},Tn=function(){return cds.env.features.skip_apply_parsing},jn=function(){return null},On=function(t){return t},kn=function(){return null},In=function(t){return ui.columns=Array.isArray(ui.columns)?ui.columns:[],ui.columns.find(ai(t))||ui.columns.push(t),t},Zn=function(){const t=new Error('"/$count" is not supported for expand operation');throw t.statusCode=501,t},_n=function(t){return t},Nn=function(t){if(t.find((t=>t&&void 0!==t.apply))){const t=new Error('"$apply" is not supported for expand operation');throw t.statusCode=501,t}if(ui.columns){for(const t of ui.columns)ui.expand.find(ai(t))||ui.expand.push(t);delete ui.columns}else Array.isArray(ui.expand)&&-1===ui.expand.indexOf("*")&&ui.expand.unshift("*")},zn=function(){ri.push(ui),ui=ui.expand[ui.expand.length-1],ui.expand=[]},Rn=function(){ui.expand.length||ui.expand.push("*"),ui=ri.pop()},Pn=function(t){const r="*"===t?{}:t;return r.expand=["*"],Array.isArray(ui.expand)||(ui.expand=[]),ui.expand.find(ai(r))||ui.expand.push(r),r},qn=function(t){return t},Hn=function(t){si(t,{SELECT:ui})},Mn=function(t){return t},Qn=function(t){return t},Un=function(t){return[{val:t}]},Gn=function(t){return[{val:t}]},Jn=function(t){return t},Kn=function(t){return t?[t]:[]},Vn=function(t,r){t.push({xpr:r})},Wn=function(t,r){t.push(...r)},Xn=function(t,r){"not"===t[t.length-1]&&"not"===r[0]?t.push({xpr:r}):t.push(...r)},Yn=function(t,r){t.push(r)},ts=function(t,r){t.push({val:r})},rs=function(t,r){t.push(...r)},us=function(t,r,u){t.push(r,...u)},es=function(t){return t},ns=function(t){return[t]},ss=function(t,r){t.push(r)},os=function(t,r){let u=t.pop();if(!r)return["exists",{ref:[...t,{id:u}]}];let e=[];for(let t=0,n=0;t<r.length;++t){let s=r[t];s.ref&&0===s.ref.length&&"="===r[t+1]?e[n++]={func:"contains",args:[{ref:[u]},r[t+=2]]}:e[n++]=s}return e.length<r.length?t.length?(u=t.pop(),["exists",{ref:[...t,{id:u,where:e}]}]):e:["exists",{ref:[...t,{id:u,where:r}]}]},as=function(t,r){let u=t.pop();return["not","exists",{ref:[...t,{id:u,where:["not",{xpr:[...r]}]}]}]},cs=function(t,r){return r},is=function(t){return t?[t]:[]},fs=function(t,r){t.push({xpr:r})},ls=function(t,r){t.push(...r)},hs=function(t,r){t.push(r)},As=function(t,r){t.push(...r)},ps=function(t,r){t.push(...r)},ds=function(t,r,u){t.push(r,...u)},Cs=function(t){return t},vs=function(t,r){return gi(t,r)},gs=function(t){return t},Es=function(t){return t},Fs=function(){const t=new Error('"$orderby" does not support lambda');throw t.statusCode=501,t},bs=function(t,r){return r},ms=function(t,r){return Xc(t,r&&{sort:r})},Bs=function(t){t&&(ui.count=!0)},Ds=function(t){return t},ys=function(t){return{val:t}},xs=function(t){return t},ws=function(t,r){return r},$s=function(t,r){return[t,...r]},Ls=function(t){return{list:t}},Ss=function(t,r){return Ei(t,r)},Ts=function(t){return"@"+t},js=function(t,r){bi(ui,t,r)||(r.val?r=r.val:r.list&&Array.isArray(r.list)&&(r=r.list.map((t=>t.val))),Ei(t,r))},Os=function(t){if("json"!==t.toLowerCase()){const t=new Error('Only query parameter "json" is allowed in "$format".');throw t.statusCode=501,t}},ks=function(t,r,u){return[t,Vc[r]||r,u]},Is=function(t){return{list:t}},Zs=function(t,r){return[t,"in",r]},_s=function(t,r){return r},Ns=function(t,r){return r?{id:t,where:r}:t},zs=function(t,r){return{func:"count",as:"$count",args:[{ref:t}]}},Rs=function(t,r){return r},Ps=function(t,r){return"null"===t?{val:null}:{ref:[t,...r]}},qs=function(t){return{val:t}},Hs=function(t){return{val:t}},Ms=function(t){return{val:t}},Qs=function(t){return{val:t}},Us=function(t){return"number"==typeof t?{val:t}:{val:t,literal:"number"}},Gs=function(t){return{val:t}},Js=function(t){return{val:t}},Ks=function(t){return{val:t}},Vs=function(t){return t},Ws=function(t){throw Object.assign(new Error(`Invalid value: ${t}`),{statusCode:400})},Xs=function(){return{val:null}},Ys=function(t){return{val:t}},to=function(t){return{val:t}},ro=function(t){return{list:t.replace(/"/g,"").split(",").map((t=>({val:t})))}},uo=function(t,r){return r},eo=function(t,r){return[t,...r]},no=function(t){return{list:t}},so=function(t,r){if(Yc&&!(t.toLowerCase()in Yc.functions))throw Object.assign(new Error(`Function "${t}" is not supported`),{statusCode:501});return{func:t.toLowerCase(),args:r}},oo=function(t,r){return r},ao=function(t,r){return[t,...r]},co=function(t){return t.length?t[0]:t},io=function(t,r,u){return{func:t.toLowerCase(),args:[r,u]}},fo=function(){return"not"},lo=function(){return"and"},ho=function(){return"or"},Ao=function(t,r){return r},po=function(t,r){if(void 0!==t){r=Array.isArray(r)?r:[r];for(let u of r)for(const r in u)"where"!==r||!t.groupBy&&!t.aggregate||t.having?"limit"===r&&t.limit?.offset&&u.limit.rows?t.limit.rows=u.limit.rows:"limit"===r&&t.limit?.offset?.val&&u.limit.offset?.val?t.limit.offset.val+=u.limit.offset.val:t[r]||"aggregate"===r&&t.groupBy&&!u.groupBy?(t={apply:t})[r]=u[r]:t[r]=u[r]:t.having=u[r];return{apply:t}}},Co=function(t){return t},vo=function(t){return t},go=function(t){return t},Eo=function(t){return t},Fo=function(t){return t},bo=function(t){return t},mo=function(t){return t},Bo=function(t){return t},Do=function(t){return t},yo=function(t){return t},xo=function(t){return{ancestors:t}},wo=function(t){return{descendants:t}},$o=function(t,r){if(t=t.toLowerCase(),!Wc[t])throw Object.assign(new Error(`Transformation "${t}" in $apply is not yet supported.`),{statusCode:501});return{aggregate:[{func:t,args:r}]}},Lo=function(t){return t},So=function(t,r){return r},To=function(t,r){return{aggregate:[t,...r]}},jo=function(t){return{func:"count",args:[{val:1}],as:t}},Oo=function(t){return t},ko=function(t,r,u){return{func:r,args:[t],as:u??t.ref[0]}},Io=function(t){return t.toLowerCase()},Zo=function(t){return t},_o=function(t,r){return r},No=function(t,r){return{groupBy:[t,...r]}},zo=function(t,r,u){return u},Ro=function(t,r,u){let e={};return e=u?{groupBy:[t,...r],...u.apply}:{groupBy:[t,...r]},e},Po=function(t){return t},qo=function(t){const r=new Error("Rollup in groupby is not supported yet.");throw r.statusCode=501,r},Ho=function(t){return t},Mo=function(t){return{where:t}},Qo=function(t){if(t=t.trim())return{search:[{val:t}]}},Uo=function(t,r){return r},Go=function(t,r){return{concat:[t,...r]}},Jo=function(t,r){return[t,r]},Ko=function(){return{identity:!0}},Vo=function(t){return{limit:{rows:{val:t}}}},Wo=function(t){return{limit:{offset:{val:t}}}},Xo=function(t,r){return r},Yo=function(t,r){return{orderBy:[t,...r]}},ta=function(t,r){return r},ra=function(t,r){return r.forEach((r=>Object.assign(t,r))),{topLevels:t}},ua=function(t){return{hierarchyNodes:t}},ea=function(t){return{hierarchyQualifier:t}},na=function(t){return{nodeProperty:t}},sa=function(t){return{levels:t}},oa=function(t,r){return r},aa=function(t,r){return{expandLevels:[t,...r]}},ca=function(t,r){return Object.assign(t,r)},ia=function(t){return{nodeID:t}},fa=function(t){return{levels:t}},la=function(t){return t},ha=function(){return null},Aa=function(t,r,u,e,n,s){return{path:t,hierarchy:r,id:u,nodes:e,distance:n,keepStart:s?.keepStart||!1}},pa=function(t,r){return r},da=function(t,r){return[t,...r]},Ca=function(t){return{filter:t}},va=function(t){return{search:t}},ga=function(){return{keepStart:!0}},Ea=function(t){return"true"===t},Fa=function(t){return t.replace(/''/g,"'")},ba=function(t){return t.replace(/\\\\/g,"\\").replace(/\\"/g,'"')},ma=function(t){if(t.split("-")[0].length>4)throw Object.assign(new Error(`The type Edm.DateTimeOffset is not compatible with "${t}"`),{statusCode:400});return t},Ba=function(t){return ni(t)},Da=function(t){return parseInt(t)},ya=function(t){return t},xa=function(t){return{val:t}},wa=function(t){return cds.env.features.base64_binaries?oi(t):Buffer.from(t,"base64")},$a=0|r.peg$currPos,La=[{line:1,column:1}],Sa=$a,Ta=r.peg$maxFailExpected||[],ja=0|r.peg$silentFails;if(r.startRule){if(!(r.startRule in s))throw new Error("Can't start parsing from rule \""+r.startRule+'".');o=s[r.startRule]}function Oa(t,r){return{type:"literal",text:t,ignoreCase:r}}function ka(t,r,u){return{type:"class",parts:t,inverted:r,ignoreCase:u}}function Ia(t){return{type:"other",description:t}}function Za(r){var u,e=La[r];if(e)return e;if(r>=La.length)u=La.length-1;else for(u=r;!La[--u];);for(e={line:(e=La[u]).line,column:e.column};u<r;)10===t.charCodeAt(u)?(e.line++,e.column=1):e.column++,u++;return La[r]=e,e}function _a(t,r,u){var e=Za(t),s=Za(r),o={source:n,start:{offset:t,line:e.line,column:e.column},end:{offset:r,line:s.line,column:s.column}};return u&&n&&"function"==typeof n.offset&&(o.start=n.offset(o.start),o.end=n.offset(o.end)),o}function Na(t){$a<Sa||($a>Sa&&(Sa=$a,Ta=[]),Ta.push(t))}function za(t,r,u){return new peg$SyntaxError(peg$SyntaxError.buildMessage(t,r),t,r,u)}function Ra(){var r,u,n,s,o,f,l,h,A,p,d,C,v,g,E,F,b;if(r=$a,47===t.charCodeAt($a)?(u=a,$a++):(u=e,0===ja&&Na(Br)),u===e&&(u=null),n=$a,(s=Pa())!==e&&(s=cn(s)),(n=s)!==e){if(s=$a,o=Gc(),63===t.charCodeAt($a)?(f=c,$a++):(f=e,0===ja&&Na(Dr)),f!==e){if(l=Gc(),h=$a,38===t.charCodeAt($a)?(A=i,$a++):(A=e,0===ja&&Na(yr)),A===e&&(A=null),p=Gc(),(d=Qa())!==e){if(C=[],v=$a,g=Gc(),E=[],38===t.charCodeAt($a)?(F=i,$a++):(F=e,0===ja&&Na(yr)),F!==e)for(;F!==e;)E.push(F),38===t.charCodeAt($a)?(F=i,$a++):(F=e,0===ja&&Na(yr));else E=e;for(E!==e?(F=Gc(),(b=Qa())!==e?v=g=[g,E,F,b]:($a=v,v=e)):($a=v,v=e);v!==e;){if(C.push(v),v=$a,g=Gc(),E=[],38===t.charCodeAt($a)?(F=i,$a++):(F=e,0===ja&&Na(yr)),F!==e)for(;F!==e;)E.push(F),38===t.charCodeAt($a)?(F=i,$a++):(F=e,0===ja&&Na(yr));else E=e;E!==e?(F=Gc(),(b=Qa())!==e?v=g=[g,E,F,b]:($a=v,v=e)):($a=v,v=e)}h=A=[A,p,d,C]}else $a=h,h=e;h===e&&(h=null),s=o=[o,f,l,h]}else $a=s,s=e;s===e&&(s=null),o=Gc(),r=fn()}else $a=r,r=e;return r}function Pa(){var r,u,n,s,o,c,i;return r=$a,t.substr($a,6)===f?(u=f,$a+=6):(u=e,0===ja&&Na(xr)),u!==e&&(u=ln()),(r=u)===e&&(r=$a,u=$a,t.substr($a,4)===l?(n=l,$a+=4):(n=e,0===ja&&Na(wr)),n===e&&(t.substr($a,6)===h?(n=h,$a+=6):(n=e,0===ja&&Na($r))),(u=n!==e?t.substring(u,$a):n)!==e&&(u=hn(u)),(r=u)===e&&(r=$a,u=$a,(n=Rc())!==e?(s=$a,(o=Qc())!==e&&(c=Uc())!==e?s=o=[o,c]:($a=s,s=e),s===e&&(s=$a,(o=Qc())!==e&&(c=Ha())!==e&&(i=Uc())!==e?s=o=[o,c,i]:($a=s,s=e)),s===e&&(s=null),o=$a,ja++,c=Hc(),ja--,c===e?o=void 0:($a=o,o=e),o!==e?u=n=[n,s,o]:($a=u,u=e)):($a=u,u=e),u===e&&(u=$a,(n=Hc())!==e&&(n=An(n)),u=n),u===e&&(u=null),n=$a,s=$a,47===t.charCodeAt($a)?(o=a,$a++):(o=e,0===ja&&Na(Br)),o!==e&&(o=pn(u,o)),(s=o)!==e?((o=Pa())===e&&(o=null),n=s=[s,o]):($a=n,n=e),n===e&&(n=null),r=dn(u,n))),r}function qa(){var r,u,n,s,o,a,c;return r=$a,(u=hc())!==e&&(u=Cn(u)),(r=u)===e&&(r=$a,(u=lc())!==e?(Gc(),61===t.charCodeAt($a)?(n=A,$a++):(n=e,0===ja&&Na(Lr)),n!==e?(Gc(),(s=hc())!==e?(o=$a,(a=Mc())!==e&&(c=qa())!==e?o=a=[a,c]:($a=o,o=e),o===e&&(o=null),r=vn(u,s,o)):($a=r,r=e)):($a=r,r=e)):($a=r,r=e)),r}function Ha(){var r,u,n,s,o,a,c;return r=$a,(u=lc())!==e?(Gc(),61===t.charCodeAt($a)?(n=A,$a++):(n=e,0===ja&&Na(Lr)),n!==e?(Gc(),(s=Ac())!==e?(o=$a,(a=Mc())!==e&&(c=Ha())!==e?o=a=[a,c]:($a=o,o=e),o===e&&(o=null),r=gn(u,s,o)):($a=r,r=e)):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,(u=Ac())!==e&&(u=En(u)),r=u),r}function Ma(){var r,u,n,s,o,c,i;if(r=$a,(u=Rc())!==e){for(n=$a,(s=Qc())!==e&&(o=Uc())!==e?n=s=[s,o]:($a=n,n=e),n===e&&(n=$a,(s=Qc())!==e&&(o=qa())!==e&&(c=Uc())!==e?n=Fn(u,o):($a=n,n=e)),n===e&&(n=null),s=[],o=$a,47===t.charCodeAt($a)?(c=a,$a++):(c=e,0===ja&&Na(Br)),c!==e&&(i=Ma())!==e?o=bn(u,n,i):($a=o,o=e);o!==e;)s.push(o),o=$a,47===t.charCodeAt($a)?(c=a,$a++):(c=e,0===ja&&Na(Br)),c!==e&&(i=Ma())!==e?o=bn(u,n,i):($a=o,o=e);r=mn(u,n,s)}else $a=r,r=e;return r}function Qa(){var r,u,n,s;return r=$a,t.substr($a,11)===p?(u=p,$a+=11):(u=e,0===ja&&Na(Sr)),u!==e?(n=Gc(),s=function(){var r,u;r=$a,u=function(){var r,u,n;r=$a,u=[],n=t.charAt($a),Fr.test(n)?$a++:(n=e,0===ja&&Na(Ye));if(n!==e)for(;n!==e;)u.push(n),n=t.charAt($a),Fr.test(n)?$a++:(n=e,0===ja&&Na(Ye));else u=e;r=u!==e?t.substring(r,$a):u;return r}(),u===e&&(u=null);return u=Hn(u),r=u,r}(),r=u=[u,n,s]):($a=r,r=e),r===e&&(r=$a,t.substr($a,8)===d?(u=d,$a+=8):(u=e,0===ja&&Na(Tr)),u!==e?(n=Gc(),s=function(){var r,u;r=$a,u=function(){var r,u,n,s,o,a,c,i,f,l,h,A;r=$a,u=$a,n=[],s=$a,o=$a,a=[],c=t.charAt($a),er.test(c)?$a++:(c=e,0===ja&&Na(Jr));for(;c!==e;)a.push(c),c=t.charAt($a),er.test(c)?$a++:(c=e,0===ja&&Na(Jr));o=t.substring(o,$a),a=[],c=t.charAt($a),nr.test(c)?$a++:(c=e,0===ja&&Na(Kr));if(c!==e)for(;c!==e;)a.push(c),c=t.charAt($a),nr.test(c)?$a++:(c=e,0===ja&&Na(Kr));else a=e;if(a===e){if(a=[],c=$a,34===t.charCodeAt($a)?(i=T,$a++):(i=e,0===ja&&Na(Vr)),i!==e){if(f=[],t.substr($a,2)===j?(l=j,$a+=2):(l=e,0===ja&&Na(Wr)),l===e&&(t.substr($a,2)===O?(l=O,$a+=2):(l=e,0===ja&&Na(Xr)),l===e&&(l=t.charAt($a),sr.test(l)?$a++:(l=e,0===ja&&Na(Yr)))),l!==e)for(;l!==e;)f.push(l),t.substr($a,2)===j?(l=j,$a+=2):(l=e,0===ja&&Na(Wr)),l===e&&(t.substr($a,2)===O?(l=O,$a+=2):(l=e,0===ja&&Na(Xr)),l===e&&(l=t.charAt($a),sr.test(l)?$a++:(l=e,0===ja&&Na(Yr))));else f=e;if(f!==e)if(34===t.charCodeAt($a)?(l=T,$a++):(l=e,0===ja&&Na(Vr)),l!==e){for(h=[],A=t.charAt($a),er.test(A)?$a++:(A=e,0===ja&&Na(Jr));A!==e;)h.push(A),A=t.charAt($a),er.test(A)?$a++:(A=e,0===ja&&Na(Jr));c=i=[i,f,l,h]}else $a=c,c=e;else $a=c,c=e}else $a=c,c=e;if(c!==e)for(;c!==e;)if(a.push(c),c=$a,34===t.charCodeAt($a)?(i=T,$a++):(i=e,0===ja&&Na(Vr)),i!==e){if(f=[],t.substr($a,2)===j?(l=j,$a+=2):(l=e,0===ja&&Na(Wr)),l===e&&(t.substr($a,2)===O?(l=O,$a+=2):(l=e,0===ja&&Na(Xr)),l===e&&(l=t.charAt($a),sr.test(l)?$a++:(l=e,0===ja&&Na(Yr)))),l!==e)for(;l!==e;)f.push(l),t.substr($a,2)===j?(l=j,$a+=2):(l=e,0===ja&&Na(Wr)),l===e&&(t.substr($a,2)===O?(l=O,$a+=2):(l=e,0===ja&&Na(Xr)),l===e&&(l=t.charAt($a),sr.test(l)?$a++:(l=e,0===ja&&Na(Yr))));else f=e;if(f!==e)if(34===t.charCodeAt($a)?(l=T,$a++):(l=e,0===ja&&Na(Vr)),l!==e){for(h=[],A=t.charAt($a),er.test(A)?$a++:(A=e,0===ja&&Na(Jr));A!==e;)h.push(A),A=t.charAt($a),er.test(A)?$a++:(A=e,0===ja&&Na(Jr));c=i=[i,f,l,h]}else $a=c,c=e;else $a=c,c=e}else $a=c,c=e;else a=e}a!==e?s=o=[o,a]:($a=s,s=e);if(s!==e)for(;s!==e;){for(n.push(s),s=$a,o=$a,a=[],c=t.charAt($a),er.test(c)?$a++:(c=e,0===ja&&Na(Jr));c!==e;)a.push(c),c=t.charAt($a),er.test(c)?$a++:(c=e,0===ja&&Na(Jr));if(o=t.substring(o,$a),a=[],c=t.charAt($a),nr.test(c)?$a++:(c=e,0===ja&&Na(Kr)),c!==e)for(;c!==e;)a.push(c),c=t.charAt($a),nr.test(c)?$a++:(c=e,0===ja&&Na(Kr));else a=e;if(a===e){if(a=[],c=$a,34===t.charCodeAt($a)?(i=T,$a++):(i=e,0===ja&&Na(Vr)),i!==e){if(f=[],t.substr($a,2)===j?(l=j,$a+=2):(l=e,0===ja&&Na(Wr)),l===e&&(t.substr($a,2)===O?(l=O,$a+=2):(l=e,0===ja&&Na(Xr)),l===e&&(l=t.charAt($a),sr.test(l)?$a++:(l=e,0===ja&&Na(Yr)))),l!==e)for(;l!==e;)f.push(l),t.substr($a,2)===j?(l=j,$a+=2):(l=e,0===ja&&Na(Wr)),l===e&&(t.substr($a,2)===O?(l=O,$a+=2):(l=e,0===ja&&Na(Xr)),l===e&&(l=t.charAt($a),sr.test(l)?$a++:(l=e,0===ja&&Na(Yr))));else f=e;if(f!==e)if(34===t.charCodeAt($a)?(l=T,$a++):(l=e,0===ja&&Na(Vr)),l!==e){for(h=[],A=t.charAt($a),er.test(A)?$a++:(A=e,0===ja&&Na(Jr));A!==e;)h.push(A),A=t.charAt($a),er.test(A)?$a++:(A=e,0===ja&&Na(Jr));c=i=[i,f,l,h]}else $a=c,c=e;else $a=c,c=e}else $a=c,c=e;if(c!==e)for(;c!==e;)if(a.push(c),c=$a,34===t.charCodeAt($a)?(i=T,$a++):(i=e,0===ja&&Na(Vr)),i!==e){if(f=[],t.substr($a,2)===j?(l=j,$a+=2):(l=e,0===ja&&Na(Wr)),l===e&&(t.substr($a,2)===O?(l=O,$a+=2):(l=e,0===ja&&Na(Xr)),l===e&&(l=t.charAt($a),sr.test(l)?$a++:(l=e,0===ja&&Na(Yr)))),l!==e)for(;l!==e;)f.push(l),t.substr($a,2)===j?(l=j,$a+=2):(l=e,0===ja&&Na(Wr)),l===e&&(t.substr($a,2)===O?(l=O,$a+=2):(l=e,0===ja&&Na(Xr)),l===e&&(l=t.charAt($a),sr.test(l)?$a++:(l=e,0===ja&&Na(Yr))));else f=e;if(f!==e)if(34===t.charCodeAt($a)?(l=T,$a++):(l=e,0===ja&&Na(Vr)),l!==e){for(h=[],A=t.charAt($a),er.test(A)?$a++:(A=e,0===ja&&Na(Jr));A!==e;)h.push(A),A=t.charAt($a),er.test(A)?$a++:(A=e,0===ja&&Na(Jr));c=i=[i,f,l,h]}else $a=c,c=e;else $a=c,c=e}else $a=c,c=e;else a=e}a!==e?s=o=[o,a]:($a=s,s=e)}else n=e;u=n!==e?t.substring(u,$a):n;u!==e&&(u=Un(u));return r=u,r}(),u!==e&&(u=Qn(u));r=u,r===e&&(r=Gc());return r}(),s!==e?r=Bn(s):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,(u=Ua())!==e&&(u=Dn(u)),(r=u)===e&&(r=function(){var r,u,n,s;r=$a,t.substr($a,3)===D?(u=D,$a+=3):(u=e,0===ja&&Na(Pr));u===e&&(t.substr($a,5)===y?(u=y,$a+=5):(u=e,0===ja&&Na(qr)),u===e&&(t.substr($a,12)===x?(u=x,$a+=12):(u=e,0===ja&&Na(Hr)),u===e&&(t.substr($a,3)===w?(u=w,$a+=3):(u=e,0===ja&&Na(Mr)))));u!==e?(61===t.charCodeAt($a)?(n=A,$a++):(n=e,0===ja&&Na(Lr)),n!==e&&(s=Nc())!==e?r=u=[u,n,s]:($a=r,r=e)):($a=r,r=e);return r}(),r===e&&(r=function(){var r,u,n,s,o;r=$a,t.substr($a,8)===Q?(u=Q,$a+=8):(u=e,0===ja&&Na(du));if(u!==e){for(n=$a,s=[],o=t.charAt($a),ur.test(o)?$a++:(o=e,0===ja&&Na(Rr));o!==e;)s.push(o),o=t.charAt($a),ur.test(o)?$a++:(o=e,0===ja&&Na(Rr));n=t.substring(n,$a),r=Os(n)}else $a=r,r=e;return r}(),r===e&&(r=function(){var r,u,n,s,o,a;r=$a,u=$a,n=[],s=t.charAt($a),ar.test(s)?$a++:(s=e,0===ja&&Na(hu));if(s!==e)for(;s!==e;)n.push(s),s=t.charAt($a),ar.test(s)?$a++:(s=e,0===ja&&Na(hu));else n=e;u=n!==e?t.substring(u,$a):n;if(u!==e){for(61===t.charCodeAt($a)?(n=A,$a++):(n=e,0===ja&&Na(Lr)),n===e&&(n=null),s=$a,o=[],a=t.charAt($a),ur.test(a)?$a++:(a=e,0===ja&&Na(Rr));a!==e;)o.push(a),a=t.charAt($a),ur.test(a)?$a++:(a=e,0===ja&&Na(Rr));s=t.substring(s,$a),r=Ss(u,s)}else $a=r,r=e;return r}(),r===e&&(r=function(){var r,u,n,s,o;r=$a,u=oc(),u!==e?(61===t.charCodeAt($a)?(n=A,$a++):(n=e,0===ja&&Na(Lr)),n!==e?(s=$a,ja++,o=oc(),ja--,o===e?s=void 0:($a=s,s=e),s!==e?(o=function(){var r,u,n,s;r=hc(),r===e&&(r=dc())===e&&(r=Cc())===e&&(r=$a,91===t.charCodeAt($a)?(u=q,$a++):(u=e,0===ja&&Na(fu)),u!==e?(n=function(){var r,u,n,s,o,a;if(r=$a,u=sc(),u!==e){for(n=[],s=$a,44===t.charCodeAt($a)?(o=P,$a++):(o=e,0===ja&&Na(iu)),o!==e&&(a=sc())!==e?s=ws(u,a):($a=s,s=e);s!==e;)n.push(s),s=$a,44===t.charCodeAt($a)?(o=P,$a++):(o=e,0===ja&&Na(iu)),o!==e&&(a=sc())!==e?s=ws(u,a):($a=s,s=e);r=$s(u,n)}else $a=r,r=e;return r}(),n!==e?(93===t.charCodeAt($a)?(s=H,$a++):(s=e,0===ja&&Na(lu)),s!==e?r=Ls(n):($a=r,r=e)):($a=r,r=e)):($a=r,r=e));return r}(),o!==e?r=js(u,o):($a=r,r=e)):($a=r,r=e)):($a=r,r=e)):($a=r,r=e);return r}(),r===e&&(r=function(){var r,u,n,s;r=$a,t.substr($a,12)===z?(u=z,$a+=12):(u=e,0===ja&&Na(ou));if(u!==e){for(Gc(),n=[],s=t.charAt($a),ur.test(s)?$a++:(s=e,0===ja&&Na(Rr));s!==e;)n.push(s),s=t.charAt($a),ur.test(s)?$a++:(s=e,0===ja&&Na(Rr));r=Ds(n)}else $a=r,r=e;return r}()))))))),r}function Ua(){var r,u,n,s,o,a,c,i;if(r=$a,t.substr($a,8)===C?(u=C,$a+=8):(u=e,0===ja&&Na(jr)),u!==e)if(n=Gc(),(s=Ga())!==e){for(o=[],a=$a,(c=Mc())!==e&&(i=Ga())!==e?a=c=[c,i]:($a=a,a=e);a!==e;)o.push(a),a=$a,(c=Mc())!==e&&(i=Ga())!==e?a=c=[c,i]:($a=a,a=e);r=u=[u,n,s,o]}else $a=r,r=e;else $a=r,r=e;if(r===e){if(r=$a,t.substr($a,8)===v?(u=v,$a+=8):(u=e,0===ja&&Na(Or)),u!==e)if(n=Gc(),(s=Ka())!==e){for(o=[],a=$a,(c=Mc())!==e&&(i=Ka())!==e?a=c=[c,i]:($a=a,a=e);a!==e;)o.push(a),a=$a,(c=Mc())!==e&&(i=Ka())!==e?a=c=[c,i]:($a=a,a=e);a=function(){var r,u;r=$a,t.substr($a,7)===L?(u=L,$a+=7):(u=e,0===ja&&Na(Ur));u!==e&&(u=Zn());return r=u,r}(),a===e&&(a=null),r=u=[u,n,s,o,a]}else $a=r,r=e;else $a=r,r=e;if(r===e&&(r=$a,t.substr($a,8)===g?(u=g,$a+=8):(u=e,0===ja&&Na(kr)),u!==e?(n=Gc(),(s=Ya())!==e?r=yn(s):($a=r,r=e)):($a=r,r=e),r===e)){if(r=$a,t.substr($a,9)===E?(u=E,$a+=9):(u=e,0===ja&&Na(Ir)),u!==e)if(n=Gc(),(s=nc())!==e){for(o=[],a=$a,(c=Mc())!==e&&(i=nc())!==e?a=xn(s,i):($a=a,a=e);a!==e;)o.push(a),a=$a,(c=Mc())!==e&&(i=nc())!==e?a=xn(s,i):($a=a,a=e);r=wn(s)}else $a=r,r=e;else $a=r,r=e;if(r===e&&(r=$a,t.substr($a,5)===F?(u=F,$a+=5):(u=e,0===ja&&Na(Zr)),u!==e?(n=Gc(),(s=Va())!==e?r=$n(s):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,t.substr($a,6)===b?(u=b,$a+=6):(u=e,0===ja&&Na(_r)),u!==e?(n=Gc(),(s=Wa())!==e?r=Ln(s):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,t.substr($a,8)===d?(u=d,$a+=8):(u=e,0===ja&&Na(Tr)),u!==e?(n=Gc(),(s=Xa())!==e?r=Sn(s):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,t.substr($a,7)===m?(u=m,$a+=7):(u=e,0===ja&&Na(Nr)),u!==e?(n=Gc(),s=function(){var t,r;t=$a,r=Ic(),r!==e&&(r=Bs(r));return t=r,t}(),s!==e?r=u=[u,n,s]:($a=r,r=e)):($a=r,r=e),r===e))))){if(r=$a,t.substr($a,7)===B?(u=B,$a+=7):(u=e,0===ja&&Na(zr)),u!==e)if((n=(n=Tn())?void 0:e)!==e){for(s=Gc(),o=[],a=t.charAt($a),ur.test(a)?$a++:(a=e,0===ja&&Na(Rr));a!==e;)o.push(a),a=t.charAt($a),ur.test(a)?$a++:(a=e,0===ja&&Na(Rr));r=jn()}else $a=r,r=e;else $a=r,r=e;r===e&&(r=$a,t.substr($a,7)===B?(u=B,$a+=7):(u=e,0===ja&&Na(zr)),u!==e?(n=Gc(),(s=bc())!==e?r=On(s):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,t.substr($a,8)===v?(u=v,$a+=8):(u=e,0===ja&&Na(Or)),u!==e&&(u=kn()),r=u))}}}return r}function Ga(){var r,u;return r=$a,42===t.charCodeAt($a)?(u=$,$a++):(u=e,0===ja&&Na(Qr)),u===e&&(u=lc()),u!==e&&(u=In(u)),r=u}function Ja(){var r,u,n,s,o;return r=$a,u=$a,(n=Qc())!==e&&(n=zn()),(u=n)!==e?(n=function(){var r,u,n,s,o;for(r=$a,u=[],n=$a,(s=Ua())!==e?(Gc(),59===t.charCodeAt($a)?(o=S,$a++):(o=e,0===ja&&Na(Gr)),o===e&&(o=null),n=_n(s)):($a=n,n=e);n!==e;)u.push(n),n=$a,(s=Ua())!==e?(Gc(),59===t.charCodeAt($a)?(o=S,$a++):(o=e,0===ja&&Na(Gr)),o===e&&(o=null),n=_n(s)):($a=n,n=e);return Nn(u)}(),s=$a,(o=Uc())!==e&&(o=Rn()),(s=o)!==e?r=u=[u,n,s]:($a=r,r=e)):($a=r,r=e),r}function Ka(){var r,u,n;return r=$a,u=$a,42===t.charCodeAt($a)?(n=$,$a++):(n=e,0===ja&&Na(Qr)),n===e&&(n=lc()),n!==e&&(n=Pn(n)),(u=n)!==e?((n=Ja())===e&&(n=null),r=u=[u,n]):($a=r,r=e),r}function Va(){var t,r;return t=$a,(r=zc())!==e&&(r=qn(r)),t=r}function Wa(){var t,r;return t=$a,(r=zc())!==e&&(r=Mn(r)),t=r}function Xa(){var r,u,n,s;if(r=$a,u=$a,n=[],s=t.charAt($a),or.test(s)?$a++:(s=e,0===ja&&Na(tu)),s!==e)for(;s!==e;)n.push(s),s=t.charAt($a),or.test(s)?$a++:(s=e,0===ja&&Na(tu));else n=e;return(u=n!==e?t.substring(u,$a):n)!==e&&(u=Gn(u)),(r=u)===e&&(r=Gc()),r}function Ya(){var t,r;return t=$a,(r=tc())!==e&&(r=Jn(r)),t=r}function tc(){var r,u,n,s,o,a,c;if(r=$a,u=$a,(n=gc())===e&&(n=null),u=n=Kn(n),n=$a,(s=Qc())!==e&&(o=tc())!==e&&(a=Uc())!==e?n=Vn(u,o):($a=n,n=e),n===e&&(n=$a,(s=ac())!==e&&(s=Wn(u,s)),(n=s)===e&&(n=$a,(s=rc())!==e&&(s=Xn(u,s)),(n=s)===e&&(n=$a,s=function(){var r,u,n,s;r=$a,u=t.substr($a,8),u.toLowerCase()===ut?$a+=8:(u=e,0===ja&&Na(Zu));u===e&&((u=t.substr($a,8)).toLowerCase()===et?$a+=8:(u=e,0===ja&&Na(_u)),u===e&&((u=t.substr($a,10)).toLowerCase()===nt?$a+=10:(u=e,0===ja&&Na(Nu)),u===e&&((u=t.substr($a,14)).toLowerCase()===st?$a+=14:(u=e,0===ja&&Na(zu)))));u!==e&&Qc()!==e&&(n=fc())!==e&&Mc()!==e&&(s=fc())!==e&&Uc()!==e?r=io(u,n,s):($a=r,r=e);return r}(),s!==e&&(s=Yn(u,s)),(n=s)===e&&(n=$a,(s=Ic())!==e&&(s=ts(u,s)),(n=s)===e&&(n=$a,(s=ic())!==e&&(s=rs(u,s)),n=s))))),n!==e){for(s=[],o=$a,(a=Ec())===e&&(a=Fc()),a!==e&&(c=tc())!==e?o=us(u,a,c):($a=o,o=e);o!==e;)s.push(o),o=$a,(a=Ec())===e&&(a=Fc()),a!==e&&(c=tc())!==e?o=us(u,a,c):($a=o,o=e);r=es(u)}else $a=r,r=e;return r}function rc(){var r,u,n,s,o,c,i;if(r=$a,u=$a,(n=Rc())!==e&&(n=ns(n)),(u=n)!==e)if(47===t.charCodeAt($a)?(n=a,$a++):(n=e,0===ja&&Na(Br)),n!==e){for(s=[],o=$a,(c=Rc())!==e?(47===t.charCodeAt($a)?(i=a,$a++):(i=e,0===ja&&Na(Br)),i!==e?o=ss(u,c):($a=o,o=e)):($a=o,o=e);o!==e;)s.push(o),o=$a,(c=Rc())!==e?(47===t.charCodeAt($a)?(i=a,$a++):(i=e,0===ja&&Na(Br)),i!==e?o=ss(u,c):($a=o,o=e)):($a=o,o=e);o=$a,c=function(){var r,u,n;r=$a,t.substr($a,3)===I?(u=I,$a+=3):(u=e,0===ja&&Na(uu));u!==e&&Qc()!==e?((n=ec())===e&&(n=null),Uc()!==e?r=gs(n):($a=r,r=e)):($a=r,r=e);return r}(),c!==e&&(c=os(u,c)),(o=c)===e&&(o=$a,c=function(){var r,u,n;r=$a,t.substr($a,3)===Z?(u=Z,$a+=3):(u=e,0===ja&&Na(eu));u!==e&&Qc()!==e&&(n=ec())!==e&&Uc()!==e?r=Es(n):($a=r,r=e);return r}(),c!==e&&(c=as(u,c)),o=c),o!==e?r=cs(u,o):($a=r,r=e)}else $a=r,r=e;else $a=r,r=e;return r}function uc(){var t,r,u,n,s,o,a;if(t=$a,r=$a,(u=gc())===e&&(u=null),r=u=is(u),u=$a,(n=Qc())!==e&&(s=uc())!==e&&(o=Uc())!==e?u=fs(r,s):($a=u,u=e),u===e&&(u=$a,(n=ac())!==e&&(n=ls(r,n)),(u=n)===e&&(u=$a,(n=vc())!==e&&(n=hs(r,n)),(u=n)===e&&(u=$a,(n=rc())!==e&&(n=As(r,n)),(u=n)===e&&(u=$a,(n=ic())!==e&&(n=ps(r,n)),u=n)))),u!==e){for(n=[],s=$a,(o=Ec())===e&&(o=Fc()),o!==e&&(a=uc())!==e?s=ds(r,o,a):($a=s,s=e);s!==e;)n.push(s),s=$a,(o=Ec())===e&&(o=Fc()),o!==e&&(a=uc())!==e?s=ds(r,o,a):($a=s,s=e);t=Cs(r)}else $a=t,t=e;return t}function ec(){var r,u,n,s;return r=$a,(u=Rc())!==e?(58===t.charCodeAt($a)?(n=k,$a++):(n=e,0===ja&&Na(ru)),n!==e&&(s=uc())!==e?r=vs(u,s):($a=r,r=e)):($a=r,r=e),r}function nc(){var r,u,n,s,o;return r=$a,u=$a,(n=rc())!==e&&(n=Fs()),(u=n)===e&&(u=vc())===e&&(u=lc()),u!==e?(n=$a,Jc()!==e?(s=$a,t.substr($a,3)===_?(o=_,$a+=3):(o=e,0===ja&&Na(nu)),o===e&&(t.substr($a,4)===N?(o=N,$a+=4):(o=e,0===ja&&Na(su))),(s=o!==e?t.substring(s,$a):o)!==e?n=bs(u,s):($a=n,n=e)):($a=n,n=e),n===e&&(n=null),r=ms(u,n)):($a=r,r=e),r}function sc(){var r,u,n;return ja++,r=$a,(u=_c())!==e&&(u=ys(u)),(r=u)===e&&(r=$a,u=$a,ja++,39===t.charCodeAt($a)?(n=R,$a++):(n=e,0===ja&&Na(cu)),ja--,n===e?u=void 0:($a=u,u=e),u!==e&&(n=hc())!==e?r=xs(n):($a=r,r=e)),ja--,r===e&&(u=e,0===ja&&Na(au)),r}function oc(){var r,u,n;return ja++,r=$a,64===t.charCodeAt($a)?(u=M,$a++):(u=e,0===ja&&Na(pu)),u!==e&&(n=Rc())!==e?r=Ts(n):($a=r,r=e),ja--,r===e&&(u=e,0===ja&&Na(Au)),r}function ac(){var r,u,n,s,o;return r=$a,(u=fc())!==e&&Jc()!==e?(n=$a,t.substr($a,2)===U?(s=U,$a+=2):(s=e,0===ja&&Na(Cu)),s===e&&(t.substr($a,2)===G?(s=G,$a+=2):(s=e,0===ja&&Na(vu)),s===e&&(t.substr($a,2)===J?(s=J,$a+=2):(s=e,0===ja&&Na(gu)),s===e&&(t.substr($a,2)===K?(s=K,$a+=2):(s=e,0===ja&&Na(Eu)),s===e&&(t.substr($a,2)===V?(s=V,$a+=2):(s=e,0===ja&&Na(Fu)),s===e&&(t.substr($a,2)===W?(s=W,$a+=2):(s=e,0===ja&&Na(bu))))))),(n=s!==e?t.substring(n,$a):s)!==e&&(s=Jc())!==e&&(o=fc())!==e?r=ks(u,n,o):($a=r,r=e)):($a=r,r=e),r}function cc(){var r,u;return r=$a,(u=oc())!==e&&(u=Is(u)),(r=u)===e&&(r=function(){var r,u,n;ja++,r=$a,u=Qc(),u!==e?(n=function(){var r,u,n,s,o,a;if(r=$a,u=hc(),u!==e){for(n=[],s=$a,44===t.charCodeAt($a)?(o=P,$a++):(o=e,0===ja&&Na(iu)),o!==e&&(a=hc())!==e?s=uo(u,a):($a=s,s=e);s!==e;)n.push(s),s=$a,44===t.charCodeAt($a)?(o=P,$a++):(o=e,0===ja&&Na(iu)),o!==e&&(a=hc())!==e?s=uo(u,a):($a=s,s=e);r=eo(u,n)}else $a=r,r=e;return r}(),n!==e&&Uc()!==e?r=no(n):($a=r,r=e)):($a=r,r=e);ja--,r===e&&(u=e,0===ja&&Na(Ou));return r}()),r}function ic(){var r,u,n,s;return r=$a,(u=fc())!==e&&Jc()!==e?(t.substr($a,2)===X?(n=X,$a+=2):(n=e,0===ja&&Na(mu)),n!==e&&Jc()!==e&&(s=cc())!==e?r=Zs(u,s):($a=r,r=e)):($a=r,r=e),r}function fc(){var r;return(r=function(){var r,u,n,s,o,c,i;ja++,r=$a,u=[],n=$a,(s=Rc())!==e?(o=$a,(c=Qc())!==e&&(i=qa())!==e&&Uc()!==e?o=_s(s,i):($a=o,o=e),o===e&&(o=null),47===t.charCodeAt($a)?(c=a,$a++):(c=e,0===ja&&Na(Br)),c!==e?n=Ns(s,o):($a=n,n=e)):($a=n,n=e);if(n!==e)for(;n!==e;)u.push(n),n=$a,(s=Rc())!==e?(o=$a,(c=Qc())!==e&&(i=qa())!==e&&Uc()!==e?o=_s(s,i):($a=o,o=e),o===e&&(o=null),47===t.charCodeAt($a)?(c=a,$a++):(c=e,0===ja&&Na(Br)),c!==e?n=Ns(s,o):($a=n,n=e)):($a=n,n=e);else u=e;u!==e?(t.substr($a,6)===f?(n=f,$a+=6):(n=e,0===ja&&Na(xr)),n!==e?r=zs(u,n):($a=r,r=e)):($a=r,r=e);ja--,r===e&&(u=e,0===ja&&Na(Bu));return r}())===e&&(r=vc())===e&&(r=hc())===e&&(r=lc())===e&&(r=dc())===e&&(r=Cc())===e&&(r=function(){var r,u,n,s,o;ja++,r=$a,91===t.charCodeAt($a)?(u=q,$a++):(u=e,0===ja&&Na(fu));if(u!==e){for(n=$a,s=[],o=t.charAt($a),ir.test(o)?$a++:(o=e,0===ja&&Na(ju));o!==e;)s.push(o),o=t.charAt($a),ir.test(o)?$a++:(o=e,0===ja&&Na(ju));n=t.substring(n,$a),93===t.charCodeAt($a)?(s=H,$a++):(s=e,0===ja&&Na(lu)),s!==e?r=ro(n):($a=r,r=e)}else $a=r,r=e;ja--,r===e&&(u=e,0===ja&&Na(Ou));return r}()),r}function lc(){var r,u,n,s,o,c;if(ja++,r=$a,(u=Rc())!==e){for(n=[],s=$a,47===t.charCodeAt($a)?(o=a,$a++):(o=e,0===ja&&Na(Br)),o!==e&&(c=Rc())!==e?s=Rs(u,c):($a=s,s=e);s!==e;)n.push(s),s=$a,47===t.charCodeAt($a)?(o=a,$a++):(o=e,0===ja&&Na(Br)),o!==e&&(c=Rc())!==e?s=Rs(u,c):($a=s,s=e);r=Ps(u,n)}else $a=r,r=e;return ja--,r===e&&(u=e,0===ja&&Na(Du)),r}function hc(){var r,u;return r=$a,(u=Ic())!==e&&(u=qs(u)),(r=u)===e&&(r=$a,(u=Nc())!==e&&(u=Hs(u)),(r=u)===e&&(r=$a,u=function(){var r,u,n,s,o,a,c,i,f,l;ja++,r=$a,u=$a,n=t.charAt($a),pr.test(n)?$a++:(n=e,0===ja&&Na(Ze));n!==e?(s=t.charAt($a),pr.test(s)?$a++:(s=e,0===ja&&Na(Ze)),s!==e?(58===t.charCodeAt($a)?(o=k,$a++):(o=e,0===ja&&Na(ru)),o!==e?(a=t.charAt($a),pr.test(a)?$a++:(a=e,0===ja&&Na(Ze)),a!==e?(c=t.charAt($a),pr.test(c)?$a++:(c=e,0===ja&&Na(Ze)),c!==e?(58===t.charCodeAt($a)?(i=k,$a++):(i=e,0===ja&&Na(ru)),i!==e?(f=t.charAt($a),pr.test(f)?$a++:(f=e,0===ja&&Na(Ze)),f!==e?(l=t.charAt($a),pr.test(l)?$a++:(l=e,0===ja&&Na(Ze)),l!==e?u=n=[n,s,o,a,c,i,f,l]:($a=u,u=e)):($a=u,u=e)):($a=u,u=e)):($a=u,u=e)):($a=u,u=e)):($a=u,u=e)):($a=u,u=e)):($a=u,u=e);r=u!==e?t.substring(r,$a):u;ja--,r===e&&(u=e,0===ja&&Na(Ie));return r}(),u!==e&&(u=Ms(u)),(r=u)===e&&(r=$a,(u=Pc())!==e&&(u=Qs(u)),(r=u)===e&&(r=$a,u=function(){var r,u,n,s,o,a,c,i,f,l,h;ja++,r=$a,u=$a,ja++,n=function(){var r,u,n;r=$a,u=[],n=t.charAt($a),pr.test(n)?$a++:(n=e,0===ja&&Na(Ze));if(n!==e)for(;n!==e;)u.push(n),n=t.charAt($a),pr.test(n)?$a++:(n=e,0===ja&&Na(Ze));else u=e;u!==e?(45===t.charCodeAt($a)?(n=Jt,$a++):(n=e,0===ja&&Na(Ne)),n!==e?r=u=[u,n]:($a=r,r=e)):($a=r,r=e);return r}(),ja--,n===e?u=void 0:($a=u,u=e);if(u!==e){if(n=$a,s=$a,o=t.charAt($a),dr.test(o)?$a++:(o=e,0===ja&&Na(qe)),o===e&&(o=null),a=[],c=t.charAt($a),pr.test(c)?$a++:(c=e,0===ja&&Na(Ze)),c!==e)for(;c!==e;)a.push(c),c=t.charAt($a),pr.test(c)?$a++:(c=e,0===ja&&Na(Ze));else a=e;if(a!==e){if(c=$a,46===t.charCodeAt($a)?(i=Vt,$a++):(i=e,0===ja&&Na(Re)),i!==e){if(f=[],l=t.charAt($a),pr.test(l)?$a++:(l=e,0===ja&&Na(Ze)),l!==e)for(;l!==e;)f.push(l),l=t.charAt($a),pr.test(l)?$a++:(l=e,0===ja&&Na(Ze));else f=e;f!==e?c=i=[i,f]:($a=c,c=e)}else $a=c,c=e;if(c===e&&(c=null),i=$a,101===t.charCodeAt($a)?(f=Xt,$a++):(f=e,0===ja&&Na(Me)),f!==e){if(l=[],h=t.charAt($a),pr.test(h)?$a++:(h=e,0===ja&&Na(Ze)),h!==e)for(;h!==e;)l.push(h),h=t.charAt($a),pr.test(h)?$a++:(h=e,0===ja&&Na(Ze));else l=e;l!==e?i=f=[f,l]:($a=i,i=e)}else $a=i,i=e;i===e&&(i=null),s=o=[o,a,c,i]}else $a=s,s=e;(n=s!==e?t.substring(n,$a):s)!==e?r=Ba(n):($a=r,r=e)}else $a=r,r=e;ja--,r===e&&(u=e,0===ja&&Na(He));return r}(),u!==e&&(u=Us(u)),(r=u)===e&&(r=$a,(u=Zc())!==e&&(u=Gs(u)),(r=u)===e&&(r=$a,u=function(){var r,u,n,s,o,a;ja++,r=$a,t.substr($a,7)===Yt?(u=Yt,$a+=7):(u=e,0===ja&&Na(rn));if(u!==e){if(n=$a,s=$a,o=[],a=t.charAt($a),br.test(a)?$a++:(a=e,0===ja&&Na(un)),a!==e)for(;a!==e;)o.push(a),a=t.charAt($a),br.test(a)?$a++:(a=e,0===ja&&Na(un));else o=e;o!==e?(t.substr($a,2)===tr?(a=tr,$a+=2):(a=e,0===ja&&Na(en)),a===e&&(61===t.charCodeAt($a)?(a=A,$a++):(a=e,0===ja&&Na(Lr))),a===e&&(a=null),s=o=[o,a]):($a=s,s=e),(n=s!==e?t.substring(n,$a):s)!==e?(39===t.charCodeAt($a)?(s=R,$a++):(s=e,0===ja&&Na(cu)),s!==e?r=wa(n):($a=r,r=e)):($a=r,r=e)}else $a=r,r=e;ja--,r===e&&(u=e,0===ja&&Na(tn));return r}(),u!==e&&(u=Js(u)),(r=u)===e&&(r=$a,(u=oc())!==e&&(u=Ks(u)),(r=u)===e&&(r=pc())))))))),r}function Ac(){var r,u;return r=$a,(u=hc())!==e&&(u=Vs(u)),(r=u)===e&&(r=$a,u=function(){var r,u,n;ja++,r=$a,u=[],n=t.charAt($a),Ar.test(n)?$a++:(n=e,0===ja&&Na(ke));if(n!==e)for(;n!==e;)u.push(n),n=t.charAt($a),Ar.test(n)?$a++:(n=e,0===ja&&Na(ke));else u=e;r=u!==e?t.substring(r,$a):u;ja--,r===e&&(u=e,0===ja&&Na(Oe));return r}(),u!==e&&(u=Ws(u)),r=u),r}function pc(){var r,u;return ja++,r=$a,t.substr($a,4)===Y?(u=Y,$a+=4):(u=e,0===ja&&Na(xu)),u!==e&&(u=Xs()),ja--,(r=u)===e&&(u=e,0===ja&&Na(yu)),r}function dc(){var r,u,n,s,o,a;if(ja++,r=$a,u=$a,n=$a,123===t.charCodeAt($a)?(s=tt,$a++):(s=e,0===ja&&Na($u)),s!==e){for(o=[],(a=dc())===e&&(a=t.charAt($a),cr.test(a)?$a++:(a=e,0===ja&&Na(Lu)));a!==e;)o.push(a),(a=dc())===e&&(a=t.charAt($a),cr.test(a)?$a++:(a=e,0===ja&&Na(Lu)));125===t.charCodeAt($a)?(a=rt,$a++):(a=e,0===ja&&Na(Su)),a!==e?n=s=[s,o,a]:($a=n,n=e)}else $a=n,n=e;return(u=n!==e?t.substring(u,$a):n)!==e&&(u=Ys(u)),ja--,(r=u)===e&&(u=e,0===ja&&Na(wu)),r}function Cc(){var r,u,n,s,o,a,c,i;if(ja++,r=$a,u=$a,n=$a,91===t.charCodeAt($a)?(s=q,$a++):(s=e,0===ja&&Na(fu)),s!==e?(o=Gc(),93===t.charCodeAt($a)?(a=H,$a++):(a=e,0===ja&&Na(lu)),a!==e?n=s=[s,o,a]:($a=n,n=e)):($a=n,n=e),n===e)if(n=$a,91===t.charCodeAt($a)?(s=q,$a++):(s=e,0===ja&&Na(fu)),s!==e)if(o=Gc(),123===t.charCodeAt($a)?(a=tt,$a++):(a=e,0===ja&&Na($u)),a!==e){for(c=[],(i=Cc())===e&&(i=t.charAt($a),ir.test(i)?$a++:(i=e,0===ja&&Na(ju)));i!==e;)c.push(i),(i=Cc())===e&&(i=t.charAt($a),ir.test(i)?$a++:(i=e,0===ja&&Na(ju)));93===t.charCodeAt($a)?(i=H,$a++):(i=e,0===ja&&Na(lu)),i!==e?n=s=[s,o,a,c,i]:($a=n,n=e)}else $a=n,n=e;else $a=n,n=e;return(u=n!==e?t.substring(u,$a):n)!==e&&(u=to(u)),ja--,(r=u)===e&&(u=e,0===ja&&Na(Tu)),r}function vc(){var r,u,n;return r=$a,u=function(){var r,u,n;if(ja++,r=$a,u=[],n=t.charAt($a),fr.test(n)?$a++:(n=e,0===ja&&Na(Iu)),n!==e)for(;n!==e;)u.push(n),n=t.charAt($a),fr.test(n)?$a++:(n=e,0===ja&&Na(Iu));else u=e;return r=u!==e?t.substring(r,$a):u,ja--,r===e&&(u=e,0===ja&&Na(ku)),r}(),u!==e&&Qc()!==e?(n=function(){var t,r,u,n,s,o,a;if(t=$a,r=[],u=$a,n=fc(),n!==e){for(s=[],o=$a,Mc()!==e&&(a=fc())!==e?o=oo(n,a):($a=o,o=e);o!==e;)s.push(o),o=$a,Mc()!==e&&(a=fc())!==e?o=oo(n,a):($a=o,o=e);u=ao(n,s)}else $a=u,u=e;for(;u!==e;)if(r.push(u),u=$a,(n=fc())!==e){for(s=[],o=$a,Mc()!==e&&(a=fc())!==e?o=oo(n,a):($a=o,o=e);o!==e;)s.push(o),o=$a,Mc()!==e&&(a=fc())!==e?o=oo(n,a):($a=o,o=e);u=ao(n,s)}else $a=u,u=e;return r=co(r),t=r,t}(),Uc()!==e?r=so(u,n):($a=r,r=e)):($a=r,r=e),r}function gc(){var r,u;return r=$a,Gc(),(u=t.substr($a,3)).toLowerCase()===ot?$a+=3:(u=e,0===ja&&Na(Ru)),u!==e&&Jc()!==e?r=fo():($a=r,r=e),r}function Ec(){var r,u;return r=$a,Jc()!==e?((u=t.substr($a,3)).toLowerCase()===at?$a+=3:(u=e,0===ja&&Na(Pu)),u!==e&&Jc()!==e?r=lo():($a=r,r=e)):($a=r,r=e),r}function Fc(){var r,u;return r=$a,Jc()!==e?((u=t.substr($a,2)).toLowerCase()===ct?$a+=2:(u=e,0===ja&&Na(qu)),u!==e&&Jc()!==e?r=ho():($a=r,r=e)):($a=r,r=e),r}function bc(){var r,u,n,s,o,c;if(r=$a,(u=mc())!==e){for(n=[],s=$a,47===t.charCodeAt($a)?(o=a,$a++):(o=e,0===ja&&Na(Br)),o!==e&&(c=mc())!==e?s=Ao(u,c):($a=s,s=e);s!==e;)n.push(s),s=$a,47===t.charCodeAt($a)?(o=a,$a++):(o=e,0===ja&&Na(Br)),o!==e&&(c=mc())!==e?s=Ao(u,c):($a=s,s=e);r=po(u,n)}else $a=r,r=e;return r}function mc(){var r,u,n;return r=$a,t.substr($a,9)===it?(u=it,$a+=9):(u=e,0===ja&&Na(Hu)),u!==e?(n=function(){var t,r,u,n,s,o;if(t=$a,r=Qc(),r!==e)if(Gc(),(u=Bc())!==e){for(n=[],s=$a,Gc(),Mc()!==e?(Gc(),(o=Bc())!==e?s=So(u,o):($a=s,s=e)):($a=s,s=e);s!==e;)n.push(s),s=$a,Gc(),Mc()!==e?(Gc(),(o=Bc())!==e?s=So(u,o):($a=s,s=e)):($a=s,s=e);s=Gc(),Uc()!==e?t=To(u,n):($a=t,t=e)}else $a=t,t=e;else $a=t,t=e;return t}(),n!==e?r=Co(n):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,t.substr($a,7)===ft?(u=ft,$a+=7):(u=e,0===ja&&Na(Mu)),u!==e?(n=function(){var t,r,u,n,s,o,a,c;if(t=$a,r=Qc(),r!==e)if(Qc()!==e)if((u=$c())!==e){for(n=[],s=$a,(o=Mc())!==e&&(a=$c())!==e?s=_o(u,a):($a=s,s=e);s!==e;)n.push(s),s=$a,(o=Mc())!==e&&(a=$c())!==e?s=_o(u,a):($a=s,s=e);s=$a,(o=Uc())!==e&&(o=No(u,n)),(s=o)!==e?(o=$a,(a=Mc())!==e&&(c=bc())!==e?o=zo(u,n,c):($a=o,o=e),o===e&&(o=null),(a=Uc())!==e?t=Ro(u,n,o):($a=t,t=e)):($a=t,t=e)}else $a=t,t=e;else $a=t,t=e;else $a=t,t=e;return t}(),n!==e?r=vo(n):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,t.substr($a,6)===lt?(u=lt,$a+=6):(u=e,0===ja&&Na(Qu)),u!==e?(n=function(){var t,r,u,n;t=$a,r=Qc(),r!==e?(Gc(),u=$a,(n=Ya())!==e&&(n=Ho(n)),(u=n)!==e?(n=Gc(),Uc()!==e?t=Mo(u):($a=t,t=e)):($a=t,t=e)):($a=t,t=e);return t}(),n!==e?r=go(n):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,t.substr($a,6)===ht?(u=ht,$a+=6):(u=e,0===ja&&Na(Uu)),u!==e?(n=function(){var r,u,n,s,o;if(r=$a,u=Qc(),u!==e){for(n=$a,s=[],o=t.charAt($a),lr.test(o)?$a++:(o=e,0===ja&&Na(he));o!==e;)s.push(o),o=t.charAt($a),lr.test(o)?$a++:(o=e,0===ja&&Na(he));n=t.substring(n,$a),(s=Uc())!==e?r=Qo(n):($a=r,r=e)}else $a=r,r=e;return r}(),n!==e?r=Eo(n):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,t.substr($a,6)===At?(u=At,$a+=6):(u=e,0===ja&&Na(Gu)),u!==e?(n=function(){var t,r,u,n,s,o;if(t=$a,r=Qc(),r!==e)if(Gc(),(u=bc())!==e){if(n=[],s=$a,Gc(),Mc()!==e?(Gc(),(o=bc())!==e?s=Uo(u,o):($a=s,s=e)):($a=s,s=e),s!==e)for(;s!==e;)n.push(s),s=$a,Gc(),Mc()!==e?(Gc(),(o=bc())!==e?s=Uo(u,o):($a=s,s=e)):($a=s,s=e);else n=e;n!==e?(s=Gc(),Uc()!==e?t=Go(u,n):($a=t,t=e)):($a=t,t=e)}else $a=t,t=e;else $a=t,t=e;return t}(),n!==e?r=Fo(n):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,t.substr($a,7)===pt?(u=pt,$a+=7):(u=e,0===ja&&Na(Ju)),u!==e?(n=function(){var t,r,u,n,s,o,a,c,i,f;if(t=$a,r=Qc(),r!==e)if(u=Gc(),(n=Lc())!==e){for(s=[],o=$a,a=Gc(),(c=Mc())!==e?(i=Gc(),(f=Lc())!==e?o=a=[a,c,i,f]:($a=o,o=e)):($a=o,o=e);o!==e;)s.push(o),o=$a,a=Gc(),(c=Mc())!==e?(i=Gc(),(f=Lc())!==e?o=a=[a,c,i,f]:($a=o,o=e)):($a=o,o=e);o=Gc(),(a=Uc())!==e?t=r=[r,u,n,s,o,a]:($a=t,t=e)}else $a=t,t=e;else $a=t,t=e;return t}(),n!==e?r=bo(n):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,t.substr($a,3)===dt?(u=dt,$a+=3):(u=e,0===ja&&Na(Ku)),u!==e?(n=function(){var t,r,u;t=$a,r=Qc(),r!==e?(Gc(),(u=Va())!==e?(Gc(),Uc()!==e?t=Vo(u):($a=t,t=e)):($a=t,t=e)):($a=t,t=e);return t}(),n!==e?r=mo(n):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,t.substr($a,4)===Ct?(u=Ct,$a+=4):(u=e,0===ja&&Na(Vu)),u!==e?(n=function(){var t,r,u;t=$a,r=Qc(),r!==e?(Gc(),(u=Wa())!==e?(Gc(),Uc()!==e?t=Wo(u):($a=t,t=e)):($a=t,t=e)):($a=t,t=e);return t}(),n!==e?r=Bo(n):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,t.substr($a,7)===vt?(u=vt,$a+=7):(u=e,0===ja&&Na(Wu)),u!==e?(n=function(){var t,r,u,n,s,o;if(t=$a,r=Qc(),r!==e)if(Gc(),(u=nc())!==e){for(n=[],s=$a,Mc()!==e&&(o=nc())!==e?s=Xo(u,o):($a=s,s=e);s!==e;)n.push(s),s=$a,Mc()!==e&&(o=nc())!==e?s=Xo(u,o):($a=s,s=e);s=Gc(),Uc()!==e?t=Yo(u,n):($a=t,t=e)}else $a=t,t=e;else $a=t,t=e;return t}(),n!==e?r=Do(n):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,t.substr($a,43)===gt?(u=gt,$a+=43):(u=e,0===ja&&Na(Xu)),u!==e?(n=function(){var t,r,u,n,s,o;if(t=$a,r=Qc(),r!==e)if(Gc(),(u=Sc())!==e){for(n=[],s=$a,Gc(),Mc()!==e?(Gc(),(o=Sc())!==e?s=ta(u,o):($a=s,s=e)):($a=s,s=e);s!==e;)n.push(s),s=$a,Gc(),Mc()!==e?(Gc(),(o=Sc())!==e?s=ta(u,o):($a=s,s=e)):($a=s,s=e);s=Gc(),Uc()!==e?t=ra(u,n):($a=t,t=e)}else $a=t,t=e;else $a=t,t=e;return t}(),n!==e?r=yo(n):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,t.substr($a,9)===Et?(u=Et,$a+=9):(u=e,0===ja&&Na(Yu)),u!==e&&(n=Oc())!==e?r=xo(n):($a=r,r=e),r===e&&(r=$a,t.substr($a,11)===Ft?(u=Ft,$a+=11):(u=e,0===ja&&Na(te)),u!==e&&(n=Oc())!==e?r=wo(n):($a=r,r=e),r===e&&(r=$a,(u=t.substr($a,8)).toLowerCase()===bt?$a+=8:(u=e,0===ja&&Na(re)),u===e&&((u=t.substr($a,11)).toLowerCase()===mt?$a+=11:(u=e,0===ja&&Na(ue)),u===e&&((u=t.substr($a,6)).toLowerCase()===Bt?$a+=6:(u=e,0===ja&&Na(ee)),u===e&&((u=t.substr($a,9)).toLowerCase()===Dt?$a+=9:(u=e,0===ja&&Na(ne)),u===e&&((u=t.substr($a,10)).toLowerCase()===yt?$a+=10:(u=e,0===ja&&Na(se)),u===e&&((u=t.substr($a,13)).toLowerCase()===xt?$a+=13:(u=e,0===ja&&Na(oe))))))),u!==e?(n=function(){var t,r,u,n;t=$a,r=Qc(),r!==e?(Gc(),(u=fc())!==e?(Gc(),Mc()!==e?(Gc(),(n=fc())!==e?(Gc(),Uc()!==e?t=Jo(u,n):($a=t,t=e)):($a=t,t=e)):($a=t,t=e)):($a=t,t=e)):($a=t,t=e);return t}(),n!==e?r=$o(u,n):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,u=function(){var r,u;r=$a,t.substr($a,8)===jt?(u=jt,$a+=8):(u=e,0===ja&&Na(Ae));u!==e&&(u=Ko());return r=u,r}(),u!==e&&(u=Lo(u)),r=u))))))))))))),r}function Bc(){var r,u,n,s;return r=$a,u=$a,t.substr($a,6)===f?(n=f,$a+=6):(n=e,0===ja&&Na(xr)),n!==e&&(s=wc())!==e?u=jo(s):($a=u,u=e),u===e&&(u=Dc()),u!==e&&(u=Oo(u)),r=u}function Dc(){var t,r,u,n,s;return t=$a,(r=lc())!==e?((u=yc())===e&&(u=null),(n=xc())===e&&(n=null),(s=wc())===e&&(s=null),t=ko(r,u,s)):($a=t,t=e),t===e&&(t=$a,(r=Rc())!==e&&(u=Qc())!==e&&(n=Dc())!==e&&(s=Uc())!==e?t=r=[r,u,n,s]:($a=t,t=e)),t}function yc(){var r,u,n,s,o;if(r=$a,Jc()!==e)if(t.substr($a,4)===wt?(u=wt,$a+=4):(u=e,0===ja&&Na(ae)),u!==e)if(Jc()!==e){if(n=$a,s=[],o=t.charAt($a),fr.test(o)?$a++:(o=e,0===ja&&Na(Iu)),o!==e)for(;o!==e;)s.push(o),o=t.charAt($a),fr.test(o)?$a++:(o=e,0===ja&&Na(Iu));else s=e;(n=s!==e?t.substring(n,$a):s)!==e?r=Io(n):($a=r,r=e)}else $a=r,r=e;else $a=r,r=e;else $a=r,r=e;return r}function xc(){var r,u,n,s,o,a,c;return r=$a,(u=Jc())!==e?(t.substr($a,4)===$t?(n=$t,$a+=4):(n=e,0===ja&&Na(ce)),n!==e&&(s=Jc())!==e&&(o=lc())!==e&&(a=yc())!==e?((c=xc())===e&&(c=null),r=u=[u,n,s,o,a,c]):($a=r,r=e)):($a=r,r=e),r}function wc(){var r,u,n;return r=$a,Jc()!==e?(t.substr($a,2)===Lt?(u=Lt,$a+=2):(u=e,0===ja&&Na(ie)),u!==e&&Jc()!==e&&(n=Rc())!==e?r=Zo(n):($a=r,r=e)):($a=r,r=e),r}function $c(){var r,u;return r=$a,u=function(){var r,u,n,s,o,a,c,i,f,l,h;r=$a,u=$a,t.substr($a,6)===St?(n=St,$a+=6):(n=e,0===ja&&Na(fe));if(n!==e)if((s=Qc())!==e)if(o=Gc(),t.substr($a,4)===Tt?(a=Tt,$a+=4):(a=e,0===ja&&Na(le)),a===e&&(a=lc()),a!==e){if(c=[],i=$a,f=Gc(),(l=Mc())!==e&&(h=lc())!==e?i=f=[f,l,h]:($a=i,i=e),i!==e)for(;i!==e;)c.push(i),i=$a,f=Gc(),(l=Mc())!==e&&(h=lc())!==e?i=f=[f,l,h]:($a=i,i=e);else c=e;c!==e?(i=Gc(),(f=Uc())!==e?u=n=[n,s,o,a,c,i,f]:($a=u,u=e)):($a=u,u=e)}else $a=u,u=e;else $a=u,u=e;else $a=u,u=e;u!==e&&(u=qo(u));return r=u,r}(),u===e&&(u=lc()),u!==e&&(u=Po(u)),r=u}function Lc(){var t,r,u;return t=$a,(r=tc())!==e&&(u=wc())!==e?t=r=[r,u]:($a=t,t=e),t}function Sc(){var r;return(r=function(){var r,u,n,s,o;r=$a,Gc(),t.substr($a,14)===Ot?(u=Ot,$a+=14):(u=e,0===ja&&Na(pe));u!==e?(Gc(),61===t.charCodeAt($a)?(n=A,$a++):(n=e,0===ja&&Na(Lr)),n!==e?(Gc(),t.substr($a,6)===kt?(s=kt,$a+=6):(s=e,0===ja&&Na(de)),s!==e&&(o=Ma())!==e?(Gc(),r=ua(o)):($a=r,r=e)):($a=r,r=e)):($a=r,r=e);return r}())===e&&(r=function(){var r,u,n,s;r=$a,Gc(),t.substr($a,18)===It?(u=It,$a+=18):(u=e,0===ja&&Na(Ce));u!==e?(Gc(),61===t.charCodeAt($a)?(n=A,$a++):(n=e,0===ja&&Na(Lr)),n!==e?(Gc(),(s=Zc())!==e?(Gc(),r=ea(s)):($a=r,r=e)):($a=r,r=e)):($a=r,r=e);return r}())===e&&(r=function(){var r,u,n,s;r=$a,Gc(),t.substr($a,12)===Zt?(u=Zt,$a+=12):(u=e,0===ja&&Na(ve));u!==e?(Gc(),61===t.charCodeAt($a)?(n=A,$a++):(n=e,0===ja&&Na(Lr)),n!==e?(Gc(),(s=Zc())!==e?(Gc(),r=na(s)):($a=r,r=e)):($a=r,r=e)):($a=r,r=e);return r}())===e&&(r=function(){var r,u,n,s;r=$a,Gc(),t.substr($a,6)===_t?(u=_t,$a+=6):(u=e,0===ja&&Na(ge));u!==e?(Gc(),61===t.charCodeAt($a)?(n=A,$a++):(n=e,0===ja&&Na(Lr)),n!==e?(Gc(),(s=zc())!==e?(Gc(),r=sa(s)):($a=r,r=e)):($a=r,r=e)):($a=r,r=e);return r}())===e&&(r=function(){var r,u,n,s,o,a,c,i;r=$a,Gc(),t.substr($a,12)===Nt?(u=Nt,$a+=12):(u=e,0===ja&&Na(Ee));if(u!==e)if(Gc(),61===t.charCodeAt($a)?(n=A,$a++):(n=e,0===ja&&Na(Lr)),n!==e)if(Gc(),91===t.charCodeAt($a)?(s=q,$a++):(s=e,0===ja&&Na(fu)),s!==e)if(Gc(),(o=Tc())!==e){for(a=[],c=$a,Gc(),Mc()!==e?(Gc(),(i=Tc())!==e?c=oa(o,i):($a=c,c=e)):($a=c,c=e);c!==e;)a.push(c),c=$a,Gc(),Mc()!==e?(Gc(),(i=Tc())!==e?c=oa(o,i):($a=c,c=e)):($a=c,c=e);93===t.charCodeAt($a)?(c=H,$a++):(c=e,0===ja&&Na(lu)),c!==e?r=aa(o,a):($a=r,r=e)}else $a=r,r=e;else $a=r,r=e;else $a=r,r=e;else $a=r,r=e;return r}()),r}function Tc(){var r,u,n,s,o,a;return r=$a,Gc(),123===t.charCodeAt($a)?(u=tt,$a++):(u=e,0===ja&&Na($u)),u!==e?(Gc(),(n=jc())!==e?(Gc(),44===t.charCodeAt($a)?(s=P,$a++):(s=e,0===ja&&Na(iu)),s!==e?(Gc(),(o=jc())!==e?(Gc(),125===t.charCodeAt($a)?(a=rt,$a++):(a=e,0===ja&&Na(Su)),a!==e?r=ca(n,o):($a=r,r=e)):($a=r,r=e)):($a=r,r=e)):($a=r,r=e)):($a=r,r=e),r}function jc(){var r,u,n,s;return r=$a,t.substr($a,8)===zt?(u=zt,$a+=8):(u=e,0===ja&&Na(Fe)),u!==e?(Gc(),58===t.charCodeAt($a)?(n=k,$a++):(n=e,0===ja&&Na(ru)),n!==e?(Gc(),(s=_c())!==e?r=ia(s):($a=r,r=e)):($a=r,r=e)):($a=r,r=e),r===e&&(r=$a,t.substr($a,8)===Rt?(u=Rt,$a+=8):(u=e,0===ja&&Na(be)),u!==e?(Gc(),58===t.charCodeAt($a)?(n=k,$a++):(n=e,0===ja&&Na(ru)),n!==e?(Gc(),s=function(){var t,r;t=$a,r=zc(),r!==e&&(r=la(r));t=r,t===e&&(t=$a,(r=pc())!==e&&(r=ha()),t=r);return t}(),s!==e?r=fa(s):($a=r,r=e)):($a=r,r=e)):($a=r,r=e)),r}function Oc(){var r,u,n,s,o,c,i,f;return r=$a,Qc()!==e?(Gc(),t.substr($a,6)===kt?(u=kt,$a+=6):(u=e,0===ja&&Na(de)),u!==e&&(n=Ma())!==e?(Gc(),Mc()!==e?(Gc(),(s=Rc())!==e?(Gc(),Mc()!==e?(Gc(),(o=Rc())!==e?(Gc(),Mc()===e&&null,c=function(){var r,u,n,s,o,c;if(r=$a,u=kc(),u!==e){for(n=[],s=$a,Gc(),47===t.charCodeAt($a)?(o=a,$a++):(o=e,0===ja&&Na(Br)),o!==e?(Gc(),(c=kc())!==e?s=pa(u,c):($a=s,s=e)):($a=s,s=e);s!==e;)n.push(s),s=$a,Gc(),47===t.charCodeAt($a)?(o=a,$a++):(o=e,0===ja&&Na(Br)),o!==e?(Gc(),(c=kc())!==e?s=pa(u,c):($a=s,s=e)):($a=s,s=e);r=da(u,n)}else $a=r,r=e;return r}(),c===e&&(c=null),Gc(),Mc()===e&&null,(i=zc())===e&&(i=null),Gc(),Mc()===e&&null,f=function(){var r,u;r=$a,t.substr($a,10)===Mt?(u=Mt,$a+=10):(u=e,0===ja&&Na(ye));u!==e&&(u=ga());return r=u,r}(),f===e&&(f=null),Uc()!==e?r=Aa(n,s,o,c,i,f):($a=r,r=e)):($a=r,r=e)):($a=r,r=e)):($a=r,r=e)):($a=r,r=e)):($a=r,r=e)):($a=r,r=e),r}function kc(){var r;return(r=function(){var r,u,n,s;r=$a,t.substr($a,7)===Ht?(u=Ht,$a+=7):(u=e,0===ja&&Na(De));u!==e&&(n=Xa())!==e?(41===t.charCodeAt($a)?(s=qt,$a++):(s=e,0===ja&&Na(Be)),s!==e?r=va(n):($a=r,r=e)):($a=r,r=e);return r}())===e&&(r=function(){var r,u,n,s;r=$a,t.substr($a,7)===Pt?(u=Pt,$a+=7):(u=e,0===ja&&Na(me));u!==e&&(n=Ya())!==e?(41===t.charCodeAt($a)?(s=qt,$a++):(s=e,0===ja&&Na(Be)),s!==e?r=Ca(n):($a=r,r=e)):($a=r,r=e);return r}()),r}function Ic(){var r,u;return ja++,r=$a,t.substr($a,4)===Qt?(u=Qt,$a+=4):(u=e,0===ja&&Na(we)),u===e&&(t.substr($a,5)===Ut?(u=Ut,$a+=5):(u=e,0===ja&&Na($e))),u!==e&&(u=Ea(u)),ja--,(r=u)===e&&(u=e,0===ja&&Na(xe)),r}function Zc(){var r,u,n,s,o;if(ja++,r=$a,39===t.charCodeAt($a)?(u=R,$a++):(u=e,0===ja&&Na(cu)),u!==e){for(n=$a,s=[],t.substr($a,2)===Gt?(o=Gt,$a+=2):(o=e,0===ja&&Na(Se)),o===e&&(o=t.charAt($a),hr.test(o)?$a++:(o=e,0===ja&&Na(Te)));o!==e;)s.push(o),t.substr($a,2)===Gt?(o=Gt,$a+=2):(o=e,0===ja&&Na(Se)),o===e&&(o=t.charAt($a),hr.test(o)?$a++:(o=e,0===ja&&Na(Te)));n=t.substring(n,$a),39===t.charCodeAt($a)?(s=R,$a++):(s=e,0===ja&&Na(cu)),s!==e?r=Fa(n):($a=r,r=e)}else $a=r,r=e;return ja--,r===e&&(u=e,0===ja&&Na(Le)),r}function _c(){var r,u,n,s,o;if(ja++,r=$a,34===t.charCodeAt($a)?(u=T,$a++):(u=e,0===ja&&Na(Vr)),u!==e){for(n=$a,s=[],t.substr($a,2)===O?(o=O,$a+=2):(o=e,0===ja&&Na(Xr)),o===e&&(t.substr($a,2)===j?(o=j,$a+=2):(o=e,0===ja&&Na(Wr)),o===e&&(o=t.charAt($a),sr.test(o)?$a++:(o=e,0===ja&&Na(Yr))));o!==e;)s.push(o),t.substr($a,2)===O?(o=O,$a+=2):(o=e,0===ja&&Na(Xr)),o===e&&(t.substr($a,2)===j?(o=j,$a+=2):(o=e,0===ja&&Na(Wr)),o===e&&(o=t.charAt($a),sr.test(o)?$a++:(o=e,0===ja&&Na(Yr))));n=t.substring(n,$a),34===t.charCodeAt($a)?(s=T,$a++):(s=e,0===ja&&Na(Vr)),s!==e?r=ba(n):($a=r,r=e)}else $a=r,r=e;return ja--,r===e&&(u=e,0===ja&&Na(je)),r}function Nc(){var r,u,n,s,o,a,c,i,f,l,h,A,p,d,C,v,g,E,F,b,m,B,D,y,x;if(ja++,r=$a,u=$a,n=$a,s=[],o=t.charAt($a),pr.test(o)?$a++:(o=e,0===ja&&Na(Ze)),o!==e)for(;o!==e;)s.push(o),o=t.charAt($a),pr.test(o)?$a++:(o=e,0===ja&&Na(Ze));else s=e;if(s!==e)if(45===t.charCodeAt($a)?(o=Jt,$a++):(o=e,0===ja&&Na(Ne)),o!==e)if(a=t.charAt($a),pr.test(a)?$a++:(a=e,0===ja&&Na(Ze)),a!==e)if(c=t.charAt($a),pr.test(c)?$a++:(c=e,0===ja&&Na(Ze)),c!==e)if(45===t.charCodeAt($a)?(i=Jt,$a++):(i=e,0===ja&&Na(Ne)),i!==e)if(f=t.charAt($a),pr.test(f)?$a++:(f=e,0===ja&&Na(Ze)),f!==e)if(l=t.charAt($a),pr.test(l)?$a++:(l=e,0===ja&&Na(Ze)),l!==e){if(h=$a,84===t.charCodeAt($a)?(A=Kt,$a++):(A=e,0===ja&&Na(ze)),A!==e)if(p=t.charAt($a),pr.test(p)?$a++:(p=e,0===ja&&Na(Ze)),p!==e)if(d=t.charAt($a),pr.test(d)?$a++:(d=e,0===ja&&Na(Ze)),d!==e)if(58===t.charCodeAt($a)?(C=k,$a++):(C=e,0===ja&&Na(ru)),C!==e)if(v=t.charAt($a),pr.test(v)?$a++:(v=e,0===ja&&Na(Ze)),v!==e)if(g=t.charAt($a),pr.test(g)?$a++:(g=e,0===ja&&Na(Ze)),g!==e){if(E=$a,58===t.charCodeAt($a)?(F=k,$a++):(F=e,0===ja&&Na(ru)),F!==e)if(b=t.charAt($a),pr.test(b)?$a++:(b=e,0===ja&&Na(Ze)),b!==e)if(m=t.charAt($a),pr.test(m)?$a++:(m=e,0===ja&&Na(Ze)),m!==e){if(B=$a,46===t.charCodeAt($a)?(D=Vt,$a++):(D=e,0===ja&&Na(Re)),D!==e){if(y=[],x=t.charAt($a),pr.test(x)?$a++:(x=e,0===ja&&Na(Ze)),x!==e)for(;x!==e;)y.push(x),x=t.charAt($a),pr.test(x)?$a++:(x=e,0===ja&&Na(Ze));else y=e;y!==e?B=D=[D,y]:($a=B,B=e)}else $a=B,B=e;B===e&&(B=null),E=F=[F,b,m,B]}else $a=E,E=e;else $a=E,E=e;else $a=E,E=e;E===e&&(E=null),90===t.charCodeAt($a)?(F=Wt,$a++):(F=e,0===ja&&Na(Pe)),F===e&&(F=$a,b=t.charAt($a),dr.test(b)?$a++:(b=e,0===ja&&Na(qe)),b!==e?(m=t.charAt($a),pr.test(m)?$a++:(m=e,0===ja&&Na(Ze)),m!==e?(B=t.charAt($a),pr.test(B)?$a++:(B=e,0===ja&&Na(Ze)),B!==e?(58===t.charCodeAt($a)?(D=k,$a++):(D=e,0===ja&&Na(ru)),D!==e?(y=t.charAt($a),pr.test(y)?$a++:(y=e,0===ja&&Na(Ze)),y!==e?(x=t.charAt($a),pr.test(x)?$a++:(x=e,0===ja&&Na(Ze)),x!==e?F=b=[b,m,B,D,y,x]:($a=F,F=e)):($a=F,F=e)):($a=F,F=e)):($a=F,F=e)):($a=F,F=e)):($a=F,F=e)),F===e&&(F=null),h=A=[A,p,d,C,v,g,E,F]}else $a=h,h=e;else $a=h,h=e;else $a=h,h=e;else $a=h,h=e;else $a=h,h=e;else $a=h,h=e;h===e&&(h=null),n=s=[s,o,a,c,i,f,l,h]}else $a=n,n=e;else $a=n,n=e;else $a=n,n=e;else $a=n,n=e;else $a=n,n=e;else $a=n,n=e;else $a=n,n=e;return(u=n!==e?t.substring(u,$a):n)!==e&&(u=ma(u)),ja--,(r=u)===e&&(u=e,0===ja&&Na(_e)),r}function zc(){var r,u,n,s,o,a;if(ja++,r=$a,u=$a,n=$a,s=t.charAt($a),dr.test(s)?$a++:(s=e,0===ja&&Na(qe)),s===e&&(s=null),o=[],a=t.charAt($a),pr.test(a)?$a++:(a=e,0===ja&&Na(Ze)),a!==e)for(;a!==e;)o.push(a),a=t.charAt($a),pr.test(a)?$a++:(a=e,0===ja&&Na(Ze));else o=e;return o!==e?n=s=[s,o]:($a=n,n=e),(u=n!==e?t.substring(u,$a):n)!==e&&(u=Da(u)),ja--,(r=u)===e&&(u=e,0===ja&&Na(Qe)),r}function Rc(){var r,u,n,s,o,a,c,i;if(ja++,r=$a,u=$a,ja++,n=Ic(),ja--,n===e?u=void 0:($a=u,u=e),u!==e)if(n=$a,ja++,s=Pc(),ja--,s===e?n=void 0:($a=n,n=e),n!==e){if(s=$a,o=$a,a=t.charAt($a),Cr.test(a)?$a++:(a=e,0===ja&&Na(Ge)),a!==e){for(c=[],i=t.charAt($a),vr.test(i)?$a++:(i=e,0===ja&&Na(Je));i!==e;)c.push(i),i=t.charAt($a),vr.test(i)?$a++:(i=e,0===ja&&Na(Je));o=a=[a,c]}else $a=o,o=e;(s=o!==e?t.substring(s,$a):o)!==e?r=ya(s):($a=r,r=e)}else $a=r,r=e;else $a=r,r=e;return ja--,r===e&&(u=e,0===ja&&Na(Ue)),r}function Pc(){var r,u,n,s,o,a,c,i,f,l,h,A,p,d;return ja++,r=$a,u=$a,(n=qc())!==e&&(s=qc())!==e?(45===t.charCodeAt($a)?(o=Jt,$a++):(o=e,0===ja&&Na(Ne)),o===e&&(o=null),(a=qc())!==e?(45===t.charCodeAt($a)?(c=Jt,$a++):(c=e,0===ja&&Na(Ne)),c===e&&(c=null),(i=qc())!==e?(45===t.charCodeAt($a)?(f=Jt,$a++):(f=e,0===ja&&Na(Ne)),f===e&&(f=null),(l=qc())!==e?(45===t.charCodeAt($a)?(h=Jt,$a++):(h=e,0===ja&&Na(Ne)),h===e&&(h=null),(A=qc())!==e&&(p=qc())!==e&&(d=qc())!==e?u=n=[n,s,o,a,c,i,f,l,h,A,p,d]:($a=u,u=e)):($a=u,u=e)):($a=u,u=e)):($a=u,u=e)):($a=u,u=e),r=u!==e?t.substring(r,$a):u,ja--,r===e&&(u=e,0===ja&&Na(Ke)),r}function qc(){var r,u,n,s,o,a;return ja++,r=$a,u=$a,n=t.charAt($a),gr.test(n)?$a++:(n=e,0===ja&&Na(We)),n!==e?(s=t.charAt($a),gr.test(s)?$a++:(s=e,0===ja&&Na(We)),s!==e?(o=t.charAt($a),gr.test(o)?$a++:(o=e,0===ja&&Na(We)),o!==e?(a=t.charAt($a),gr.test(a)?$a++:(a=e,0===ja&&Na(We)),a!==e?u=n=[n,s,o,a]:($a=u,u=e)):($a=u,u=e)):($a=u,u=e)):($a=u,u=e),r=u!==e?t.substring(r,$a):u,ja--,r===e&&(u=e,0===ja&&Na(Ve)),r}function Hc(){var r,u,n,s;if(r=$a,u=$a,n=[],s=t.charAt($a),Er.test(s)?$a++:(s=e,0===ja&&Na(Xe)),s!==e)for(;s!==e;)n.push(s),s=t.charAt($a),Er.test(s)?$a++:(s=e,0===ja&&Na(Xe));else n=e;return(u=n!==e?t.substring(u,$a):n)!==e&&(u=xa(u)),r=u}function Mc(){var r,u,n;return r=$a,u=Gc(),44===t.charCodeAt($a)?(n=P,$a++):(n=e,0===ja&&Na(iu)),n!==e?r=u=[u,n,Gc()]:($a=r,r=e),r}function Qc(){var r,u,n;return r=$a,u=Gc(),40===t.charCodeAt($a)?(n=rr,$a++):(n=e,0===ja&&Na(nn)),n!==e?r=u=[u,n,Gc()]:($a=r,r=e),r}function Uc(){var r,u,n;return r=$a,u=Gc(),41===t.charCodeAt($a)?(n=qt,$a++):(n=e,0===ja&&Na(Be)),n!==e?r=u=[u,n]:($a=r,r=e),r}function Gc(){var r,u,n;for(ja++,r=$a,u=[],n=t.charAt($a),mr.test(n)?$a++:(n=e,0===ja&&Na(on));n!==e;)u.push(n),n=t.charAt($a),mr.test(n)?$a++:(n=e,0===ja&&Na(on));return r=t.substring(r,$a),ja--,u=e,0===ja&&Na(sn),r}function Jc(){var r,u,n;if(ja++,r=$a,u=[],n=t.charAt($a),mr.test(n)?$a++:(n=e,0===ja&&Na(on)),n!==e)for(;n!==e;)u.push(n),n=t.charAt($a),mr.test(n)?$a++:(n=e,0===ja&&Na(on));else u=e;return r=u!==e?t.substring(r,$a):u,ja--,r===e&&(u=e,0===ja&&Na(an)),r}const Kc=["$value"],Vc={eq:"=",ne:"!=",lt:"<",gt:">",le:"<=",ge:">="},Wc={topcount:!0,bottomcount:!0,topsum:!1,bottomsum:!1,toppercent:!1,bottompercent:!1},Xc=Object.assign,{strict:Yc,minimal:ti}=r,ri=[];let ui,ei;const ni=r.safeNumber||function(t){if("string"!=typeof t)return t;const r=parseFloat(t);if(!isNaN(r)&&String(r)===t)return r;const u=parseInt(t);return isNaN(u)||String(u)!==t.replace(/^-?\d+\.0+$/,t.split(".")[0])?t:u},si=r.skipToken,oi=r.standardBase64||function(t){return Buffer.from(t,"base64").toString("base64")},ai=t=>r=>t===r||t.as&&r.as&&t.as===r.as||r.as&&t.ref&&r.as===t.ref[t.ref.length-1]||t.ref&&r.ref&&t.ref.join("")===r.ref.join(""),ci=t=>r=>{if(Array.isArray(r))return r.map(ci(t));const u=r.ref&&t.find((t=>"func"in t&&t.as&&t.as===r.ref[0]));return u||r},ii=t=>r=>Array.isArray(r)?r.map(ii(t)):r.ref&&!t.find(ai(r))?{val:null}:r,fi=(t,r)=>{if(1===r.ref.length)t.find(ai(r))||t.push(r);else{const u=r.ref.shift(),e=t.find((t=>t.ref&&t.ref[0]===u));if(e)fi(e.expand??=[],r);else{const e={ref:[u],expand:[]};fi(e.expand,r),t.push(e)}}},li=t=>{const r=t.reduce(((t,r)=>{if("string"==typeof r)return t[r]??=[],t;if(!r.ref)return t;const u=r.ref[0];return t[u]??=[],t[u].push(...r.expand??[]),t}),{}),u=[];for(const t in r){if("*"===t){u.push(t);continue}const e={ref:[t]};r[t].length&&(e.expand=li(r[t])),u.push(e)}return u},hi=(t,r)=>{if(!r.length)return;const u=r.reduce(((t,r)=>{if(!r.ref)return t;const u=r.ref[0];return t[u]??=[],t[u].push(...r.expand??[]),t}),{}),e={},n=[];for(const r in t){const s=t[r],o=s.ref?.[0];Object.keys(u).includes(o)?e[o]=s:s.func||n.push(r)}if(Object.keys(e).length){for(const r of n)t.splice(r,1);for(const t in u){const r=e[t];r&&(u[t].length&&(r.expand?hi(r.expand,u[t]):r.expand=li(u[t])))}}},Ai=(t,r)=>{let u=di({from:t.from},r);if(delete t.apply,Array.isArray(u))for(let r=0;r<u.length;r++)u[r]=pi(u[r],t);else u=pi(u,t);if(u.SELECT?.recurse&&t.where){const r=t.where;delete t.where,u={SELECT:{from:u,where:r}}}return u};const pi=(t,r)=>{const u=function(t){return t.SELECT.groupBy||t.SELECT.columns?.some((t=>t&&"object"==typeof t&&"func"in t))}(t);if(r.columns&&"$count"===r.columns[0].as||!u&&r.where&&(t.SELECT.where||t.SELECT.limit)||t.SELECT.limit&&r.limit||t.SELECT.orderBy&&r.orderBy||t.SELECT.search&&r.search){const u=Object.assign({},r);u.from=t,t={SELECT:u}}else{let e=t.SELECT.from,n=t.SELECT.columns,s=t.SELECT.where;if(t.SELECT=Object.assign(t.SELECT,r),t.SELECT.from=e,t.SELECT.columns=n,u&&r.where){const u=r.where.map(ci(t.SELECT.columns)).map(ii(t.SELECT.groupBy??[]));t.SELECT.having?t.SELECT.having=[{xpr:t.SELECT.having},"and",{xpr:u}]:t.SELECT.having=u,t.SELECT.where=s}}if(r.columns){const u=[];if(t.SELECT.columns||(t.SELECT.columns=[]),t.SELECT.columns.length&&u.push(...t.SELECT.columns),t.SELECT.groupBy&&t.SELECT.groupBy.length)hi(u,r.columns);else for(const t of r.columns)u.some(ai(t))||u.push(t);t.SELECT.columns=u}return t.SELECT.columns?.length||delete t.SELECT.columns,t},di=(t,r)=>{delete t.apply,r.identity&&t.from.SELECT&&(t=t.from.SELECT),r.apply&&(t.from={SELECT:{...t}});const u=t=>{t.recurse={ref:["parent"]};const u=[],e=[];if(r.topLevels.levels?e.push([{ref:["DistanceFromRoot"]},"<=",{val:r.topLevels.levels-1}]):e.push([{ref:["DistanceFromRoot"]},">=",{val:0}]),r.topLevels.expandLevels)for(const t of r.topLevels.expandLevels)0===t.levels?u.push([{func:"DistanceTo",args:[{val:t.nodeID},{val:null}]}]):e.push([{func:"DistanceTo",args:[{val:t.nodeID},{val:t.levels}]}]);const n=">="===e[0][1]&&0===e[0][2].val?1===e.length?[]:[e[0]]:e,s=n.flatMap(((t,r)=>r<n.length-1?[...t,"or"]:t));if(u.length){const r=u.flatMap(((t,r)=>["and","not",...t]));n.length>1?t.recurse.where=[{xpr:s}].concat(r):1===n.length&&">="===n[0][1]&&0===n[0][2].val?t.recurse.where=r.slice(1):t.recurse.where=s.concat(r)}else s.length&&(t.recurse.where=s)},e=t=>n(t,r.descendants,1),n=(t,u=r.ancestors,e=-1)=>{if(u.nodes)for(const r of u.nodes)r.filter&&-1===e?t.where=r.filter:r.search&&(t.search=r.search);if(t.recurse={ref:["parent"]},1===e){const r=()=>{const t=new Error("For descendants, only the following filter is supported: `<ID> eq <val>`");throw t.statusCode=400,t};1===u.nodes?.length&&u.nodes[0].filter||r();const n=u.nodes[0].filter.findIndex((t=>t.ref?.[0]===u.id));-1===!n&&r();const s=u.nodes[0].filter[n+1],o=u.nodes[0].filter[n+2]?.val;"="===s&&o||r();const a=u.distance&&e*u.distance,c=[{func:"DistanceTo",args:[{val:o},{val:Number.isInteger(a)?a:null}]}];t.recurse.where=c}};if(r.ancestors&&r.topLevels){n(t);const r={...t};u(r),t.recurse=r.recurse}else if(r.ancestors&&r.descendants){n(t);const r={...t};e(r),t.recurse=r.recurse}else r.topLevels?u(t):r.ancestors?n(r):r.descendants&&e(t);if(r.where&&(t.where=r.where),r.search&&(t.search=r.search),r.limit&&(t.limit=r.limit),r.orderBy&&(t.orderBy=r.orderBy),r.groupBy&&(t.groupBy=r.groupBy.reduce(((t,r)=>(t.some(ai(r))||t.push(r),t)),[])),r.aggregate&&r.aggregate.length&&(t.columns=(t.columns||[]).concat(r.aggregate)),t.groupBy&&t.groupBy.length){const r=t.groupBy.reduce(((t,r)=>{if(r.ref&&r.ref.length>1){const u={ref:[...r.ref]};r.expand&&r.expand.length&&(u.expand=[...r.expand]),r.as&&(u.as=r.as),fi(t,u,!0)}else t.push({...r});return t}),[]);t.columns=(t.columns||[]).concat(r)}if(r.having&&(t.having=r.having.map(ci(t.columns)).map(ii(t.groupBy??[]))),r.apply&&di(t.from.SELECT,r.apply),Array.isArray(r.concat)){const u=[],e=1===Object.keys(t).length?t.from:{SELECT:t};for(let t of r.concat)if(t.from=e,t.apply){const r=di(t,t.apply);Array.isArray(r)?u.push(...r):u.push(r)}return u}return{SELECT:t}},Ci=t=>{ui.limit&&ui.limit.offset&&ui.limit.offset.val&&(t+=ui.limit.offset.val),(ui.limit||(ui.limit={})).offset={val:t}},vi=(t,r=!1)=>{ui.orderBy=ui.orderBy?r?[t,...ui.orderBy]:[...ui.orderBy,t]:[t]},gi=(t,r)=>{for(const u of r)u.ref&&u.ref[0]===t&&u.ref.shift(),u.func&&gi(t,u.args),u.xpr&&gi(t,u.xpr);return r},Ei=(t,r)=>{"null"===r?r=null:"true"===r?r=!0:"false"===r&&(r=!1);let u=ui.from._params??={},e=t.match(/^(\w+)\[(.*)\]$/);for(;e;)e[1]in u||(u[e[1]]=""===e[2]?[]:{}),u=u[e[1]],e=(t=e[2]).match(/^(\w+)\[(.*)\]$/);Array.isArray(u)?u.push(r):u[t]=r},Fi=(t,r,u,e=!1)=>{let n=!1;return t?.forEach((t=>{t.val===r?(t.val="list"in u?u.list.map((t=>t.val)):u.val,n=!0):t.list===r?(t.list=u.list,n=!0):t.func?t.args.forEach(((t,s)=>{t.val===r?(t.val=u.val,n=!0):t.func&&Fi(t.args,r,u,e)})):t.SELECT&&bi(t.SELECT,r,u,e)})),n},bi=(t,r,u,e=!1)=>{let n=!1;const{where:s,from:o}=t;return n=Fi(s,r,u),o?.ref?.forEach((t=>{n=Fi(t.where,r,u,!0)})),n};if(u=o(),r.peg$library)return{peg$result:u,peg$currPos:$a,peg$FAILED:e,peg$maxFailExpected:Ta,peg$maxFailPos:Sa};if(u!==e&&$a===t.length)return u;throw u!==e&&$a<t.length&&Na({type:"end"}),za(Ta,Sa<t.length?t.charAt(Sa):null,Sa<t.length?_a(Sa,Sa+1):_a(Sa,Sa))}peg$subclass(peg$SyntaxError,Error),peg$SyntaxError.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var u,e=null;for(u=0;u<t.length;u++)if(t[u].source===this.location.source){e=t[u].text.split(/\r\n|\n|\r/g);break}var n=this.location.start,s=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(n):n,o=this.location.source+":"+s.line+":"+s.column;if(e){var a=this.location.end,c=peg$padEnd("",s.line.toString().length," "),i=e[n.line-1],f=(n.line===a.line?a.column:i.length+1)-n.column||1;r+="\n --\x3e "+o+"\n"+c+" |\n"+s.line+" | "+i+"\n"+c+" | "+peg$padEnd("",n.column-1," ")+peg$padEnd("",f,"^")}else r+="\n at "+o}return r},peg$SyntaxError.buildMessage=function(t,r){var u={literal:function(t){return'"'+n(t.text)+'"'},class:function(t){var r=t.parts.map((function(t){return Array.isArray(t)?s(t[0])+"-"+s(t[1]):s(t)}));return"["+(t.inverted?"^":"")+r.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(t){return t.description}};function e(t){return t.charCodeAt(0).toString(16).toUpperCase()}function n(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+e(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+e(t)}))}function s(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+e(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+e(t)}))}function o(t){return u[t.type](t)}return"Expected "+function(t){var r,u,e=t.map(o);if(e.sort(),e.length>0){for(r=1,u=1;r<e.length;r++)e[r-1]!==e[r]&&(e[u]=e[r],u++);e.length=u}switch(e.length){case 1:return e[0];case 2:return e[0]+" or "+e[1];default:return e.slice(0,-1).join(", ")+", or "+e[e.length-1]}}(t)+" but "+function(t){return t?'"'+n(t)+'"':"end of input"}(r)+" found."},module.exports={StartRules:["ODataRelativeURI"],SyntaxError:peg$SyntaxError,parse:peg$parse};
@@ -6,40 +6,6 @@ const _etag = require('./etag')
6
6
  const { toBase64url } = require('../../_runtime/common/utils/binary')
7
7
  const { getSapMessages } = require('../middleware/error')
8
8
 
9
- // copied from cds-compiler/lib/edm/edmUtils.js
10
- const cds2edm = {
11
- 'cds.String': 'Edm.String',
12
- // 'cds.hana.NCHAR': 'Edm.String',
13
- 'cds.LargeString': 'Edm.String',
14
- // 'cds.hana.VARCHAR': 'Edm.String',
15
- // 'cds.hana.CHAR': 'Edm.String',
16
- // 'cds.hana.CLOB': 'Edm.String',
17
- 'cds.Binary': 'Edm.Binary',
18
- // 'cds.hana.BINARY': 'Edm.Binary',
19
- 'cds.LargeBinary': 'Edm.Binary',
20
- 'cds.Decimal': 'Edm.Decimal',
21
- 'cds.DecimalFloat': 'Edm.Decimal',
22
- // 'cds.hana.SMALLDECIMAL': 'Edm.Decimal', // V4: Scale="floating" Precision="16"
23
- 'cds.Integer64': 'Edm.Int64',
24
- 'cds.Integer': 'Edm.Int32',
25
- 'cds.Int64': 'Edm.Int64',
26
- 'cds.Int32': 'Edm.Int32',
27
- 'cds.Int16': 'Edm.Int16',
28
- 'cds.UInt8': 'Edm.Byte',
29
- // 'cds.hana.SMALLINT': 'Edm.Int16',
30
- // 'cds.hana.TINYINT': 'Edm.Byte',
31
- 'cds.Double': 'Edm.Double',
32
- // 'cds.hana.REAL': 'Edm.Single',
33
- 'cds.Date': 'Edm.Date',
34
- 'cds.Time': 'Edm.TimeOfDay',
35
- 'cds.DateTime': 'Edm.DateTimeOffset',
36
- 'cds.Timestamp': 'Edm.DateTimeOffset',
37
- 'cds.Boolean': 'Edm.Boolean',
38
- 'cds.UUID': 'Edm.Guid'
39
- // 'cds.hana.ST_POINT': 'Edm.GeometryPoint',
40
- // 'cds.hana.ST_GEOMETRY': 'Edm.Geometry',
41
- }
42
-
43
9
  const getSafeNumber = inputString => {
44
10
  if (typeof inputString !== 'string') return inputString
45
11
  // Try to parse the input string as a floating-point number using parseFloat
@@ -357,7 +323,6 @@ function getBoundary(req) {
357
323
  }
358
324
 
359
325
  module.exports = {
360
- cds2edm,
361
326
  getSafeNumber,
362
327
  formatVal,
363
328
  skipToken,
@@ -1,9 +1,42 @@
1
1
  const cds = require('../../../lib')
2
2
  const LOG = cds.log('odata')
3
3
  const { appURL } = require('../../_runtime/common/utils/vcap')
4
- const { cds2edm } = require('./index')
5
4
  const { where2obj } = require('../../_runtime/common/utils/cqn')
6
5
 
6
+ // copied from cds-compiler/lib/edm/edmUtils.js
7
+ const cds2edm = {
8
+ 'cds.String': 'Edm.String',
9
+ // 'cds.hana.NCHAR': 'Edm.String',
10
+ 'cds.LargeString': 'Edm.String',
11
+ // 'cds.hana.VARCHAR': 'Edm.String',
12
+ // 'cds.hana.CHAR': 'Edm.String',
13
+ // 'cds.hana.CLOB': 'Edm.String',
14
+ 'cds.Binary': 'Edm.Binary',
15
+ // 'cds.hana.BINARY': 'Edm.Binary',
16
+ 'cds.LargeBinary': 'Edm.Binary',
17
+ 'cds.Decimal': 'Edm.Decimal',
18
+ 'cds.DecimalFloat': 'Edm.Decimal',
19
+ // 'cds.hana.SMALLDECIMAL': 'Edm.Decimal', // V4: Scale="floating" Precision="16"
20
+ 'cds.Integer64': 'Edm.Int64',
21
+ 'cds.Integer': 'Edm.Int32',
22
+ 'cds.Int64': 'Edm.Int64',
23
+ 'cds.Int32': 'Edm.Int32',
24
+ 'cds.Int16': 'Edm.Int16',
25
+ 'cds.UInt8': 'Edm.Byte',
26
+ // 'cds.hana.SMALLINT': 'Edm.Int16',
27
+ // 'cds.hana.TINYINT': 'Edm.Byte',
28
+ 'cds.Double': 'Edm.Double',
29
+ // 'cds.hana.REAL': 'Edm.Single',
30
+ 'cds.Date': 'Edm.Date',
31
+ 'cds.Time': 'Edm.TimeOfDay',
32
+ 'cds.DateTime': 'Edm.DateTimeOffset',
33
+ 'cds.Timestamp': 'Edm.DateTimeOffset',
34
+ 'cds.Boolean': 'Edm.Boolean',
35
+ 'cds.UUID': 'Edm.Guid'
36
+ // 'cds.hana.ST_POINT': 'Edm.GeometryPoint',
37
+ // 'cds.hana.ST_GEOMETRY': 'Edm.Geometry',
38
+ }
39
+
7
40
  const _getContextAbsoluteUrl = _req => {
8
41
  const { contextAbsoluteUrl } = cds.env.odata
9
42
  if (!contextAbsoluteUrl) return ''
@@ -19,7 +19,8 @@ function odataBind(data, target) {
19
19
  }
20
20
  const bindName = assoc.name + '@odata.bind'
21
21
  if (data[bindName]) {
22
- const parsed = odata.parse(data[bindName])?.SELECT?.from?.ref?.[0]?.where
22
+ // dummy to also support `../MyEntity(...)`
23
+ const parsed = odata.parse(data[bindName].replace(/^[^(]*\(/, 'dummy('))?.SELECT?.from?.ref?.[0]?.where
23
24
  if (!parsed) _throw(assoc.name)
24
25
  if (parsed.length === 1) {
25
26
  // single key variant
@@ -33,9 +33,10 @@ const KEYSTOCLEANUP = {
33
33
 
34
34
  const _rewriteMetadataDeep = result => {
35
35
  for (const key in result) {
36
- if (typeof result[key] === 'object' && result[key] != null) _rewriteMetadataDeep(result[key])
36
+ const value = result[key]
37
+ if (typeof value === 'object' && value != null) _rewriteMetadataDeep(value)
37
38
  if (key in METADATA && !KEYSTOCLEANUP[key]) {
38
- result[METADATA[key]] = result[key]
39
+ result[METADATA[key]] = value
39
40
  delete result[key]
40
41
  }
41
42
  }
@@ -63,27 +64,28 @@ module.exports = function getODataResult(result, metadata, options = {}) {
63
64
  if (result === undefined) return
64
65
 
65
66
  // make sure @odata.context is the first element (per OData spec)
66
- const odataResult = {
67
- [METADATA.$context]: metadata.context
68
- }
67
+ const odataResult = { [METADATA.$context]: metadata.context }
69
68
 
70
- // copy metadata from result to odataResult
71
- for (const key in METADATA) {
72
- if (!(key in result)) continue
73
- if (!KEYSTOCLEANUP[key]) odataResult[METADATA[key]] = result[key]
74
- }
69
+ // Normalization of result to array or object has already been done above based on isCollection
70
+ // -> we can assume result is already in the correct shape for further processing below
75
71
 
76
- // rewrite metadata in result
77
- _rewriteMetadataDeep(result)
72
+ const resultIsArray = Array.isArray(result)
73
+ const resultIsPlainObject = typeof result === 'object' && !resultIsArray && !Buffer.isBuffer(result)
78
74
 
79
- // add result to odataResult
80
- if (isCollection) {
81
- Object.assign(odataResult, { value: result })
82
- } else if (property) {
83
- Object.assign(odataResult, { value: result[property] })
84
- } else {
85
- Object.assign(odataResult, result)
75
+ if (resultIsPlainObject || resultIsArray) {
76
+ // copy metadata from result to odataResult
77
+ for (const key in METADATA) {
78
+ if (!(key in result)) continue
79
+ if (!KEYSTOCLEANUP[key]) odataResult[METADATA[key]] = result[key]
80
+ }
81
+
82
+ // rewrite metadata in result
83
+ _rewriteMetadataDeep(result)
86
84
  }
87
85
 
88
- return odataResult
86
+ // add result to odataResult
87
+ if (property) return { ...odataResult, value: result[property] }
88
+ if (resultIsPlainObject) return { ...odataResult, ...result }
89
+ // Result is a primitive value, an Array or a Buffer
90
+ return { ...odataResult, value: result }
89
91
  }