(function(){/*
 unicode_hack.js
    Copyright (C) 2010-2012  Marcelo Gibson de Castro Gonçalves. All rights reserved.

    Copying and distribution of this file, with or without modification,
    are permitted in any medium without royalty provided the copyright
    notice and this notice are preserved.  This file is offered as-is,
    without any warranty.
*/
'use strict';var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(G){var V=0;return function(){return V<G.length?{done:!1,value:G[V++]}:{done:!0}}};$jscomp.arrayIterator=function(G){return{next:$jscomp.arrayIteratorImpl(G)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(G,V,a){if(G==Array.prototype||G==Object.prototype)return G;G[V]=a.value;return G};$jscomp.getGlobal=function(G){G=["object"==typeof globalThis&&globalThis,G,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var V=0;V<G.length;++V){var a=G[V];if(a&&a.Math==Math)return a}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(G,V){var a=$jscomp.propertyToPolyfillSymbol[V];if(null==a)return G[V];a=G[a];return void 0!==a?a:G[V]};
$jscomp.polyfill=function(G,V,a,c){V&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(G,V,a,c):$jscomp.polyfillUnisolated(G,V,a,c))};$jscomp.polyfillUnisolated=function(G,V,a,c){a=$jscomp.global;G=G.split(".");for(c=0;c<G.length-1;c++){var b=G[c];if(!(b in a))return;a=a[b]}G=G[G.length-1];c=a[G];V=V(c);V!=c&&null!=V&&$jscomp.defineProperty(a,G,{configurable:!0,writable:!0,value:V})};
$jscomp.polyfillIsolated=function(G,V,a,c){var b=G.split(".");G=1===b.length;c=b[0];c=!G&&c in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var e=0;e<b.length-1;e++){var l=b[e];if(!(l in c))return;c=c[l]}b=b[b.length-1];a=$jscomp.IS_SYMBOL_NATIVE&&"es6"===a?c[b]:null;V=V(a);null!=V&&(G?$jscomp.defineProperty($jscomp.polyfills,b,{configurable:!0,writable:!0,value:V}):V!==a&&(void 0===$jscomp.propertyToPolyfillSymbol[b]&&($jscomp.propertyToPolyfillSymbol[b]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(b):
$jscomp.POLYFILL_PREFIX+b),$jscomp.defineProperty(c,$jscomp.propertyToPolyfillSymbol[b],{configurable:!0,writable:!0,value:V})))};$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(G){G={next:G};G[Symbol.iterator]=function(){return this};return G};
$jscomp.polyfill("String.prototype.matchAll",function(G){return G?G:function(V){if(V instanceof RegExp&&!V.global)throw new TypeError("RegExp passed into String.prototype.matchAll() must have global tag.");var a=new RegExp(V,V instanceof RegExp?void 0:"g"),c=this,b=!1,e={next:function(){var l={},r=a.lastIndex;if(b)return{value:void 0,done:!0};var h=a.exec(c);if(!h)return b=!0,{value:void 0,done:!0};a.lastIndex===r&&(a.lastIndex+=1);l.value=h;l.done=!1;return l}};e[Symbol.iterator]=function(){return e};
return e}},"es_2020","es3");$jscomp.polyfill("Object.fromEntries",function(G){return G?G:function(V){var a={};if(!(Symbol.iterator in V))throw new TypeError(""+V+" is not iterable");V=V[Symbol.iterator].call(V);for(var c=V.next();!c.done;c=V.next()){c=c.value;if(Object(c)!==c)throw new TypeError("iterable for fromEntries should yield objects");a[c[0]]=c[1]}return a}},"es_2019","es3");
(function(G){function V(c){if(a[c])return a[c].exports;var b=a[c]={i:c,l:!1,exports:{}};G[c].call(b.exports,b,b.exports,V);b.l=!0;return b.exports}var a={};V.m=G;V.c=a;V.d=function(c,b,e){V.o(c,b)||Object.defineProperty(c,b,{enumerable:!0,get:e})};V.r=function(c){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"});Object.defineProperty(c,"__esModule",{value:!0})};V.t=function(c,b){b&1&&(c=V(c));if(b&8||b&4&&"object"===typeof c&&c&&c.__esModule)return c;
var e=Object.create(null);V.r(e);Object.defineProperty(e,"default",{enumerable:!0,value:c});if(b&2&&"string"!=typeof c)for(var l in c)V.d(e,l,function(r){return c[r]}.bind(null,l));return e};V.n=function(c){var b=c&&c.__esModule?function(){return c["default"]}:function(){return c};V.d(b,"a",b);return b};V.o=function(c,b){return Object.prototype.hasOwnProperty.call(c,b)};V.p="";return V(V.s=2)})([function(G,V){V=function(){return this}();try{V=V||(new Function("return this"))()}catch(a){"object"===
typeof window&&(V=window)}G.exports=V},function(G,V,a){a.r(V);G={Cc:"\\0-\\x1F\\x7F-\\x9F",Cf:"\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB",Co:"\\uE000-\\uF8FF",Cs:"\\uD800-\\uDFFF",Cn:"\\u0378-\\u0379\\u0380-\\u0383\\u038B\\u038D\\u03A2\\u0530\\u0557-\\u0558\\u0560\\u0588\\u058B-\\u058C\\u0590\\u05C8-\\u05CF\\u05EB-\\u05EF\\u05F5-\\u05FF\\u070E\\u074B-\\u074C\\u07B2-\\u07BF\\u07FB-\\u07FF\\u082E-\\u082F\\u083F\\u085C-\\u085D\\u085F\\u08B5-\\u08B6\\u08BE-\\u08D2\\u0984\\u098D-\\u098E\\u0991-\\u0992\\u09A9\\u09B1\\u09B3-\\u09B5\\u09BA-\\u09BB\\u09C5-\\u09C6\\u09C9-\\u09CA\\u09CF-\\u09D6\\u09D8-\\u09DB\\u09DE\\u09E4-\\u09E5\\u09FC-\\u09FD\\u0A00\\u0A04\\u0A0B-\\u0A0E",
Ll:"a-z\\xB5\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F-\\u0293\\u0295-\\u02AF\\u0371\\u0373\\u0377\\u037B-\\u037D\\u0390\\u03AC-\\u03CE\\u03D0\\u03D1\\u03D5-\\u03D7\\u03D9\\u03DB\\u03DD\\u03DF\\u03E1\\u03E3\\u03E5\\u03E7\\u03E9\\u03EB\\u03ED\\u03EF-\\u03F3\\u03F5\\u03F8\\u03FB\\u03FC\\u0430-\\u045F\\u0461\\u0463\\u0465\\u0467\\u0469\\u046B\\u046D\\u046F\\u0471\\u0473\\u0475\\u0477\\u0479\\u047B\\u047D\\u047F\\u0481\\u048B\\u048D\\u048F\\u0491\\u0493\\u0495\\u0497\\u0499\\u049B\\u049D\\u049F\\u04A1\\u04A3\\u04A5\\u04A7\\u04A9\\u04AB\\u04AD\\u04AF\\u04B1\\u04B3\\u04B5\\u04B7\\u04B9\\u04BB\\u04BD\\u04BF\\u04C2\\u04C4\\u04C6\\u04C8\\u04CA\\u04CC\\u04CE\\u04CF\\u04D1\\u04D3\\u04D5\\u04D7\\u04D9\\u04DB\\u04DD\\u04DF\\u04E1\\u04E3\\u04E5\\u04E7\\u04E9\\u04EB\\u04ED\\u04EF\\u04F1\\u04F3\\u04F5\\u04F7\\u04F9\\u04FB\\u04FD\\u04FF\\u0501\\u0503\\u0505\\u0507\\u0509\\u050B\\u050D\\u050F\\u0511\\u0513\\u0515\\u0517\\u0519\\u051B\\u051D\\u051F\\u0521\\u0523\\u0525\\u0527\\u0529\\u052B\\u052D\\u052F\\u0560-\\u0588\\u10D0-\\u10FA\\u10FD-\\u10FF\\u13F8-\\u13FD\\u1C80-\\u1C88\\u1D00-\\u1D2B\\u1D6B-\\u1D77\\u1D79-\\u1D9A\\u1E01\\u1E03\\u1E05\\u1E07\\u1E09\\u1E0B\\u1E0D\\u1E0F\\u1E11\\u1E13\\u1E15\\u1E17\\u1E19\\u1E1B\\u1E1D\\u1E1F\\u1E21\\u1E23\\u1E25\\u1E27\\u1E29\\u1E2B\\u1E2D\\u1E2F\\u1E31\\u1E33\\u1E35\\u1E37\\u1E39\\u1E3B\\u1E3D\\u1E3F\\u1E41\\u1E43\\u1E45\\u1E47\\u1E49\\u1E4B\\u1E4D\\u1E4F\\u1E51\\u1E53\\u1E55\\u1E57\\u1E59\\u1E5B\\u1E5D\\u1E5F\\u1E61\\u1E63\\u1E65\\u1E67\\u1E69\\u1E6B\\u1E6D\\u1E6F\\u1E71\\u1E73\\u1E75\\u1E77\\u1E79\\u1E7B\\u1E7D\\u1E7F\\u1E81\\u1E83\\u1E85\\u1E87\\u1E89\\u1E8B\\u1E8D\\u1E8F\\u1E91\\u1E93\\u1E95-\\u1E9D\\u1E9F\\u1EA1\\u1EA3\\u1EA5\\u1EA7\\u1EA9\\u1EAB\\u1EAD\\u1EAF\\u1EB1\\u1EB3\\u1EB5\\u1EB7\\u1EB9\\u1EBB\\u1EBD\\u1EBF\\u1EC1\\u1EC3\\u1EC5\\u1EC7\\u1EC9\\u1ECB\\u1ECD\\u1ECF\\u1ED1\\u1ED3\\u1ED5\\u1ED7\\u1ED9\\u1EDB\\u1EDD\\u1EDF\\u1EE1\\u1EE3\\u1EE5\\u1EE7\\u1EE9\\u1EEB\\u1EED\\u1EEF\\u1EF1\\u1EF3\\u1EF5\\u1EF7\\u1EF9\\u1EFB\\u1EFD\\u1EFF-\\u1F07\\u1F10-\\u1F15\\u1F20-\\u1F27\\u1F30-\\u1F37\\u1F40-\\u1F45\\u1F50-\\u1F57\\u1F60-\\u1F67\\u1F70-\\u1F7D\\u1F80-\\u1F87\\u1F90-\\u1F97\\u1FA0-\\u1FA7\\u1FB0-\\u1FB4\\u1FB6\\u1FB7\\u1FBE\\u1FC2-\\u1FC4\\u1FC6\\u1FC7\\u1FD0-\\u1FD3\\u1FD6\\u1FD7\\u1FE0-\\u1FE7\\u1FF2-\\u1FF4\\u1FF6\\u1FF7\\u210A\\u210E\\u210F\\u2113\\u212F\\u2134\\u2139\\u213C\\u213D\\u2146-\\u2149\\u214E\\u2184\\u2C30-\\u2C5E\\u2C61\\u2C65\\u2C66\\u2C68\\u2C6A\\u2C6C\\u2C71\\u2C73\\u2C74\\u2C76-\\u2C7B\\u2C81\\u2C83\\u2C85\\u2C87\\u2C89\\u2C8B\\u2C8D\\u2C8F\\u2C91\\u2C93\\u2C95\\u2C97\\u2C99\\u2C9B\\u2C9D\\u2C9F\\u2CA1\\u2CA3\\u2CA5\\u2CA7\\u2CA9\\u2CAB\\u2CAD\\u2CAF\\u2CB1\\u2CB3\\u2CB5\\u2CB7\\u2CB9\\u2CBB\\u2CBD\\u2CBF\\u2CC1\\u2CC3\\u2CC5\\u2CC7\\u2CC9\\u2CCB\\u2CCD\\u2CCF\\u2CD1\\u2CD3\\u2CD5\\u2CD7\\u2CD9\\u2CDB\\u2CDD\\u2CDF\\u2CE1\\u2CE3\\u2CE4\\u2CEC\\u2CEE\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\uA641\\uA643\\uA645\\uA647\\uA649\\uA64B\\uA64D\\uA64F\\uA651\\uA653\\uA655\\uA657\\uA659\\uA65B\\uA65D\\uA65F\\uA661\\uA663\\uA665\\uA667\\uA669\\uA66B\\uA66D\\uA681\\uA683\\uA685\\uA687\\uA689\\uA68B\\uA68D\\uA68F\\uA691\\uA693\\uA695\\uA697\\uA699\\uA69B\\uA723\\uA725\\uA727\\uA729\\uA72B\\uA72D\\uA72F-\\uA731\\uA733\\uA735\\uA737\\uA739\\uA73B\\uA73D\\uA73F\\uA741\\uA743\\uA745\\uA747\\uA749\\uA74B\\uA74D\\uA74F\\uA751\\uA753\\uA755\\uA757\\uA759\\uA75B\\uA75D\\uA75F\\uA761\\uA763\\uA765\\uA767\\uA769\\uA76B\\uA76D\\uA76F\\uA771-\\uA778\\uA77A\\uA77C\\uA77F\\uA781\\uA783\\uA785\\uA787\\uA78C\\uA78E\\uA791\\uA793-\\uA795\\uA797\\uA799\\uA79B\\uA79D\\uA79F\\uA7A1\\uA7A3\\uA7A5\\uA7A7\\uA7A9\\uA7AF\\uA7B5\\uA7B7\\uA7B9\\uA7BB\\uA7BD\\uA7BF\\uA7C3\\uA7C8\\uA7CA\\uA7F6\\uA7FA\\uAB30-\\uAB5A\\uAB60-\\uAB68\\uAB70-\\uABBF\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF41-\\uFF5A",
Lm:"\\u02B0-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0374\\u037A\\u0559\\u0640\\u06E5\\u06E6\\u07F4\\u07F5\\u07FA\\u081A\\u0824\\u0828\\u0971\\u0E46\\u0EC6\\u10FC\\u17D7\\u1843\\u1AA7\\u1C78-\\u1C7D\\u1D2C-\\u1D6A\\u1D78\\u1D9B-\\u1DBF\\u2071\\u207F\\u2090-\\u209C\\u2C7C\\u2C7D\\u2D6F\\u2E2F\\u3005\\u3031-\\u3035\\u303B\\u309D\\u309E\\u30FC-\\u30FE\\uA015\\uA4F8-\\uA4FD\\uA60C\\uA67F\\uA69C\\uA69D\\uA717-\\uA71F\\uA770\\uA788\\uA7F8\\uA7F9\\uA9CF\\uA9E6\\uAA70\\uAADD\\uAAF3\\uAAF4\\uAB5C-\\uAB5F\\uAB69\\uFF70\\uFF9E\\uFF9F",
Lo:"\\xAA\\xBA\\u01BB\\u01C0-\\u01C3\\u0294\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u063F\\u0641-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u0800-\\u0815\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08C7\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0972-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\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\\u0AF9\\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-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E45\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u1100-\\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\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17DC\\u1820-\\u1842\\u1844-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C77\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u2135-\\u2138\\u2D30-\\u2D67\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3006\\u303C\\u3041-\\u3096\\u309F\\u30A1-\\u30FA\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\u9FFC\\uA000-\\uA014\\uA016-\\uA48C\\uA4D0-\\uA4F7\\uA500-\\uA60B\\uA610-\\uA61F\\uA62A\\uA62B\\uA66E\\uA6A0-\\uA6E5\\uA78F\\uA7F7\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9E0-\\uA9E4\\uA9E7-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA6F\\uAA71-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB\\uAADC\\uAAE0-\\uAAEA\\uAAF2\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\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\\uFF66-\\uFF6F\\uFF71-\\uFF9D\\uFFA0-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC",
Lt:"\\u01C5\\u01C8\\u01CB\\u01F2\\u1F88-\\u1F8F\\u1F98-\\u1F9F\\u1FA8-\\u1FAF\\u1FBC\\u1FCC\\u1FFC",Lu:"A-Z\\xC0-\\xD6\\xD8-\\xDE\\u0100\\u0102\\u0104\\u0106\\u0108\\u010A\\u010C\\u010E\\u0110\\u0112\\u0114\\u0116\\u0118\\u011A\\u011C\\u011E\\u0120\\u0122\\u0124\\u0126\\u0128\\u012A\\u012C\\u012E\\u0130\\u0132\\u0134\\u0136\\u0139\\u013B\\u013D\\u013F\\u0141\\u0143\\u0145\\u0147\\u014A\\u014C\\u014E\\u0150\\u0152\\u0154\\u0156\\u0158\\u015A\\u015C\\u015E\\u0160\\u0162\\u0164\\u0166\\u0168\\u016A\\u016C\\u016E\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017B\\u017D\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018B\\u018E-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019C\\u019D\\u019F\\u01A0\\u01A2\\u01A4\\u01A6\\u01A7\\u01A9\\u01AC\\u01AE\\u01AF\\u01B1-\\u01B3\\u01B5\\u01B7\\u01B8\\u01BC\\u01C4\\u01C7\\u01CA\\u01CD\\u01CF\\u01D1\\u01D3\\u01D5\\u01D7\\u01D9\\u01DB\\u01DE\\u01E0\\u01E2\\u01E4\\u01E6\\u01E8\\u01EA\\u01EC\\u01EE\\u01F1\\u01F4\\u01F6-\\u01F8\\u01FA\\u01FC\\u01FE\\u0200\\u0202\\u0204\\u0206\\u0208\\u020A\\u020C\\u020E\\u0210\\u0212\\u0214\\u0216\\u0218\\u021A\\u021C\\u021E\\u0220\\u0222\\u0224\\u0226\\u0228\\u022A\\u022C\\u022E\\u0230\\u0232\\u023A\\u023B\\u023D\\u023E\\u0241\\u0243-\\u0246\\u0248\\u024A\\u024C\\u024E\\u0370\\u0372\\u0376\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E\\u038F\\u0391-\\u03A1\\u03A3-\\u03AB\\u03CF\\u03D2-\\u03D4\\u03D8\\u03DA\\u03DC\\u03DE\\u03E0\\u03E2\\u03E4\\u03E6\\u03E8\\u03EA\\u03EC\\u03EE\\u03F4\\u03F7\\u03F9\\u03FA\\u03FD-\\u042F\\u0460\\u0462\\u0464\\u0466\\u0468\\u046A\\u046C\\u046E\\u0470\\u0472\\u0474\\u0476\\u0478\\u047A\\u047C\\u047E\\u0480\\u048A\\u048C\\u048E\\u0490\\u0492\\u0494\\u0496\\u0498\\u049A\\u049C\\u049E\\u04A0\\u04A2\\u04A4\\u04A6\\u04A8\\u04AA\\u04AC\\u04AE\\u04B0\\u04B2\\u04B4\\u04B6\\u04B8\\u04BA\\u04BC\\u04BE\\u04C0\\u04C1\\u04C3\\u04C5\\u04C7\\u04C9\\u04CB\\u04CD\\u04D0\\u04D2\\u04D4\\u04D6\\u04D8\\u04DA\\u04DC\\u04DE\\u04E0\\u04E2\\u04E4\\u04E6\\u04E8\\u04EA\\u04EC\\u04EE\\u04F0\\u04F2\\u04F4\\u04F6\\u04F8\\u04FA\\u04FC\\u04FE\\u0500\\u0502\\u0504\\u0506\\u0508\\u050A\\u050C\\u050E\\u0510\\u0512\\u0514\\u0516\\u0518\\u051A\\u051C\\u051E\\u0520\\u0522\\u0524\\u0526\\u0528\\u052A\\u052C\\u052E\\u0531-\\u0556\\u10A0-\\u10C5\\u10C7\\u10CD\\u13A0-\\u13F5\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1E00\\u1E02\\u1E04\\u1E06\\u1E08\\u1E0A\\u1E0C\\u1E0E\\u1E10\\u1E12\\u1E14\\u1E16\\u1E18\\u1E1A\\u1E1C\\u1E1E\\u1E20\\u1E22\\u1E24\\u1E26\\u1E28\\u1E2A\\u1E2C\\u1E2E\\u1E30\\u1E32\\u1E34\\u1E36\\u1E38\\u1E3A\\u1E3C\\u1E3E\\u1E40\\u1E42\\u1E44\\u1E46\\u1E48\\u1E4A\\u1E4C\\u1E4E\\u1E50\\u1E52\\u1E54\\u1E56\\u1E58\\u1E5A\\u1E5C\\u1E5E\\u1E60\\u1E62\\u1E64\\u1E66\\u1E68\\u1E6A\\u1E6C\\u1E6E\\u1E70\\u1E72\\u1E74\\u1E76\\u1E78\\u1E7A\\u1E7C\\u1E7E\\u1E80\\u1E82\\u1E84\\u1E86\\u1E88\\u1E8A\\u1E8C\\u1E8E\\u1E90\\u1E92\\u1E94\\u1E9E\\u1EA0\\u1EA2\\u1EA4\\u1EA6\\u1EA8\\u1EAA\\u1EAC\\u1EAE\\u1EB0\\u1EB2\\u1EB4\\u1EB6\\u1EB8\\u1EBA\\u1EBC\\u1EBE\\u1EC0\\u1EC2\\u1EC4\\u1EC6\\u1EC8\\u1ECA\\u1ECC\\u1ECE\\u1ED0\\u1ED2\\u1ED4\\u1ED6\\u1ED8\\u1EDA\\u1EDC\\u1EDE\\u1EE0\\u1EE2\\u1EE4\\u1EE6\\u1EE8\\u1EEA\\u1EEC\\u1EEE\\u1EF0\\u1EF2\\u1EF4\\u1EF6\\u1EF8\\u1EFA\\u1EFC\\u1EFE\\u1F08-\\u1F0F\\u1F18-\\u1F1D\\u1F28-\\u1F2F\\u1F38-\\u1F3F\\u1F48-\\u1F4D\\u1F59\\u1F5B\\u1F5D\\u1F5F\\u1F68-\\u1F6F\\u1FB8-\\u1FBB\\u1FC8-\\u1FCB\\u1FD8-\\u1FDB\\u1FE8-\\u1FEC\\u1FF8-\\u1FFB\\u2102\\u2107\\u210B-\\u210D\\u2110-\\u2112\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u2130-\\u2133\\u213E\\u213F\\u2145\\u2183\\u2C00-\\u2C2E\\u2C60\\u2C62-\\u2C64\\u2C67\\u2C69\\u2C6B\\u2C6D-\\u2C70\\u2C72\\u2C75\\u2C7E-\\u2C80\\u2C82\\u2C84\\u2C86\\u2C88\\u2C8A\\u2C8C\\u2C8E\\u2C90\\u2C92\\u2C94\\u2C96\\u2C98\\u2C9A\\u2C9C\\u2C9E\\u2CA0\\u2CA2\\u2CA4\\u2CA6\\u2CA8\\u2CAA\\u2CAC\\u2CAE\\u2CB0\\u2CB2\\u2CB4\\u2CB6\\u2CB8\\u2CBA\\u2CBC\\u2CBE\\u2CC0\\u2CC2\\u2CC4\\u2CC6\\u2CC8\\u2CCA\\u2CCC\\u2CCE\\u2CD0\\u2CD2\\u2CD4\\u2CD6\\u2CD8\\u2CDA\\u2CDC\\u2CDE\\u2CE0\\u2CE2\\u2CEB\\u2CED\\u2CF2\\uA640\\uA642\\uA644\\uA646\\uA648\\uA64A\\uA64C\\uA64E\\uA650\\uA652\\uA654\\uA656\\uA658\\uA65A\\uA65C\\uA65E\\uA660\\uA662\\uA664\\uA666\\uA668\\uA66A\\uA66C\\uA680\\uA682\\uA684\\uA686\\uA688\\uA68A\\uA68C\\uA68E\\uA690\\uA692\\uA694\\uA696\\uA698\\uA69A\\uA722\\uA724\\uA726\\uA728\\uA72A\\uA72C\\uA72E\\uA732\\uA734\\uA736\\uA738\\uA73A\\uA73C\\uA73E\\uA740\\uA742\\uA744\\uA746\\uA748\\uA74A\\uA74C\\uA74E\\uA750\\uA752\\uA754\\uA756\\uA758\\uA75A\\uA75C\\uA75E\\uA760\\uA762\\uA764\\uA766\\uA768\\uA76A\\uA76C\\uA76E\\uA779\\uA77B\\uA77D\\uA77E\\uA780\\uA782\\uA784\\uA786\\uA78B\\uA78D\\uA790\\uA792\\uA796\\uA798\\uA79A\\uA79C\\uA79E\\uA7A0\\uA7A2\\uA7A4\\uA7A6\\uA7A8\\uA7AA-\\uA7AE\\uA7B0-\\uA7B4\\uA7B6\\uA7B8\\uA7BA\\uA7BC\\uA7BE\\uA7C2\\uA7C4-\\uA7C7\\uA7C9\\uA7F5\\uFF21-\\uFF3A",
M:"\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1AC0\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F",
Mc:"\\u0903\\u093B\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u094F\\u0982\\u0983\\u09BE-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09D7\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD7\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0-\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0D02\\u0D03\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D57\\u0D82\\u0D83\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0F3E\\u0F3F\\u0F7F\\u102B\\u102C\\u1031\\u1038\\u103B\\u103C\\u1056\\u1057\\u1062-\\u1064\\u1067-\\u106D\\u1083\\u1084\\u1087-\\u108C\\u108F\\u109A-\\u109C\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u1A19\\u1A1A\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1B04\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1BE7\\u1BEA-\\u1BEC\\u1BEE\\u1BF2\\u1BF3\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF7\\u302E\\u302F\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BE-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAA7B\\uAA7D\\uAAEB\\uAAEE\\uAAEF\\uAAF5\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC",
Me:"\\u0488\\u0489\\u1ABE\\u20DD-\\u20E0\\u20E2-\\u20E4\\uA670-\\uA672",Mn:"\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C00\\u0C04\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ABD\\u1ABF\\u1AC0\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u3099\\u309A\\uA66F\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA82C\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F",
Nd:"0-9\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0DE6-\\u0DEF\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uA9F0-\\uA9F9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19",
Nl:"\\u16EE-\\u16F0\\u2160-\\u2182\\u2185-\\u2188\\u3007\\u3021-\\u3029\\u3038-\\u303A\\uA6E6-\\uA6EF",No:"\\xB2\\xB3\\xB9\\xBC-\\xBE\\u09F4-\\u09F9\\u0B72-\\u0B77\\u0BF0-\\u0BF2\\u0C78-\\u0C7E\\u0D58-\\u0D5E\\u0D70-\\u0D78\\u0F2A-\\u0F33\\u1369-\\u137C\\u17F0-\\u17F9\\u19DA\\u2070\\u2074-\\u2079\\u2080-\\u2089\\u2150-\\u215F\\u2189\\u2460-\\u249B\\u24EA-\\u24FF\\u2776-\\u2793\\u2CFD\\u3192-\\u3195\\u3220-\\u3229\\u3248-\\u324F\\u3251-\\u325F\\u3280-\\u3289\\u32B1-\\u32BF\\uA830-\\uA835",Pc:"_\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F",
Pd:"\\-\\u058A\\u05BE\\u1400\\u1806\\u2010-\\u2015\\u2E17\\u2E1A\\u2E3A\\u2E3B\\u2E40\\u301C\\u3030\\u30A0\\uFE31\\uFE32\\uFE58\\uFE63\\uFF0D",Pe:"\\)\\]\\}\\u0F3B\\u0F3D\\u169C\\u2046\\u207E\\u208E\\u2309\\u230B\\u232A\\u2769\\u276B\\u276D\\u276F\\u2771\\u2773\\u2775\\u27C6\\u27E7\\u27E9\\u27EB\\u27ED\\u27EF\\u2984\\u2986\\u2988\\u298A\\u298C\\u298E\\u2990\\u2992\\u2994\\u2996\\u2998\\u29D9\\u29DB\\u29FD\\u2E23\\u2E25\\u2E27\\u2E29\\u3009\\u300B\\u300D\\u300F\\u3011\\u3015\\u3017\\u3019\\u301B\\u301E\\u301F\\uFD3E\\uFE18\\uFE36\\uFE38\\uFE3A\\uFE3C\\uFE3E\\uFE40\\uFE42\\uFE44\\uFE48\\uFE5A\\uFE5C\\uFE5E\\uFF09\\uFF3D\\uFF5D\\uFF60\\uFF63",
Pf:"\\xBB\\u2019\\u201D\\u203A\\u2E03\\u2E05\\u2E0A\\u2E0D\\u2E1D\\u2E21",Pi:"\\xAB\\u2018\\u201B\\u201C\\u201F\\u2039\\u2E02\\u2E04\\u2E09\\u2E0C\\u2E1C\\u2E20",Po:"!-#%-'\\*,\\.\\/:;\\?@\\xA1\\xA7\\xB6\\xB7\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u166E\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u1805\\u1807-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2016\\u2017\\u2020-\\u2027\\u2030-\\u2038\\u203B-\\u203E\\u2041-\\u2043\\u2047-\\u2051\\u2053\\u2055-\\u205E\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00\\u2E01\\u2E06-\\u2E08\\u2E0B\\u2E0E-\\u2E16\\u2E18\\u2E19\\u2E1B\\u2E1E\\u2E1F\\u2E2A-\\u2E2E\\u2E30-\\u2E39\\u2E3C-\\u2E3F\\u2E41\\u2E43-\\u2E4F\\u2E52\\u3001-\\u3003\\u303D\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFE10-\\uFE16\\uFE19\\uFE30\\uFE45\\uFE46\\uFE49-\\uFE4C\\uFE50-\\uFE52\\uFE54-\\uFE57\\uFE5F-\\uFE61\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF07\\uFF0A\\uFF0C\\uFF0E\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3C\\uFF61\\uFF64\\uFF65",
Ps:"\\(\\[\\{\\u0F3A\\u0F3C\\u169B\\u201A\\u201E\\u2045\\u207D\\u208D\\u2308\\u230A\\u2329\\u2768\\u276A\\u276C\\u276E\\u2770\\u2772\\u2774\\u27C5\\u27E6\\u27E8\\u27EA\\u27EC\\u27EE\\u2983\\u2985\\u2987\\u2989\\u298B\\u298D\\u298F\\u2991\\u2993\\u2995\\u2997\\u29D8\\u29DA\\u29FC\\u2E22\\u2E24\\u2E26\\u2E28\\u2E42\\u3008\\u300A\\u300C\\u300E\\u3010\\u3014\\u3016\\u3018\\u301A\\u301D\\uFD3F\\uFE17\\uFE35\\uFE37\\uFE39\\uFE3B\\uFE3D\\uFE3F\\uFE41\\uFE43\\uFE47\\uFE59\\uFE5B\\uFE5D\\uFF08\\uFF3B\\uFF5B\\uFF5F\\uFF62",
Sc:"\\$\\xA2-\\xA5\\u058F\\u060B\\u07FE\\u07FF\\u09F2\\u09F3\\u09FB\\u0AF1\\u0BF9\\u0E3F\\u17DB\\u20A0-\\u20BF\\uA838\\uFDFC\\uFE69\\uFF04\\uFFE0\\uFFE1\\uFFE5\\uFFE6",Sk:"\\^`\\xA8\\xAF\\xB4\\xB8\\u02C2-\\u02C5\\u02D2-\\u02DF\\u02E5-\\u02EB\\u02ED\\u02EF-\\u02FF\\u0375\\u0384\\u0385\\u1FBD\\u1FBF-\\u1FC1\\u1FCD-\\u1FCF\\u1FDD-\\u1FDF\\u1FED-\\u1FEF\\u1FFD\\u1FFE\\u309B\\u309C\\uA700-\\uA716\\uA720\\uA721\\uA789\\uA78A\\uAB5B\\uAB6A\\uAB6B\\uFBB2-\\uFBC1\\uFF3E\\uFF40\\uFFE3",Sm:"\\+<->\\|~\\xAC\\xB1\\xD7\\xF7\\u03F6\\u0606-\\u0608\\u2044\\u2052\\u207A-\\u207C\\u208A-\\u208C\\u2118\\u2140-\\u2144\\u214B\\u2190-\\u2194\\u219A\\u219B\\u21A0\\u21A3\\u21A6\\u21AE\\u21CE\\u21CF\\u21D2\\u21D4\\u21F4-\\u22FF\\u2320\\u2321\\u237C\\u239B-\\u23B3\\u23DC-\\u23E1\\u25B7\\u25C1\\u25F8-\\u25FF\\u266F\\u27C0-\\u27C4\\u27C7-\\u27E5\\u27F0-\\u27FF\\u2900-\\u2982\\u2999-\\u29D7\\u29DC-\\u29FB\\u29FE-\\u2AFF\\u2B30-\\u2B44\\u2B47-\\u2B4C\\uFB29\\uFE62\\uFE64-\\uFE66\\uFF0B\\uFF1C-\\uFF1E\\uFF5C\\uFF5E\\uFFE2\\uFFE9-\\uFFEC",
So:"\\xA6\\xA9\\xAE\\xB0\\u0482\\u058D\\u058E\\u060E\\u060F\\u06DE\\u06E9\\u06FD\\u06FE\\u07F6\\u09FA\\u0B70\\u0BF3-\\u0BF8\\u0BFA\\u0C7F\\u0D4F\\u0D79\\u0F01-\\u0F03\\u0F13\\u0F15-\\u0F17\\u0F1A-\\u0F1F\\u0F34\\u0F36\\u0F38\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE\\u0FCF\\u0FD5-\\u0FD8\\u109E\\u109F\\u1390-\\u1399\\u166D\\u1940\\u19DE-\\u19FF\\u1B61-\\u1B6A\\u1B74-\\u1B7C\\u2100\\u2101\\u2103-\\u2106\\u2108\\u2109\\u2114\\u2116\\u2117\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A\\u213B\\u214A\\u214C\\u214D\\u214F\\u218A\\u218B\\u2195-\\u2199\\u219C-\\u219F\\u21A1\\u21A2\\u21A4\\u21A5\\u21A7-\\u21AD\\u21AF-\\u21CD\\u21D0\\u21D1\\u21D3\\u21D5-\\u21F3\\u2300-\\u2307\\u230C-\\u231F\\u2322-\\u2328\\u232B-\\u237B\\u237D-\\u239A\\u23B4-\\u23DB\\u23E2-\\u2426\\u2440-\\u244A\\u249C-\\u24E9\\u2500-\\u25B6\\u25B8-\\u25C0\\u25C2-\\u25F7\\u2600-\\u266E\\u2670-\\u2767\\u2794-\\u27BF\\u2800-\\u28FF\\u2B00-\\u2B2F\\u2B45\\u2B46\\u2B4D-\\u2B73\\u2B76-\\u2B95\\u2B97-\\u2BFF\\u2CE5-\\u2CEA\\u2E50\\u2E51\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFB\\u3004\\u3012\\u3013\\u3020\\u3036\\u3037\\u303E\\u303F\\u3190\\u3191\\u3196-\\u319F\\u31C0-\\u31E3\\u3200-\\u321E\\u322A-\\u3247\\u3250\\u3260-\\u327F\\u328A-\\u32B0\\u32C0-\\u33FF\\u4DC0-\\u4DFF\\uA490-\\uA4C6\\uA828-\\uA82B\\uA836\\uA837\\uA839\\uAA77-\\uAA79\\uFDFD\\uFFE4\\uFFE8\\uFFED\\uFFEE\\uFFFC\\uFFFD",
Zl:"\\u2028",Zp:"\\u2029",Zs:" \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000"};G.C=G.Cc+G.Cf+G.Cs+G.Co+G.Cn;G.L=G.Lu+G.Ll+G.Lt+G.Lm+G.Mn+G.Lo;G.LC=G.Lu+G.Ll+G.Lt;G.M=G.Mn+G.Mc+G.Me;G.N=G.Nd+G.Nl+G.No;G.P=G.Pc+G.Pd+G.Ps+G.Pe+G.Pi+G.Pf+G.Po;G.S=G.Sm+G.Sc+G.Sk+G.So;G.Z=G.Zs+G.Zl+G.Zp;G.w="_"+G.L+G.N;G.b="(?:["+G.w+"](?:[^"+G.w+"]|$)|(?:^|[^"+G.w+"])["+G.w+"])";G.bOut="(?=[^"+G.w+"]|$)";G.bIn="(?:^|[^"+G.w+"])";G.bInCapture="(?:^|([^"+G.w+"]))";G.B="(?:["+G.w+"]["+G.w+"]|[^"+G.w+"][^"+G.w+"])";G.d=
G.N;V["default"]=G},function(G,V,a){a(3);Sk.global.strftime=a(4);a(5);a(7);a(8);a(10);a(11);a(12);a(13);a(14);a(15);a(16);a(17);a(18);a(19);[Sk.builtin.object,Sk.builtin.type].forEach(c=>{Sk.abstr.setUpSlots(c);Sk.abstr.setUpMethods(c);Sk.abstr.setUpGetSets(c);Sk.abstr.setUpClassMethods(c)});a(20);a(21);a(22);[Sk.builtin.str,Sk.builtin.none,Sk.builtin.NotImplemented,Sk.builtin.object].forEach(c=>{c=c.prototype;c.__doc__=c.hasOwnProperty("tp$doc")?new Sk.builtin.str(c.tp$doc):Sk.builtin.none.none$});
a(23);a(24);a(25);a(26);a(27);a(28);a(29);a(30);a(32);a(33);a(34);a(35);a(36);a(37);a(38);a(39);a(40);a(41);a(42);a(43);a(44);a(45);a(46);a(47);a(48);a(49);a(50);a(51);a(52);a(53);a(54);a(55);a(56);a(57);a(58);a(59);a(60);a(61);a(62);a(63);a(64);a(65);a(66);a(67)},function(G,V,a){(function(c){var b={build:{githash:"f5016ef7904c55fa707d6965dfd7bfec40a1dcd4",date:"2025-06-18T01:28:58.494Z"}};b.global="undefined"!==typeof c?c:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{};b.exportSymbol=
function(e,l){e=e.split(".");var r=b.global,h;for(h=0;h<e.length-1;h++){var f=e[h];r=r.hasOwnProperty(f)?r[f]:r[f]={}}"undefined"!==typeof l&&(f=e[h],r[f]=l)};b.isArrayLike=function(e){return e instanceof Array||e&&e.length&&"number"==typeof e.length?!0:!1};b.js_beautify=function(e){return e};b.exportSymbol("Sk",b);b.exportSymbol("Sk.global",b.global);b.exportSymbol("Sk.build",b.build);b.exportSymbol("Sk.exportSymbol",b.exportSymbol);b.exportSymbol("Sk.isArrayLike",b.isArrayLike);b.exportSymbol("Sk.js_beautify",
b.js_beautify)}).call(this,a(0))},function(G,V){(function(){function a(g,p,k){function q(z,D,K,R){for(var T="",t=null,y=!1,E=z.length,J=!1,Q=0;Q<E;Q++){var X=z.charCodeAt(Q);if(!0===y)if(45===X)t="";else if(95===X)t=" ";else if(48===X)t="0";else if(58===X)J&&h("[WARNING] detected use of unsupported %:: or %::: modifiers to strftime"),J=!0;else{switch(X){case 37:T+="%";break;case 65:T+=K.days[D.getDay()];break;case 66:T+=K.months[D.getMonth()];break;case 67:T+=c(Math.floor(D.getFullYear()/100),t);
break;case 68:T+=q(K.formats.D,D,K,R);break;case 70:T+=q(K.formats.F,D,K,R);break;case 72:T+=c(D.getHours(),t);break;case 73:T+=c(e(D.getHours()),t);break;case 76:T+=b(Math.floor(R%1E3));break;case 77:T+=c(D.getMinutes(),t);break;case 80:T+=12>D.getHours()?K.am:K.pm;break;case 82:T+=q(K.formats.R,D,K,R);break;case 83:T+=c(D.getSeconds(),t);break;case 84:T+=q(K.formats.T,D,K,R);break;case 85:T+=c(l(D,"sunday"),t);break;case 87:T+=c(l(D,"monday"),t);break;case 88:T+=q(K.formats.X,D,K,R);break;case 89:T+=
D.getFullYear();break;case 90:w&&0===v?T+="GMT":(t=D,t=(t=t.toString().match(/\(([\w\s]+)\)/))&&t[1],T+=t||"");break;case 97:T+=K.shortDays[D.getDay()];break;case 98:T+=K.shortMonths[D.getMonth()];break;case 99:T+=q(K.formats.c,D,K,R);break;case 100:T+=c(D.getDate(),t);break;case 101:T+=c(D.getDate(),null==t?" ":t);break;case 104:T+=K.shortMonths[D.getMonth()];break;case 106:t=new Date(D.getFullYear(),0,1);t=Math.ceil((D.getTime()-t.getTime())/864E5);T+=b(t);break;case 107:T+=c(D.getHours(),null==
t?" ":t);break;case 108:T+=c(e(D.getHours()),null==t?" ":t);break;case 109:T+=c(D.getMonth()+1,t);break;case 110:T+="\n";break;case 111:t=D.getDate();T=K.ordinalSuffixes?T+(String(t)+(K.ordinalSuffixes[t-1]||r(t))):T+(String(t)+r(t));break;case 112:T+=12>D.getHours()?K.AM:K.PM;break;case 114:T+=q(K.formats.r,D,K,R);break;case 115:T+=Math.floor(R/1E3);break;case 116:T+="\t";break;case 117:t=D.getDay();T+=0===t?7:t;break;case 118:T+=q(K.formats.v,D,K,R);break;case 119:T+=D.getDay();break;case 120:T+=
q(K.formats.x,D,K,R);break;case 121:T+=(""+D.getFullYear()).slice(2);break;case 122:w&&0===v?T+=J?"+00:00":"+0000":(t=0!==v?v/6E4:-D.getTimezoneOffset(),y=J?":":"",X=Math.abs(t%60),T+=(0>t?"-":"+")+c(Math.floor(Math.abs(t/60)))+y+c(X));break;default:y&&(T+="%"),T+=z[Q]}t=null;y=!1}else 37===X?y=!0:T+=z[Q]}return T}var x=g||n,v=p||0,w=k||!1,C=0,F,L=function(z,D){if(D){var K=D.getTime();if(w){var R=6E4*(D.getTimezoneOffset()||0);D=new Date(K+R+v);6E4*(D.getTimezoneOffset()||0)!==R&&(D=6E4*(D.getTimezoneOffset()||
0),D=new Date(K+D+v))}}else K=Date.now(),K>C?(C=K,F=new Date(C),K=C,w&&(F=new Date(C+6E4*(F.getTimezoneOffset()||0)+v))):K=C,D=F;return q(z,D,x,K)};L.localize=function(z){return new a(z||x,v,w)};L.localizeByIdentifier=function(z){var D=f[z];return D?L.localize(D):(h('[WARNING] No locale found with identifier "'+z+'".'),L)};L.timezone=function(z){var D=v,K=w,R=typeof z;if("number"===R||"string"===R)K=!0,"string"===R?(D="-"===z[0]?-1:1,R=parseInt(z.slice(1,3),10),z=parseInt(z.slice(3,5),10),D=D*(60*
R+z)*6E4):"number"===R&&(D=6E4*z);return new a(x,D,K)};L.utc=function(){return new a(x,v,!0)};return L}function c(g,p){if(""===p||9<g)return g;null==p&&(p="0");return p+g}function b(g){return 99<g?g:9<g?"0"+g:"00"+g}function e(g){return 0===g?12:12<g?g-12:g}function l(g,p){p=p||"sunday";var k=g.getDay();"monday"===p&&(0===k?k=6:k--);p=Date.UTC(g.getFullYear(),0,1);g=Date.UTC(g.getFullYear(),g.getMonth(),g.getDate());return Math.floor((Math.floor((g-p)/864E5)+7-k)/7)}function r(g){var p=g%10;g%=100;
if(11<=g&&13>=g||0===p||4<=p)return"th";switch(p){case 1:return"st";case 2:return"nd";case 3:return"rd"}}function h(g){"undefined"!==typeof console&&"function"==typeof console.warn&&console.warn(g)}var f={de_DE:{identifier:"de-DE",days:"Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag".split(" "),shortDays:"So Mo Di Mi Do Fr Sa".split(" "),months:"Januar Februar M\u00e4rz April Mai Juni Juli August September Oktober November Dezember".split(" "),shortMonths:"Jan Feb M\u00e4r Apr Mai Jun Jul Aug Sep Okt Nov Dez".split(" "),
AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d.%m.%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},en_CA:{identifier:"en-CA",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),ordinalSuffixes:"st nd rd th th th th th th th th th th th th th th th th th st nd rd th th th th th th th st".split(" "),
AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}},en_US:{identifier:"en-US",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),ordinalSuffixes:"st nd rd th th th th th th th th th th th th th th th th th st nd rd th th th th th th th st".split(" "),
AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%m/%d/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}},es_MX:{identifier:"es-MX",days:"domingo lunes martes mi\u00e9rcoles jueves viernes s\u00e1bado".split(" "),shortDays:"dom lun mar mi\u00e9 jue vie s\u00e1b".split(" "),months:"enero;febrero;marzo;abril;mayo;junio;julio;agosto;septiembre;octubre;noviembre; diciembre".split(";"),shortMonths:"ene feb mar abr may jun jul ago sep oct nov dic".split(" "),
AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},fr_FR:{identifier:"fr-FR",days:"dimanche lundi mardi mercredi jeudi vendredi samedi".split(" "),shortDays:"dim. lun. mar. mer. jeu. ven. sam.".split(" "),months:"janvier f\u00e9vrier mars avril mai juin juillet ao\u00fbt septembre octobre novembre d\u00e9cembre".split(" "),shortMonths:"janv. f\u00e9vr. mars avril mai juin juil. ao\u00fbt sept. oct. nov. d\u00e9c.".split(" "),
AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},it_IT:{identifier:"it-IT",days:"domenica luned\u00ec marted\u00ec mercoled\u00ec gioved\u00ec venerd\u00ec sabato".split(" "),shortDays:"dom lun mar mer gio ven sab".split(" "),months:"gennaio febbraio marzo aprile maggio giugno luglio agosto settembre ottobre novembre dicembre".split(" "),shortMonths:"gen feb mar apr mag giu lug ago set ott nov dic".split(" "),
AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},nl_NL:{identifier:"nl-NL",days:"zondag maandag dinsdag woensdag donderdag vrijdag zaterdag".split(" "),shortDays:"zo ma di wo do vr za".split(" "),months:"januari februari maart april mei juni juli augustus september oktober november december".split(" "),shortMonths:"jan feb mrt apr mei jun jul aug sep okt nov dec".split(" "),AM:"AM",PM:"PM",
am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},pt_BR:{identifier:"pt-BR",days:"domingo segunda ter\u00e7a quarta quinta sexta s\u00e1bado".split(" "),shortDays:"Dom Seg Ter Qua Qui Sex S\u00e1b".split(" "),months:"janeiro fevereiro mar\u00e7o abril maio junho julho agosto setembro outubro novembro dezembro".split(" "),shortMonths:"Jan Fev Mar Abr Mai Jun Jul Ago Set Out Nov Dez".split(" "),AM:"AM",PM:"PM",
am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},ru_RU:{identifier:"ru-RU",days:"\u0412\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435 \u041f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a \u0412\u0442\u043e\u0440\u043d\u0438\u043a \u0421\u0440\u0435\u0434\u0430 \u0427\u0435\u0442\u0432\u0435\u0440\u0433 \u041f\u044f\u0442\u043d\u0438\u0446\u0430 \u0421\u0443\u0431\u0431\u043e\u0442\u0430".split(" "),
shortDays:"\u0412\u0441 \u041f\u043d \u0412\u0442 \u0421\u0440 \u0427\u0442 \u041f\u0442 \u0421\u0431".split(" "),months:"\u042f\u043d\u0432\u0430\u0440\u044c \u0424\u0435\u0432\u0440\u0430\u043b\u044c \u041c\u0430\u0440\u0442 \u0410\u043f\u0440\u0435\u043b\u044c \u041c\u0430\u0439 \u0418\u044e\u043d\u044c \u0418\u044e\u043b\u044c \u0410\u0432\u0433\u0443\u0441\u0442 \u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c \u041e\u043a\u0442\u044f\u0431\u0440\u044c \u041d\u043e\u044f\u0431\u0440\u044c \u0414\u0435\u043a\u0430\u0431\u0440\u044c".split(" "),
shortMonths:"\u044f\u043d\u0432 \u0444\u0435\u0432 \u043c\u0430\u0440 \u0430\u043f\u0440 \u043c\u0430\u0439 \u0438\u044e\u043d \u0438\u044e\u043b \u0430\u0432\u0433 \u0441\u0435\u043d \u043e\u043a\u0442 \u043d\u043e\u044f \u0434\u0435\u043a".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X",D:"%d.%m.%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},tr_TR:{identifier:"tr-TR",days:"Pazar Pazartesi Sal\u0131 \u00c7ar\u015famba Per\u015fembe Cuma Cumartesi".split(" "),
shortDays:"Paz Pzt Sal \u00c7r\u015f Pr\u015f Cum Cts".split(" "),months:"Ocak \u015eubat Mart Nisan May\u0131s Haziran Temmuz A\u011fustos Eyl\u00fcl Ekim Kas\u0131m Aral\u0131k".split(" "),shortMonths:"Oca \u015eub Mar Nis May Haz Tem A\u011fu Eyl Eki Kas Ara".split(" "),AM:"\u00d6\u00d6",PM:"\u00d6S",am:"\u00d6\u00d6",pm:"\u00d6S",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},zh_CN:{identifier:"zh-CN",days:"\u661f\u671f\u65e5 \u661f\u671f\u4e00 \u661f\u671f\u4e8c \u661f\u671f\u4e09 \u661f\u671f\u56db \u661f\u671f\u4e94 \u661f\u671f\u516d".split(" "),
shortDays:"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split(""),months:"\u4e00\u6708\u4efd \u4e8c\u6708\u4efd \u4e09\u6708\u4efd \u56db\u6708\u4efd \u4e94\u6708\u4efd \u516d\u6708\u4efd \u4e03\u6708\u4efd \u516b\u6708\u4efd \u4e5d\u6708\u4efd \u5341\u6708\u4efd \u5341\u4e00\u6708\u4efd \u5341\u4e8c\u6708\u4efd".split(" "),shortMonths:"\u4e00\u6708 \u4e8c\u6708 \u4e09\u6708 \u56db\u6708 \u4e94\u6708 \u516d\u6708 \u4e03\u6708 \u516b\u6708 \u4e5d\u6708 \u5341\u6708 \u5341\u4e00\u6708 \u5341\u4e8c\u6708".split(" "),
AM:"\u4e0a\u5348",PM:"\u4e0b\u5348",am:"\u4e0a\u5348",pm:"\u4e0b\u5348",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}}},n=f.en_US,d=new a(n,0,!1);if("undefined"!==typeof G)var m=G.exports=d;else m=function(){return this||(0,eval)("this")}(),m.strftime=d;"function"!==typeof Date.now&&(Date.now=function(){return+new Date})})()},function(G,V,a){G=a(6);const c=Sk.global.JSBI=void 0!==Sk.global.BigInt?{}:G;void 0===Sk.global.BigInt?
(c.__isBigInt||(c.__isBigInt=b=>b instanceof c),c.powermod=(b,e,l)=>{const r=c.BigInt(1);let h=r;for(e=c.greaterThan(e,c.__ZERO)?e:c.unaryMinus(e);c.greaterThan(e,c.__ZERO);)c.bitwiseAnd(e,r)&&(h=c.remainder(c.multiply(h,b),l)),e=c.signedRightShift(e,r),b=c.remainder(c.multiply(b,b),l);return h}):Object.assign(c,{BigInt:Sk.global.BigInt,toNumber:b=>Number(b),toString:b=>b.toString(),__isBigInt:b=>"bigint"===typeof b,unaryMinus:b=>-b,bitwiseNot:b=>~b,bitwiseAnd:(b,e)=>b&e,bitwiseOr:(b,e)=>b|e,bitwiseXor:(b,
e)=>b^e,exponentiate:(b,e)=>{const l=c.BigInt(1);let r=l;for(e=e>c.__ZERO?e:-e;e>c.__ZERO;)e&l&&(r*=b),e>>=l,b*=b;return r},powermod:(b,e,l)=>{const r=c.BigInt(1);let h=r;for(e=e>c.__ZERO?e:-e;e>c.__ZERO;)e&r&&(h=h*b%l),e>>=r,b=b*b%l;return h},multiply:(b,e)=>b*e,divide:(b,e)=>b/e,remainder:(b,e)=>b%e,add:(b,e)=>b+e,subtract:(b,e)=>b-e,leftShift:(b,e)=>b<<e,signedRightShift:(b,e)=>b>>e,unsignedRightShift:(b,e)=>b>>>e,lessThan:(b,e)=>b<e,lessThanOrEqual:(b,e)=>b<=e,greaterThan:(b,e)=>b>e,greaterThanOrEqual:(b,
e)=>b>=e,equal:(b,e)=>b===e,notEqual:(b,e)=>b!==e});c.__ZERO=c.BigInt(0);c.__MAX_SAFE=c.BigInt(Number.MAX_SAFE_INTEGER);c.__MIN_SAFE=c.BigInt(-Number.MAX_SAFE_INTEGER);c.numberIfSafe=b=>c.lessThan(b,c.__MAX_SAFE)&&c.greaterThan(b,c.__MIN_SAFE)?c.toNumber(b):b;c.BigUp=b=>c.__isBigInt(b)?b:c.BigInt(b)},function(G,V,a){(function(c,b){G.exports=b()})(this,function(){var c=Math.imul,b=Math.clz32,e=Math.abs,l=Math.max,r=Math.floor;class h extends Array{constructor(f,n){if(super(f),this.sign=n,f>h.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");
}static BigInt(f){var n=Number.isFinite;if("number"==typeof f){if(0===f)return h.__zero();if(h.__isOneDigitInt(f))return 0>f?h.__oneDigit(-f,!0):h.__oneDigit(f,!1);if(!n(f)||r(f)!==f)throw new RangeError("The number "+f+" cannot be converted to BigInt because it is not an integer");return h.__fromDouble(f)}if("string"==typeof f){n=h.__fromString(f);if(null===n)throw new SyntaxError("Cannot convert "+f+" to a BigInt");return n}if("boolean"==typeof f)return!0===f?h.__oneDigit(1,!1):h.__zero();if("object"==
typeof f){if(f.constructor===h)return f;f=h.__toPrimitive(f);return h.BigInt(f)}throw new TypeError("Cannot convert "+f+" to a BigInt");}toDebugString(){const f=["BigInt["];for(const n of this)f.push((n?(n>>>0).toString(16):n)+", ");return f.push("]"),f.join("")}toString(f=10){if(2>f||36<f)throw new RangeError("toString() radix argument must be between 2 and 36");return 0===this.length?"0":0==(f&f-1)?h.__toStringBasePowerOfTwo(this,f):h.__toStringGeneric(this,f,!1)}static toNumber(f){var n=f.length;
if(0===n)return 0;if(1===n){var d=f.__unsignedDigit(0);return f.sign?-d:d}var m=f.__digit(n-1),g=h.__clz30(m);d=30*n-g;if(1024<d)return f.sign?-Infinity:1/0;--d;let p=n-1;var k=g+3;g=(32===k?0:m<<k)>>>12;const q=k-12;n=12<=k?0:m<<20+k;k=20+k;for(0<q&&0<p&&(p--,m=f.__digit(p),g|=m>>>30-q,n=m<<q+2,k=q+2);0<k&&0<p;)p--,m=f.__digit(p),n|=30<=k?m<<k-30:m>>>30-k,k-=30;m=h.__decideRounding(f,k,p,m);if((1===m||0===m&&1==(1&n))&&(n=n+1>>>0,0===n&&(g++,0!=g>>>20&&(g=0,d++,1023<d))))return f.sign?-Infinity:
1/0;f=f.sign?-2147483648:0;return d=d+1023<<20,h.__kBitConversionInts[1]=f|d|g,h.__kBitConversionInts[0]=n,h.__kBitConversionDouble[0]}static unaryMinus(f){if(0===f.length)return f;const n=f.__copy();return n.sign=!f.sign,n}static bitwiseNot(f){return f.sign?h.__absoluteSubOne(f).__trim():h.__absoluteAddOne(f,!0)}static exponentiate(f,n){if(n.sign)throw new RangeError("Exponent must be positive");if(0===n.length)return h.__oneDigit(1,!1);if(0===f.length)return f;if(1===f.length&&1===f.__digit(0))return f.sign&&
0==(1&n.__digit(0))?h.unaryMinus(f):f;if(1<n.length)throw new RangeError("BigInt too big");n=n.__unsignedDigit(0);if(1===n)return f;if(n>=h.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===f.length&&2===f.__digit(0)){var d=1+(0|n/30);f=new h(d,f.sign&&0!=(1&n));f.__initializeDigits();return f.__setDigit(d-1,1<<n%30),f}d=null;let m=f;0!=(1&n)&&(d=f);for(n>>=1;0!==n;n>>=1)m=h.multiply(m,m),0!=(1&n)&&(null===d?d=m:d=h.multiply(d,m));return d}static multiply(f,n){if(0===f.length)return f;
if(0===n.length)return n;var d=f.length+n.length;30<=f.__clzmsd()+n.__clzmsd()&&d--;d=new h(d,f.sign!==n.sign);d.__initializeDigits();for(let m=0;m<f.length;m++)h.__multiplyAccumulate(n,f.__digit(m),d,m);return d.__trim()}static divide(f,n){if(0===n.length)throw new RangeError("Division by zero");if(0>h.__absoluteCompare(f,n))return h.__zero();const d=f.sign!==n.sign,m=n.__unsignedDigit(0);if(1===n.length&&32767>=m){if(1===m)return d===f.sign?f:h.unaryMinus(f);f=h.__absoluteDivSmall(f,m,null)}else f=
h.__absoluteDivLarge(f,n,!0,!1);return f.sign=d,f.__trim()}static remainder(f,n){if(0===n.length)throw new RangeError("Division by zero");if(0>h.__absoluteCompare(f,n))return f;const d=n.__unsignedDigit(0);if(1===n.length&&32767>=d){if(1===d)return h.__zero();n=h.__absoluteModSmall(f,d);return 0===n?h.__zero():h.__oneDigit(n,f.sign)}n=h.__absoluteDivLarge(f,n,!1,!0);return n.sign=f.sign,n.__trim()}static add(f,n){const d=f.sign;return d===n.sign?h.__absoluteAdd(f,n,d):0<=h.__absoluteCompare(f,n)?
h.__absoluteSub(f,n,d):h.__absoluteSub(n,f,!d)}static subtract(f,n){const d=f.sign;return d===n.sign?0<=h.__absoluteCompare(f,n)?h.__absoluteSub(f,n,d):h.__absoluteSub(n,f,!d):h.__absoluteAdd(f,n,d)}static leftShift(f,n){return 0===n.length||0===f.length?f:n.sign?h.__rightShiftByAbsolute(f,n):h.__leftShiftByAbsolute(f,n)}static signedRightShift(f,n){return 0===n.length||0===f.length?f:n.sign?h.__leftShiftByAbsolute(f,n):h.__rightShiftByAbsolute(f,n)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead");
}static lessThan(f,n){return 0>h.__compareToBigInt(f,n)}static lessThanOrEqual(f,n){return 0>=h.__compareToBigInt(f,n)}static greaterThan(f,n){return 0<h.__compareToBigInt(f,n)}static greaterThanOrEqual(f,n){return 0<=h.__compareToBigInt(f,n)}static equal(f,n){if(f.sign!==n.sign||f.length!==n.length)return!1;for(let d=0;d<f.length;d++)if(f.__digit(d)!==n.__digit(d))return!1;return!0}static notEqual(f,n){return!h.equal(f,n)}static bitwiseAnd(f,n){if(!f.sign&&!n.sign)return h.__absoluteAnd(f,n).__trim();
if(f.sign&&n.sign){const d=l(f.length,n.length)+1;f=h.__absoluteSubOne(f,d);n=h.__absoluteSubOne(n);return f=h.__absoluteOr(f,n,f),h.__absoluteAddOne(f,!0,f).__trim()}return f.sign&&([f,n]=[n,f]),h.__absoluteAndNot(f,h.__absoluteSubOne(n)).__trim()}static bitwiseXor(f,n){if(!f.sign&&!n.sign)return h.__absoluteXor(f,n).__trim();if(f.sign&&n.sign){var d=l(f.length,n.length);f=h.__absoluteSubOne(f,d);n=h.__absoluteSubOne(n);return h.__absoluteXor(f,n,f).__trim()}d=l(f.length,n.length)+1;f.sign&&([f,
n]=[n,f]);n=h.__absoluteSubOne(n,d);return n=h.__absoluteXor(n,f,n),h.__absoluteAddOne(n,!0,n).__trim()}static bitwiseOr(f,n){const d=l(f.length,n.length);if(!f.sign&&!n.sign)return h.__absoluteOr(f,n).__trim();if(f.sign&&n.sign)return f=h.__absoluteSubOne(f,d),n=h.__absoluteSubOne(n),f=h.__absoluteAnd(f,n,f),h.__absoluteAddOne(f,!0,f).__trim();f.sign&&([f,n]=[n,f]);n=h.__absoluteSubOne(n,d);return n=h.__absoluteAndNot(n,f,n),h.__absoluteAddOne(n,!0,n).__trim()}static asIntN(f,n){if(0===n.length)return n;
if(f=r(f),0>f)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===f)return h.__zero();if(f>=h.__kMaxLengthBits)return n;const d=0|(f+29)/30;if(n.length<d)return n;const m=n.__unsignedDigit(d-1),g=1<<(f-1)%30;if(n.length===d&&m<g)return n;if((m&g)!==g)return h.__truncateToNBits(f,n);if(!n.sign)return h.__truncateAndSubFromPowerOfTwo(f,n,!0);if(0==(m&g-1)){for(let p=d-2;0<=p;p--)if(0!==n.__digit(p))return h.__truncateAndSubFromPowerOfTwo(f,n,!1);return n.length===d&&m===
g?n:h.__truncateToNBits(f,n)}return h.__truncateAndSubFromPowerOfTwo(f,n,!1)}static asUintN(f,n){if(0===n.length)return n;if(f=r(f),0>f)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===f)return h.__zero();if(n.sign){if(f>h.__kMaxLengthBits)throw new RangeError("BigInt too big");return h.__truncateAndSubFromPowerOfTwo(f,n,!1)}if(f>=h.__kMaxLengthBits)return n;const d=0|(f+29)/30;if(n.length<d)return n;const m=f%30;return n.length!=d||0!==m&&0!=n.__digit(d-1)>>>m?h.__truncateToNBits(f,
n):n}static ADD(f,n){if(f=h.__toPrimitive(f),n=h.__toPrimitive(n),"string"==typeof f)return"string"!=typeof n&&(n=n.toString()),f+n;if("string"==typeof n)return f.toString()+n;if(f=h.__toNumeric(f),n=h.__toNumeric(n),h.__isBigInt(f)&&h.__isBigInt(n))return h.add(f,n);if("number"==typeof f&&"number"==typeof n)return f+n;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions");}static LT(f,n){return h.__compare(f,n,0)}static LE(f,n){return h.__compare(f,n,1)}static GT(f,n){return h.__compare(f,
n,2)}static GE(f,n){return h.__compare(f,n,3)}static EQ(f,n){for(;;){if(h.__isBigInt(f))return h.__isBigInt(n)?h.equal(f,n):h.EQ(n,f);if("number"==typeof f){if(h.__isBigInt(n))return h.__equalToNumber(n,f);if("object"!=typeof n)return f==n;n=h.__toPrimitive(n)}else if("string"==typeof f){if(h.__isBigInt(n))return f=h.__fromString(f),null!==f&&h.equal(f,n);if("object"!=typeof n)return f==n;n=h.__toPrimitive(n)}else if("boolean"==typeof f){if(h.__isBigInt(n))return h.__equalToNumber(n,+f);if("object"!=
typeof n)return f==n;n=h.__toPrimitive(n)}else if("symbol"==typeof f){if(h.__isBigInt(n))return!1;if("object"!=typeof n)return f==n;n=h.__toPrimitive(n)}else if("object"==typeof f){if("object"==typeof n&&n.constructor!==h)return f==n;f=h.__toPrimitive(f)}else return f==n}}static NE(f,n){return!h.EQ(f,n)}static __zero(){return new h(0,!1)}static __oneDigit(f,n){n=new h(1,n);return n.__setDigit(0,f),n}__copy(){const f=new h(this.length,this.sign);for(let n=0;n<this.length;n++)f[n]=this[n];return f}__trim(){let f=
this.length,n=this[f-1];for(;0===n;)f--,n=this[f-1],this.pop();return 0===f&&(this.sign=!1),this}__initializeDigits(){for(let f=0;f<this.length;f++)this[f]=0}static __decideRounding(f,n,d,m){if(0<n)return-1;if(0>n)n=-n-1;else{if(0===d)return-1;d--;m=f.__digit(d);n=29}n=1<<n;if(0==(m&n))return-1;if(--n,0!=(m&n))return 1;for(;0<d;)if(d--,0!==f.__digit(d))return 1;return 0}static __fromDouble(f){h.__kBitConversionDouble[0]=f;var n=(2047&h.__kBitConversionInts[1]>>>20)-1023,d=(0|n/30)+1;f=new h(d,0>f);
let m=1048575&h.__kBitConversionInts[1]|1048576,g=h.__kBitConversionInts[0];n%=30;let p;if(20>n){var k=20-n;p=k+32;n=m>>>k;m=m<<32-k|g>>>k;g<<=32-k}else 20===n?(p=32,n=m,m=g):(k=n-20,p=32-k,n=m<<k|g>>>32-k,m=g<<k),g=0;f.__setDigit(d-1,n);for(d-=2;0<=d;d--)0<p?(p-=30,n=m>>>2,m=m<<30|g>>>2,g<<=30):n=0,f.__setDigit(d,n);return f.__trim()}static __isWhitespace(f){return!!(13>=f&&9<=f)||(159>=f?32==f:131071>=f?160==f||5760==f:196607>=f?(f&=131071,10>=f||40==f||41==f||47==f||95==f||4096==f):65279==f)}static __fromString(f,
n=0){let d=0;const m=f.length;let g=0;if(g===m)return h.__zero();let p=f.charCodeAt(g);for(;h.__isWhitespace(p);){if(++g===m)return h.__zero();p=f.charCodeAt(g)}if(43===p){if(++g===m)return null;p=f.charCodeAt(g);d=1}else if(45===p){if(++g===m)return null;p=f.charCodeAt(g);d=-1}if(0===n){if(n=10,48===p){if(++g===m)return h.__zero();if(p=f.charCodeAt(g),88===p||120===p){if(n=16,++g===m)return null;p=f.charCodeAt(g)}else if(79===p||111===p){if(n=8,++g===m)return null;p=f.charCodeAt(g)}else if(66===
p||98===p){if(n=2,++g===m)return null;p=f.charCodeAt(g)}}}else if(16===n&&48===p){if(++g===m)return h.__zero();if(p=f.charCodeAt(g),88===p||120===p){if(++g===m)return null;p=f.charCodeAt(g)}}if(0!=d&&10!==n)return null;for(;48===p;){if(++g===m)return h.__zero();p=f.charCodeAt(g)}var k=m-g;let q=h.__kMaxBitsPerChar[n];var x=h.__kBitsPerCharTableMultiplier-1;if(k>1073741824/q)return null;k=new h(0|((q*k+x>>>h.__kBitsPerCharTableShift)+29)/30,!1);const v=10>n?n:10,w=10<n?n-10:0;if(0==(n&n-1)){q>>=h.__kBitsPerCharTableShift;
n=[];var C=[],F=!1;do{for(var L=0,z=0;;){if(p-48>>>0<v)x=p-48;else if((32|p)-97>>>0<w)x=(32|p)-87;else{F=!0;break}if(z+=q,L=L<<q|x,++g===m){F=!0;break}if(p=f.charCodeAt(g),30<z+q)break}n.push(L);C.push(z)}while(!F);h.__fillFromParts(k,n,C)}else{k.__initializeDigits();C=!1;F=0;do{L=0;for(z=1;;){if(p-48>>>0<v)x=p-48;else if((32|p)-97>>>0<w)x=(32|p)-87;else{C=!0;break}const D=z*n;if(1073741823<D)break;if(z=D,L=L*n+x,F++,++g===m){C=!0;break}p=f.charCodeAt(g)}x=30*h.__kBitsPerCharTableMultiplier-1;k.__inplaceMultiplyAdd(z,
L,0|(q*F+x>>>h.__kBitsPerCharTableShift)/30)}while(!C)}if(g!==m){if(!h.__isWhitespace(p))return null;for(g++;g<m;g++)if(p=f.charCodeAt(g),!h.__isWhitespace(p))return null}return k.sign=-1==d,k.__trim()}static __fillFromParts(f,n,d){let m=0,g=0,p=0;for(let k=n.length-1;0<=k;k--){const q=n[k],x=d[k];g|=q<<p;p+=x;30===p?(f.__setDigit(m++,g),p=0,g=0):30<p&&(f.__setDigit(m++,1073741823&g),p-=30,g=q>>>x-p)}if(0!==g){if(m>=f.length)throw Error("implementation bug");f.__setDigit(m++,g)}for(;m<f.length;m++)f.__setDigit(m,
0)}static __toStringBasePowerOfTwo(f,n){const d=f.length;var m=n-1;m=(85&m>>>1)+(85&m);m=(51&m>>>2)+(51&m);m=(15&m>>>4)+(15&m);--n;const g=f.__digit(d-1);var p=h.__clz30(g),k=0|(30*d-p+m-1)/m;if(f.sign&&k++,268435456<k)throw Error("string too long");p=Array(k);--k;var q=0,x=0;for(let v=0;v<d-1;v++){const w=f.__digit(v);q=(q|w<<x)&n;p[k--]=h.__kConversionChars[q];x=m-x;q=w>>>x;for(x=30-x;x>=m;)p[k--]=h.__kConversionChars[q&n],q>>>=m,x-=m}p[k--]=h.__kConversionChars[(q|g<<x)&n];for(q=g>>>m-x;0!==q;)p[k--]=
h.__kConversionChars[q&n],q>>>=m;if(f.sign&&(p[k--]="-"),-1!=k)throw Error("implementation bug");return p.join("")}static __toStringGeneric(f,n,d){var m=f.length;if(0===m)return"";if(1===m)return n=f.__unsignedDigit(0).toString(n),!1===d&&f.sign&&(n="-"+n),n;var g=30*m-h.__clz30(f.__digit(m-1));m=h.__kMaxBitsPerChar[n]-1;g*=h.__kBitsPerCharTableMultiplier;m=(0|(g+(m-1))/m)+1>>1;g=h.exponentiate(h.__oneDigit(n,!1),h.__oneDigit(m,!1));var p=g.__unsignedDigit(0);if(1===g.length&&32767>=p){g=new h(f.length,
!1);g.__initializeDigits();var k=0;for(let q=2*f.length-1;0<=q;q--)k=k<<15|f.__halfDigit(q),g.__setHalfDigit(q,0|k/p),k=0|k%p;p=k.toString(n)}else p=h.__absoluteDivLarge(f,g,!0,!0),g=p.quotient,p=p.remainder.__trim(),p=h.__toStringGeneric(p,n,!0);g.__trim();for(n=h.__toStringGeneric(g,n,!0);p.length<m;)p="0"+p;return!1===d&&f.sign&&(n="-"+n),n+p}static __unequalSign(f){return f?-1:1}static __absoluteGreater(f){return f?-1:1}static __absoluteLess(f){return f?1:-1}static __compareToBigInt(f,n){const d=
f.sign;if(d!==n.sign)return h.__unequalSign(d);f=h.__absoluteCompare(f,n);return 0<f?h.__absoluteGreater(d):0>f?h.__absoluteLess(d):0}static __compareToNumber(f,n){if(h.__isOneDigitInt(n)){const d=f.sign,m=0>n;if(d!==m)return h.__unequalSign(d);if(0===f.length){if(m)throw Error("implementation bug");return 0===n?0:-1}if(1<f.length)return h.__absoluteGreater(d);n=e(n);f=f.__unsignedDigit(0);return f>n?h.__absoluteGreater(d):f<n?h.__absoluteLess(d):0}return h.__compareToDouble(f,n)}static __compareToDouble(f,
n){if(n!==n)return n;if(n===1/0)return-1;if(-Infinity===n)return 1;const d=f.sign;if(d!==0>n)return h.__unequalSign(d);if(0===n)throw Error("implementation bug: should be handled elsewhere");if(0===f.length)return-1;h.__kBitConversionDouble[0]=n;n=2047&h.__kBitConversionInts[1]>>>20;if(2047==n)throw Error("implementation bug: handled elsewhere");var m=n-1023;if(0>m)return h.__absoluteGreater(d);n=f.length;var g=f.__digit(n-1),p=h.__clz30(g),k=30*n-p;m+=1;if(k<m)return h.__absoluteLess(d);if(k>m)return h.__absoluteGreater(d);
m=1048576|1048575&h.__kBitConversionInts[1];let q=h.__kBitConversionInts[0];p=29-p;if(p!==(0|(k-1)%30))throw Error("implementation bug");if(20>p){var x=20-p;p=x+32;k=m>>>x;m=m<<32-x|q>>>x;q<<=32-x}else 20===p?(p=32,k=m,m=q):(x=p-20,p=32-x,k=m<<x|q>>>32-x,m=q<<x),q=0;if(g>>>=0,k>>>=0,g>k)return h.__absoluteGreater(d);if(g<k)return h.__absoluteLess(d);for(n-=2;0<=n;n--){0<p?(p-=30,k=m>>>2,m=m<<30|q>>>2,q<<=30):k=0;g=f.__unsignedDigit(n);if(g>k)return h.__absoluteGreater(d);if(g<k)return h.__absoluteLess(d)}if(0!==
m||0!==q){if(0===p)throw Error("implementation bug");return h.__absoluteLess(d)}return 0}static __equalToNumber(f,n){return h.__isOneDigitInt(n)?0===n?0===f.length:1===f.length&&f.sign===0>n&&f.__unsignedDigit(0)===e(n):0===h.__compareToDouble(f,n)}static __comparisonResultToBool(f,n){return 0===n?0>f:1===n?0>=f:2===n?0<f:3===n?0<=f:void 0}static __compare(f,n,d){if(f=h.__toPrimitive(f),n=h.__toPrimitive(n),"string"==typeof f&&"string"==typeof n)switch(d){case 0:return f<n;case 1:return f<=n;case 2:return f>
n;case 3:return f>=n}if(h.__isBigInt(f)&&"string"==typeof n)return n=h.__fromString(n),null!==n&&h.__comparisonResultToBool(h.__compareToBigInt(f,n),d);if("string"==typeof f&&h.__isBigInt(n))return f=h.__fromString(f),null!==f&&h.__comparisonResultToBool(h.__compareToBigInt(f,n),d);if(f=h.__toNumeric(f),n=h.__toNumeric(n),h.__isBigInt(f)){if(h.__isBigInt(n))return h.__comparisonResultToBool(h.__compareToBigInt(f,n),d);if("number"!=typeof n)throw Error("implementation bug");return h.__comparisonResultToBool(h.__compareToNumber(f,
n),d)}if("number"!=typeof f)throw Error("implementation bug");if(h.__isBigInt(n))return h.__comparisonResultToBool(h.__compareToNumber(n,f),2^d);if("number"!=typeof n)throw Error("implementation bug");return 0===d?f<n:1===d?f<=n:2===d?f>n:3===d?f>=n:void 0}__clzmsd(){return h.__clz30(this.__digit(this.length-1))}static __absoluteAdd(f,n,d){if(f.length<n.length)return h.__absoluteAdd(n,f,d);if(0===f.length)return f;if(0===n.length)return f.sign===d?f:h.unaryMinus(f);var m=f.length;(0===f.__clzmsd()||
n.length===f.length&&0===n.__clzmsd())&&m++;d=new h(m,d);let g=m=0;for(;g<n.length;g++){const p=f.__digit(g)+n.__digit(g)+m;m=p>>>30;d.__setDigit(g,1073741823&p)}for(;g<f.length;g++)n=f.__digit(g)+m,m=n>>>30,d.__setDigit(g,1073741823&n);return g<d.length&&d.__setDigit(g,m),d.__trim()}static __absoluteSub(f,n,d){if(0===f.length)return f;if(0===n.length)return f.sign===d?f:h.unaryMinus(f);d=new h(f.length,d);let m=0,g=0;for(;g<n.length;g++){const p=f.__digit(g)-n.__digit(g)-m;m=1&p>>>30;d.__setDigit(g,
1073741823&p)}for(;g<f.length;g++)n=f.__digit(g)-m,m=1&n>>>30,d.__setDigit(g,1073741823&n);return d.__trim()}static __absoluteAddOne(f,n,d=null){const m=f.length;null===d?d=new h(m,n):d.sign=n;n=1;for(let g=0;g<m;g++){const p=f.__digit(g)+n;n=p>>>30;d.__setDigit(g,1073741823&p)}return 0!=n&&d.__setDigitGrow(m,1),d}static __absoluteSubOne(f,n){const d=f.length;n=n||d;const m=new h(n,!1);let g=1;for(let p=0;p<d;p++){const k=f.__digit(p)-g;g=1&k>>>30;m.__setDigit(p,1073741823&k)}if(0!=g)throw Error("implementation bug");
for(f=d;f<n;f++)m.__setDigit(f,0);return m}static __absoluteAnd(f,n,d=null){var m=f.length,g=n.length;let p=g;m<g&&(p=m,m=f,f=n,n=m);m=p;null===d?d=new h(m,!1):m=d.length;for(g=0;g<p;g++)d.__setDigit(g,f.__digit(g)&n.__digit(g));for(;g<m;g++)d.__setDigit(g,0);return d}static __absoluteAndNot(f,n,d=null){const m=f.length;var g=n.length;let p=g;m<g&&(p=m);g=m;null===d?d=new h(g,!1):g=d.length;let k=0;for(;k<p;k++)d.__setDigit(k,f.__digit(k)&~n.__digit(k));for(;k<m;k++)d.__setDigit(k,f.__digit(k));for(;k<
g;k++)d.__setDigit(k,0);return d}static __absoluteOr(f,n,d=null){let m=f.length;var g=n.length;let p=g;if(m<g){p=m;var k=f;f=n;m=g;n=k}g=m;null===d?d=new h(g,!1):g=d.length;for(k=0;k<p;k++)d.__setDigit(k,f.__digit(k)|n.__digit(k));for(;k<m;k++)d.__setDigit(k,f.__digit(k));for(;k<g;k++)d.__setDigit(k,0);return d}static __absoluteXor(f,n,d=null){let m=f.length;var g=n.length;let p=g;if(m<g){p=m;var k=f;f=n;m=g;n=k}g=m;null===d?d=new h(g,!1):g=d.length;for(k=0;k<p;k++)d.__setDigit(k,f.__digit(k)^n.__digit(k));
for(;k<m;k++)d.__setDigit(k,f.__digit(k));for(;k<g;k++)d.__setDigit(k,0);return d}static __absoluteCompare(f,n){var d=f.length-n.length;if(0!=d)return d;for(d=f.length-1;0<=d&&f.__digit(d)===n.__digit(d);)d--;return 0>d?0:f.__unsignedDigit(d)>n.__unsignedDigit(d)?1:-1}static __multiplyAccumulate(f,n,d,m){if(0!==n){var g=32767&n,p=n>>>15,k=n=0;for(let w,C=0;C<f.length;C++,m++){w=d.__digit(m);var q=f.__digit(C),x=32767&q,v=q>>>15;q=h.__imul(x,g);x=h.__imul(x,p);const F=h.__imul(v,g);v=h.__imul(v,p);
w+=k+q+n;n=w>>>30;w&=1073741823;w+=((32767&x)<<15)+((32767&F)<<15);n+=w>>>30;k=v+(x>>>15)+(F>>>15);d.__setDigit(m,1073741823&w)}for(;0!=n||0!==k;m++)f=d.__digit(m),f+=n+k,k=0,n=f>>>30,d.__setDigit(m,1073741823&f)}}static __internalMultiplyAdd(f,n,d,m,g){let p=0;for(let x=0;x<m;x++){var k=f.__digit(x),q=h.__imul(32767&k,n);k=h.__imul(k>>>15,n);q=q+((32767&k)<<15)+p+d;d=q>>>30;p=k>>>15;g.__setDigit(x,1073741823&q)}if(g.length>m)for(g.__setDigit(m++,d+p);m<g.length;)g.__setDigit(m++,0);else if(0!==d+
p)throw Error("implementation bug");}__inplaceMultiplyAdd(f,n,d){d>this.length&&(d=this.length);const m=32767&f;f>>>=15;let g=0;for(let x=0;x<d;x++){var p=this.__digit(x),k=32767&p,q=p>>>15;p=h.__imul(k,m);k=h.__imul(k,f);const v=h.__imul(q,m);q=h.__imul(q,f);p=n+p+g;g=p>>>30;p&=1073741823;p+=((32767&k)<<15)+((32767&v)<<15);g+=p>>>30;n=q+(k>>>15)+(v>>>15);this.__setDigit(x,1073741823&p)}if(0!=g||0!==n)throw Error("implementation bug");}static __absoluteDivSmall(f,n,d=null){null===d&&(d=new h(f.length,
!1));let m=0;for(let g,p=2*f.length-1;0<=p;p-=2){g=(m<<15|f.__halfDigit(p))>>>0;const k=0|g/n;m=0|g%n;g=(m<<15|f.__halfDigit(p-1))>>>0;const q=0|g/n;m=0|g%n;d.__setDigit(p>>>1,k<<15|q)}return d}static __absoluteModSmall(f,n){let d=0;for(let m=2*f.length-1;0<=m;m--)d=0|((d<<15|f.__halfDigit(m))>>>0)%n;return d}static __absoluteDivLarge(f,n,d,m){const g=n.__halfDigitLength(),p=n.length;var k=f.__halfDigitLength()-g;let q=null;d&&(q=new h(k+2>>>1,!1),q.__initializeDigits());const x=new h(g+2>>>1,!1);
x.__initializeDigits();const v=h.__clz15(n.__halfDigit(g-1));0<v&&(n=h.__specialLeftShift(n,v,0));f=h.__specialLeftShift(f,v,1);const w=n.__halfDigit(g-1);let C=0;for(let F,L=k;0<=L;L--){F=32767;k=f.__halfDigit(L+g);if(k!==w){k=(k<<15|f.__halfDigit(L+g-1))>>>0;F=0|k/w;k=0|k%w;const z=n.__halfDigit(g-2),D=f.__halfDigit(L+g-2);for(;h.__imul(F,z)>>>0>(k<<16|D)>>>0&&(F--,k+=w,!(32767<k)););}h.__internalMultiplyAdd(n,F,0,p,x);k=f.__inplaceSub(x,L,g+1);0!==k&&(k=f.__inplaceAdd(n,L,g),f.__setHalfDigit(L+
g,32767&f.__halfDigit(L+g)+k),F--);d&&(1&L?C=F<<15:q.__setDigit(L>>>1,C|F))}if(m)return f.__inplaceRightShift(v),d?{quotient:q,remainder:f}:f;if(d)return q;throw Error("unreachable");}static __clz15(f){return h.__clz30(f)-15}__inplaceAdd(f,n,d){let m=0;for(let g=0;g<d;g++){const p=this.__halfDigit(n+g)+f.__halfDigit(g)+m;m=p>>>15;this.__setHalfDigit(n+g,32767&p)}return m}__inplaceSub(f,n,d){let m=0;if(1&n){n>>=1;for(var g=this.__digit(n),p=32767&g,k=0;k<d-1>>>1;k++){var q=f.__digit(k);g=(g>>>15)-
(32767&q)-m;m=1&g>>>15;this.__setDigit(n+k,(32767&g)<<15|32767&p);g=this.__digit(n+k+1);p=(32767&g)-(q>>>15)-m;m=1&p>>>15}q=f.__digit(k);const x=(g>>>15)-(32767&q)-m;m=1&x>>>15;this.__setDigit(n+k,(32767&x)<<15|32767&p);if(n+k+1>=this.length)throw new RangeError("out of bounds");0==(1&d)&&(g=this.__digit(n+k+1),p=(32767&g)-(q>>>15)-m,m=1&p>>>15,this.__setDigit(n+f.length,1073709056&g|32767&p))}else{n>>=1;for(p=0;p<f.length-1;p++)g=this.__digit(n+p),q=f.__digit(p),k=(32767&g)-(32767&q)-m,m=1&k>>>15,
g=(g>>>15)-(q>>>15)-m,m=1&g>>>15,this.__setDigit(n+p,(32767&g)<<15|32767&k);k=this.__digit(n+p);f=f.__digit(p);g=(32767&k)-(32767&f)-m;m=1&g>>>15;q=0;0==(1&d)&&(q=(k>>>15)-(f>>>15)-m,m=1&q>>>15);this.__setDigit(n+p,(32767&q)<<15|32767&g)}return m}__inplaceRightShift(f){if(0!==f){var n=this.__digit(0)>>>f,d=this.length-1;for(let m=0;m<d;m++){const g=this.__digit(m+1);this.__setDigit(m,1073741823&g<<30-f|n);n=g>>>f}this.__setDigit(d,n)}}static __specialLeftShift(f,n,d){const m=f.length,g=new h(m+d,
!1);if(0===n){for(n=0;n<m;n++)g.__setDigit(n,f.__digit(n));return 0<d&&g.__setDigit(m,0),g}let p=0;for(let k=0;k<m;k++){const q=f.__digit(k);g.__setDigit(k,1073741823&q<<n|p);p=q>>>30-n}return 0<d&&g.__setDigit(m,p),g}static __leftShiftByAbsolute(f,n){var d=h.__toShiftAmount(n);if(0>d)throw new RangeError("BigInt too big");n=0|d/30;var m=d%30;const g=f.length,p=0!==m&&0!=f.__digit(g-1)>>>30-m;var k=g+n+(p?1:0);d=new h(k,f.sign);if(0===m){for(m=0;m<n;m++)d.__setDigit(m,0);for(;m<k;m++)d.__setDigit(m,
f.__digit(m-n))}else{k=0;for(var q=0;q<n;q++)d.__setDigit(q,0);for(q=0;q<g;q++){const x=f.__digit(q);d.__setDigit(q+n,1073741823&x<<m|k);k=x>>>30-m}if(p)d.__setDigit(g+n,k);else if(0!==k)throw Error("implementation bug");}return d.__trim()}static __rightShiftByAbsolute(f,n){var d=f.length,m=f.sign,g=h.__toShiftAmount(n);if(0>g)return h.__rightShiftByMaximum(m);n=0|g/30;var p=g%30,k=d-n;if(0>=k)return h.__rightShiftByMaximum(m);g=!1;if(m)if(0!=(f.__digit(n)&(1<<p)-1))g=!0;else for(var q=0;q<n;q++)if(0!==
f.__digit(q)){g=!0;break}g&&0===p&&0==~f.__digit(d-1)&&k++;m=new h(k,m);if(0===p)for(m.__setDigit(k-1,0),p=n;p<d;p++)m.__setDigit(p-n,f.__digit(p));else{k=f.__digit(n)>>>p;d=d-n-1;for(q=0;q<d;q++){const x=f.__digit(q+n+1);m.__setDigit(q,1073741823&x<<30-p|k);k=x>>>p}m.__setDigit(d,k)}return g&&(m=h.__absoluteAddOne(m,!0,m)),m.__trim()}static __rightShiftByMaximum(f){return f?h.__oneDigit(1,!0):h.__zero()}static __toShiftAmount(f){if(1<f.length)return-1;f=f.__unsignedDigit(0);return f>h.__kMaxLengthBits?
-1:f}static __toPrimitive(f,n="default"){if("object"!=typeof f||f.constructor===h)return f;const d=f[Symbol.toPrimitive];if(d){f=d(n);if("object"!=typeof f)return f;throw new TypeError("Cannot convert object to primitive value");}if(n=f.valueOf)if(n=n.call(f),"object"!=typeof n)return n;if(n=f.toString)if(f=n.call(f),"object"!=typeof f)return f;throw new TypeError("Cannot convert object to primitive value");}static __toNumeric(f){return h.__isBigInt(f)?f:+f}static __isBigInt(f){return"object"==typeof f&&
null!==f&&f.constructor===h}static __truncateToNBits(f,n){var d=0|(f+29)/30;const m=new h(d,n.sign);--d;for(let g=0;g<d;g++)m.__setDigit(g,n.__digit(g));n=n.__digit(d);0!=f%30&&(f=32-f%30,n=n<<f>>>f);return m.__setDigit(d,n),m.__trim()}static __truncateAndSubFromPowerOfTwo(f,n,d){var m=Math.min,g=0|(f+29)/30;d=new h(g,d);let p=0;--g;var k=0;for(m=m(g,n.length);p<m;p++){const q=0-n.__digit(p)-k;k=1&q>>>30;d.__setDigit(p,1073741823&q)}for(;p<g;p++)d.__setDigit(p,0|1073741823&-k);n=g<n.length?n.__digit(g):
0;f%=30;0==f?k=0-n-k&1073741823:(f=32-f,n=n<<f>>>f,f=1<<32-f,k=f-n-k,k&=f-1);return d.__setDigit(g,k),d.__trim()}__digit(f){return this[f]}__unsignedDigit(f){return this[f]>>>0}__setDigit(f,n){this[f]=0|n}__setDigitGrow(f,n){this[f]=0|n}__halfDigitLength(){const f=this.length;return 32767>=this.__unsignedDigit(f-1)?2*f-1:2*f}__halfDigit(f){return 32767&this[f>>>1]>>>15*(1&f)}__setHalfDigit(f,n){const d=f>>>1,m=this.__digit(d);this.__setDigit(d,1&f?32767&m|n<<15:1073709056&m|32767&n)}static __digitPow(f,
n){let d=1;for(;0<n;)1&n&&(d*=f),n>>>=1,f*=f;return d}static __isOneDigitInt(f){return(1073741823&f)===f}}return h.__kMaxLength=33554432,h.__kMaxLengthBits=h.__kMaxLength<<5,h.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],h.__kBitsPerCharTableShift=5,h.__kBitsPerCharTableMultiplier=1<<h.__kBitsPerCharTableShift,h.__kConversionChars="0123456789abcdefghijklmnopqrstuvwxyz".split(""),h.__kBitConversionBuffer=
new ArrayBuffer(8),h.__kBitConversionDouble=new Float64Array(h.__kBitConversionBuffer),h.__kBitConversionInts=new Int32Array(h.__kBitConversionBuffer),h.__clz30=b?function(f){return b(f)-2}:function(f){var n=Math.LN2,d=Math.log;return 0===f?30:0|29-(0|d(f>>>0)/n)},h.__imul=c||function(f,n){return 0|f*n},h})},function(G,V){[..."abc"].flat();"a".matchAll(/a/g)},function(G,V,a){(function(c,b){(function(e,l){function r(F){delete q[F]}function h(F){if(x)setTimeout(h,0,F);else{var L=q[F];if(L){x=!0;try{var z=
L.callback,D=L.args;switch(D.length){case 0:z();break;case 1:z(D[0]);break;case 2:z(D[0],D[1]);break;case 3:z(D[0],D[1],D[2]);break;default:z.apply(l,D)}}finally{r(F),x=!1}}}}function f(){w=function(F){b.nextTick(function(){h(F)})}}function n(){if(e.postMessage&&!e.importScripts){var F=!0,L=e.onmessage;e.onmessage=function(){F=!1};e.postMessage("","*");e.onmessage=L;return F}}function d(){var F="setImmediate$"+Math.random()+"$",L=function(z){z.source===e&&"string"===typeof z.data&&0===z.data.indexOf(F)&&
h(+z.data.slice(F.length))};e.addEventListener?e.addEventListener("message",L,!1):e.attachEvent("onmessage",L);w=function(z){e.postMessage(F+z,"*")}}function m(){var F=new MessageChannel;F.port1.onmessage=function(L){h(L.data)};w=function(L){F.port2.postMessage(L)}}function g(){var F=v.documentElement;w=function(L){var z=v.createElement("script");z.onreadystatechange=function(){h(L);z.onreadystatechange=null;F.removeChild(z);z=null};F.appendChild(z)}}function p(){w=function(F){setTimeout(h,0,F)}}
if(!e.setImmediate){var k=1,q={},x=!1,v=e.document,w,C=Object.getPrototypeOf&&Object.getPrototypeOf(e);C=C&&C.setTimeout?C:e;"[object process]"==={}.toString.call(e.process)?f():n()?d():e.MessageChannel?m():v&&"onreadystatechange"in v.createElement("script")?g():p();C.setImmediate=function(F){"function"!==typeof F&&(F=new Function(""+F));for(var L=Array(arguments.length-1),z=0;z<L.length;z++)L[z]=arguments[z+1];q[k]={callback:F,args:L};w(k);return k++};C.clearImmediate=r}})("undefined"===typeof self?
"undefined"===typeof c?this:c:self)}).call(this,a(0),a(9))},function(G,V){function a(){throw Error("setTimeout has not been defined");}function c(){throw Error("clearTimeout has not been defined");}function b(q){if(n===setTimeout)return setTimeout(q,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(q,0);try{return n(q,0)}catch(x){try{return n.call(null,q,0)}catch(v){return n.call(this,q,0)}}}function e(q){if(d===clearTimeout)return clearTimeout(q);if((d===c||!d)&&clearTimeout)return d=
clearTimeout,clearTimeout(q);try{return d(q)}catch(x){try{return d.call(null,q)}catch(v){return d.call(this,q)}}}function l(){g&&p&&(g=!1,p.length?m=p.concat(m):k=-1,m.length&&r())}function r(){if(!g){var q=b(l);g=!0;for(var x=m.length;x;){p=m;for(m=[];++k<x;)p&&p[k].run();k=-1;x=m.length}p=null;g=!1;e(q)}}function h(q,x){this.fun=q;this.array=x}function f(){}G=G.exports={};try{var n="function"===typeof setTimeout?setTimeout:a}catch(q){n=a}try{var d="function"===typeof clearTimeout?clearTimeout:c}catch(q){d=
c}var m=[],g=!1,p,k=-1;G.nextTick=function(q){var x=Array(arguments.length-1);if(1<arguments.length)for(var v=1;v<arguments.length;v++)x[v-1]=arguments[v];m.push(new h(q,x));1!==m.length||g||b(r)};h.prototype.run=function(){this.fun.apply(null,this.array)};G.title="browser";G.browser=!0;G.env={};G.argv=[];G.version="";G.versions={};G.on=f;G.addListener=f;G.once=f;G.off=f;G.removeListener=f;G.removeAllListeners=f;G.emit=f;G.prependListener=f;G.prependOnceListener=f;G.listeners=function(q){return[]};
G.binding=function(q){throw Error("process.binding is not supported");};G.cwd=function(){return"/"};G.chdir=function(q){throw Error("process.chdir is not supported");};G.umask=function(){return 0}},function(G,V){Sk.asserts={};Sk.asserts.assert=function(a,c){return a};Sk.exportSymbol("Sk.asserts.assert",Sk.asserts.assert);Sk.asserts.fail=function(a){};Sk.exportSymbol("Sk.asserts.fail",Sk.asserts.fail)},function(G,V){Sk.bool_check=function(a,c){if(void 0===a||null===a||"boolean"!==typeof a)throw Error("must specify "+
c+" and it must be a boolean");};Sk.python2={print_function:!1,division:!1,absolute_import:null,unicode_literals:!1,python3:!1,class_repr:!1,inherit_from_object:!1,super_args:!1,octal_number_literal:!1,bankers_rounding:!1,python_version:!1,dunder_round:!1,exceptions:!1,no_long_type:!1,ceil_floor_int:!1,silent_octal_literal:!0};Sk.python3={print_function:!0,division:!0,absolute_import:null,unicode_literals:!0,python3:!0,class_repr:!0,inherit_from_object:!0,super_args:!0,octal_number_literal:!0,bankers_rounding:!0,
python_version:!0,dunder_round:!0,exceptions:!0,no_long_type:!0,ceil_floor_int:!0,silent_octal_literal:!1};Sk.configure=function(a){Sk.output=a.output||Sk.output;Sk.asserts.assert("function"===typeof Sk.output);Sk.debugout=a.debugout||Sk.debugout;Sk.asserts.assert("function"===typeof Sk.debugout);Sk.uncaughtException=a.uncaughtException||Sk.uncaughtException;Sk.asserts.assert("function"===typeof Sk.uncaughtException);Sk.read=a.read||Sk.read;Sk.asserts.assert("function"===typeof Sk.read);Sk.nonreadopen=
a.nonreadopen||!1;Sk.asserts.assert("boolean"===typeof Sk.nonreadopen);Sk.fileopen=a.fileopen||void 0;Sk.asserts.assert("function"===typeof Sk.fileopen||"undefined"===typeof Sk.fileopen);Sk.filewrite=a.filewrite||void 0;Sk.asserts.assert("function"===typeof Sk.filewrite||"undefined"===typeof Sk.filewrite);Sk.timeoutMsg=a.timeoutMsg||Sk.timeoutMsg;Sk.asserts.assert("function"===typeof Sk.timeoutMsg);Sk.exportSymbol("Sk.timeoutMsg",Sk.timeoutMsg);Sk.sysargv=a.sysargv||Sk.sysargv;Sk.asserts.assert(Sk.isArrayLike(Sk.sysargv));
Sk.__future__=a.__future__||Sk.python3;Sk.bool_check(Sk.__future__.print_function,"Sk.__future__.print_function");Sk.bool_check(Sk.__future__.division,"Sk.__future__.division");Sk.bool_check(Sk.__future__.unicode_literals,"Sk.__future__.unicode_literals");Sk.bool_check(Sk.__future__.class_repr,"Sk.__future__.class_repr");Sk.bool_check(Sk.__future__.inherit_from_object,"Sk.__future__.inherit_from_object");Sk.bool_check(Sk.__future__.super_args,"Sk.__future__.super_args");Sk.bool_check(Sk.__future__.octal_number_literal,
"Sk.__future__.octal_number_literal");Sk.bool_check(Sk.__future__.bankers_rounding,"Sk.__future__.bankers_rounding");Sk.bool_check(Sk.__future__.python_version,"Sk.__future__.python_version");Sk.bool_check(Sk.__future__.dunder_round,"Sk.__future__.dunder_round");Sk.bool_check(Sk.__future__.exceptions,"Sk.__future__.exceptions");Sk.bool_check(Sk.__future__.no_long_type,"Sk.__future__.no_long_type");Sk.bool_check(Sk.__future__.ceil_floor_int,"Sk.__future__.ceil_floor_int");Sk.bool_check(Sk.__future__.silent_octal_literal,
"Sk.__future__.silent_octal_literal");Sk.imageProxy=a.imageProxy||"http://localhost:8080/320x";Sk.asserts.assert("string"===typeof Sk.imageProxy||"function"===typeof Sk.imageProxy);Sk.inputfun=a.inputfun||Sk.inputfun;Sk.asserts.assert("function"===typeof Sk.inputfun);Sk.inputfunTakesPrompt=a.inputfunTakesPrompt||!1;Sk.asserts.assert("boolean"===typeof Sk.inputfunTakesPrompt);Sk.retainGlobals=a.retainglobals||a.retainGlobals||!1;Sk.asserts.assert("boolean"===typeof Sk.retainGlobals);Sk.debugging=a.debugging||
!1;Sk.asserts.assert("boolean"===typeof Sk.debugging);Sk.killableWhile=a.killableWhile||!1;Sk.asserts.assert("boolean"===typeof Sk.killableWhile);Sk.killableFor=a.killableFor||!1;Sk.asserts.assert("boolean"===typeof Sk.killableFor);Sk.signals=a.signals;Sk.signals=!0===Sk.signals?{listeners:[],addEventListener(c){Sk.signals.listeners.push(c)},removeEventListener(c){c=Sk.signals.listeners.indexOf(c);0<=c&&Sk.signals.listeners.splice(c,1)},signal(c,b){for(var e=0;e<Sk.signals.listeners.length;e++)Sk.signals.listeners[e].call(null,
c,b)}}:null;Sk.asserts.assert("object"===typeof Sk.signals);Sk.breakpoints=a.breakpoints||function(){return!0};Sk.asserts.assert("function"===typeof Sk.breakpoints);Sk.setTimeout=a.setTimeout;void 0===Sk.setTimeout&&(Sk.setTimeout="function"===typeof setTimeout?function(c,b){setTimeout(c,b)}:function(c,b){c()});Sk.asserts.assert("function"===typeof Sk.setTimeout);"execLimit"in a&&(Sk.execLimit=a.execLimit);"yieldLimit"in a&&(Sk.yieldLimit=a.yieldLimit);a.syspath&&(Sk.syspath=a.syspath,Sk.asserts.assert(Sk.isArrayLike(Sk.syspath)),
Sk.realsyspath=void 0,Sk.sysmodules=new Sk.builtin.dict([]));Sk.misceval.softspace_=!1;Sk.misceval.defaultHandlers=a.suspensionHandlers||{};Sk.switch_version(Sk.__future__.python3);Sk.builtin.str.$next=Sk.__future__.python3?new Sk.builtin.str("__next__"):new Sk.builtin.str("next");Sk.setupOperators(Sk.__future__.python3);Sk.setupDunderMethods(Sk.__future__.python3);Sk.setupObjects(Sk.__future__.python3);Sk.token.setupTokens(Sk.__future__.python3)};Sk.exportSymbol("Sk.configure",Sk.configure);Sk.uncaughtException=
function(a){throw a;};Sk.uncaughtException=function(a){throw a;};Sk.exportSymbol("Sk.uncaughtException",Sk.uncaughtException);Sk.timeoutMsg=function(){return"Program exceeded run time limit."};Sk.exportSymbol("Sk.timeoutMsg",Sk.timeoutMsg);Sk.execLimit=Number.POSITIVE_INFINITY;Sk.yieldLimit=Number.POSITIVE_INFINITY;Sk.output=function(a){};Sk.read=function(a){if(void 0===Sk.builtinFiles)throw"skulpt-stdlib.js has not been loaded";if(void 0===Sk.builtinFiles.files[a])throw"File not found: '"+a+"'";
return Sk.builtinFiles.files[a]};Sk.sysargv=[];Sk.getSysArgv=function(){return Sk.sysargv};Sk.exportSymbol("Sk.getSysArgv",Sk.getSysArgv);Sk.syspath=[];Sk.inBrowser=void 0!==Sk.global.document;Sk.debugout=function(a){};(function(){void 0!==Sk.global.write?Sk.output=Sk.global.write:void 0!==Sk.global.console&&void 0!==Sk.global.console.log?Sk.output=function(a){Sk.global.console.log(a)}:void 0!==Sk.global.print&&(Sk.output=Sk.global.print);void 0!==Sk.global.console&&void 0!==Sk.global.console.log?
Sk.debugout=function(a){Sk.global.console.log(a)}:void 0!==Sk.global.print&&(Sk.debugout=Sk.global.print)})();Sk.inputfun=function(a){return window.prompt(a)};Sk.setup_method_mappings=function(){};Sk.setupDictIterators=function(a){};Sk.switch_version=function(a){const c={float_:{method_names:["__round__"],2:[!1],3:[!0]},int_:{method_names:["__round__"],2:[!1],3:[!0]},list:{method_names:["clear","copy","sort"],2:[!1,!1,!0],3:[!0,!0,!0]},dict:{method_names:["has_key","keys","items","values"],2:[!0,
!0,!0,!0],3:[!1,!0,!0,!0]}};for(let r in c){const h=Sk.builtin[r],f=c[r].method_names;var b=c[r][3];if(a&&void 0===h.py3$methods)break;else if(void 0===h.py3$methods){h.py3$methods={};for(var e=0;e<f.length;e++){var l=f[e];b[e]&&(h.py3$methods[l]=h.prototype[l].d$def)}}a?e=h.py3$methods:(b=c[r][2],e=h.py2$methods);for(l=0;l<f.length;l++){const n=f[l];delete h.prototype[n];b[l]&&(h.prototype[n]=new Sk.builtin.method_descriptor(h,e[n]))}}};Sk.exportSymbol("Sk.__future__",Sk.__future__);Sk.exportSymbol("Sk.inputfun",
Sk.inputfun)},function(G,V){function a(g,p,k){if(g.hasOwnProperty(p)){const q=g[p];q instanceof Sk.builtin.func&&(g[p]=new Sk.builtin[k](q))}}function c(g){return this.prototype[g.$mangled]}function b(g){g=g.$mangled;const p=this.prototype.tp$mro;for(let k=0;k<p.length;++k){const q=p[k].prototype;if(q.hasOwnProperty(g))return q[g]}}function e(g,p,k,q){const x=l(k),v=p.prototype;Sk.abstr.setUpInheritance(g.v,p,x,q);Object.defineProperties(v,{sk$prototypical:{value:!0,writable:!0},tp$bases:{value:k,
writable:!0},tp$mro:{value:null,writable:!0},ht$type:{value:!0,writable:!0},ht$name:{value:g,writable:!0},ht$qualname:{value:g,writable:!0}});v.tp$mro=p.$buildMRO();Object.defineProperties(p,{$typeLookup:{value:v.sk$prototypical?c:b,writable:!0},sk$klass:{value:!0,writable:!0}})}function l(g){function p(w){return w.sk$solidBase||w.sk$solidSlotBase?w:p(w.prototype.tp$base)}0===g.length&&g.push(Sk.builtin.object);let k,q,x,v;for(let w=0;w<g.length;w++){v=g[w];if(!Sk.builtin.checkClass(v))throw new Sk.builtin.TypeError("bases must be 'type' objects");
if(v.sk$unacceptableBase)throw new Sk.builtin.TypeError("type '"+v.prototype.tp$name+"' is not an acceptable base type");x=p(v);if(void 0===q)q=x,k=v;else if(!q.$isSubType(x))if(x.$isSubType(q))q=x,k=v;else throw new Sk.builtin.TypeError("multiple bases have instance layout conflicts");}return k}function r(g,p){const k=p.prototype,q=k.sk$nslots||0;Object.defineProperty(k,"sk$nslots",{value:q+g.length,writable:!0});g.length&&Object.defineProperty(p,"sk$solidSlotBase",{value:!0,writable:!0});g.forEach((x,
v)=>{v+=q;const w=Sk.builtin.str.$fixReserved(x);k[w]=new Sk.builtin.getset_descriptor(p,{$get(){const C=this.$s[v];if(void 0===C)throw new Sk.builtin.AttributeError(x);return C},$set(C){this.$s[v]=C}})})}function h(g){for(;null!==g.prototype.tp$base;){if(void 0===g.sk$klass&&g.prototype.hasOwnProperty("__dict__"))return g=g.prototype.__dict__,Sk.builtin.checkDataDescr(g)?g:void 0;g=g.prototype.tp$base}}function f(g,p,k){if(void 0===g.sk$klass)throw new Sk.builtin.TypeError("can't set "+g.prototype.tp$name+
"."+k.$jsstr());if(void 0===p)throw new Sk.builtin.TypeError("can't delete "+g.prototype.tp$name+"."+k.$jsstr());}function n(g,p){g=(new Sk.builtin.super_(g,g)).tp$getattr(Sk.builtin.str.$initsubclass);Sk.misceval.callsimArray(g,[],p)}function d(g){const p=g.prototype;Object.keys(p).forEach(k=>{const q=Sk.abstr.lookupSpecial(p[k],Sk.builtin.str.$setname);if(void 0!==q){const x=Sk.unfixReserved(k);try{Sk.misceval.callsimArray(q,[g,new Sk.builtin.str(x)])}catch(v){throw k=new Sk.builtin.RuntimeError("Error calling __set_name__ on '"+
Sk.abstr.typeName(p[k])+"' instance '"+x+"' in '"+g.prototype.tp$name+"'"),k.$cause=v,k;}}})}void 0===Sk.builtin&&(Sk.builtin={});Sk.builtin.type=function(g){this instanceof Sk.builtin.type&&Sk.asserts.fail("calling new Sk.builtin.type is not safe");return g.ob$type};Object.defineProperties(Sk.builtin.type.prototype,{call:{value:Function.prototype.call},apply:{value:Function.prototype.apply},tp$slots:{value:{tp$doc:"type(object_or_name, bases, dict)\ntype(object) -> the object's type\ntype(name, bases, dict) -> a new type",
tp$call:function(g,p){if(this===Sk.builtin.type){if(1===g.length&&(void 0===p||!p.length))return g[0].ob$type;if(3!==g.length)throw new Sk.builtin.TypeError("type() takes 1 or 3 arguments");}let k=this.prototype.tp$new(g,p);if(k.$isSuspension)return Sk.misceval.chain(k,q=>{k=q;if(k.ob$type.$isSubType(this))return k.tp$init(g,p)},()=>k);if(k.ob$type.$isSubType(this)){const q=k.tp$init(g,p);return void 0!==q&&q.$isSuspension?Sk.misceval.chain(q,()=>k):k}return k},tp$new:function(g,p){if(3!==g.length){if(1===
g.length&&(void 0===p||!p.length))return g[0].ob$type;throw new Sk.builtin.TypeError("type() takes 1 or 3 arguments");}const k=g[0];var q=g[1];const x=g[2];if("dict"!==x.tp$name)throw new Sk.builtin.TypeError("type() argument 3 must be dict, not "+Sk.abstr.typeName(x));if(!Sk.builtin.checkString(k))throw new Sk.builtin.TypeError("type() argument 1 must be str, not "+Sk.abstr.typeName(k));if("tuple"!==q.tp$name)throw new Sk.builtin.TypeError("type() argument 2 must be tuple, not "+Sk.abstr.typeName(q));
q=q.sk$asarray();g=function(){this.sk$hasDict&&(this.$d=new Sk.builtin.dict);this.$s=[]};e(k,g,q,this.constructor);const v=g.prototype;Sk.globals&&(v.__module__=Sk.globals.__name__);v.__doc__=Sk.builtin.none.none$;q=x.quick$lookup(Sk.builtin.str.$slots);let w=void 0===q,C=void 0!==g.$typeLookup(Sk.builtin.str.$dict),F;void 0!==q&&(F=new Set,q=Sk.builtin.checkString(q)?[q]:Sk.misceval.arrayFromIterable(q),q.forEach(L=>{if(!Sk.builtin.checkString(L))throw new Sk.builtin.TypeError("__slots__ items must be strings, not '"+
Sk.abstr.typeName(L)+"'");if(!L.$isIdentifier())throw new Sk.builtin.TypeError("__slots__ must be identifiers");if("__dict__"===L.v){if(C)throw new Sk.builtin.TypeError("__dict__ slot disallowed: we already got one");w=!0}else F.add(Sk.mangleName(k,L).v)}),q=[...F].sort((L,z)=>L.localeCompare(z)),r(q,g));w&&!C&&(v.__dict__=new Sk.builtin.getset_descriptor(g,m),C=!0);Object.defineProperties(v,{ht$slots:{value:q||null,writable:!0},sk$hasDict:{value:C,writable:!0}});x.$items().forEach(([L,z])=>{if(Sk.builtin.checkString(L)){if(F&&
F.has(L.v))throw new Sk.builtin.ValueError("'"+L.toString()+"' in __slots__ conflicts with class variable");v[L.$mangled]=z}});if(v.hasOwnProperty("__qualname__")){q=v.__qualname__;if(!Sk.builtin.checkString(q))throw new Sk.builtin.TypeError("type __qualname__ must be a str, not '"+Sk.abstr.typeName(q)+"'");v.ht$qualname=q}q=g.prototype;a(q,"__init_subclass__","classmethod");a(q,"__new__","staticmethod");a(q,"__class_getitem__","classmethod");g.$allocateSlots();d(g);n(g,p);return g},tp$init:function(g,
p){if(g&&1==g.length&&p&&p.length)throw new Sk.builtin.TypeError("type.__init__() takes no keyword arguments");if(3!=g.length&&1!=g.length)throw new Sk.builtin.TypeError("type.__init__() takes 1 or 3 arguments");return Sk.builtin.object.prototype.tp$init.call(this,[])},tp$getattr:function(g,p){var k=this.ob$type;const q=k.$typeLookup(g);let x;if(void 0!==q&&(x=q.tp$descr_get,void 0!==x&&void 0!==q.tp$descr_set))return p=x.call(q,this,k,p);g=this.$typeLookup(g);if(void 0!==g)return k=g.tp$descr_get,
void 0!==k?p=k.call(g,null,this,p):g;if(void 0!==x)return p=x.call(q,this,k,p);if(void 0!==q)return q},tp$setattr:function(g,p,k){if(!this.sk$klass){if(void 0!==p)throw new Sk.builtin.TypeError("can't set attributes of built-in/extension type '"+this.prototype.tp$name+"'");throw new Sk.builtin.TypeError("can't delete attributes on type object '"+this.prototype.tp$name+"'");}const q=this.ob$type.$typeLookup(g);if(void 0!==q){const x=q.tp$descr_set;if(x)return x.call(q,this,p,k)}k=g.$mangled;if(void 0===
p)if(p=this.prototype,p.hasOwnProperty(k))delete p[k],g=Sk.dunderToSkulpt[k],void 0!==g&&(delete this.prototype[g],p.sk$prototypical||this.$allocateGetterSlot(k));else throw new Sk.builtin.AttributeError("type object '"+this.prototype.tp$name+"' has no attribute '"+g.$jsstr()+"'");else this.prototype[k]=p,k in Sk.dunderToSkulpt&&this.$allocateSlot(k,p)},$r:function(){let g=this.prototype.__module__,p="",k="class";g&&Sk.builtin.checkString(g)?p=g.v+".":g=null;g||this.sk$klass||Sk.__future__.class_repr||
(k="type");return new Sk.builtin.str("<"+k+" '"+p+this.prototype.tp$name+"'>")}},writable:!0},tp$methods:{value:null,writable:!0},tp$classmethods:{value:null,writable:!0},tp$getsets:{value:null,writable:!0},sk$type:{value:!0},$isSubType:{value:function(g){return this===g||this.prototype instanceof g||!this.prototype.sk$prototypical&&this.prototype.tp$mro.includes(g)}},$allocateSlot:{value:function(g,p){g=Sk.slots[g];const k=g.$slot_name,q=this.prototype;q.hasOwnProperty(k)&&delete q[k];Object.defineProperty(q,
k,{value:g.$slot_func(p),writable:!0,configurable:!0})}},$allocateSlots:{value:function(){const g=this.prototype;this.prototype.sk$prototypical?Object.keys(g).forEach(p=>{p in Sk.slots&&this.$allocateSlot(p,g[p])}):Object.keys(Sk.slots).forEach(p=>{g.hasOwnProperty(p)?this.$allocateSlot(p,g[p]):this.$allocateGetterSlot(p)});g.hasOwnProperty("__eq__")&&!g.hasOwnProperty("__hash__")&&(g.tp$hash=g.__hash__=Sk.builtin.none.none$)}},$allocateGetterSlot:{value:function(g){const p=Sk.slots[g].$slot_name,
k=this.prototype;k.hasOwnProperty(p)||Object.defineProperty(k,p,{configurable:!0,get(){const q=k.tp$mro;for(let x=1;x<q.length;x++){const v=Object.getOwnPropertyDescriptor(q[x].prototype,p);if(void 0!==v&&v.value)return v.value}}})}},$typeLookup:{value:function(g){return this.prototype.sk$prototypical?this.prototype[g.$mangled]:b.call(this,g)},writable:!0},$mroMerge:{value:function(g){this.prototype.sk$prototypical=!0;let p;const k=[];for(;;){for(p=0;p<g.length;++p){var q=g[p];if(0!==q.length)break}if(p===
g.length)return k;var x=[];for(p=0;p<g.length;++p)if(q=g[p],0!==q.length){const v=q[0];q=0;a:for(;q<g.length;++q){const w=g[q];for(let C=1;C<w.length;++C)if(w[C]===v)break a}q===g.length&&x.push(v)}if(0===x.length)throw new Sk.builtin.TypeError("Inconsistent precedences in type hierarchy");x=x[0];k.length&&this.prototype.sk$prototypical&&Object.getPrototypeOf(k[k.length-1].prototype)!==x.prototype&&(this.prototype.sk$prototypical=!1);k.push(x);for(p=0;p<g.length;++p)q=g[p],0<q.length&&q[0]===x&&q.splice(0,
1)}}},$buildMRO:{value:function(){const g=[[this]],p=this.prototype.tp$bases;for(var k=0;k<p.length;++k)g.push([...p[k].prototype.tp$mro]);k=[];for(let q=0;q<p.length;++q)k.push(p[q]);g.push(k);return this.$mroMerge(g)}},sk$attrError:{value(){return"type object '"+this.prototype.tp$name+"'"},writable:!0}});Sk.builtin.type.prototype.tp$getsets={__base__:{$get(){return this.prototype.tp$base||Sk.builtin.none.none$}},__bases__:{$get(){void 0===this.sk$tuple_bases&&(this.sk$tuple_bases=new Sk.builtin.tuple(this.prototype.tp$bases));
return this.sk$tuple_bases}},__mro__:{$get(){void 0===this.sk$tuple_mro&&(this.sk$tuple_mro=new Sk.builtin.tuple(this.prototype.tp$mro));return this.sk$tuple_mro}},__dict__:{$get(){return new Sk.builtin.mappingproxy(this.prototype)}},__doc__:{$get(){const g=this.$typeLookup(Sk.builtin.str.$doc);return g?void 0!==g.tp$descr_get?this===Sk.builtin.type?new Sk.builtin.str(this.prototype.tp$doc):g.tp$descr_get(null,this):this.prototype.__doc__:Sk.builtin.none.none$},$set(g){f(this,g,Sk.builtin.str.$doc);
this.prototype.__doc__=g}},__name__:{$get(){let g=this.prototype.ht$name;if(void 0!==g)return g;g=this.prototype.tp$name;g.includes(".")&&(g=g.slice(g.lastIndexOf(".")+1));return new Sk.builtin.str(g)},$set(g){f(this,g,Sk.builtin.str.$name);if(!Sk.builtin.checkString(g))throw new Sk.builtin.TypeError("can only assign string to "+this.prototype.tp$name+".__name__, not '"+Sk.abstr.typeName(g)+"'");this.prototype.ht$name=g;this.prototype.tp$name=g.$jsstr()}},__qualname__:{$get(){return this.prototype.ht$qualname||
Sk.abstr.lookupSpecial(this,Sk.builtin.str.$name)},$set(g){f(this,g,Sk.builtin.str.$name);if(!Sk.builtin.checkString(g))throw new Sk.builtin.TypeError("can only assign string to "+this.prototype.tp$name+".__qualname__, not '"+Sk.abstr.typeName(g)+"'");this.prototype.ht$qualname=g}},__module__:{$get(){const g=this.prototype,p=g.__module__;return p&&p.ob$type!==Sk.builtin.getset_descriptor?p:g.tp$name.includes(".")?new Sk.builtin.str(g.tp$name.slice(0,g.tp$name.lastIndexOf("."))):new Sk.builtin.str("builtins")},
$set(g){f(this,g,Sk.builtin.str.$module);this.prototype.__module__=g}}};Sk.builtin.type.prototype.tp$methods={mro:{$meth(){return new Sk.builtin.list(this.$buildMRO())},$flags:{NoArgs:!0}},__dir__:{$meth:function(){const g=new Sk.builtin.dict([]);this.$mergeClassDict(g);return new Sk.builtin.list(g.sk$asarray())},$flags:{NoArgs:!0},$doc:"Specialized __dir__ implementation for types."}};Sk.builtin.type.tp$classmethods={__prepare__:{$meth(){return new Sk.builtin.dict([])},$flags:{FastCall:!0}}};const m=
{$get(){const g=h(this.ob$type);return void 0!==g?g.tp$descr_get(this,this.ob$type):Sk.generic.getSetDict.$get.call(this)},$set(g){const p=h(this.ob$type);if(void 0!==p)return p.tp$descr_set(this,g);if(void 0===g)this.$d=new Sk.builtin.dict([]);else return Sk.generic.getSetDict.$set.call(this,g)},$doc:"dictionary for instance variables (if defined)",$name:"__dict__"}},function(G,V){Sk.generic={};Sk.generic.getAttr=function(a,c){let b;const e=this.ob$type,l=e.$typeLookup(a);if(void 0!==l&&(b=l.tp$descr_get,
void 0!==b&&void 0!==l.tp$descr_set))return b.call(l,this,e,c);const r=this.$d;if(void 0!==r&&(a=r.quick$lookup(a),void 0!==a))return a;if(void 0!==b)return b.call(l,this,e,c);if(void 0!==l)return l};Sk.exportSymbol("Sk.generic.getAttr",Sk.generic.getAttr);Sk.generic.setAttr=function(a,c,b){var e=this.ob$type.$typeLookup(a);if(void 0!==e&&null!==e){const l=e.tp$descr_set;if(l)return l.call(e,this,c,b)}b=this.$d;if(void 0!==b&&null!==b){if(b.dict$setItem){if(void 0!==c)return b.dict$setItem(a,c);if(b.dict$delItem(a))throw new Sk.builtin.AttributeError("'"+
Sk.abstr.typeName(this)+"' object has no attribute '"+a.$jsstr()+"'");return}if("object"===typeof b&&!b.sk$object){e=a.$mangled;if(void 0!==c){b[e]=c;return}if(void 0!==b[e]){delete b[e];return}}}throw new Sk.builtin.AttributeError(this.sk$attrError()+" has no attribute '"+a.$jsstr()+"'");};Sk.exportSymbol("Sk.generic.setAttr",Sk.generic.setAttr);Sk.generic.new=function(a){return function(c,b){if(this.constructor===a)return new this.constructor;c=new this.constructor;a.call(c);return c}};Sk.generic.newMethodDef=
{$meth(a,c){const b=this.prototype;if(1>a.length)throw a=b.tp$name,new Sk.builtin.TypeError(a+".__new__(): not enough arguments");var e=a.shift();if(void 0===e.sk$type)throw a=b.tp$name,new Sk.builtin.TypeError(a+"__new__(X): X is not a type object ("+Sk.abstr.typeName(e)+")");if(!e.$isSubType(this))throw a=b.tp$name,e=e.prototype.tp$name,new Sk.builtin.TypeError(a+".__new__("+e+"): "+e+" is not a subtype of "+a);const l=e.prototype.sk$staticNew.prototype;if(l.tp$new!==b.tp$new)throw a=b.tp$name,
e=e.prototype.tp$name,new Sk.builtin.TypeError(a+".__new__("+e+") is not safe, use "+l.tp$name+".__new__()");return b.tp$new.call(e.prototype,a,c)},$flags:{FastCall:!0},$textsig:"($type, *args, **kwargs)",$name:"__new__"};Sk.generic.selfIter=function(){return this};Sk.generic.iterNextWithArrayCheckSize=function(){if(this.$seq.length!==this.$orig.get$size()){const a=this.tp$name.split("_")[0];throw new Sk.builtin.RuntimeError(a+" changed size during iteration");}if(!(this.$index>=this.$seq.length))return this.$seq[this.$index++]};
Sk.generic.iterNextWithArray=function(){const a=this.$seq[this.$index++];void 0===a&&(this.tp$iternext=()=>{});return a};Sk.generic.iterLengthHintWithArrayMethodDef={$meth:function(){return new Sk.builtin.int_(this.$seq.length-this.$index)},$flags:{NoArgs:!0}};Sk.generic.iterReverseLengthHintMethodDef={$meth:function(){return new Sk.builtin.int_(this.$index)},$flags:{NoArgs:!0}};Sk.generic.getSetDict={$get(){return this.$d},$set(a){if(void 0===a)throw new Sk.builtin.TypeError("cannot delete __dict__");
if(a instanceof Sk.builtin.dict)this.$d=a;else throw new Sk.builtin.TypeError("__dict__ must be set to a dictionary, not a '"+Sk.abstr.typeName(a)+"'");},$doc:"dictionary for instance variables (if defined)",$name:"__dict__"};Sk.generic.seqCompare=function(a,c){if(this===a&&Sk.misceval.opAllowsEquality(c))return!0;if(!(a instanceof this.sk$builtinBase))return Sk.builtin.NotImplemented.NotImplemented$;const b=this.v;a=a.v;let e;if(b.length!==a.length&&("Eq"===c||"NotEq"===c))return"Eq"===c?!1:!0;for(e=
0;e<b.length&&e<a.length&&(b[e]===a[e]||Sk.misceval.richCompareBool(b[e],a[e],"Eq"));++e);const l=b.length,r=a.length;if(e>=l||e>=r)switch(c){case "Lt":return l<r;case "LtE":return l<=r;case "Eq":return l===r;case "NotEq":return l!==r;case "Gt":return l>r;case "GtE":return l>=r;default:Sk.asserts.fail()}return"Eq"===c?!1:"NotEq"===c?!0:Sk.misceval.richCompareBool(b[e],a[e],c)};Sk.generic.classGetItem={__class_getitem__:{$meth(a){return new Sk.builtin.GenericAlias(this,a)},$flags:{OneArg:!0}}}},function(G,
V){Sk.builtin.pyCheckArgs=function(a,c,b,e,l,r){c=c.length;void 0===e&&(e=Infinity);l&&--c;r&&--c;if(c<b||c>e)throw new Sk.builtin.TypeError((b===e?a+"() takes exactly "+b+" arguments":c<b?a+"() takes at least "+b+" arguments":0<b?a+"() takes at most "+e+" arguments":a+"() takes no arguments")+(" ("+c+" given)"));};Sk.exportSymbol("Sk.builtin.pyCheckArgs",Sk.builtin.pyCheckArgs);Sk.builtin.pyCheckArgsLen=function(a,c,b,e,l,r){void 0===e&&(e=Infinity);l&&--c;r&&--c;if(c<b||c>e)throw new Sk.builtin.TypeError((b===
e?a+"() takes exactly "+b+" arguments":c<b?a+"() takes at least "+b+" arguments":a+"() takes at most "+e+" arguments")+(" ("+c+" given)"));};Sk.builtin.pyCheckType=function(a,c,b){if(!b)throw new Sk.builtin.TypeError(a+" must be a "+c);};Sk.exportSymbol("Sk.builtin.pyCheckType",Sk.builtin.pyCheckType);Sk.builtin.checkSequence=function(a){return null!=a&&void 0!==a.mp$subscript};Sk.exportSymbol("Sk.builtin.checkSequence",Sk.builtin.checkSequence);Sk.builtin.checkIterable=function(a){return void 0===
a?!1:a.tp$iter?void 0!==a.tp$iter().tp$iternext:void 0!==a.mp$subscript};Sk.exportSymbol("Sk.builtin.checkIterable",Sk.builtin.checkIterable);Sk.builtin.checkCallable=function(a){return null!=a&&void 0!==a.tp$call};Sk.builtin.checkNumber=function(a){return"number"===typeof a||a instanceof Sk.builtin.int_||a instanceof Sk.builtin.float_||a instanceof Sk.builtin.lng};Sk.exportSymbol("Sk.builtin.checkNumber",Sk.builtin.checkNumber);Sk.builtin.checkComplex=function(a){return a instanceof Sk.builtin.complex};
Sk.exportSymbol("Sk.builtin.checkComplex",Sk.builtin.checkComplex);Sk.builtin.checkInt=function(a){return a instanceof Sk.builtin.int_||"number"===typeof a&&Number.isInteger(a)};Sk.exportSymbol("Sk.builtin.checkInt",Sk.builtin.checkInt);Sk.builtin.checkFloat=function(a){return a instanceof Sk.builtin.float_};Sk.exportSymbol("Sk.builtin.checkFloat",Sk.builtin.checkFloat);Sk.builtin.checkString=function(a){return a instanceof Sk.builtin.str};Sk.exportSymbol("Sk.builtin.checkString",Sk.builtin.checkString);
Sk.builtin.checkBytes=function(a){return a instanceof Sk.builtin.bytes};Sk.builtin.checkClass=function(a){return a instanceof Sk.builtin.type};Sk.exportSymbol("Sk.builtin.checkClass",Sk.builtin.checkClass);Sk.builtin.checkBool=function(a){return a instanceof Sk.builtin.bool};Sk.exportSymbol("Sk.builtin.checkBool",Sk.builtin.checkBool);Sk.builtin.checkNone=function(a){return a===Sk.builtin.none.none$};Sk.exportSymbol("Sk.builtin.checkNone",Sk.builtin.checkNone);Sk.builtin.checkFunction=function(a){return null!=
a&&void 0!==a.tp$call};Sk.exportSymbol("Sk.builtin.checkFunction",Sk.builtin.checkFunction);Sk.builtin.checkDataDescr=function(a){return a&&void 0!==a.tp$descr_set};Sk.exportSymbol("Sk.builtin.checkDataDescr",Sk.builtin.checkDataDescr);Sk.builtin.checkAnySet=function(a){return a instanceof Sk.builtin.set||a instanceof Sk.builtin.frozenset};Sk.builtin.checkMapping=function(a){return a instanceof Sk.builtin.dict||null!=a&&void 0!==a.mp$subscript&&void 0!==Sk.abstr.lookupSpecial(a,Sk.builtin.str.$keys)}},
function(G,V){function a(k,q){switch(q){case "Add":return k.nb$add;case "Sub":return k.nb$subtract;case "Mult":return k.nb$multiply;case "MatMult":if(Sk.__future__.python3)return k.nb$matrix_multiply;case "Div":return k.nb$divide;case "FloorDiv":return k.nb$floor_divide;case "Mod":return k.nb$remainder;case "DivMod":return k.nb$divmod;case "Pow":return k.nb$power;case "LShift":return k.nb$lshift;case "RShift":return k.nb$rshift;case "BitAnd":return k.nb$and;case "BitXor":return k.nb$xor;case "BitOr":return k.nb$or}}
function c(k,q){switch(q){case "Add":return k.nb$reflected_add;case "Sub":return k.nb$reflected_subtract;case "Mult":return k.nb$reflected_multiply;case "MatMult":if(Sk.__future__.python3)return k.nb$reflected_matrix_multiply;case "Div":return k.nb$reflected_divide;case "FloorDiv":return k.nb$reflected_floor_divide;case "Mod":return k.nb$reflected_remainder;case "DivMod":return k.nb$reflected_divmod;case "Pow":return k.nb$reflected_power;case "LShift":return k.nb$reflected_lshift;case "RShift":return k.nb$reflected_rshift;
case "BitAnd":return k.nb$reflected_and;case "BitXor":return k.nb$reflected_xor;case "BitOr":return k.nb$reflected_or}}function b(k,q){switch(q){case "Add":return k.nb$inplace_add;case "Sub":return k.nb$inplace_subtract;case "Mult":return k.nb$inplace_multiply;case "MatMult":if(Sk.__future__.python3)return k.nb$inplace_matrix_multiply;case "Div":return k.nb$inplace_divide;case "FloorDiv":return k.nb$inplace_floor_divide;case "Mod":return k.nb$inplace_remainder;case "Pow":return k.nb$inplace_power;
case "LShift":return k.nb$inplace_lshift;case "RShift":return k.nb$inplace_rshift;case "BitAnd":return k.nb$inplace_and;case "BitOr":return k.nb$inplace_or;case "BitXor":return k.nb$inplace_xor}}function e(k,q,x){const v=q.constructor,w=k.constructor;let C;let F=!1;if(v!==w&&void 0===v.sk$baseClass&&q instanceof w)if(C=c(q,x),void 0===C)F=!0;else if(C!==c(k,x)){F=!0;var L=C.call(q,k);if(L!==Sk.builtin.NotImplemented.NotImplemented$)return L}L=a(k,x);if(void 0!==L&&(L=L.call(k,q),L!==Sk.builtin.NotImplemented.NotImplemented$)||
!F&&v!==w&&(C||(C=c(q,x)),void 0!==C&&(L=C.call(q,k),L!==Sk.builtin.NotImplemented.NotImplemented$)))return L}function l(k,q,x){var v=b(k,x);return void 0!==v&&(v=v.call(k,q),v!==Sk.builtin.NotImplemented.NotImplemented$)?v:e(k,q,x)}function r(k){p.forEach(([q,x])=>{k[x]=function(v){return this.tp$richcompare(v,q)}})}function h(k){const q=Sk.reflectedNumberSlots;Object.keys(q).forEach(x=>{if(void 0!==k[x]){const v=q[x],w=v.reflected,C=k[w];void 0!==C?null===C&&delete k[w]:k[w]=v.slot||k[x]}})}function f(k){const q=
Sk.sequenceAndMappingSlots;Object.keys(q).forEach(x=>{void 0!==k[x]&&q[x].forEach(v=>{k[v]=k[x]})})}Sk.abstr={};Sk.abstr.typeName=function(k){if(null!=k&&void 0!==k.tp$name){let q=k.ht$name;if(void 0!==q)return q.toString();q=k.tp$name;q.includes(".")&&(q=q.slice(q.lastIndexOf(".")+1));return q}Sk.asserts.fail(k+" passed to typeName");return"<invalid type>"};const n={Add:"+",Sub:"-",Mult:"*",MatMult:"@",Div:"/",FloorDiv:"//",Mod:"%",DivMod:"divmod()",Pow:"** or pow()",LShift:"<<",RShift:">>",BitAnd:"&",
BitXor:"^",BitOr:"|"},d={UAdd:"+",USub:"-",Invert:"~"};Sk.abstr.numberBinOp=function(k,q,x){var v;if(!(v=e(k,q,x)))throw k=Sk.abstr.typeName(k),q=Sk.abstr.typeName(q),new Sk.builtin.TypeError("unsupported operand type(s) for "+n[x]+": '"+k+"' and '"+q+"'");return v};Sk.exportSymbol("Sk.abstr.numberBinOp",Sk.abstr.numberBinOp);Sk.abstr.numberInplaceBinOp=function(k,q,x){var v;if(!(v=l(k,q,x)))throw k=Sk.abstr.typeName(k),q=Sk.abstr.typeName(q),new Sk.builtin.TypeError("unsupported operand type(s) for "+
n[x]+"=: '"+k+"' and '"+q+"'");return v};Sk.exportSymbol("Sk.abstr.numberInplaceBinOp",Sk.abstr.numberInplaceBinOp);Sk.abstr.numberUnaryOp=function(k,q){if("Not"===q)return Sk.misceval.isTrue(k)?Sk.builtin.bool.false$:Sk.builtin.bool.true$;b:{switch(q){case "USub":var x=k.nb$negative;break b;case "UAdd":x=k.nb$positive;break b;case "Invert":x=k.nb$invert;break b}x=void 0}x=void 0!==x?x.call(k):void 0;if(!x)throw k=Sk.abstr.typeName(k),new Sk.builtin.TypeError("bad operand type for unary "+d[q]+": '"+
k+"'");return x};Sk.exportSymbol("Sk.abstr.numberUnaryOp",Sk.abstr.numberUnaryOp);Sk.abstr.fixSeqIndex_=function(k,q){q=Sk.builtin.asnum$(q);0>q&&k.sq$length&&(q+=k.sq$length());return q};Sk.abstr.sequenceContains=function(k,q,x){if(k.sq$contains)return k.sq$contains(q,x);k=Sk.misceval.iterFor(Sk.abstr.iter(k),function(v){return v===q||Sk.misceval.richCompareBool(v,q,"Eq")?new Sk.misceval.Break(!0):!1},!1);return x?k:Sk.misceval.retryOptionalSuspensionOrThrow(k)};Sk.abstr.sequenceConcat=function(k,
q){if(k.sq$concat)return k.sq$concat(q);if(Sk.builtin.checkSequence(k)&&Sk.builtin.checkSequence(q)&&(q=e(k,q,"Add"),void 0!==q))return q;throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(k)+"' object can't be concatenated");};Sk.abstr.sequenceInPlaceConcat=function(k,q){if(k.sq$inplace_concat)return k.sq$inplace_concat(q);if(k.sq$concat)return k.sq$concat(q);if(Sk.builtin.checkSequence(k)&&Sk.builtin.checkSequence(q)&&(q=l(k,q,"Add"),void 0!==q))return q;throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(k)+
"' object can't be concatenated");};Sk.abstr.sequenceGetIndexOf=function(k,q){if(k.index)return Sk.misceval.callsimArray(k.index,[k,q]);let x=0;for(let v=Sk.abstr.iter(k),w=v.tp$iternext();void 0!==w;w=v.tp$iternext()){if(Sk.misceval.richCompareBool(q,w,"Eq"))return new Sk.builtin.int_(x);x+=1}throw new Sk.builtin.ValueError("sequence.index(x): x not in sequence");};Sk.abstr.sequenceGetCountOf=function(k,q){if(k.count)return Sk.misceval.callsimArray(k.count,[k,q]);let x=0;for(let v=Sk.abstr.iter(k),
w=v.tp$iternext();void 0!==w;w=v.tp$iternext())Sk.misceval.richCompareBool(q,w,"Eq")&&(x+=1);return new Sk.builtin.int_(x)};Sk.abstr.sequenceGetItem=function(k,q,x){"number"===typeof q&&(q=new Sk.builtin.int_(q));return Sk.abstr.objectGetItem(k,q,x)};Sk.abstr.sequenceSetItem=function(k,q,x,v){"number"===typeof q&&(q=new Sk.builtin.int_(q));return Sk.abstr.objectSetItem(k,q,x,v)};Sk.abstr.sequenceDelItem=function(k,q,x){return Sk.abstr.objectDelItem(k,q,x)};Sk.abstr.sequenceGetSlice=function(k,q,x){return Sk.abstr.objectGetItem(k,
new Sk.builtin.slice(q,x))};Sk.abstr.sequenceDelSlice=function(k,q,x){return Sk.abstr.objectDelItem(k,new Sk.builtin.slice(q,x))};Sk.abstr.sequenceSetSlice=function(k,q,x,v){return Sk.abstr.objectSetItem(k,new Sk.builtin.slice(q,x))};Sk.abstr.sequenceUnpack=function(k,q,x,v){if(!Sk.builtin.checkIterable(k))throw new Sk.builtin.TypeError("cannot unpack non-iterable "+Sk.abstr.typeName(k)+" object");const w=Sk.abstr.iter(k),C=[];let F=0,L;0<q&&(L=Sk.misceval.iterFor(w,z=>{C.push(z);if(++F===q)return new Sk.misceval.Break}));
return Sk.misceval.chain(L,()=>{if(C.length<q)throw new Sk.builtin.ValueError("not enough values to unpack (expected at least "+x+", got "+C.length+")");if(!v)return Sk.misceval.chain(w.tp$iternext(!0),D=>{if(void 0!==D)throw new Sk.builtin.ValueError("too many values to unpack (expected "+q+")");return C});const z=[];return Sk.misceval.chain(Sk.misceval.iterFor(w,D=>{z.push(D)}),()=>{const D=z.length+q-x;if(0>D)throw new Sk.builtin.ValueError("not enough values to unpack (expected at least "+x+", got "+
(x+D)+")");C.push(new Sk.builtin.list(z.slice(0,D)));C.push(...z.slice(D));return C})})};Sk.abstr.mappingUnpackIntoKeywordArray=function(k,q,x){if(q instanceof Sk.builtin.dict)q.$items().forEach(([w,C])=>{if(!Sk.builtin.checkString(w))throw new Sk.builtin.TypeError((x.$qualname?x.$qualname+"() ":"")+"keywords must be strings");k.push(w.v);k.push(C)});else{var v=Sk.abstr.lookupSpecial(q,Sk.builtin.str.$keys);if(void 0===v)throw new Sk.builtin.TypeError("Object is not a mapping");return Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(v),
w=>Sk.misceval.iterFor(Sk.abstr.iter(w),C=>{if(!Sk.builtin.checkString(C))throw new Sk.builtin.TypeError((x.$qualname?x.$qualname+"() ":"")+"keywords must be strings");return Sk.misceval.chain(q.mp$subscript(C,!0),F=>{k.push(C.v);k.push(F)})}))}};Sk.abstr.keywordArrayFromPyDict=function(k){const q=[];k.$items().forEach(([x,v])=>{if(!Sk.builtin.checkString(x))throw new Sk.builtin.TypeError("keywords must be strings");q.push(x.toString());q.push(v)});return q};Sk.abstr.keywordArrayToPyDict=function(k){const q=
new Sk.builtin.dict;for(let x=0;x<k.length;x+=2)q.mp$ass_subscript(new Sk.builtin.str(k[x]),k[x+1]);return q};Sk.abstr.copyKeywordsToNamedArgs=function(k,q,x,v,w){v=v||[];var C=x.length+v.length/2;if(C>q.length)throw new Sk.builtin.TypeError(k+"() expected at most "+q.length+" arguments ("+C+" given)");if(v.length||void 0!==w){if(C===q.length&&!v.length)return x;if(0===C&&q.length===(w&&w.length))return w}else return x;x=x.slice(0);for(C=0;C<v.length;C+=2){const F=v[C].toString(),L=v[C+1],z=q.indexOf(F);
if(0<=z){if(void 0!==x[z])throw new Sk.builtin.TypeError(k+"() got multiple values for argument '"+F+"'");x[z]=L}else throw new Sk.builtin.TypeError(k+"() got an unexpected keyword argument '"+F+"'");}if(w){v=q.length;for(C=v-1;0<=C;C--)void 0===x[C]&&(x[C]=w[w.length-1-(v-1-C)]);q=q.filter((F,L)=>void 0===x[L]);if(q.length)throw new Sk.builtin.TypeError(k+"() missing "+q.length+" required positional arguments: "+q.join(", "));}return x};Sk.exportSymbol("Sk.abstr.copyKeywordsToNamedArgs",Sk.abstr.copyKeywordsToNamedArgs);
Sk.abstr.checkNoKwargs=function(k,q){if(q&&q.length)throw new Sk.builtin.TypeError(k+"() takes no keyword arguments");};Sk.exportSymbol("Sk.abstr.checkNoKwargs",Sk.abstr.checkNoKwargs);Sk.abstr.checkNoArgs=function(k,q,x){if(q=q.length+(x?x.length:0))throw new Sk.builtin.TypeError(k+"() takes no arguments ("+q+" given)");};Sk.exportSymbol("Sk.abstr.checkNoArgs",Sk.abstr.checkNoArgs);Sk.abstr.checkOneArg=function(k,q,x){Sk.abstr.checkNoKwargs(k,x);if(1!==q.length)throw new Sk.builtin.TypeError(k+"() takes exactly one argument ("+
q.length+" given)");};Sk.exportSymbol("Sk.abstr.checkOneArg",Sk.abstr.checkOneArg);Sk.abstr.checkArgsLen=function(k,q,x,v){q=q.length;void 0===v&&(v=Infinity);if(q<x||q>v)throw new Sk.builtin.TypeError((x===v?k+"() takes exactly "+x+" arguments":q<x?k+"() takes at least "+x+" arguments":k+"() takes at most "+v+" arguments")+(" ("+q+" given)"));};Sk.exportSymbol("Sk.abstr.checkArgsLen",Sk.abstr.checkArgsLen);Sk.abstr.objectFormat=function(k,q){if(void 0===q)q=Sk.builtin.str.$emptystr;else if(!Sk.builtin.checkString(q))throw new Sk.builtin.TypeError("Format specifier must be a string, not "+
Sk.abstr.typeName(q));k=Sk.abstr.lookupSpecial(k,Sk.builtin.str.$format);q=Sk.misceval.callsimArray(k,[q]);if(!Sk.builtin.checkString(q))throw new Sk.builtin.TypeError("__format__ must return a str, not "+Sk.abstr.typeName(q));return q};Sk.abstr.objectHash=function(k){const q=k.tp$hash;if(void 0!==q){if(Sk.builtin.checkNone(q))throw new Sk.builtin.TypeError("unhashable type: '"+Sk.abstr.typeName(k)+"'");return k.tp$hash()}throw new Sk.builtin.TypeError("unsupported Javascript type");};Sk.abstr.objectAdd=
function(k,q){if(k.nb$add)return k.nb$add(q);k=Sk.abstr.typeName(k);q=Sk.abstr.typeName(q);throw new Sk.builtin.TypeError("unsupported operand type(s) for +: '"+k+"' and '"+q+"'");};Sk.abstr.objectNegative=function(k){if(k.nb$negative)return k.nb$negative();throw new Sk.builtin.TypeError("bad operand type for unary -: '"+Sk.abstr.typeName(k)+"'");};Sk.abstr.objectPositive=function(k){if(k.nb$positive)return k.nb$positive();throw new Sk.builtin.TypeError("bad operand type for unary +: '"+Sk.abstr.typeName(k)+
"'");};Sk.abstr.objectDelItem=function(k,q,x){if(k.mp$ass_subscript)return k.mp$ass_subscript(q,void 0,x);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(k)+"' object does not support item deletion");};Sk.exportSymbol("Sk.abstr.objectDelItem",Sk.abstr.objectDelItem);Sk.abstr.objectGetItem=function(k,q,x){if(k.mp$subscript)return k.mp$subscript(q,x);if(Sk.builtin.checkClass(k)){if(k===Sk.builtin.type)return new Sk.builtin.GenericAlias(k,q);const v=Sk.abstr.typeLookup(k,Sk.builtin.str.$class_getitem);
if(void 0!==v)return k=Sk.misceval.callsimOrSuspendArray(v,[q]),x?k:Sk.misceval.retryOptionalSuspensionOrThrow(k)}throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(k)+"' does not support indexing");};Sk.exportSymbol("Sk.abstr.objectGetItem",Sk.abstr.objectGetItem);Sk.abstr.objectSetItem=function(k,q,x,v){if(k.mp$ass_subscript)return k.mp$ass_subscript(q,x,v);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(k)+"' does not support item assignment");};Sk.exportSymbol("Sk.abstr.objectSetItem",
Sk.abstr.objectSetItem);Sk.abstr.gattr=function(k,q,x){x=k.tp$getattr(q,x);if(void 0===x)throw new Sk.builtin.AttributeError(k.sk$attrError()+" has no attribute '"+q.$jsstr()+"'");return x.$isSuspension?Sk.misceval.chain(x,function(v){if(void 0===v)throw new Sk.builtin.AttributeError(k.sk$attrError()+" has no attribute '"+q.$jsstr()+"'");return v}):x};Sk.exportSymbol("Sk.abstr.gattr",Sk.abstr.gattr);Sk.abstr.sattr=function(k,q,x,v){return k.tp$setattr(q,x,v)};Sk.exportSymbol("Sk.abstr.sattr",Sk.abstr.sattr);
Sk.abstr.iternext=function(k,q){return k.tp$iternext(q)};Sk.exportSymbol("Sk.abstr.iternext",Sk.abstr.iternext);Sk.abstr.iter=function(k){if(k.tp$iter){k=k.tp$iter();if(k.tp$iternext)return k;throw new Sk.builtin.TypeError("iter() returned non-iterator of type '"+Sk.abstr.typeName(k)+"'");}if(k.mp$subscript)return new Sk.builtin.seq_iter_(k);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(k)+"' object is not iterable");};Sk.exportSymbol("Sk.abstr.iter",Sk.abstr.iter);Sk.abstr.lookupSpecial=function(k,
q){var x=k.ob$type;if(void 0===x)Sk.asserts.fail("javascript object sent to lookupSpecial");else if(q=x.$typeLookup(q),void 0!==q)return void 0!==q.tp$descr_get&&(q=q.tp$descr_get(k,x)),q};Sk.exportSymbol("Sk.abstr.lookupSpecial",Sk.abstr.lookupSpecial);Sk.abstr.lookupAttr=function(k,q){try{return k.tp$getattr(q)}catch(x){if(!(x instanceof Sk.builtin.AttributeError))throw x;}};Sk.abstr.typeLookup=function(k,q){q=k.$typeLookup(q);return void 0!==q&&q.tp$descr_get?q.tp$descr_get(null,k):q};Sk.abstr.markUnhashable=
function(k){k=k.prototype;k.__hash__=Sk.builtin.none.none$;k.tp$hash=Sk.builtin.none.none$};Sk.abstr.setUpInheritance=function(k,q,x,v){v=v||Sk.builtin.type;x=void 0===x?Sk.builtin.object:x;const w=null!==x?x.prototype:null;Object.setPrototypeOf(q,v.prototype);Object.setPrototypeOf(q.prototype,w);Object.defineProperties(q.prototype,{sk$object:{value:!0,writable:!0},ob$type:{value:q,writable:!0},tp$name:{value:k,writable:!0},tp$base:{value:x,writable:!0}})};Sk.abstr.setUpBuiltinMro=function(k){let q=
k.prototype.tp$base;const x=null===q?[]:[q];if(q===Sk.builtin.object||null===q)Object.defineProperty(k,"sk$baseClass",{value:!0,writable:!0}),Object.defineProperty(k.prototype,"sk$builtinBase",{value:k,writable:!0});Object.defineProperty(k,"sk$solidBase",{value:!0,writable:!0});const v=[k];for(;null!==q;)v.push(q),q=q.prototype.tp$base;Object.defineProperties(k.prototype,{sk$prototypical:{value:!0,writable:!0},tp$bases:{value:x,writable:!0},tp$mro:{value:v,writable:!0}});Object.defineProperty(k,"$typeLookup",
{value:function(w){return this.prototype[w.$mangled]},writable:!0})};let m=k=>Sk.builtin.str&&Sk.builtin.str.$fixReserved?(m=Sk.builtin.str.$fixReserved,Sk.builtin.str.$fixReserved(k)):k;Sk.abstr.setUpGetSets=function(k,q){if(void 0!==Sk.builtin.getset_descriptor){var x=k.prototype;q=q||x.tp$getsets||{};Object.entries(q).forEach(([v,w])=>{w.$name=v;x[m(v)]=new Sk.builtin.getset_descriptor(k,w)});Object.defineProperty(x,"tp$getsets",{value:null,writable:!0})}};Sk.abstr.setUpMethods=function(k,q){if(void 0!==
Sk.builtin.method_descriptor){var x=k.prototype;q=q||x.tp$methods||{};Object.entries(q).forEach(([v,w])=>{w.$name=v;x[m(v)]=new Sk.builtin.method_descriptor(k,w)});Object.defineProperty(x,"tp$methods",{value:null,writable:!0})}};Sk.abstr.setUpClassMethods=function(k,q){if(void 0!==Sk.builtin.classmethod_descriptor){var x=k.prototype;q=q||x.tp$classmethods||{};Object.entries(q).forEach(([v,w])=>{w.$name=v;x[m(v)]=new Sk.builtin.classmethod_descriptor(k,w)});Object.defineProperty(x,"tp$classmethods",
{value:null,writable:!0})}};const g={Eq:"ob$eq",NotEq:"ob$ne",Gt:"ob$gt",GtE:"ob$ge",Lt:"ob$lt",LtE:"ob$le"},p=Object.entries(g);Sk.abstr.setUpSlots=function(k,q){function x(F,L){w[F]=new Sk.builtin.wrapper_descriptor(k,Sk.slots[F],L)}function v(F,L){"string"===typeof F?x(F,L):F.forEach(z=>{x(z,L)})}if(void 0!==Sk.builtin.wrapper_descriptor){var w=k.prototype;q=q||w.tp$slots||{};q.tp$new===Sk.generic.new&&(q.tp$new=Sk.generic.new(k));q.tp$richcompare?r(q):q.ob$eq&&(q.tp$richcompare=function(F,L){return this[g[L]].call(this,
F)});q.tp$as_number&&h(q);q.tp$as_sequence_or_mapping&&f(q);Object.entries(q).forEach(([F,L])=>{Object.defineProperty(w,F,{value:L,writable:!0})});q.tp$new&&(w.__new__=new Sk.builtin.sk_method(Sk.generic.newMethodDef,k),Object.defineProperty(w,"sk$staticNew",{value:k,writable:!0}));Sk.subSlots.main_slots.forEach(([F,L])=>{F=q[F];void 0!==F&&v(L,F)});var C=q.tp$hash;void 0!==C&&("function"===typeof C?x("__hash__",C):C===Sk.builtin.none.none$?w.__hash__=C:Sk.asserts.fail("invalid tp$hash"));q.tp$as_number&&
Sk.subSlots.number_slots.forEach(([F,L])=>{F=q[F];void 0!==F&&v(L,F)});q.tp$as_sequence_or_mapping&&Sk.subSlots.sequence_and_mapping_slots.forEach(([F,L])=>{F=q[F];void 0!==F&&v(L,F)});Object.defineProperty(w,"tp$slots",{value:null,writable:!0})}};Sk.abstr.buildNativeClass=function(k,q){q=q||{};Sk.asserts.assert(q.hasOwnProperty("constructor"),"A constructor is required to build a native class");let x=q.constructor;Sk.abstr.setUpInheritance(k,x,q.base,q.meta);Sk.abstr.setUpBuiltinMro(x);const v=x.prototype;
Object.defineProperties(v,{tp$slots:{value:q.slots,writable:!0},tp$getsets:{value:q.getsets,writable:!0},tp$methods:{value:q.methods,writable:!0},tp$classmethods:{value:q.classmethods,writable:!0}});Sk.abstr.setUpSlots(x,q.slots||{});Sk.abstr.setUpMethods(x,q.methods);Sk.abstr.setUpGetSets(x,q.getsets);Sk.abstr.setUpClassMethods(x,q.classmethods);Object.entries(q.proto||{}).forEach(([w,C])=>{Object.defineProperty(v,w,{value:C,writable:!0,enumerable:!(w.includes("$")||w in Object.prototype)})});Object.entries(q.flags||
{}).forEach(([w,C])=>{Object.defineProperty(x,w,{value:C,writable:!0})});v.hasOwnProperty("tp$iter")&&(v[Symbol.iterator]=function(){return this.tp$iter()[Symbol.iterator]()});void 0!==Sk.builtin.str&&v.hasOwnProperty("tp$doc")&&!v.hasOwnProperty("__doc__")&&(k=v.tp$doc||null,v.__doc__="string"===typeof k?new Sk.builtin.str(k):Sk.builtin.none.none$);return x};Sk.abstr.buildIteratorClass=function(k,q){Sk.asserts.assert(q.hasOwnProperty("constructor"),"must provide a constructor");q.slots=q.slots||
{};q.slots.tp$iter=Sk.generic.selfIter;q.slots.tp$iternext=q.slots.tp$iternext||q.iternext;q.slots.tp$getattr=q.slots.tp$getattr||Sk.generic.getAttr;k=Sk.abstr.buildNativeClass(k,q);Sk.abstr.built$iterators.push(k);k.prototype[Symbol.iterator]=function(){return{next:()=>{const x=this.tp$iternext();return{value:x,done:void 0===x}}}};return k};Sk.abstr.built$iterators=[];Sk.abstr.setUpModuleMethods=function(k,q,x){Object.entries(x).forEach(([v,w])=>{w.$name=w.$name||v;q[v]=new Sk.builtin.sk_method(w,
null,k)});return q};Sk.abstr.superConstructor=function(k,q,x){var v=Array.prototype.slice.call(arguments,2);k.prototype.tp$base.apply(q,v)}},function(G,V){function a(e){const l=e.prototype,r=l.tp$base;if(null==r)return!1;const h=r.prototype;return r.sk$solidSlotBase||e.sk$solidSlotBase||h.sk$hasDict!==l.sk$hasDict||r.sk$solidBase&&r!==Sk.builtin.module?!1:!0}function c(e,l){e=e.prototype;l=l.prototype;const r=e.ht$slots,h=l.ht$slots;return e.sk$hasDict!==l.sk$hasDict?!1:r===h?!0:r&&h?r.length===h.length&&
r.every((f,n)=>f===h[n]):(r&&(r.length||null))===(h&&(h.length||null))}const b=new WeakMap;Sk.builtin.object=Sk.abstr.buildNativeClass("object",{constructor:function object(){Sk.asserts.assert(this instanceof Sk.builtin.object,"bad call to object, use 'new'")},base:null,slots:{tp$new(e,l){if(e.length||l&&l.length){if(this.tp$new!==Sk.builtin.object.prototype.tp$new)throw new Sk.builtin.TypeError("object.__new__() takes exactly one argument (the type to instantiate)");if(this.tp$init===Sk.builtin.object.prototype.tp$init)throw new Sk.builtin.TypeError(Sk.abstr.typeName(this)+
"() takes no arguments");}return new this.constructor},tp$init(e,l){if(e.length||l&&l.length){if(this.tp$init!==Sk.builtin.object.prototype.tp$init)throw new Sk.builtin.TypeError("object.__init__() takes exactly one argument (the instance to initialize)");if(this.tp$new===Sk.builtin.object.prototype.tp$new)throw new Sk.builtin.TypeError(Sk.abstr.typeName(this)+".__init__() takes exactly one argument (the instance to initialize)");}},tp$getattr:Sk.generic.getAttr,tp$setattr:Sk.generic.setAttr,$r(){const e=
Sk.abstr.lookupSpecial(this,Sk.builtin.str.$module);let l="";e&&Sk.builtin.checkString(e)&&(l=e.v+".");return new Sk.builtin.str("<"+l+Sk.abstr.typeName(this)+" object>")},tp$str(){return this.$r()},tp$hash(){let e=b.get(this);if(void 0!==e)return e;e=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER-Number.MAX_SAFE_INTEGER/2);b.set(this,e);return e},tp$richcompare(e,l){switch(l){case "Eq":e=this===e||Sk.builtin.NotImplemented.NotImplemented$;break;case "NotEq":e=this.ob$eq(e,"Eq");e!==Sk.builtin.NotImplemented.NotImplemented$&&
(e=!Sk.misceval.isTrue(e));break;default:e=Sk.builtin.NotImplemented.NotImplemented$}return e},tp$doc:"The most base type"},getsets:{__class__:{$get(){return this.ob$type},$set(e){if(void 0===e)throw new Sk.builtin.TypeError("can't delete __class__ attribute");if(!Sk.builtin.checkClass(e))throw new Sk.builtin.TypeError("__class__ must be set to a class, not '"+Sk.abstr.typeName(e)+"' object");const l=this.ob$type;if(!(l.$isSubType(Sk.builtin.module)&&e.$isSubType(Sk.builtin.module)||void 0!==l.prototype.ht$type&&
void 0!==e.prototype.ht$type))throw new Sk.builtin.TypeError(" __class__ assignment only supported for heap types or ModuleType subclasses");{let r=l,h=e;for(;a(r);)r=r.prototype.tp$base;for(;a(h);)h=h.prototype.tp$base;if(r!==h&&(r.prototype.tp$base!==h.prototype.tp$base||!c(r,h)))throw new Sk.builtin.TypeError("__class__ assignment: '"+e.prototype.tp$name+"' object layout differs from '"+l.prototype.tp$name+"'");}Object.setPrototypeOf(this,e.prototype)},$doc:"the object's class"}},methods:{__dir__:{$meth:function(){let e=
Sk.abstr.lookupAttr(this,Sk.builtin.str.$dict);e=void 0===e?new Sk.builtin.dict([]):e instanceof Sk.builtin.dict?e.dict$copy():new Sk.builtin.dict([]);const l=Sk.abstr.lookupAttr(this,Sk.builtin.str.$class);void 0!==l&&l.$mergeClassDict(e);return new Sk.builtin.list(e.sk$asarray())},$flags:{NoArgs:!0},$doc:"Default dir() implementation."},__format__:{$meth(e){if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("__format__() argument must be str, not "+Sk.abstr.typeName(e));if(""!==e.v)throw new Sk.builtin.TypeError(`unsupported format string passed to ${Sk.abstr.typeName(this)}.__format__`);
return this.tp$str()},$flags:{OneArg:!0},$doc:"Default object formatter."}},classmethods:{__init_subclass__:{$meth(e){return Sk.builtin.none.none$},$flags:{FastCall:!0,NoKwargs:!0}}},proto:{valueOf:Object.prototype.valueOf,toString(){return this.tp$str().v},hasOwnProperty:Object.prototype.hasOwnProperty,ht$type:void 0,sk$attrError(){return"'"+this.tp$name+"' object"},$mergeClassDict(e){var l=Sk.abstr.lookupAttr(this,Sk.builtin.str.$dict);void 0!==l&&e.dict$merge(l);l=Sk.abstr.lookupAttr(this,Sk.builtin.str.$bases);
if(void 0!==l){var r=Sk.builtin.len(l).valueOf();for(let h=0;h<r;h++)Sk.abstr.objectGetItem(l,new Sk.builtin.int_(h)).$mergeClassDict(e)}}}});Sk.abstr.setUpInheritance("type",Sk.builtin.type,Sk.builtin.object);Sk.abstr.setUpBuiltinMro(Sk.builtin.type)},function(G,V){function a(w,C,F){Sk.abstr.checkNoArgs(this.$name,C,F);w=this.call(w);return void 0===w?Sk.builtin.none.none$:w}function c(w,C,F){Sk.abstr.checkOneArg(this.$name,C,F);w=this.call(w,C[0]);return void 0===w?Sk.builtin.none.none$:w}function b(w,
C,F){Sk.abstr.checkOneArg(this.$name,C,F);w=this.call(w,C[0],!0);return Sk.misceval.chain(w,L=>void 0===L?Sk.builtin.none.none$:L)}function e(w,C,F){Sk.abstr.checkNoKwargs(this.$name,F);Sk.abstr.checkArgsLen(this.$name,C,1,2);w=this.call(w,...C);return void 0===w?Sk.builtin.none.none$:w}function l(w,C,F){Sk.abstr.checkNoKwargs(this.$name,F);Sk.abstr.checkArgsLen(this.$name,C,2,2);return Sk.misceval.chain(this.call(w,C[0],C[1],!0),()=>Sk.builtin.none.none$)}function r(w,C,F){Sk.abstr.checkOneArg(this.$name,
C,F);w=this.call(w,C[0],void 0,!0);return Sk.misceval.chain(w,L=>void 0===L?Sk.builtin.none.none$:L)}function h(w,C,F){w=c.call(this,w,C,F);return w===Sk.builtin.NotImplemented.NotImplemented$?w:new Sk.builtin.bool(w)}function f(w,C,F){return function(L,z,D){L=w.call(this,L,z,D);return F?Sk.misceval.chain(L,C):C(Sk.misceval.retryOptionalSuspensionOrThrow(L))}}function n(w){return function(){const C=w.tp$descr_get?w.tp$descr_get(this,this.ob$type):w;return Sk.misceval.callsimArray(C,[])}}function d(w,
C,F,L){return function(z){return function(){var D=z.tp$descr_get?z.tp$descr_get(this,this.ob$type):z;D=Sk.misceval.callsimArray(D,[]);if(!C(D))throw new Sk.builtin.TypeError(w+" should return "+F+" (returned "+Sk.abstr.typeName(D)+")");return void 0!==L?L(D):D}}}function m(w){return function(C){const F=w.tp$descr_get?w.tp$descr_get(this,this.ob$type):w;return Sk.misceval.callsimArray(F,[C])}}function g(w,C){let F=this.ob$type.$typeLookup(Sk.builtin.str.$getattribute);if(F instanceof Sk.builtin.wrapper_descriptor)return F.d$wrapped.call(this,
w,C);F.tp$descr_get&&(F=F.tp$descr_get(this,this.ob$type));const L=Sk.misceval.tryCatch(()=>Sk.misceval.callsimOrSuspendArray(F,[w]),z=>{if(!(z instanceof Sk.builtin.AttributeError))throw z;});return C?L:Sk.misceval.retryOptionalSuspensionOrThrow(L)}function p(w,C,F){return function(L){return function(z,D,K){let R;void 0===D?(R=C,F=null):R=w;let T=this.ob$type.$typeLookup(new Sk.builtin.str(R));if(T instanceof Sk.builtin.wrapper_descriptor)return T.d$wrapped.call(this,z,D);T.tp$descr_get&&(T=T.tp$descr_get(this,
this.ob$type,K));if(void 0!==T)z=Sk.misceval.callsimOrSuspendArray(T,void 0===D?[z]:[z,D]);else{if(F)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(this)+"' object "+F);throw new Sk.builtin.AttributeError(R);}return K?z:Sk.misceval.retryOptionalSuspensionOrThrow(z)}}}function k(w,C){let F=w.ob$type;for(;F&&void 0!==F.sk$klass;)F=F.prototype.tp$base;if(F&&F.prototype.tp$setattr!==C)throw new Sk.builtin.TypeError("can't apply this "+C.$name+" to "+Sk.abstr.typeName(w)+" object");}Sk.slots=Object.create(null);
G=Sk.slots;Sk.slots.__init__={$name:"__init__",$slot_name:"tp$init",$slot_func:function(w){return function(C,F){const L=w.tp$descr_get?w.tp$descr_get(this,this.ob$type):w;C=Sk.misceval.callsimOrSuspendArray(L,C,F);return Sk.misceval.chain(C,z=>{if(!Sk.builtin.checkNone(z)&&void 0!==z)throw new Sk.builtin.TypeError("__init__() should return None, not "+Sk.abstr.typeName(z));})}},$wrapper:function(w,C,F){this.call(w,C,F);return Sk.builtin.none.none$},$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},
$doc:"Initialize self.  See help(type(self)) for accurate signature."};G.__new__={$name:"__new__",$slot_name:"tp$new",$slot_func:function(w){const C=function(F,L){let z=w;w.tp$descr_get&&(z=w.tp$descr_get(null,this.constructor));return Sk.misceval.callsimOrSuspendArray(z,[this.constructor,...F],L)};C.sk$static_new=!1;return C},$wrapper:null,$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Create and return a new object."};G.__call__={$name:"__call__",$slot_name:"tp$call",$slot_func:function(w){return function(C,
F){const L=w.tp$descr_get?w.tp$descr_get(this,this.ob$type):w;return Sk.misceval.callsimOrSuspendArray(L,C,F)}},$wrapper:function(w,C,F){w=this.call(w,C,F);return void 0===w?Sk.builtin.none.none$:w},$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Call self as a function."};G.__repr__={$name:"__repr__",$slot_name:"$r",$slot_func:d("__repr__",Sk.builtin.checkString,"str"),$wrapper:a,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return repr(self)."};G.__str__={$name:"__str__",$slot_name:"tp$str",
$slot_func:d("__str__",Sk.builtin.checkString,"str"),$wrapper:a,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return str(self)."};var q=d("__hash__",Sk.builtin.checkInt,"int",w=>"number"===typeof w.v?w.v:w.tp$hash());G.__hash__={$name:"__hash__",$slot_name:"tp$hash",$slot_func:function(w){return w===Sk.builtin.none.none$?Sk.builtin.none.none$:q(w)},$wrapper:f(a,w=>new Sk.builtin.int_(w)),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return hash(self)."};G.__getattribute__={$name:"__getattribute__",
$slot_name:"tp$getattr",$slot_func:function(w){return function(C,F){let L=this.ob$type.$typeLookup(Sk.builtin.str.$getattr);if(void 0===L)return g.call(this,C,F);const z=Sk.misceval.chain(g.call(this,C,F),D=>Sk.misceval.tryCatch(()=>{if(void 0!==D)return D;L.tp$descr_get&&(L=L.tp$descr_get(this,this.ob$type));return Sk.misceval.callsimOrSuspendArray(L,[C])},function(K){if(!(K instanceof Sk.builtin.AttributeError))throw K;}));return F?z:Sk.misceval.retryOptionalSuspensionOrThrow(z)}},$wrapper:function(w,
C,F){Sk.abstr.checkOneArg(this.$name,C,F);const L=C[0];if(!Sk.builtin.checkString(L))throw new Sk.builtin.TypeError("attribute name must be string, not '"+Sk.abstr.typeName(L)+"'");C=this.call(w,L,!0);return Sk.misceval.chain(C,z=>{if(void 0===z)throw new Sk.builtin.AttributeError(Sk.abstr.typeName(w)+" has no attribute "+L.$jsstr());return z})},$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Return getattr(self, name)."};G.__getattr__={$name:"__getattr__",$slot_name:"tp$getattr",$slot_func:G.__getattribute__.$slot_func,
$wrapper:null,$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Return getattr(self, name)."};G.__setattr__={$name:"__setattr__",$slot_name:"tp$setattr",$slot_func:p("__setattr__","__delattr__"),$wrapper:function(w,C,F){Sk.abstr.checkNoKwargs(this.$name,F);Sk.abstr.checkArgsLen(this.$name,C,2,2);k(w,this);return Sk.misceval.chain(this.call(w,C[0],C[1],!0),()=>Sk.builtin.none.none$)},$textsig:"($self, name, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Implement setattr(self, name, value)."};G.__delattr__=
{$name:"__delattr__",$slot_name:"tp$setattr",$slot_func:G.__setattr__.$slot_func,$wrapper:function(w,C,F){Sk.abstr.checkOneArg(this.$name,C,F);k(w,this);this.call(w,C[0]);return Sk.builtin.none.none$},$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Implement delattr(self, name)."};G.__get__={$name:"__get__",$slot_name:"tp$descr_get",$slot_func:function(w){return function(C,F,L){null===C&&(C=Sk.builtin.none.none$);null==F&&(F=Sk.builtin.none.none$);const z=w.tp$descr_get?w.tp$descr_get(this,this.ob$type):
w;C=Sk.misceval.callsimOrSuspendArray(z,[C,F]);return L?C:Sk.misceval.retryOptionalSuspensionOrThrow(C)}},$wrapper:function(w,C,F){Sk.abstr.checkNoKwargs(this.$name,F);Sk.abstr.checkArgsLen(this.$name,C,1,2);F=C[0];C=C[1];F===Sk.builtin.none.none$&&(F=null);C===Sk.builtin.none.none$&&(C=null);if(null===C&&null===F)throw new Sk.builtin.TypeError("__get__(None, None) is invalid");return this.call(w,F,C,!0)},$textsig:"($self, instance, owner, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Return an attribute of instance, which is of type owner."};
G.__set__={$name:"__set__",$slot_name:"tp$descr_set",$slot_func:p("__set__","__delete__"),$wrapper:l,$textsig:"($self, instance, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Set an attribute of instance to value."};G.__delete__={$name:"__delete__",$slot_name:"tp$descr_set",$slot_func:G.__set__.$slot_func,$wrapper:r,$textsig:"($self, instance, /)",$flags:{OneArg:!0},$doc:"Delete an attribute of instance."};G.__eq__={$name:"__eq__",$slot_name:"ob$eq",$slot_func:m,$wrapper:h,$textsig:"($self, value, /)",
$flags:{OneArg:!0},$doc:"Return self==value."};G.__ge__={$name:"__ge__",$slot_name:"ob$ge",$slot_func:m,$wrapper:h,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self>=value."};G.__gt__={$name:"__gt__",$slot_name:"ob$gt",$slot_func:m,$wrapper:h,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self>value."};G.__le__={$name:"__le__",$slot_name:"ob$le",$slot_func:m,$wrapper:h,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self<=value."};G.__lt__={$name:"__lt__",
$slot_name:"ob$lt",$slot_func:m,$wrapper:h,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self<value."};G.__ne__={$name:"__ne__",$slot_name:"ob$ne",$slot_func:m,$wrapper:h,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self!=value."};G.__iter__={$name:"__iter__",$slot_name:"tp$iter",$slot_func:n,$wrapper:a,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Implement iter(self)."};G.__next__={$name:"__next__",$slot_name:"tp$iternext",$slot_func:function(w){return function(C){const F=
w.tp$descr_get?w.tp$descr_get(this,this.ob$type):w,L=Sk.misceval.tryCatch(()=>Sk.misceval.callsimOrSuspendArray(F,[]),z=>{if(z instanceof Sk.builtin.StopIteration)this.gi$ret=z.$value;else throw z;});return C?L:Sk.misceval.retryOptionalSuspensionOrThrow(L)}},$wrapper:function(w,C,F){Sk.abstr.checkNoArgs(this.$name,C,F);return Sk.misceval.chain(w.tp$iternext(!0),L=>{if(void 0===L)throw new Sk.builtin.StopIteration;return L})},$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Implement next(self)."};G.__len__=
{$name:"__len__",$slot_name:"sq$length",$slot_func:function(w){return function(C){const F=w.tp$descr_get?w.tp$descr_get(this,this.ob$type):w;if(C)return C=Sk.misceval.callsimOrSuspendArray(F,[]),Sk.misceval.chain(C,L=>Sk.misceval.asIndexOrThrow(L));C=Sk.misceval.callsimArray(F,[]);return Sk.misceval.asIndexOrThrow(C)}},$wrapper:f(function(w,C,F){Sk.abstr.checkNoArgs(this.$name,C,F);w=this.call(w,!0);return Sk.misceval.chain(w,L=>void 0===L?Sk.builtin.none.none$:L)},w=>new Sk.builtin.int_(w),!0),$flags:{NoArgs:!0},
$textsig:"($self, /)",$doc:"Return len(self)."};G.__contains__={$name:"__contains__",$slot_name:"sq$contains",$slot_func:function(w){return function(C,F){const L=w.tp$descr_get?w.tp$descr_get(this,this.ob$type):w;C=Sk.misceval.callsimOrSuspendArray(L,[C]);C=Sk.misceval.chain(C,z=>Sk.misceval.isTrue(z));return C.$isSuspension?F?C:Sk.misceval.retryOptionalSuspensionOrThrow(C):C}},$wrapper:f(b,w=>new Sk.builtin.bool(w),!0),$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Return key in self."};G.__getitem__=
{$name:"__getitem__",$slot_name:"mp$subscript",$slot_func:function(w){return function(C,F){const L=w.tp$descr_get?w.tp$descr_get(this,this.ob$type):w;C=Sk.misceval.callsimOrSuspendArray(L,[C]);return F?C:Sk.misceval.retryOptionalSuspensionOrThrow(C)}},$wrapper:b,$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Return self[key]."};G.__setitem__={$name:"__setitem__",$slot_name:"mp$ass_subscript",$slot_func:p("__setitem__","__delitem__","does not support item assignment"),$wrapper:l,$textsig:"($self, key, value, /)",
$flags:{MinArgs:2,MaxArgs:2},$doc:"Set self[key] to value."};G.__delitem__={$name:"__delitem__",$slot_name:"mp$ass_subscript",$slot_func:G.__setitem__.$slot_func,$wrapper:r,$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Delete self[key]."};G.__add__={$name:"__add__",$slot_name:"nb$add",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self+value."};G.__radd__={$name:"__radd__",$slot_name:"nb$reflected_add",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",
$flags:{OneArg:!0},$doc:"Return value+self."};G.__iadd__={$name:"__iadd__",$slot_name:"nb$inplace_add",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self+=value."};G.__sub__={$name:"__sub__",$slot_name:"nb$subtract",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self-value."};G.__rsub__={$name:"__rsub__",$slot_name:"nb$reflected_subtract",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value-self."};
G.__imul__={$name:"__imul__",$slot_name:"nb$inplace_multiply",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self*=value."};G.__mul__={$name:"__mul__",$slot_name:"nb$multiply",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self*value."};G.__rmul__={$name:"__rmul__",$slot_name:"nb$reflected_multiply",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value*self."};G.__isub__={$name:"__isub__",
$slot_name:"nb$inplace_subtract",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self-=value."};G.__mod__={$name:"__mod__",$slot_name:"nb$remainder",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self%value."};G.__rmod__={$name:"__rmod__",$slot_name:"nb$reflected_remainder",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value%self."};G.__imod__={$name:"__imod__",$slot_name:"nb$inplace_remainder",
$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement value%=self."};G.__divmod__={$name:"__divmod__",$slot_name:"nb$divmod",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return divmod(self, value)."};G.__rdivmod__={$name:"__rdivmod__",$slot_name:"nb$reflected_divmod",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return divmod(value, self)"};G.__pos__={$name:"__pos__",$slot_name:"nb$positive",$slot_func:n,
$wrapper:a,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"+self"};G.__neg__={$name:"__neg__",$slot_name:"nb$negative",$slot_func:n,$wrapper:a,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"-self"};G.__abs__={$name:"__abs__",$slot_name:"nb$abs",$slot_func:n,$wrapper:a,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"abs(self)"};G.__bool__={$name:"__bool__",$slot_name:"nb$bool",$slot_func:d("__bool__",Sk.builtin.checkBool,"bool",w=>0!==w.v),$wrapper:f(a,w=>new Sk.builtin.bool(w)),$textsig:"($self, /)",
$flags:{NoArgs:!0},$doc:"self != 0"};G.__invert__={$name:"__invert__",$slot_name:"nb$invert",$slot_func:n,$wrapper:a,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"~self"};G.__lshift__={$name:"__lshift__",$slot_name:"nb$lshift",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self<<value."};G.__rlshift__={$name:"__rlshift__",$slot_name:"nb$reflected_lshift",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value<<self."};G.__rshift__=
{$name:"__rshift__",$slot_name:"nb$rshift",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self>>value."};G.__rrshift__={$name:"__rrshift__",$slot_name:"nb$reflected_rshift",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value>>self."};G.__ilshift__={$name:"__ilshift__",$slot_name:"nb$inplace_lshift",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self<<=value."};G.__irshift__={$name:"__irshift__",
$slot_name:"nb$inplace_rshift",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self=>>value."};G.__and__={$name:"__and__",$slot_name:"nb$and",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self&value."};G.__rand__={$name:"__rand__",$slot_name:"nb$refelcted_and",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value&self."};G.__iand__={$name:"__iand__",$slot_name:"nb$inplace_and",$slot_func:m,
$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self&=value."};G.__xor__={$name:"__xor__",$slot_name:"nb$xor",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self^value."};G.__rxor__={$name:"__rxor__",$slot_name:"nb$reflected_xor",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value^self."};G.__ixor__={$name:"__ixor__",$slot_name:"nb$inplace_xor",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",
$flags:{OneArg:!0},$doc:"Implement self^=value."};G.__or__={$name:"__or__",$slot_name:"nb$or",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self|value."};G.__ror__={$name:"__ror__",$slot_name:"nb$reflected_or",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value|self."};G.__ior__={$name:"__ior__",$slot_name:"nb$inplace_or",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self|=value."};
G.__int__={$name:"__int__",$slot_name:"nb$int",$slot_func:d("__int__",Sk.builtin.checkInt,"int"),$wrapper:a,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"int(self)"};G.__float__={$name:"__float__",$slot_name:"nb$float",$slot_func:d("__float__",Sk.builtin.checkFloat,"float"),$wrapper:a,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"float(self)"};G.__floordiv__={$name:"__floordiv__",$slot_name:"nb$floor_divide",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self//value."};
G.__rfloordiv__={$name:"__rfloordiv__",$slot_name:"nb$reflected_floor_divide",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value//self."};G.__ifloordiv__={$name:"__ifloordiv__",$slot_name:"nb$inplace_floor_divide",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self//=value."};G.__truediv__={$name:"__truediv__",$slot_name:"nb$divide",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self/value."};
G.__rtruediv__={$name:"__rtruediv__",$slot_name:"nb$reflected_divide",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value/self."};G.__itruediv__={$name:"__itruediv__",$slot_name:"nb$inplace_divide",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self/=value."};G.__index__={$name:"__index__",$slot_name:"nb$index",$slot_func:d("__index__",Sk.builtin.checkInt,"int",w=>w.v),$wrapper:f(a,w=>new Sk.builtin.int_(w)),$textsig:"($self, /)",
$flags:{NoArgs:!0},$doc:"Return self converted to an integer, if self is suitable for use as an index into a list."};G.__pow__={$name:"__pow__",$slot_name:"nb$power",$slot_func:function(w){return function(C,F){const L=w.tp$descr_get?w.tp$descr_get(this,this.ob$type):w;return void 0==F?Sk.misceval.callsimArray(L,[C]):Sk.misceval.callsimArray(L,[C,F])}},$wrapper:e,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Return pow(self, value, mod)."};G.__rpow__={$name:"__rpow__",$slot_name:"nb$reflected_power",
$slot_func:G.__pow__.$slot_func,$wrapper:e,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Return pow(value, self, mod)."};G.__ipow__={$name:"__ipow__",$slot_name:"nb$inplace_power",$slot_func:G.__pow__.$slot_func,$wrapper:e,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Implement **="};G.__matmul__={$name:"__matmul__",$slot_name:"nb$matrix_multiply",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self@value."};
G.__rmatmul__={$name:"__rmatmul__",$slot_name:"nb$reflected_matrix_multiply",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value@self."};G.__imatmul__={$name:"__imatmul__",$slot_name:"nb$inplace_matrix_multiply",$slot_func:m,$wrapper:c,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self@=value."};G.__long__={$name:"__long__",$slot_name:"nb$long",$slot_func:d("__long__",Sk.builtin.checkInt,"int"),$wrapper:a,$textsig:"($self, /)",$flags:{NoArgs:!0},
$doc:"int(self)"};var x,v={next:{$name:"next",$slot_name:"tp$iternext",$slot_func:G.__next__.$slot_func,$wrapper:G.__next__.$wrapper,$textsig:G.__next__.$textsig,$flags:G.__next__.$flags},__nonzero__:{$name:"__nonzero__",$slot_name:"nb$bool",$slot_func:d("__nonzero__",Sk.builtin.checkInt,"int",w=>0!==w.v),$wrapper:f(a,w=>new Sk.builtin.bool(w)),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"x.__nonzero__() <==> x != 0"},__div__:{$name:"__div__",$slot_name:"nb$divide",$slot_func:m,$wrapper:c,$textsig:"($self, other/)",
$flags:{OneArg:!0},$doc:"x.__div__(y) <==> x/y"},__rdiv__:{$name:"__rdiv__",$slot_name:"nb$reflected_divide",$slot_func:m,$wrapper:c,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"x.__rdiv__(y) <==> x/y"},__idiv__:{$name:"__idiv__",$slot_name:"nb$inplace_divide",$slot_func:m,$wrapper:c,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"implement self /= other"}};Sk.subSlots={main_slots:Object.entries({tp$init:"__init__",tp$call:"__call__",$r:"__repr__",tp$str:"__str__",tp$getattr:"__getattribute__",
tp$setattr:["__setattr__","__delattr__"],ob$eq:"__eq__",ob$ne:"__ne__",ob$lt:"__lt__",ob$le:"__le__",ob$gt:"__gt__",ob$ge:"__ge__",tp$descr_get:"__get__",tp$descr_set:["__set__","__delete__"],tp$iter:"__iter__",tp$iternext:"__next__"}),number_slots:Object.entries({nb$abs:"__abs__",nb$negative:"__neg__",nb$positive:"__pos__",nb$int:"__int__",nb$long:"__long__",nb$float:"__float__",nb$index:"__index__",nb$add:"__add__",nb$reflected_add:"__radd__",nb$inplace_add:"__iadd__",nb$subtract:"__sub__",nb$reflected_subtract:"__rsub__",
nb$inplace_subtract:"__isub__",nb$multiply:"__mul__",nb$reflected_multiply:"__rmul__",nb$inplace_multiply:"__imul__",nb$floor_divide:"__floordiv__",nb$reflected_floor_divide:"__rfloordiv__",nb$inplace_floor_divide:"__ifloordiv__",nb$invert:"__invert__",nb$remainder:"__mod__",nb$reflected_remainder:"__rmod__",nb$inplace_remainder:"__imod__",nb$divmod:"__divmod__",nb$reflected_divmod:"__rdivmod__",nb$power:"__pow__",nb$reflected_power:"__rpow__",nb$inplace_power:"__ipow__",nb$divide:"__truediv__",nb$reflected_divide:"__rtruediv__",
nb$inplace_divide:"__itruediv__",nb$bool:"__bool__",nb$and:"__and__",nb$reflected_and:"__rand__",nb$inplace_and:"__iand__",nb$or:"__or__",nb$reflected_or:"__ror__",nb$inplace_or:"__ior__",nb$xor:"__xor__",nb$reflected_xor:"__rxor__",nb$inplace_xor:"__ixor__",nb$lshift:"__lshift__",nb$reflected_lshift:"__rlshift__",nb$rshift:"__rshift__",nb$reflected_rshift:"__rrshift__",nb$inplace_lshift:"__ilshift__",nb$inplace_rshift:"__irshift__",nb$matrix_multiply:"__matmul__",nb$reflected_matrix_multiply:"__rmatmul__",
nb$inplace_matrix_multiply:"__imatmul__"}),sequence_and_mapping_slots:Object.entries({sq$length:"__len__",sq$contains:"__contains__",mp$subscript:"__getitem__",mp$ass_subscript:["__setitem__","__delitem__"],nb$add:"__add__",nb$multiply:"__mul__",nb$reflected_multiply:"__rmul__",nb$inplace_add:"__iadd__",nb$inplace_multiply:"__imul__"})};Sk.reflectedNumberSlots={nb$add:{reflected:"nb$reflected_add"},nb$subtract:{reflected:"nb$reflected_subtract",slot:function(w){return w instanceof this.constructor?
w.nb$subtract(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$multiply:{reflected:"nb$reflected_multiply"},nb$divide:{reflected:"nb$reflected_divide",slot:function(w){return w instanceof this.constructor?w.nb$divide(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$floor_divide:{reflected:"nb$reflected_floor_divide",slot:function(w){return w instanceof this.constructor?w.nb$floor_divide(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$remainder:{reflected:"nb$reflected_remainder",slot:function(w){return w instanceof
this.constructor?w.nb$remainder(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$divmod:{reflected:"nb$reflected_divmod",slot:function(w){return w instanceof this.constructor?w.nb$divmod(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$power:{reflected:"nb$reflected_power",slot:function(w,C){return w instanceof this.constructor?w.nb$power(this,C):Sk.builtin.NotImplemented.NotImplemented$}},nb$and:{reflected:"nb$reflected_and"},nb$or:{reflected:"nb$reflected_or"},nb$xor:{reflected:"nb$reflected_xor"},
nb$lshift:{reflected:"nb$reflected_lshift",slot:function(w){return w instanceof this.constructor?w.nb$lshift(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$rshift:{reflected:"nb$reflected_rshift",slot:function(w){return w instanceof this.constructor?w.nb$rshift(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$matrix_multiply:{reflected:"nb$reflexted_matrix_multiply",slot:function(w){return w instanceof this.constructor?w.nb$matrix_multiply(this):Sk.builtin.NotImplemented.NotImplemented$}}};
Sk.sequenceAndMappingSlots={sq$concat:["nb$add"],sq$repeat:["nb$multiply","nb$reflected_multiply"],mp$length:["sq$length"],sq$inplace_repeat:["nb$inplace_multiply"],sq$inplace_concat:["nb$inplace_add"]};Sk.dunderToSkulpt={__repr__:"$r",__str__:"tp$str",__init__:"tp$init",__new__:"tp$new",__hash__:"tp$hash",__call__:"tp$call",__iter__:"tp$iter",__next__:"tp$iternext",__eq__:"ob$eq",__ne__:"ob$ne",__lt__:"ob$lt",__le__:"ob$le",__gt__:"ob$gt",__ge__:"ob$ge",__abs__:"nb$abs",__neg__:"nb$negative",__pos__:"nb$positive",
__int__:"nb$int",__float__:"nb$float",__index__:"nb$index",__add__:"nb$add",__radd__:"nb$reflected_add",__iadd__:"nb$inplace_add",__sub__:"nb$subtract",__rsub__:"nb$reflected_subtract",__isub__:"nb$inplace_subtract",__mul__:"nb$multiply",__rmul__:"nb$reflected_multiply",__imul__:"nb$inplace_multiply",__truediv__:"nb$divide",__rtruediv__:"nb$reflected_divide",__itruediv__:"nb$inplace_divide",__floordiv__:"nb$floor_divide",__rfloordiv__:"nb$reflected_floor_divide",__ifloordiv__:"nb$inplace_floor_divide",
__invert__:"nb$invert",__mod__:"nb$remainder",__rmod__:"nb$reflected_remainder",__imod__:"nb$inplace_remainder",__divmod__:"nb$divmod",__rdivmod__:"nb$reflected_divmod",__pow__:"nb$power",__rpow__:"nb$reflected_power",__ipow__:"nb$inplace_power",__bool__:"nb$bool",__long__:"nb$long",__lshift__:"nb$lshift",__rlshift__:"nb$reflected_lshift",__ilshift__:"nb$inplace_lshift",__rshift__:"nb$rshift",__rrshift__:"nb$reflected_rshift",__irshift__:"nb$inplace_rshift",__and__:"nb$and",__rand__:"nb$reflected_and",
__iand__:"nb$inplace_and",__or__:"nb$or",__ror__:"nb$reflected_or",__ior__:"nb$inplace_or",__xor__:"nb$xor",__rxor__:"nb$reflected_xor",__ixor__:"nb$inplace_xor",__matmul__:"nb$matrix_multiply",__rmatmul__:"nb$reflected_matrix_multiply",__imatmul__:"nb$inplace_matrix_multiply",__get__:"tp$descr_get",__set__:"tp$descr_set",__delete__:"tp$descr_set",__getattribute__:"tp$getattr",__getattr__:"tp$getattr",__setattr__:"tp$setattr",__delattr__:"tp$setattr",__len__:"sq$length",__contains__:"sq$contains",
__getitem__:"mp$subscript",__setitem__:"mp$ass_subscript",__delitem__:"mp$ass_subscript"};Sk.exportSymbol("Sk.setupDunderMethods",Sk.setupDunderMethods);Sk.setupDunderMethods=function(w){function C(y,E,J){for(let Q=0;Q<y.length;Q++){const X=y[Q].prototype;X.hasOwnProperty(J)||(X[J]=X[E],delete X[E])}}var F=Sk.slots;if(!w||void 0!==x){var L=Sk.abstr.built$iterators,z=[Sk.builtin.int_,Sk.builtin.lng,Sk.builtin.float_,Sk.builtin.complex],D=Sk.subSlots.number_slots,K=Sk.subSlots.main_slots,R=K.findIndex(y=>
"tp$iternext"===y[0]),T=D.findIndex(y=>"nb$bool"===y[0]),t=Sk.dunderToSkulpt;if(w){t.__bool__="nb$bool";t.__next__="tp$iternext";delete t.__nonzero__;delete t.__div__;delete t.__rdiv__;delete t.__idiv__;delete t.next;for(let y in x)F[y]=x[y];for(let y in v)delete F[y];for(w=0;w<z.length;w++)F=z[w].prototype,delete F.__div__,delete F.__rdiv__;K[R][1]="__next__";D[T][1]="__bool__";C(L,"next","__next__");C(z,"__bool__","__nonzero__")}else{void 0===x&&(F.py3$slots={__next__:F.__next__},x=F.py3$slots);
t.next="tp$iternext";t.__nonzero__="nb$bool";t.__div__="nb$divide";t.__rdiv__="nb$reflected_divide";t.__idiv__="nb$inplace_divide";delete t.__bool__;delete t.__next__;for(let y in v)F[y]=v[y];for(let y in x)delete F[y];K[R][1]="next";D[T][1]="__nonzero__";C(L,"__next__","next");C(z,"__nonzero__","__bool__");for(L=0;L<z.length;L++)D=z[L],K=D.prototype,K.hasOwnProperty("__div__")||(K.__div__=new Sk.builtin.wrapper_descriptor(D,v.__div__,K.nb$divide),K.__rdiv__=new Sk.builtin.wrapper_descriptor(D,v.__rdiv__,
Sk.reflectedNumberSlots.nb$divide.slot))}}}},function(G,V){function a(r,h,f){return Sk.abstr.buildNativeClass(r,{constructor:f.constructor,slots:Object.assign({tp$getattr:Sk.generic.getAttr,$r:e},f.slots),getsets:Object.assign(f.getsets||{},l),proto:Object.assign(f.proto||{},{d$repr_name:h||r,d$check:c,d$set_check:b}),flags:{sk$unacceptableBase:!0}})}function c(r){if(null==r)return this;if(!r.ob$type.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+
this.d$type.prototype.tp$name+"' object but received a '"+Sk.abstr.typeName(r)+"' object");}function b(r){if(!r.ob$type.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+this.d$type.prototype.tp$name+"' object but received a '"+Sk.abstr.typeName(r)+"' object");}function e(){return new Sk.builtin.str("<"+this.d$repr_name+" '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' objects>")}const l={__doc__:{$get(){return this.d$def.$doc?new Sk.builtin.str(this.d$def.$doc):
Sk.builtin.none.none$}},__objclass__:{$get(){return this.d$type}},__name__:{$get(){return new Sk.builtin.str(this.d$name)}}};G={__text_signature__:{$get(){return this.d$def.$textsig?new Sk.builtin.str(this.d$def.$textsig):Sk.builtin.none.none$}}};Sk.builtin.getset_descriptor=a("getset_descriptor",void 0,{constructor:function(r,h){this.d$def=h;this.$get=h.$get;this.$set=h.$set;this.d$type=r;this.d$name=h.$name},slots:{tp$descr_get(r,h,f){if(h=this.d$check(r))return h;if(void 0!==this.$get)return r=
this.$get.call(r),f?r:Sk.misceval.retryOptionalSuspensionOrThrow(r);throw new Sk.builtin.AttributeError("getset_descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' objects is not readable");},tp$descr_set(r,h,f){this.d$set_check(r);if(void 0!==this.$set)return r=this.$set.call(r,h),f?r:Sk.misceval.retryOptionalSuspensionOrThrow(r);throw new Sk.builtin.AttributeError("attribute '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' objects is readonly");}}});Sk.builtin.method_descriptor=
a("method_descriptor","method",{constructor:function(r,h){this.d$def=h;this.$meth=h.$meth;this.d$type=r;this.d$name=h.$name||"<native JS>";this.$flags=r=h.$flags||{};r.FastCall&&r.NoKwargs?this.tp$call=this.$methodFastCallNoKwargs:r.FastCall?this.tp$call=this.$methodFastCall:r.NoArgs?this.tp$call=this.$methodCallNoArgs:r.OneArg?this.tp$call=this.$methodCallOneArg:r.NamedArgs?this.tp$call=this.$methodCallNamedArgs:void 0!==r.MinArgs?this.tp$call=this.$methodCallMinArgs:(this.func_code=h.$meth,this.tp$call=
this.$defaultCall,this.$memoiseFlags=Sk.builtin.func.prototype.$memoiseFlags,this.$resolveArgs=Sk.builtin.func.prototype.$resolveArgs)},slots:{tp$call(r,h){return this.tp$call(r,h)},tp$descr_get(r,h){let f;return(f=this.d$check(r))?f:new Sk.builtin.sk_method(this.d$def,r)}},getsets:G,proto:{$methodFastCall(r,h){const f=r.shift();this.m$checkself(f);return this.$meth.call(f,r,h)},$methodFastCallNoKwargs(r,h){const f=r.shift();this.m$checkself(f);Sk.abstr.checkNoKwargs(this.d$name,h);return this.$meth.call(f,
r)},$methodCallNoArgs(r,h){const f=r.shift();this.m$checkself(f);Sk.abstr.checkNoArgs(this.d$name,r,h);return this.$meth.call(f)},$methodCallOneArg(r,h){const f=r.shift();this.m$checkself(f);Sk.abstr.checkOneArg(this.d$name,r,h);return this.$meth.call(f,r[0])},$methodCallNamedArgs(r,h){const f=r.shift();this.m$checkself(f);r=Sk.abstr.copyKeywordsToNamedArgs(this.d$name,this.$flags.NamedArgs,r,h,this.$flags.Defaults);return this.$meth.call(f,...r)},$methodCallMinArgs(r,h){const f=r.shift();this.m$checkself(f);
Sk.abstr.checkNoKwargs(this.d$name,h);Sk.abstr.checkArgsLen(this.d$name,r,this.$flags.MinArgs,this.$flags.MaxArgs);return this.$meth.call(f,...r)},$defaultCall(r,h){this.m$checkself(r[0]);return Sk.builtin.func.prototype.tp$call.call(this,r,h)},m$checkself(r){if(void 0===r)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");this.d$check(r)}}});Sk.builtin.wrapper_descriptor=a("wrapper_descriptor","slot wrapper",{constructor:function(r,
h,f){this.d$def=h;this.d$type=r;this.d$name=f.$name=h.$name;this.d$wrapped=f},slots:{tp$descr_get(r,h){let f;return(f=this.d$check(r))?f:new Sk.builtin.method_wrapper(this,r)},tp$call(r,h){if(1>r.length)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");const f=r.shift();if(!f.ob$type.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+this.d$type.prototype.tp$name+"' object but received a '"+
Sk.abstr.typeName(f)+"'");return this.raw$call(f,r,h)}},proto:{raw$call(r,h,f){this.d$wrapped.$name=this.d$name;return this.d$def.$wrapper.call(this.d$wrapped,r,h,f)}}});Sk.builtin.method_wrapper=a("method_wrapper",void 0,{constructor:function(r,h){this.m$descr=r;this.m$self=h;this.d$def=r.d$def;this.d$name=r.d$name;this.d$type=r.d$type},slots:{tp$call(r,h){return this.m$descr.raw$call(this.m$self,r,h)},tp$richcompare(r,h){if("Eq"!==h&&"NotEq"!==h||!(r instanceof Sk.builtin.method_wrapper))return Sk.builtin.NotImplemented.NotImplemented$;
r=this.m$self===r.m$self&&this.m$descr===r.m$descr;return"Eq"===h?r:!r},$r(){return new Sk.builtin.str("<method-wrapper '"+this.d$name+"' of "+Sk.abstr.typeName(this.m$self)+" object>")}},getsets:{__self__:{$get(){return this.m$self}}}});Sk.builtin.classmethod_descriptor=a("classmethod_descriptor","method",{constructor:function(r,h){this.d$def=h;this.$meth=h.$meth;this.d$type=r;this.d$name=h.$name||"<native JS>"},slots:{tp$call(r,h){if(1>r.length)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+
"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");const f=r.shift();return this.tp$descr_get(null,f).tp$call(r,h)},tp$descr_get(r,h,f){if(void 0===h)if(null!==r)h=h||r.ob$type;else throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' for type '"+this.d$type.prototype.tp$name+"' needs an object or a type");if(!h.ob$type.$isSubType(Sk.builtin.type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' for type '"+this.d$type.prototype.tp$name+"' needs a type not a '"+
Sk.abstr.typeName(h)+"' as arg 2");if(!h.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+this.d$type.prototype.tp$name+"' object but received a '"+Sk.abstr.typeName(h)+"' object");return new Sk.builtin.sk_method(this.d$def,h)}},getsets:G});[Sk.builtin.method_descriptor,Sk.builtin.getset_descriptor,Sk.builtin.wrapper_descriptor,Sk.builtin.method_wrapper,Sk.builtin.classmethod_descriptor].forEach(r=>{Sk.abstr.setUpSlots(r);Sk.abstr.setUpMethods(r);
Sk.abstr.setUpGetSets(r)})},function(G,V){Sk.builtin.sk_method=Sk.abstr.buildNativeClass("builtin_function_or_method",{constructor:function sk_method(a,c,b){this.$meth=a.$meth.bind(c);this.$doc=a.$doc;this.$self=c||null;this.$module=b?new Sk.builtin.str(b):null;this.$name=a.$name||a.$meth.name||"<native JS>";this.m$def=a;this.$textsig=a.$textsig;this.$flags=a=a.$flags||{};a.FastCall&&a.NoKwargs?this.tp$call=this.$fastCallNoKwargs:a.FastCall?this.tp$call=this.$meth:a.NoArgs?this.tp$call=this.$callNoArgs:a.OneArg?
this.tp$call=this.$callOneArg:a.NamedArgs?this.tp$call=this.$callNamedArgs:void 0!==a.MinArgs?this.tp$call=this.$callMinArgs:(this.func_code=this.$meth,this.tp$call=this.$defaultCallMethod)},proto:{$fastCallNoKwargs(a,c){Sk.abstr.checkNoKwargs(this.$name,c);return this.$meth(a)},$callNoArgs(a,c){Sk.abstr.checkNoArgs(this.$name,a,c);return this.$meth()},$callOneArg(a,c){Sk.abstr.checkOneArg(this.$name,a,c);return this.$meth(a[0])},$callNamedArgs(a,c){a=Sk.abstr.copyKeywordsToNamedArgs(this.$name,this.$flags.NamedArgs,
a,c,this.$flags.Defaults);return this.$meth(...a)},$callMinArgs(a,c){Sk.abstr.checkNoKwargs(this.$name,c);Sk.abstr.checkArgsLen(this.$name,a,this.$flags.MinArgs,this.$flags.MaxArgs);return this.$meth(...a)},$defaultCallMethod(a,c){return null!==this.$self?Sk.builtin.func.prototype.tp$call.call(this,[this.$self,...a],c):Sk.builtin.func.prototype.tp$call.call(this,a,c)},$memoiseFlags(){return Sk.builtin.func.prototype.$memoiseFlags.call(this)},$resolveArgs(){return Sk.builtin.func.prototype.$resolveArgs.call(this)}},
flags:{sk$unacceptableBase:!0},slots:{tp$getattr:Sk.generic.getAttr,$r(){return null===this.$self?new Sk.builtin.str("<built-in function "+this.$name+">"):new Sk.builtin.str("<built-in method "+this.$name+" of "+Sk.abstr.typeName(this.$self)+" object>")},tp$call(a,c){return this.tp$call(a,c)},tp$richcompare(a,c){if("Eq"!==c&&"NotEq"!==c||!(a instanceof Sk.builtin.sk_method))return Sk.builtin.NotImplemented.NotImplemented$;a=this.$self===a.$self&&this.m$def.$meth===a.m$def.$meth;return"Eq"===c?a:!a}},
getsets:{__module__:{$get(){return this.$module||Sk.builtin.none.none$},$set(a){this.$module=a=a||Sk.builtin.none.none$}},__doc__:{$get(){return this.$doc?new Sk.builtin.str(this.$doc):Sk.builtin.none.none$}},__name__:{$get(){return new Sk.builtin.str(this.$name)}},__text_signature__:{$get(){return new Sk.builtin.str(this.$textsig)}},__self__:{$get(){return this.$self||Sk.sysModules.mp$lookup(this.$module)||Sk.builtin.none.none$}}}})},function(G,V){Sk.builtin.none=Sk.abstr.buildNativeClass("NoneType",
{constructor:function(){return Sk.builtin.none.none$},slots:{tp$new(a,c){Sk.abstr.checkNoArgs("NoneType",a,c);return Sk.builtin.none.none$},$r(){return new Sk.builtin.str("None")},tp$as_number:!0,nb$bool(){return!1}},proto:{valueOf(){return null}},flags:{sk$unacceptableBase:!0}});Sk.builtin.none.none$=Object.create(Sk.builtin.none.prototype,{v:{value:null,enumerable:!0}});Sk.builtin.NotImplemented=Sk.abstr.buildNativeClass("NotImplementedType",{constructor:function NotImplemented(){return Sk.builtin.NotImplemented.NotImplemented$},
slots:{$r(){return new Sk.builtin.str("NotImplemented")},tp$new(a,c){Sk.abstr.checkNoArgs("NotImplementedType",a,c);return Sk.builtin.NotImplemented.NotImplemented$}},flags:{sk$unacceptableBase:!0}});Sk.builtin.NotImplemented.NotImplemented$=Object.create(Sk.builtin.NotImplemented.prototype,{v:{value:null,enumerable:!0}});G=Sk.abstr.buildNativeClass("ellipsis",{constructor:function(){return Sk.builtin.Ellipsis},slots:{tp$new(a,c){Sk.abstr.checkNoArgs("ellipsis",a,c);return Sk.builtin.Ellipsis},$r(){return new Sk.builtin.str("Ellipsis")}},
flags:{sk$unacceptableBase:!0}});Sk.builtin.Ellipsis=Object.create(G.prototype,{v:{value:"..."}})},function(G,V){const a=/^(?:(.)?([<>=\^]))?([\+\-\s])?(#)?(0)?(\d+)?(,|_)?(?:\.(\d+))?([bcdeEfFgGnosxX%])?$/;Sk.formatting={};let c=function(d,m,g,p){Sk.asserts.assert("string"===typeof m);if(d[6]){var k=parseInt(d[6],10);p=d[2]||(d[5]?"=":p?">":"<");let q=k-(m.length+(g?g.length:0));if(0>=q)return g+m;k=(d[1]||(d[5]?"0":" ")).repeat(q);switch(p){case "=":if("s"===d[9])throw new Sk.builtin.ValueError("'=' alignment not allowed in string format specifier");
return g+k+m;case ">":return k+g+m;case "<":return g+m+k;case "^":return d=Math.floor(q/2),k.substring(0,d)+g+m+k.substring(d)}}return g+m},b=function(d,m){return m?"-":"+"===d[3]?"+":" "===d[3]?" ":""};const e=/\B(?=(\d{3})+(?!\d))/g,l=/\B(?=([A-Za-z0-9]{4})+(?![A-Za-z0-9]))/g;let r=function(d,m,g){Sk.asserts.assert(m instanceof Sk.builtin.int_||m instanceof Sk.builtin.lng);if(d[8])throw new Sk.builtin.ValueError("Precision not allowed in integer format");var p=m.str$(g,!1);m=m.nb$isnegative();m=
b(d,m);d[4]&&(16===g?m+="0x":8===g?m+="0o":2===g&&(m+="0b"));const k=d[9];"X"===k&&(p=p.toUpperCase());if("n"===d[9])p=(+p).toLocaleString();else if(d[7]){p=p.split(".");const q=d[7];if(","===q&&10!==g)throw new Sk.builtin.ValueError(`Cannot specify ',' with '${k}'`);p[0]=p[0].replace(10===g?e:l,q);p=p.join(".")}return c(d,p,m,!0)},h=function(d,m,g){if(!m)return d.str$(10,!0);m=m.match(a);if(!m)throw new Sk.builtin.ValueError("Invalid format specifier");var p=m[9];p||(p=g?"g":"d");if(-1==(g?"fFeEgG%":
"bcdoxXnfFeEgG%").indexOf(p))throw new Sk.builtin.ValueError("Unknown format code '"+m[9]+"' for object of type '"+Sk.abstr.typeName(d)+"'");switch(p){case "d":case "n":return r(m,d,10);case "x":case "X":return r(m,d,16);case "o":return r(m,d,8);case "b":return r(m,d,2);case "c":if(m[3])throw new Sk.builtin.ValueError("Sign not allowed with integer format specifier 'c'");if(m[4])throw new Sk.builtin.ValueError("Alternate form not allowed with integer format specifier 'c'");if(m[7])throw new Sk.builtin.ValueError("Cannot specify ',' with 'c'");
if(m[8])throw new Sk.builtin.ValueError("Cannot specify ',' with 'c'");return c(m,String.fromCodePoint(Sk.builtin.asnum$(d)),"",!0);case "f":case "F":case "e":case "E":case "g":case "G":{if(m[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed in float format specifier");g=Sk.builtin.asnum$(d);"string"===typeof g&&(g=Number(g));if(Infinity===g)return c(m,"inf","",!0);if(-Infinity===g)return c(m,"inf","-",!0);if(isNaN(g))return c(m,"nan","",!0);d=!1;0>g&&(g=-g,d=!0);var k=["toExponential",
"toFixed","toPrecision"]["efg".indexOf(p.toLowerCase())];let q=m[8]?parseInt(m[8],10):6;g=g[k](q);-1!=="EFG".indexOf(p)&&(g=g.toUpperCase());if("g"===p.toLowerCase()||!m[9]){if(k=g.match(/\.(\d*[1-9])?(0+)$/)){let [,x,v]=k;g=g.slice(0,x?-v.length:-(v.length+1))}-1!=g.indexOf(".")||m[9]||(g+=".0")}"e"===p.toLowerCase()&&(g=g.replace(/^([-+]?[0-9]*\.?[0-9]+[eE][-+]?)([0-9])?$/,"$10$2"));m[7]&&(p=g.toString().split("."),p[0]=p[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),g=p.join("."));return c(m,g,b(m,d),
!0)}case "%":if(m[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed with format specifier '%'");d=Sk.builtin.asnum$(d);"string"===typeof d&&(d=Number(d));if(Infinity===d)return c(m,"inf%","",!0);if(-Infinity===d)return c(m,"inf%","-",!0);if(isNaN(d))return c(m,"nan%","",!0);p=!1;0>d&&(d=-d,p=!0);g=m[8]?parseInt(m[8],10):6;d=(100*d).toFixed(g)+"%";return c(m,d,b(m,p),!0);default:throw new Sk.builtin.ValueError("Unknown format code '"+m[9]+"'");}};Sk.formatting.mkNumber__format__=d=>
function(m){if(!Sk.builtin.checkString(m))throw new Sk.builtin.TypeError("format() argument 2 must be str, not "+Sk.abstr.typeName(m));return new Sk.builtin.str(h(this,m.$jsstr(),d))};const f=/^\d+$/,n=/{(((?:\d+)|(?:\w+))?((?:\.(\w+))|(?:\[((?:\d+)|(?:\w+))\])?))?(?:!(.))?(?::([^}]*))?}/g;Sk.formatting.format=function(d,m){m=m||[];const g={};for(let v=0;v<m.length;v+=2)g[m[v]]=m[v+1];let p;const k=v=>{if(void 0===p)p=v;else if(p!==v)throw new Sk.builtin.ValueError(`cannot switch from ${p} to ${v}`);
},q=v=>{let w;if("number"===typeof v)k("manual field specification"),w=d[v];else if(f.test(v))k("automatic field numbering"),w=d[v];else if(w=g[v],void 0===w)throw new Sk.builtin.KeyError(v);if(void 0===w)throw new Sk.builtin.IndexError(`Replacement index ${v} out of range for positional args tuple`);return w};let x=0;m=this.v.replace(n,function(v,w,C,F,L,z,D,K,R,T){let t;void 0!==z&&""!==z?(L=q(C),t=L.constructor===Array?L[z]:f.test(z)?Sk.abstr.objectGetItem(L,new Sk.builtin.int_(parseInt(z,10)),
!1):Sk.abstr.objectGetItem(L,new Sk.builtin.str(z),!1),x++):void 0!==L&&""!==L?(z=q(C||x++),t=Sk.abstr.gattr(z,new Sk.builtin.str(L))):void 0!==C&&""!==C?t=q(C):void 0===w||""===w?(t=q(x),x++):f.test(w)&&(t=q(w),x++);if("s"===D)t=new Sk.builtin.str(t);else if("r"===D)t=Sk.builtin.repr(t);else if("a"===D)t=Sk.builtin.ascii(t);else if(""!==D&&void 0!==D)throw new Sk.builtin.ValueError("Unknown conversion specifier "+D);return Sk.abstr.objectFormat(t,new Sk.builtin.str(K)).$jsstr()});return new Sk.builtin.str(m)};
Sk.formatting.formatString=function(d){if(!Sk.builtin.checkString(d))throw new Sk.builtin.TypeError("format() argument 2 must be str, not "+Sk.abstr.typeName(d));d=d.$jsstr().match(a);if(d[9]&&"s"!==d[9])throw new Sk.builtin.ValueError("Unknown format code '"+d[9]+"' for object of type 'str'");if(d[3])throw new Sk.builtin.ValueError("Sign not allowed in string format specifier");if(d[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed with string format specifier");if(d[7])throw new Sk.builtin.ValueError("Cannot specify ',' with 's'");
let m=this.v;d[8]&&(m=m.substring(0,d[8]));return new Sk.builtin.str(c(d,m,"",!1))}},function(G,V,a){function c(z){let D;const K=[];for(let R=0;R<z.length;R++)D=z.charAt(R),x.test(D)?K.push(D):"\\000"===D?K.push("\\000"):K.push("\\"+D);return K.join("")}function b(z,D,K){D=Sk.builtin.checkNone(D)?null:z.get$tgt(D);if(null!==D&&!D.length)throw new Sk.builtin.ValueError("empty separator");z=z.v;var R=0;if(null===D){var T=/[\s\xa0]+/g;R=z.length;z=z.replace(w,"");R-=z.length}else T=D.replace(v,"\\$1"),
T=new RegExp(T,"g");const t=[];let y=0,E=0,J;for(K=0>K?Infinity:K;null!=(J=T.exec(z))&&E<K&&J.index!==T.lastIndex;)t.push(y+R),t.push(J.index+R),y=T.lastIndex,E+=1;if(null!==D||z.length-y)t.push(y+R),t.push(z.length+R);return t}function e(z,D){return function(K){if(void 0===K||Sk.builtin.checkNone(K))K=z;else if(K instanceof Sk.builtin.str)K=c(K.v),K=new RegExp(D(K),"g");else throw new Sk.builtin.TypeError("strip arg must be None or str");return new Sk.builtin.str(this.v.replace(K,""))}}function l(z){return function(D){D=
this.get$tgt(D);const K=this.v;let R;if(z){if(R=K.lastIndexOf(D),0>R)return new Sk.builtin.tuple([new Sk.builtin.str(""),new Sk.builtin.str(""),new Sk.builtin.str(K)])}else if(R=K.indexOf(D),0>R)return new Sk.builtin.tuple([new Sk.builtin.str(K),new Sk.builtin.str(""),new Sk.builtin.str("")]);return new Sk.builtin.tuple([new Sk.builtin.str(K.substring(0,R)),new Sk.builtin.str(D),new Sk.builtin.str(K.substring(R+D.length))])}}function r(z,D){return function(K,R){K=Sk.misceval.asIndexSized(K,Sk.builtin.OverflowError);
if(void 0===R)R=" ";else if(R instanceof Sk.builtin.str&&1===R.sq$length())R=R.v;else throw new Sk.builtin.TypeError("the fill character must be a str of length 1");var T=this.sq$length();if(T>=K)return new Sk.builtin.str(this.v);if(D)return T=K-T,K=Math.floor(T/2)+(T&K&1),R=R.repeat(K)+this.v+R.repeat(T-K),new Sk.builtin.str(R);R=R.repeat(K-T);return new Sk.builtin.str(z?R+this.v:this.v+R)}}function h(z,D,K){({start:D,end:K}=Sk.builtin.slice.startEnd$wrt(z,D,K));if(z.$hasAstralCodePoints()){const R=
z.codepoints[D];D=void 0===R?D+z.v.length-z.codepoints.length:R;K=z.codepoints[K];K=void 0===K?z.v.length:K}return{start:D,end:K}}function f(z){return function(D,K,R){D=this.get$tgt(D);({start:K,end:R}=h(this,K,R));if(R<K)return-1;R-=D.length;D=z?this.v.lastIndexOf(D,R):this.v.indexOf(D,K);D=D>=K&&D<=R?D:-1;if(this.codepoints){R=this.sq$length();K=-1;for(let T=0;T<R;T++)D==this.codepoints[T]&&(K=T)}else K=D;return K}}function n(z,D){return function(K,R,T){if(!(K instanceof Sk.builtin.str||K instanceof
Sk.builtin.tuple))throw new Sk.builtin.TypeError(z+" first arg must be str or a tuple of str, not "+Sk.abstr.typeName(K));({start:R,end:T}=h(this,R,T));if(R>T)return Sk.builtin.bool.false$;R=this.v.slice(R,T);if(K instanceof Sk.builtin.tuple){for(let t=Sk.abstr.iter(K),y=t.tp$iternext();void 0!==y;y=t.tp$iternext()){if(!(y instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("tuple for "+z+" must only contain str, not "+Sk.abstr.typeName(y));if(D(R,y.v))return Sk.builtin.bool.true$}return Sk.builtin.bool.false$}return new Sk.builtin.bool(D(R,
K.v))}}function d(z){return void 0===F[z]?z:z+"_$rw$"}G=a(1).default;var m=/^[0-9!#_]/;V=G.Zs.replace(" ","").replace("\\u0020","");const g=new RegExp("["+G.C+G.Zl+G.Zp+V+"]","u"),p=new RegExp("^["+G.Nd+"]+$","u");var k=Array(256),q=new Map;Sk.builtin.str=Sk.abstr.buildNativeClass("str",{constructor:function str(z,D){Sk.asserts.assert(this instanceof Sk.builtin.str,"bad call to str - use 'new'");if("string"!==typeof z)if(void 0===z)z="";else if(null===z)z="None";else{if(void 0!==z.tp$str)return z.tp$str();
if("number"===typeof z)z=Number.isFinite(z)?String(z):String(z).replace("Infinity","inf").replace("NaN","nan");else throw new Sk.builtin.TypeError("could not convert object of type '"+Sk.abstr.typeName(z)+"' to str");}var K=z.length;0===K?K=L:1!==K?K=void 0:(K=z.charCodeAt(0),K=256>K?k[K]:void 0);if(void 0!==K)return K;if(D){K=q.get(z);if(void 0!==K)return K;q.set(z,this)}this.$mangled=d(z);this.$savedKeyHash=z.replace(m,"!$&");this.v=z;this.$hash=-1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,
tp$doc:"str(object='') -> str\nstr(bytes_or_buffer[, encoding[, errors]]) -> str\n\nCreate a new string object from the given object. If encoding or\nerrors is specified, then the object must expose a data buffer\nthat will be decoded using the given encoding and error handler.\nOtherwise, returns the result of object.__str__() (if defined)\nor repr(object).\nencoding defaults to sys.getdefaultencoding().\nerrors defaults to 'strict'.",tp$new(z,D){D=D||[];if(this!==Sk.builtin.str.prototype)return this.$subtype_new(z,
D);if(1>=z.length&&!D.length)return new Sk.builtin.str(z[0]);if(Sk.__future__.python3){const [K,R,T]=Sk.abstr.copyKeywordsToNamedArgs("str",["object","encoding","errors"],z,D);if(void 0===K||void 0===R&&void 0===T)return new Sk.builtin.str(K);Sk.builtin.bytes.check$encodeArgs("str",R,T);if(!Sk.builtin.checkBytes(K))throw new Sk.builtin.TypeError("decoding to str: need a bytes-like object, "+Sk.abstr.typeName(K)+" found");return Sk.builtin.bytes.$decode.call(K,R,T)}throw new Sk.builtin.TypeError("str takes at most one argument ("+
(z.length+D.length)+" given)");},tp$hash(){if(-1!==this.$hash)return this.$hash;const z=this.v;if(0===z.length)return this.$hash=0;let D=z.length,K=0,R;for(R=0xe9b597bd163a6^z.charCodeAt(K)<<7;0<=--D;)R=1000003*R^z.charCodeAt(++K);R^=z.length;R^=0x621cdb4baf09f;-1===R&&(R=-2);return this.$hash=R},$r(){let z="'";-1!==this.v.indexOf("'")&&-1===this.v.indexOf('"')&&(z='"');const D=this.v.length;let K=z;for(let t=0;t<D;t++){var R=this.v.charAt(t);var T=this.v.charCodeAt(t);R===z||"\\"===R?K+="\\"+R:"\t"===
R?K+="\\t":"\n"===R?K+="\\n":"\r"===R?K+="\\r":(255<T&&55296>T||57344<=T)&&!Sk.__future__.python3?K+="\\u"+("000"+T.toString(16)).slice(-4):55296<=T&&!Sk.__future__.python3?(R=this.v.codePointAt(t),t++,R=R.toString(16),T="0000000"+R.toString(16),K=4<R.length?K+("\\U"+T.slice(-8)):K+("\\u"+T.slice(-4))):255<T&&!Sk.__future__.python3?K+="\\ufffd":" ">R||127<=T&&!Sk.__future__.python3?(R=R.charCodeAt(0).toString(16),2>R.length&&(R="0"+R),K+="\\x"+R):K+=R}return new Sk.builtin.str(K+z)},tp$str(){return this.constructor===
Sk.builtin.str?this:new Sk.builtin.str(this.v)},tp$iter(){return new C(this)},tp$richcompare(z,D){if(!(z instanceof Sk.builtin.str))return Sk.builtin.NotImplemented.NotImplemented$;switch(D){case "Lt":return this.v<z.v;case "LtE":return this.v<=z.v;case "Eq":return this.v===z.v;case "NotEq":return this.v!==z.v;case "Gt":return this.v>z.v;case "GtE":return this.v>=z.v}},mp$subscript(z){let D;if(Sk.misceval.isIndex(z)){z=Sk.misceval.asIndexSized(z,Sk.builtin.OverflowError);D=this.sq$length();0>z&&(z+=
D);if(0>z||z>=D)throw new Sk.builtin.IndexError("string index out of range");return this.codepoints?new Sk.builtin.str(this.v.substring(this.codepoints[z],this.codepoints[z+1])):new Sk.builtin.str(this.v.charAt(z))}if(z instanceof Sk.builtin.slice){let K="";D=this.sq$length();this.codepoints?z.sssiter$(D,R=>{K+=this.v.substring(this.codepoints[R],this.codepoints[R+1])}):z.sssiter$(D,R=>{K+=this.v.charAt(R)});return new Sk.builtin.str(K)}throw new Sk.builtin.TypeError("string indices must be integers, not "+
Sk.abstr.typeName(z));},sq$length(){return this.$hasAstralCodePoints()?this.codepoints.length:this.v.length},sq$concat(z){if(!(z instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("cannot concatenate 'str' and '"+Sk.abstr.typeName(z)+"' objects");return new Sk.builtin.str(this.v+z.v)},sq$repeat(z){if(!Sk.misceval.isIndex(z))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(z)+"'");z=Sk.misceval.asIndexSized(z,Sk.builtin.OverflowError);if(z*this.v.length>
Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;let D="";for(let K=0;K<z;K++)D+=this.v;return new Sk.builtin.str(D)},sq$contains(z){if(!(z instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("'in <string>' requires string as left operand not "+Sk.abstr.typeName(z));return-1!==this.v.indexOf(z.v)},tp$as_number:!0,nb$remainder:function(z){var D;const K=this.sk$builtinBase;z.constructor===Sk.builtin.tuple||z instanceof Sk.builtin.dict||z instanceof Sk.builtin.mappingproxy||(z=new Sk.builtin.tuple([z]));
var R=0;var T=this.$jsstr().replace(/%(\([a-zA-Z0-9]+\))?([#0 +\-]+)?(\*|[0-9]+)?(\.(\*|[0-9]+))?[hlL]?([diouxXeEfFgGcrsb%])/g,function(t,y,E,J,Q,X,ba){var ia,oa,pa,la,qa;J=Sk.builtin.asnum$(J);Q=Sk.builtin.asnum$(Q);void 0!==y&&""!==y||"%"==ba||(ia=R++);""===Q&&(Q=void 0);var na=oa=pa=la=qa=!1;E&&(-1!==E.indexOf("-")?la=!0:-1!==E.indexOf("0")&&(qa=!0),-1!==E.indexOf("+")?oa=!0:-1!==E.indexOf(" ")&&(pa=!0),na=-1!==E.indexOf("#"));Q&&(Q=parseInt(Q.substr(1),10));E=function(ja,N){var W;N=Sk.builtin.asnum$(N);
var ea=!1;if("number"===typeof ja){0>ja&&(ja=-ja,ea=!0);var I=ja.toString(N)}else ja instanceof Sk.builtin.float_?(I=ja.str$(N,!1),2<I.length&&".0"===I.substr(-2)&&(I=I.substr(0,I.length-2)),ea=ja.nb$isnegative()):ja instanceof Sk.builtin.int_?(I=ja.str$(N,!1),ea=ja.nb$isnegative()):ja instanceof Sk.builtin.lng&&(I=ja.str$(N,!1),ea=ja.nb$isnegative());Sk.asserts.assert(void 0!==I,"unhandled number format");ja=!1;if(Q)for(W=I.length;W<Q;++W)I="0"+I,ja=!0;W="";ea?W="-":oa?W="+"+W:pa&&(W=" "+W);na&&
(16===N?W+="0x":8!==N||ja||"0"===I||(W+="0"));return[W,I]};t=function(ja){var N=ja[0];ja=ja[1];if(J){J=parseInt(J,10);var W=ja.length+N.length;if(qa)for(;W<J;++W)ja="0"+ja;else if(la){for(;W<J;++W)ja+=" ";Sk.__future__.python3&&(ja+=N,N="")}else for(;W<J;++W)N=" "+N}return N+ja};if(z.constructor===Sk.builtin.tuple)y=z.v[ia];else if(void 0!==z.mp$subscript&&void 0!==y)y=y.substring(1,y.length-1),y=z.mp$subscript(new K(y));else if(z.constructor===Sk.builtin.dict||z.constructor===Sk.builtin.list)y=z;
else throw new Sk.builtin.AttributeError(z.tp$name+" instance has no attribute 'mp$subscript'");if("d"===ba||"i"===ba){var Z=E(y,10);if(void 0===Z[1])throw new Sk.builtin.TypeError("%"+ba+" format: a number is required, not "+Sk.abstr.typeName(y));ba=Z[1];Z[1]=-1!==ba.indexOf(".")?parseInt(ba,10).toString():ba;return t(Z)}if("o"===ba)return t(E(y,8));if("x"===ba)return t(E(y,16));if("X"===ba)return t(E(y,16)).toUpperCase();if("f"===ba||"F"===ba||"e"===ba||"E"===ba||"g"===ba||"G"===ba){Z=Sk.builtin.asnum$(y);
"string"===typeof Z&&(Z=Number(Z));if(Infinity===Z)return"inf";if(-Infinity===Z)return"-inf";if(isNaN(Z))return"nan";ia=["toExponential","toFixed","toPrecision"]["efg".indexOf(ba.toLowerCase())];if(void 0===Q||""===Q)if("e"===ba||"E"===ba)Q=6;else if("f"===ba||"F"===ba)Q=Sk.__future__.python3?6:7;ia=Z[ia](Q);Sk.builtin.checkFloat(y)&&0===Z&&-Infinity===1/Z&&(ia="-"+ia);Sk.__future__.python3&&(7<=ia.length&&"0.0000"==ia.slice(0,6)&&(D=parseFloat(ia),ia=D.toExponential()),"-"==ia.charAt(ia.length-2)&&
(ia=ia.slice(0,ia.length-1)+"0"+ia.charAt(ia.length-1)));-1!=="EFG".indexOf(ba)&&(ia=ia.toUpperCase());return t(["",ia])}if("c"===ba){if("number"===typeof y)return String.fromCharCode(y);if(y instanceof Sk.builtin.int_||y instanceof Sk.builtin.float_)return String.fromCharCode(y.v);if(y instanceof Sk.builtin.lng)return String.fromCharCode(y.str$(10,!1)[0]);if(y.constructor===Sk.builtin.str)return y.v.substr(0,1);throw new Sk.builtin.TypeError("an integer is required");}if("r"===ba)return ba=Sk.builtin.repr(y),
Q?ba.v.substr(0,Q):ba.v;if("s"===ba&&K===Sk.builtin.str){ba=new Sk.builtin.str(y);ba=ba.$jsstr();if(Q)return ba.substr(0,Q);J&&(ba=t([" ",ba]));return ba}if("b"===ba||"s"===ba){if(K===Sk.builtin.str)throw new Sk.builtin.ValueError("unsupported format character 'b'");if(!(y instanceof Sk.builtin.bytes)&&void 0===(Z=Sk.abstr.lookupSpecial(y,Sk.builtin.str.$bytes)))throw new Sk.builtin.TypeError("%b requires a bytes-like object, or an object that implements __bytes__, not '"+Sk.abstr.typeName(y)+"'");
void 0!==Z&&(y=new Sk.builtin.bytes(y));ba=y.$jsstr();if(Q)return ba.substr(0,Q);J&&(ba=t([" ",ba]));return ba}if("%"===ba)return"%"});if(z instanceof Sk.builtin.tuple&&R<z.sq$length())throw new Sk.builtin.TypeError("not all arguments converted during string formatting");return new K(T)}},proto:{toString(){return this.v},$subtype_new(z,D){const K=new this.constructor;z=Sk.builtin.str.prototype.tp$new(z,D);K.$mangled=z.$mangled;K.$savedKeyHash=z.$savedKeyHash;K.v=z.v;return K},$jsstr(){return this.v},
$hasAstralCodePoints(){if(null===this.codepoints)return!1;if(void 0!==this.codepoints)return!0;for(var z=0;z<this.v.length;z++){let D=this.v.charCodeAt(z);if(55296<=D&&57344>D){this.codepoints=[];for(z=0;z<this.v.length;z++)this.codepoints.push(z),D=this.v.charCodeAt(z),55296<=D&&56320>D&&z++;return!0}}this.codepoints=null;return!1},sk$asarray(){const z=[];if(this.$hasAstralCodePoints()){var D=this.codepoints;for(let K=0;K<D.length;K++)z.push(new Sk.builtin.str(this.v.substring(D[K],D[K+1])))}else for(D=
0;D<this.v.length;D++)z.push(new Sk.builtin.str(this.v[D]));return z},find$left:f(!1),find$right:f(!0),get$tgt(z){if(z instanceof Sk.builtin.str)return z.v;throw new Sk.builtin.TypeError("a str instance is required not '"+Sk.abstr.typeName(z)+"'");},valueOf(){return this.v},$isIdentifier(){return Sk.token.isIdentifier(this.v)}},methods:{encode:{$meth:function(z,D){({encoding:z,errors:D}=Sk.builtin.bytes.check$encodeArgs("encode",z,D));z=Sk.builtin.bytes.str$encode(this,z,D);return Sk.__future__.python3?
z:new Sk.builtin.str(z.$jsstr())},$flags:{NamedArgs:["encoding","errors"]},$textsig:"($self, /, encoding='utf-8', errors='strict')",$doc:"Encode the string using the codec registered for encoding.\n\n  encoding\n    The encoding in which to encode the string.\n  errors\n    The error handling scheme to use for encoding errors.\n    The default is 'strict' meaning that encoding errors raise a\n    UnicodeEncodeError.  Other possible values are 'ignore', 'replace' and\n    'xmlcharrefreplace' as well as any other name registered with\n    codecs.register_error that can handle UnicodeEncodeErrors."},
replace:{$meth(z,D,K){z=this.get$tgt(z);D=this.get$tgt(D);K=void 0===K?-1:Sk.misceval.asIndexSized(K,Sk.builtin.OverflowError);z=new RegExp(c(z),"g");if(0>K)return new Sk.builtin.str(this.v.replace(z,D));let R=0;z=this.v.replace(z,T=>R++<K?D:T);return new Sk.builtin.str(z)},$flags:{MinArgs:2,MaxArgs:3},$textsig:"($self, old, new, count=-1, /)",$doc:"Return a copy with all occurrences of substring old replaced by new.\n\n  count\n    Maximum number of occurrences to replace.\n    -1 (the default value) means replace all occurrences.\n\nIf the optional argument count is given, only the first count occurrences are\nreplaced."},
split:{$meth:function(z,D){D=Sk.misceval.asIndexSized(D,Sk.builtin.OverflowError);z=b(this,z,D);D=[];for(let K=0;K<z.length;K++)D.push(new Sk.builtin.str(this.v.substring(z[K],z[++K])));return new Sk.builtin.list(D)},$flags:{NamedArgs:["sep","maxsplit"],Defaults:[Sk.builtin.none.none$,-1]},$textsig:"($self, /, sep=None, maxsplit=-1)",$doc:"Return a list of the words in the string, using sep as the delimiter string.\n\n  sep\n    The delimiter according which to split the string.\n    None (the default value) means split according to any whitespace,\n    and discard empty strings from the result.\n  maxsplit\n    Maximum number of splits to do.\n    -1 (the default value) means no limit."},
rsplit:{$meth:function(z,D){D=Sk.misceval.asIndexSized(D,Sk.builtin.OverflowError);z=b(this,z,-1);var K=0>D?0:2*(z.length/2-D);D=[];for(0>=K?K=0:D.push(new Sk.builtin.str(this.v.slice(0,z[K-1])));K<z.length;K++)D.push(new Sk.builtin.str(this.v.substring(z[K],z[++K])));return new Sk.builtin.list(D)},$flags:{NamedArgs:["sep","maxsplit"],Defaults:[Sk.builtin.none.none$,-1]},$textsig:"($self, /, sep=None, maxsplit=-1)",$doc:"Return a list of the words in the string, using sep as the delimiter string.\n\n  sep\n    The delimiter according which to split the string.\n    None (the default value) means split according to any whitespace,\n    and discard empty strings from the result.\n  maxsplit\n    Maximum number of splits to do.\n    -1 (the default value) means no limit.\n\nSplits are done starting at the end of the string and working to the front."},
join:{$meth(z){const D=[];return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(z),K=>{if(!(K instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("sequence item "+D.length+": expected str, "+Sk.abstr.typeName(K)+" found");D.push(K.v)}),()=>new Sk.builtin.str(D.join(this.v)))},$flags:{OneArg:!0},$textsig:"($self, iterable, /)",$doc:"Concatenate any number of strings.\n\nThe string whose method is called is inserted in between each given string.\nThe result is returned as a new string.\n\nExample: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'"},
capitalize:{$meth:function(){return new Sk.builtin.str(this.v.charAt(0).toUpperCase()+this.v.slice(1).toLowerCase())},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a capitalized version of the string.\n\nMore specifically, make the first character have upper case and the rest lower\ncase."},title:{$meth:function(){const z=this.v.replace(/[a-z][a-z]*/gi,D=>D[0].toUpperCase()+D.substr(1).toLowerCase());return new Sk.builtin.str(z)},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a version of the string where each word is titlecased.\n\nMore specifically, words start with uppercased characters and all remaining\ncased characters have lower case."},
center:{$meth:r(!1,!0),$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, width, fillchar=' ', /)",$doc:"Return a centered string of length width.\n\nPadding is done using the specified fill character (default is a space)."},count:{$meth:function(z,D,K){z=this.get$tgt(z);({start:D,end:K}=h(this,D,K));if(K<D)return new Sk.builtin.int_(0);z=z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");z=new RegExp(z,"g");return(D=this.v.slice(D,K).match(z))?new Sk.builtin.int_(D.length):new Sk.builtin.int_(0)},$flags:{MinArgs:1,
MaxArgs:3},$textsig:null,$doc:"S.count(sub[, start[, end]]) -> int\n\nReturn the number of non-overlapping occurrences of substring sub in\nstring S[start:end].  Optional arguments start and end are\ninterpreted as in slice notation."},expandtabs:{$meth:function(z){if(Sk.builtin.checkInt(z))z=Sk.builtin.asnum$(z);else throw new Sk.builtin.TypeError("an integer is required, got type"+Sk.abstr.typeName(z));const D=Array(z+1).join(" "),K=this.v.replace(/([^\r\n\t]*)\t/g,(R,T)=>T+D.slice(T.length%z));
return new Sk.builtin.str(K)},$flags:{NamedArgs:["tabsize"],Defaults:[8]},$textsig:"($self, /, tabsize=8)",$doc:"Return a copy where all tab characters are expanded using spaces.\n\nIf tabsize is not given, a tab size of 8 characters is assumed."},find:{$meth:function(z,D,K){return new Sk.builtin.int_(this.find$left(z,D,K))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.find(sub[, start[, end]]) -> int\n\nReturn the lowest index in S where substring sub is found,\nsuch that sub is contained within S[start:end].  Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},
partition:{$meth:l(!1),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the string into three parts using the given separator.\n\nThis will search for the separator in the string.  If the separator is found,\nreturns a 3-tuple containing the part before the separator, the separator\nitself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing the original string\nand two empty strings."},index:{$meth:function(z,D,K){z=this.find$left(z,D,K);if(-1===z)throw new Sk.builtin.ValueError("substring not found");
return new Sk.builtin.int_(z)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.index(sub[, start[, end]]) -> int\n\nReturn the lowest index in S where substring sub is found, \nsuch that sub is contained within S[start:end].  Optional\narguments start and end are interpreted as in slice notation.\n\nRaises ValueError when the substring is not found."},ljust:{$meth:r(!1,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, width, fillchar=' ', /)",$doc:"Return a left-justified string of length width.\n\nPadding is done using the specified fill character (default is a space)."},
lower:{$meth(){return new Sk.builtin.str(this.v.toLowerCase())},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a copy of the string converted to lowercase."},lstrip:{$meth:e(/^\s+/g,z=>"^["+z+"]+"),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, chars=None, /)",$doc:"Return a copy of the string with leading whitespace removed.\n\nIf chars is given and not None, remove characters in chars instead."},removeprefix:{$meth:function(z){z=this.get$tgt(z);const D=this.v;return D.startsWith(z)?new Sk.builtin.str(D.slice(z.length)):
this},$flags:{OneArg:!0},$textsig:"($self, prefix, /)",$doc:"Return a str with the given prefix string removed if present.\n\nIf the string starts with the prefix string, return string[len(prefix):].\nOtherwise, return a copy of the original string."},removesuffix:{$meth:function(z){z=this.get$tgt(z);const D=this.v;return D.endsWith(z)?new Sk.builtin.str(D.slice(0,D.length-z.length)):this},$flags:{OneArg:!0},$textsig:"($self, suffix, /)",$doc:"Return a str with the given suffix string removed if present.\n\nIf the string ends with the suffix string and that suffix is not empty,\nreturn string[:-len(suffix)]. Otherwise, return a copy of the original string."},
rfind:{$meth(z,D,K){return new Sk.builtin.int_(this.find$right(z,D,K))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.rfind(sub[, start[, end]]) -> int\n\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end].  Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},rindex:{$meth:function(z,D,K){z=this.find$right(z,D,K);if(-1===z)throw new Sk.builtin.ValueError("substring not found");return new Sk.builtin.int_(z)},
$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.rindex(sub[, start[, end]]) -> int\n\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end].  Optional\narguments start and end are interpreted as in slice notation.\n\nRaises ValueError when the substring is not found."},rjust:{$meth:r(!0,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, width, fillchar=' ', /)",$doc:"Return a right-justified string of length width.\n\nPadding is done using the specified fill character (default is a space)."},
rstrip:{$meth:e(/\s+$/g,z=>"["+z+"]+$"),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, chars=None, /)",$doc:"Return a copy of the string with trailing whitespace removed.\n\nIf chars is given and not None, remove characters in chars instead."},rpartition:{$meth:l(!0),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the string into three parts using the given separator.\n\nThis will search for the separator in the string, starting at the end. If\nthe separator is found, returns a 3-tuple containing the part before the\nseparator, the separator itself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing two empty strings\nand the original string."},
splitlines:{$meth:function(z){z=Sk.misceval.isTrue(z);const D=this.v,K=[],R=D.length;var T=0;for(let y=0;y<R;y++){var t=D.charAt(y);if("\n"===D.charAt(y+1)&&"\r"===t)t=y+2,T=D.slice(T,t),z||(T=T.replace(/(\r|\n)/g,"")),K.push(new Sk.builtin.str(T)),T=t;else if("\n"===t&&"\r"!==D.charAt(y-1)||"\r"===t)t=y+1,T=D.slice(T,t),z||(T=T.replace(/(\r|\n)/g,"")),K.push(new Sk.builtin.str(T)),T=t}T<R&&(T=D.slice(T,R),z||(T=T.replace(/(\r|\n)/g,"")),K.push(new Sk.builtin.str(T)));return new Sk.builtin.list(K)},
$flags:{NamedArgs:["keepends"],Defaults:[!1]},$textsig:"($self, /, keepends=False)",$doc:"Return a list of the lines in the string, breaking at line boundaries.\n\nLine breaks are not included in the resulting list unless keepends is given and\ntrue."},strip:{$meth:e(/^\s+|\s+$/g,z=>"^["+z+"]+|["+z+"]+$"),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, chars=None, /)",$doc:"Return a copy of the string with leading and trailing whitespace remove.\n\nIf chars is given and not None, remove characters in chars instead."},
swapcase:{$meth(){const z=this.v.replace(/[a-z]/gi,D=>{const K=D.toLowerCase();return K===D?D.toUpperCase():K});return new Sk.builtin.str(z)},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Convert uppercase characters to lowercase and lowercase characters to uppercase."},upper:{$meth(){return new Sk.builtin.str(this.v.toUpperCase())},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a copy of the string converted to uppercase."},startswith:{$meth:n("startswith",(z,D)=>0===z.indexOf(D)),$flags:{MinArgs:1,
MaxArgs:3},$textsig:null,$doc:"S.startswith(prefix[, start[, end]]) -> bool\n\nReturn True if S starts with the specified prefix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nprefix can also be a tuple of strings to try."},endswith:{$meth:n("endswith",(z,D)=>-1!==z.indexOf(D,z.length-D.length)),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.endswith(suffix[, start[, end]]) -> bool\n\nReturn True if S ends with the specified suffix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nsuffix can also be a tuple of strings to try."},
isascii:{$meth(){return new Sk.builtin.bool(/^[\x00-\x7F]*$/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if all characters in the string are ASCII, False otherwise.\n\nASCII characters have code points in the range U+0000-U+007F.\nEmpty string is ASCII too."},islower:{$meth:function(){return new Sk.builtin.bool(this.v.length&&/[a-z]/.test(this.v)&&!/[A-Z]/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is a lowercase string, False otherwise.\n\nA string is lowercase if all cased characters in the string are lowercase and\nthere is at least one cased character in the string."},
isupper:{$meth:function(){return new Sk.builtin.bool(this.v.length&&!/[a-z]/.test(this.v)&&/[A-Z]/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is an uppercase string, False otherwise.\n\nA string is uppercase if all cased characters in the string are uppercase and\nthere is at least one cased character in the string."},istitle:{$meth:function(){const z=this.v;let D=!1,K=!1,R;for(let T=0;T<z.length;T++)if(R=z.charAt(T),!/[a-z]/.test(R)&&/[A-Z]/.test(R)){if(K)return Sk.builtin.bool.false$;
D=K=!0}else if(/[a-z]/.test(R)&&!/[A-Z]/.test(R)){if(!K)return Sk.builtin.bool.false$;D=!0}else K=!1;return new Sk.builtin.bool(D)},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is a title-cased string, False otherwise.\n\nIn a title-cased string, upper- and title-case characters may only\nfollow uncased characters and lowercase characters only cased ones."},isspace:{$meth:function(){return new Sk.builtin.bool(/^\s+$/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",
$doc:"Return True if the string is a whitespace string, False otherwise.\n\nA string is whitespace if all characters in the string are whitespace and there\nis at least one character in the string."},isdecimal:{$meth:function(){return new Sk.builtin.bool(p.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is a decimal string, False otherwise.\n\nA string is a decimal string if all characters in the string are decimal digits\nand the string is not empty."},isdigit:{$meth:function(){return new Sk.builtin.bool(/^\d+$/.test(this.v))},
$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is a digit string, False otherwise.\n\nA string is a digit string if all characters in the string are digits and there\nis at least one character in the string."},isnumeric:{$meth:function(){return new Sk.builtin.bool(this.v.length&&!/[^0-9]/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is a numeric string, False otherwise.\n\nA string is numeric if all characters in the string are numeric and there is at\nleast one character in the string."},
isalpha:{$meth:function(){return new Sk.builtin.bool(this.v.length&&!/[^a-zA-Z]/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is an alphabetic string, False otherwise.\n\nA string is alphabetic if all characters in the string are alphabetic and there\nis at least one character in the string."},isalnum:{$meth:function(){return new Sk.builtin.bool(this.v.length&&!/[^a-zA-Z0-9]/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is an alpha-numeric string, False otherwise.\n\nA string is alpha-numeric if all characters in the string are alpha-numeric and\nthere is at least one character in the string."},
isidentifier:{$meth:function(){return this.$isIdentifier()?Sk.builtin.bool.true$:Sk.builtin.bool.false$},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:'Return True if the string is a valid Python identifier, False otherwise.\n\nUse keyword.iskeyword() to test for reserved identifiers such as "def" and\n"class".'},isprintable:{$meth:function(){return new Sk.builtin.bool(!g.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is printable, False otherwise.\n\nA string is printable if all of its characters are considered printable in\nrepr() or if it is empty."},
zfill:{$meth:function(z){z=Sk.misceval.asIndexSized(z,Sk.builtin.OverflowError);let D="";z-=this.v.length;const K="+"===this.v[0]||"-"===this.v[0]?1:0;for(let R=0;R<z;R++)D+="0";return new Sk.builtin.str(this.v.substr(0,K)+D+this.v.substr(K))},$flags:{OneArg:!0},$textsig:"($self, width, /)",$doc:"Pad a numeric string with zeros on the left, to fill a field of the given width.\n\nThe string is never truncated."},format:{$meth:Sk.formatting.format,$flags:{FastCall:!0},$textsig:null,$doc:"S.format(*args, **kwargs) -> str\n\nReturn a formatted version of S, using substitutions from args and kwargs.\nThe substitutions are identified by braces ('{' and '}')."},
__format__:{$meth:Sk.formatting.formatString,$flags:{OneArg:!0},$textsig:"($self, format_spec, /)",$doc:"Return a formatted version of the string as described by format_spec."},__getnewargs__:{$meth(){return new Sk.builtin.tuple(new Sk.builtin.str(this.v))},$flags:{NoArgs:!0},$textsig:null,$doc:null}}});Sk.exportSymbol("Sk.builtin.str",Sk.builtin.str);var x=/^[A-Za-z0-9]+$/,v=/([.*+?=|\\\/()\[\]\{\}^$])/g,w=/^[\s\xa0]+/;Sk.builtin.str.$py2decode=new Sk.builtin.method_descriptor(Sk.builtin.str,{$name:"decode",
$meth(z,D){const K=new Sk.builtin.bytes(this.v);return Sk.builtin.bytes.$decode.call(K,z,D)},$flags:{NamedArgs:["encoding","errors"]}});var C=Sk.abstr.buildIteratorClass("str_iterator",{constructor:function(z){this.$index=0;z.$hasAstralCodePoints()?(this.$seq=z.codepoints,this.tp$iternext=()=>{const D=this.$seq[this.$index];if(void 0!==D)return new Sk.builtin.str(z.v.substring(D,this.$seq[++this.$index]))}):(this.$seq=z.v,this.tp$iternext=()=>{const D=this.$seq[this.$index++];if(void 0!==D)return new Sk.builtin.str(D)})},
iternext(){return this.tp$iternext()},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}}),F={abstract:!0,as:!0,boolean:!0,break:!0,byte:!0,case:!0,catch:!0,char:!0,class:!0,continue:!0,const:!0,debugger:!0,default:!0,delete:!0,do:!0,double:!0,else:!0,enum:!0,export:!0,extends:!0,false:!0,final:!0,finally:!0,float:!0,for:!0,function:!0,goto:!0,if:!0,implements:!0,import:!0,in:!0,instanceof:!0,int:!0,interface:!0,is:!0,long:!0,namespace:!0,native:!0,
new:!0,null:!0,package:!0,private:!0,protected:!0,public:!0,return:!0,short:!0,static:!0,super:!0,switch:!0,synchronized:!0,this:!0,throw:!0,throws:!0,transient:!0,true:!0,try:!0,typeof:!0,use:!0,var:!0,void:!0,volatile:!0,while:!0,with:!0,constructor:!0,__defineGetter__:!0,__defineSetter__:!0,apply:!0,arguments:!0,call:!0,caller:!0,eval:!0,hasOwnProperty:!0,isPrototypeOf:!0,__lookupGetter__:!0,__lookupSetter__:!0,__noSuchMethod__:!0,propertyIsEnumerable:!0,prototype:!0,toSource:!0,toLocaleString:!0,
toString:!0,unwatch:!0,valueOf:!0,watch:!0,length:!0,name:!0};Sk.builtin.str.reservedWords_=F;Sk.builtin.str.$fixReserved=d;var L=new Sk.builtin.str("");for(G=0;256>G;G++)k[G]=new Sk.builtin.str(String.fromCharCode(G))},function(G,V){Sk.builtin.func=Sk.abstr.buildNativeClass("function",{constructor:function func(a,c,b,e){Sk.asserts.assert(this instanceof Sk.builtin.func,"builtin func should be called as a class with `new`");this.func_code=a;this.func_globals=c||null;this.$name=a.co_name||new Sk.builtin.str(a.name||
"<native JS>");this.$d=Sk.builtin.dict?new Sk.builtin.dict:void 0;this.$doc=a.co_docstring||Sk.builtin.none.none$;this.$module=Sk.globals&&Sk.globals.__name__||Sk.builtin.none.none$;this.$qualname=a.co_qualname||this.$name;if(void 0!==e)for(let l in e)b[l]=e[l];this.func_closure=b;this.func_annotations=null;this.$memoiseFlags();this.memoised=a.co_fastcall||null;this.tp$call=a.co_fastcall?a.bind(this):Sk.builtin.func.prototype.$funcCall.bind(this)},slots:{tp$getattr:Sk.generic.getAttr,tp$descr_get(a,
c){return null===a?this:new Sk.builtin.method(this,a)},$r(){return new Sk.builtin.str("<function "+this.$qualname+">")},tp$call(a,c){return this.tp$call(a,c)}},getsets:{__name__:{$get(){return this.$name},$set(a){if(!Sk.builtin.checkString(a))throw new Sk.builtin.TypeError("__name__ must be set to a string object");this.$name=a}},__qualname__:{$get(){return new Sk.builtin.str(this.$qualname)},$set(a){if(!Sk.builtin.checkString(a))throw new Sk.builtin.TypeError("__qualname__ must be set to a string object");
this.$qualname=a}},__dict__:Sk.generic.getSetDict,__annotations__:{$get(){null===this.func_annotations?this.func_annotations=new Sk.builtin.dict([]):Array.isArray(this.func_annotations)&&(this.func_annotations=Sk.abstr.keywordArrayToPyDict(this.func_annotations));return this.func_annotations},$set(a){if(void 0===a||Sk.builtin.checkNone(a))this.func_annotations=new Sk.builtin.dict([]);else if(a instanceof Sk.builtin.dict)this.func_annotations=a;else throw new Sk.builtin.TypeError("__annotations__ must be set to a dict object");
}},__defaults__:{$get(){return null==this.$defaults?Sk.builtin.none.none$:new Sk.builtin.tuple(this.$defaults)},$set(a){if(void 0===a||Sk.builtin.checkNone(a))this.$defaults=null;else if(a instanceof Sk.builtin.tuple)this.$defaults=a.valueOf();else throw new Sk.builtin.TypeError("__defaults__ must be set to a tuple object");}},__doc__:{$get(){return this.$doc},$set(a){this.$doc=a||Sk.builtin.none.none$}},__module__:{$get(){return this.$module},$set(a){this.$module=a||Sk.builtin.none.none$}}},proto:{$memoiseFlags(){this.co_varnames=
this.func_code.co_varnames;this.co_argcount=this.func_code.co_argcount;void 0===this.co_argcount&&this.co_varnames&&(this.co_argcount=this.co_varnames.length);this.co_kwonlyargcount=this.func_code.co_kwonlyargcount||0;this.co_varargs=this.func_code.co_varargs;this.co_kwargs=this.func_code.co_kwargs;this.$defaults=this.func_code.$defaults;this.$kwdefs=this.func_code.$kwdefs||[]},$resolveArgs:function(a,c){var b=this.co_argcount;void 0===b&&(b=this.co_varnames?this.co_varnames.length:a.length);var e=
this.co_varnames||[],l=this.co_kwonlyargcount||0;let r=b+l;if(!(0!==l||this.co_kwargs||c&&0!==c.length||this.co_varargs)){if(a.length==b)return a;if(0===a.length&&this.$defaults&&this.$defaults.length===b){for(e=0;e!=this.$defaults.length;e++)a[e]=this.$defaults[e];return a}}let h;this.co_kwargs&&(h=[]);var f=a.length;let n=a.length<=b?a:a.slice(0,b);if(this.co_varargs)a=a.length>n.length?a.slice(n.length):[],n[r]=new Sk.builtin.tuple(a);else if(f>b)throw new Sk.builtin.TypeError(`${this.$name}() takes ${b} positional ${1==
b?"argument":"arguments"} but ${f} ${1==f?"was":"were"} given`);if(c){if(this.func_code.no_kw)throw new Sk.builtin.TypeError(this.$name+"() takes no keyword arguments");for(a=0;a<c.length;a+=2){f=c[a];var d=c[a+1],m=e.indexOf(f);if(0<=m){if(void 0!==n[m])throw new Sk.builtin.TypeError(this.$name+"() got multiple values for argument '"+f+"'");n[m]=d}else if(h)h.push(new Sk.builtin.str(f),d);else throw new Sk.builtin.TypeError(this.$name+"() got an unexpected keyword argument '"+f+"'");}}c=this.$defaults||
[];a=0;f=[];d=!1;for(m=b-c.length;a<m;a++)void 0===n[a]&&(f.push(e[a]),void 0===e[a]&&(d=!0));if(0!=f.length&&(this.co_argcount||this.co_varnames))throw new Sk.builtin.TypeError(this.$name+"() missing "+f.length+" required argument"+(1==f.length?"":"s")+(d?"":": "+f.map(g=>"'"+g+"'").join(", ")));for(;a<b;a++)void 0===n[a]&&(n[a]=c[a-m]);if(0<l){l=[];c=this.$kwdefs;for(a=b;a<r;a++)void 0===n[a]&&(void 0!==c[a-b]?n[a]=c[a-b]:l.push(e[a]));if(0!==l.length)throw new Sk.builtin.TypeError(this.$name+"() missing "+
l.length+" required keyword argument"+(1==l.length?"":"s")+": "+l.join(", "));}if(this.func_closure&&e)for(b=n.length;b<e.length;b++)n.push(void 0);h&&n.unshift(h);return n},$funcCall(a,c){this.memoised||(this.$memoiseFlags(),this.memoised=!0);if(void 0===this.co_argcount&&void 0===this.co_varnames&&!this.co_kwargs&&!this.func_closure){if(c&&0!==c.length)throw new Sk.builtin.TypeError(this.$name+"() takes no keyword arguments");return this.func_code.apply(this.func_globals,a)}a=this.$resolveArgs(a,
c);this.func_closure&&a.push(this.func_closure);return this.func_code.apply(this.func_globals,a)}}})},function(G,V){Sk.builtin.asnum$=function(e){return void 0===e||null===e||"number"===typeof e?e:e instanceof Sk.builtin.int_?"number"===typeof e.v?e.v:e.v.toString():e instanceof Sk.builtin.float_?e.v:e===Sk.builtin.none.none$?null:e};Sk.exportSymbol("Sk.builtin.asnum$",Sk.builtin.asnum$);Sk.builtin.assk$=function(e){return 0===e%1?new Sk.builtin.int_(e):new Sk.builtin.float_(e)};Sk.exportSymbol("Sk.builtin.assk$",
Sk.builtin.assk$);Sk.builtin.asnum$nofloat=function(e){if(void 0===e||null===e)return e;if("number"===typeof e)e=e.toString();else if(e instanceof Sk.builtin.int_)e=e.v.toString();else if(e instanceof Sk.builtin.float_)e=e.v.toString();else{if(e===Sk.builtin.none.none$)return null;return}if(0>e.indexOf(".")&&0>e.indexOf("e")&&0>e.indexOf("E"))return e;var l=0;if(0<=e.indexOf("e")){var r=e.substr(0,e.indexOf("e"));l=e.substr(e.indexOf("e")+1)}else 0<=e.indexOf("E")?(r=e.substr(0,e.indexOf("e")),l=
e.substr(e.indexOf("E")+1)):r=e;l=parseInt(l,10);e=r.indexOf(".");if(0>e){if(0<=l){for(;0<l--;)r+="0";return r}return r.length>-l?r.substr(0,r.length+l):0}r=0===e?r.substr(1):e<r.length?r.substr(0,e)+r.substr(e+1):r.substr(0,e);for(e+=l;e>r.length;)r+="0";return r=0>=e?0:r.substr(0,e)};Sk.exportSymbol("Sk.builtin.asnum$nofloat",Sk.builtin.asnum$nofloat);Sk.builtin.round=function(e,l){if(void 0===e)throw new Sk.builtin.TypeError("a float is required");if(!Sk.__future__.dunder_round){if(!Sk.builtin.checkNumber(e))throw new Sk.builtin.TypeError("a float is required");
if(e.round$)return e.round$(l);throw new Sk.builtin.AttributeError(Sk.abstr.typeName(e)+" instance has no attribute '__float__'");}if(void 0!==l&&!Sk.builtin.checkNone(l)&&!Sk.misceval.isIndex(l))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(l)+"' object cannot be interpreted as an index");e=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$round);if(void 0!==e)return void 0!==l?Sk.misceval.callsimArray(e,[l]):Sk.misceval.callsimArray(e,[]);throw new Sk.builtin.TypeError("a float is required");};Sk.builtin.len=
function(e){if(e.sq$length)e=e.sq$length(!0);else throw new Sk.builtin.TypeError("object of type '"+Sk.abstr.typeName(e)+"' has no len()");return Sk.misceval.chain(e,l=>new Sk.builtin.int_(l))};Sk.builtin.min=function(e,l){let r;const h=e.length;if(!h)throw new Sk.builtin.TypeError("min expected 1 argument, got 0");const [f,n]=Sk.abstr.copyKeywordsToNamedArgs("min",["default","key"],[],l,[null,Sk.builtin.none.none$]);if(1<h&&null!==f)throw new Sk.builtin.TypeError("Cannot specify a default for min() with multiple positional arguments");
r=1==h?Sk.abstr.iter(e[0]):Sk.abstr.iter(new Sk.builtin.tuple(e));if(!Sk.builtin.checkNone(n)&&!Sk.builtin.checkCallable(n))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(n)+"' object is not callable");let d;return Sk.misceval.chain(r.tp$iternext(!0),m=>{d=m;if(void 0!==d)return Sk.builtin.checkNone(n)?Sk.misceval.iterFor(r,g=>{Sk.misceval.richCompareBool(g,d,"Lt")&&(d=g)}):Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(n,[d]),g=>Sk.misceval.iterFor(r,p=>Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(n,
[p]),k=>{Sk.misceval.richCompareBool(k,g,"Lt")&&(d=p,g=k)})))},()=>{if(void 0===d){if(null===f)throw new Sk.builtin.ValueError("min() arg is an empty sequence");d=f}return d})};Sk.builtin.max=function(e,l){let r;const h=e.length;if(!h)throw new Sk.builtin.TypeError("max expected 1 argument, got 0");const [f,n]=Sk.abstr.copyKeywordsToNamedArgs("max",["default","key"],[],l,[null,Sk.builtin.none.none$]);if(1<h&&null!==f)throw new Sk.builtin.TypeError("Cannot specify a default for max() with multiple positional arguments");
r=1===h?Sk.abstr.iter(e[0]):Sk.abstr.iter(new Sk.builtin.tuple(e));if(!Sk.builtin.checkNone(n)&&!Sk.builtin.checkCallable(n))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(n)+"' object is not callable");let d;return Sk.misceval.chain(r.tp$iternext(!0),m=>{d=m;if(void 0!==d)return Sk.builtin.checkNone(n)?Sk.misceval.iterFor(r,g=>{Sk.misceval.richCompareBool(g,d,"Gt")&&(d=g)}):Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(n,[d]),g=>Sk.misceval.iterFor(r,p=>Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(n,
[p]),k=>{Sk.misceval.richCompareBool(k,g,"Gt")&&(d=p,g=k)})))},()=>{if(void 0===d){if(null===f)throw new Sk.builtin.ValueError("max() arg is an empty sequence");d=f}return d})};Sk.builtin.min.co_fastcall=Sk.builtin.max.co_fastcall=1;Sk.builtin.any=function(e){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(e),function(l){if(Sk.misceval.isTrue(l))return new Sk.misceval.Break(Sk.builtin.bool.true$)}),l=>l||Sk.builtin.bool.false$)};Sk.builtin.all=function(e){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(e),
function(l){if(!Sk.misceval.isTrue(l))return new Sk.misceval.Break(Sk.builtin.bool.false$)}),l=>l||Sk.builtin.bool.true$)};Sk.builtin.sum=function(e,l){function r(){return Sk.misceval.iterFor(n,m=>{if(m.constructor===Sk.builtin.int_)d=d.nb$add(m);else{if(m.constructor===Sk.builtin.float_)return d=d.nb$float().nb$add(m),new Sk.misceval.Break("float");d=Sk.abstr.numberBinOp(d,m,"Add");return new Sk.misceval.Break("slow")}})}function h(){return Sk.misceval.iterFor(n,m=>{if(m.constructor===Sk.builtin.float_||
m.constructor===Sk.builtin.int_)d=d.nb$add(m);else return d=Sk.abstr.numberBinOp(d,m,"Add"),new Sk.misceval.Break("slow")})}function f(){return Sk.misceval.iterFor(n,m=>{d=Sk.abstr.numberBinOp(d,m,"Add")})}const n=Sk.abstr.iter(e);if(void 0===l)var d=new Sk.builtin.int_(0);else{if(Sk.builtin.checkString(l))throw new Sk.builtin.TypeError("sum() can't sum strings [use ''.join(seq) instead]");d=l}e=void 0===l||l.constructor===Sk.builtin.int_?r():l.constructor===Sk.builtin.float_?"float":"slow";return Sk.misceval.chain(e,
m=>"float"===m?h():m,m=>{if("slow"===m)return f()},()=>d)};Sk.builtin.zip=function(){var e,l;if(0===arguments.length)return new Sk.builtin.list([]);var r=[];for(l=0;l<arguments.length;l++)if(Sk.builtin.checkIterable(arguments[l]))r.push(Sk.abstr.iter(arguments[l]));else throw new Sk.builtin.TypeError("argument "+l+" must support iteration");var h=[];for(e=!1;!e;){var f=[];for(l=0;l<arguments.length;l++){var n=r[l].tp$iternext();if(void 0===n){e=!0;break}f.push(n)}e||h.push(new Sk.builtin.tuple(f))}return new Sk.builtin.list(h)};
Sk.builtin.abs=function(e){if(e.nb$abs)return e.nb$abs();throw new Sk.builtin.TypeError("bad operand type for abs(): '"+Sk.abstr.typeName(e)+"'");};Sk.builtin.fabs=function(e){return Sk.builtin.abs(e)};Sk.builtin.ord=function(e){if(Sk.builtin.checkString(e)){if(1!==e.v.length&&1!==e.sq$length())throw new Sk.builtin.TypeError("ord() expected a character, but string of length "+e.v.length+" found");return new Sk.builtin.int_(e.v.codePointAt(0))}if(Sk.builtin.checkBytes(e)){if(1!==e.sq$length())throw new Sk.builtin.TypeError("ord() expected a character, but string of length "+
e.v.length+" found");return new Sk.builtin.int_(e.v[0])}throw new Sk.builtin.TypeError("ord() expected a string of length 1, but "+Sk.abstr.typeName(e)+" found");};Sk.builtin.chr=function(e){if(!Sk.builtin.checkInt(e))throw new Sk.builtin.TypeError("an integer is required");e=Sk.builtin.asnum$(e);if(Sk.__future__.python3){if(0>e||1114112<=e)throw new Sk.builtin.ValueError("chr() arg not in range(0x110000)");}else if(0>e||256<=e)throw new Sk.builtin.ValueError("chr() arg not in range(256)");return new Sk.builtin.str(String.fromCodePoint(e))};
Sk.builtin.unichr=function(e){Sk.builtin.pyCheckArgsLen("unichr",arguments.length,1,1);if(!Sk.builtin.checkInt(e))throw new Sk.builtin.TypeError("an integer is required");e=Sk.builtin.asnum$(e);try{return new Sk.builtin.str(String.fromCodePoint(e))}catch(l){if(l instanceof RangeError)throw new Sk.builtin.ValueError(l.message);throw l;}};Sk.builtin.int2str_=function(e,l,r){let h=Sk.misceval.asIndexOrThrow(e),f=h.toString(l);f=0>h?"-"+r+f.slice(1):r+f;2!==l&&!Sk.__future__.python3&&(e instanceof Sk.builtin.lng||
JSBI.__isBigInt(h))&&(f+="L");return new Sk.builtin.str(f)};Sk.builtin.hex=function(e){if(!Sk.misceval.isIndex(e))throw new Sk.builtin.TypeError("hex() argument can't be converted to hex");return Sk.builtin.int2str_(e,16,"0x")};Sk.builtin.oct=function(e){if(!Sk.misceval.isIndex(e))throw new Sk.builtin.TypeError("oct() argument can't be converted to hex");return Sk.__future__.octal_number_literal?Sk.builtin.int2str_(e,8,"0o"):Sk.builtin.int2str_(e,8,"0")};Sk.builtin.bin=function(e){if(!Sk.misceval.isIndex(e))throw new Sk.builtin.TypeError("'"+
Sk.abstr.typeName(e)+"' object can't be interpreted as an index");return Sk.builtin.int2str_(e,2,"0b")};Sk.builtin.dir=function(e){if(void 0!==e)return e=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$dir),Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(e,[]),l=>Sk.builtin.sorted(l));throw new Sk.builtin.NotImplementedError("skulpt does not yet support dir with no args");};Sk.builtin.repr=function(e){return e.$r()};Sk.builtin.ascii=function(e){return Sk.misceval.chain(e.$r(),l=>{let r,h;for(h=0;h<l.v.length;h++)if(127<=
l.v.charCodeAt(h)){r=l.v.substr(0,h);break}if(!r)return l;for(;h<l.v.length;h++){var f=l.v.charAt(h),n=l.v.charCodeAt(h);127<n&&255>=n?(f=n.toString(16),2>f.length&&(f="0"+f),r+="\\x"+f):127<n&&55296>n||57344<=n?r+="\\u"+("000"+n.toString(16)).slice(-4):55296<=n?(f=l.v.codePointAt(h),h++,f=f.toString(16),n="0000000"+f.toString(16),r=4<f.length?r+("\\U"+n.slice(-8)):r+("\\u"+n.slice(-4))):r+=f}return new Sk.builtin.str(r)})};Sk.builtin.open=function(e,l,r){void 0===l&&(l=new Sk.builtin.str("r"));if(/\+/.test(l.v))throw"todo; haven't implemented read/write mode";
if(("w"===l.v||"wb"===l.v||"a"===l.v||"ab"===l.v)&&!Sk.nonreadopen)throw"todo; haven't implemented non-read opens";return new Sk.builtin.file(e,l,r)};Sk.builtin.isinstance=function(e,l){if(!(Sk.builtin.checkClass(l)||l instanceof Sk.builtin.tuple))throw new Sk.builtin.TypeError("isinstance() arg 2 must be a class, type, or tuple of classes and types");var r=e.ob$type;if(r===l)return Sk.builtin.bool.true$;if(!(l instanceof Sk.builtin.tuple)){if(r.$isSubType(l))return Sk.builtin.bool.true$;e=e.tp$getattr(Sk.builtin.str.$class);
return e!=r&&Sk.builtin.checkClass(e)&&e.$isSubType(l)?Sk.builtin.bool.true$:Sk.builtin.bool.false$}for(r=0;r<l.v.length;++r)if(Sk.misceval.isTrue(Sk.builtin.isinstance(e,l.v[r])))return Sk.builtin.bool.true$;return Sk.builtin.bool.false$};Sk.builtin.hash=function(e){return new Sk.builtin.int_(Sk.abstr.objectHash(e))};Sk.builtin.getattr=function(e,l,r){if(!Sk.builtin.checkString(l))throw new Sk.builtin.TypeError("attribute name must be string");const h=Sk.misceval.tryCatch(()=>e.tp$getattr(l,!0),
f=>{if(!(f instanceof Sk.builtin.AttributeError))throw f;});return Sk.misceval.chain(h,f=>{if(void 0===f){if(void 0!==r)return r;throw new Sk.builtin.AttributeError(e.sk$attrError()+" has no attribute "+Sk.misceval.objectRepr(l));}return f})};Sk.builtin.setattr=function(e,l,r){if(!Sk.builtin.checkString(l))throw new Sk.builtin.TypeError("attribute name must be string");return Sk.misceval.chain(e.tp$setattr(l,r,!0),()=>Sk.builtin.none.none$)};Sk.builtin.raw_input=function(e){var l=e?e:"";return Sk.misceval.chain(Sk.importModule("sys",
!1,!0),function(r){return Sk.inputfunTakesPrompt?Sk.builtin.file.$readline(r.$d.stdin,null,l):Sk.misceval.chain(void 0,function(){return Sk.misceval.callsimOrSuspendArray(r.$d.stdout.write,[r.$d.stdout,new Sk.builtin.str(l)])},function(){return Sk.misceval.callsimOrSuspendArray(r.$d.stdin.readline,[r.$d.stdin])})})};Sk.builtin.input=Sk.builtin.raw_input;Sk.builtin.jseval=function(e){e=Sk.global.eval(Sk.ffi.remapToJs(e));return Sk.ffi.remapToPy(e)};Sk.builtin.jsmillis=function(){console.warn("jsmillis is deprecated");
return(new Date).valueOf()};const a=Sk.abstr.buildNativeClass("code",{constructor:function(e,l){this.compiled=l;this.code=l.code;this.filename=e},slots:{tp$new(e,l){throw new Sk.builtin.NotImplementedError("cannot construct a code object in skulpt");},$r(){return new Sk.builtin.str("<code object <module>, file "+this.filename+">")}}});Sk.builtin.compile=function(e,l,r,h,f,n){Sk.builtin.pyCheckType("source","str",Sk.builtin.checkString(e));Sk.builtin.pyCheckType("filename","str",Sk.builtin.checkString(l));
Sk.builtin.pyCheckType("mode","str",Sk.builtin.checkString(r));e=e.$jsstr();l=l.$jsstr();r=r.$jsstr();return Sk.misceval.chain(Sk.compile(e,l,r,!0),d=>new a(l,d))};Sk.builtin.exec=function(e,l,r){let h=l&&l.__file__;h=void 0!==h&&Sk.builtin.checkString(h)?h.toString():"<string>";if(Sk.builtin.checkString(e))e=Sk.compile(e.$jsstr(),h,"exec",!0);else if("string"===typeof e)e=Sk.compile(e,h,"exec",!0);else if(!(e instanceof a))throw new Sk.builtin.TypeError("exec() arg 1 must be a string, bytes or code object");
Sk.asserts.assert(void 0===l||l.constructor===Object,"internal calls to exec should be called with a javascript object for globals");Sk.asserts.assert(void 0===r||r.constructor===Object,"internal calls to exec should be called with a javascript object for locals");const f=Sk.globals;l=l||f;return Sk.misceval.chain(e,n=>Sk.global.eval(n.code)(l,r),n=>{Sk.globals=f;return n})};Sk.builtin.eval=function(e,l,r){if(Sk.builtin.checkString(e))e=e.$jsstr();else if(Sk.builtin.checkBytes(e))throw new Sk.builtin.NotImplementedError("bytes for eval is not yet implemented in skulpt");
if("string"===typeof e){e=e.trim();var h=Sk.parse("?",e);h=Sk.astFromParse(h.cst,"?",h.flags);if(1<h.body.length||!(h.body[0]instanceof Sk.astnodes.Expr))throw new Sk.builtin.SyntaxError("invalid syntax");e="__final_res__ = "+e}else if(!(e instanceof a))throw new Sk.builtin.TypeError("eval() arg 1 must be a string, bytes or code object");return Sk.misceval.chain(Sk.builtin.exec(e,l,r),f=>{const n=f.__final_res__||Sk.builtin.none.none$;delete f.__final_res__;return n})};Sk.builtin.map=function(e,l){var r=
[],h,f;Sk.builtin.pyCheckArgsLen("map",arguments.length,2);if(2<arguments.length){var n=[];var d=Array.prototype.slice.apply(arguments).slice(1);for(f=0;f<d.length;f++){if(!Sk.builtin.checkIterable(d[f])){var m=parseInt(f,10)+2;throw new Sk.builtin.TypeError("argument "+m+" to map() must support iteration");}d[f]=Sk.abstr.iter(d[f])}for(;;){var g=[];for(f=h=0;f<d.length;f++)m=d[f].tp$iternext(),void 0===m?(g.push(Sk.builtin.none.none$),h++):g.push(m);if(h!==d.length)n.push(g);else break}l=new Sk.builtin.list(n)}if(!Sk.builtin.checkIterable(l))throw new Sk.builtin.TypeError("'"+
Sk.abstr.typeName(l)+"' object is not iterable");return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(l),function(p){if(e===Sk.builtin.none.none$)p instanceof Array&&(p=new Sk.builtin.tuple(p)),r.push(p);else return p instanceof Array||(p=[p]),Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(e,p),function(k){r.push(k)})}),function(){return new Sk.builtin.list(r)})};Sk.builtin.reduce=function(e,l,r){if(!Sk.builtin.checkIterable(l))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(l)+"' object is not iterable");
l=Sk.abstr.iter(l);if(void 0===r&&(r=l.tp$iternext(),void 0===r))throw new Sk.builtin.TypeError("reduce() of empty sequence with no initial value");var h=r;for(r=l.tp$iternext();void 0!==r;r=l.tp$iternext())h=Sk.misceval.callsimArray(e,[h,r]);return h};Sk.builtin.sorted=function(e,l,r,h){e=Sk.misceval.arrayFromIterable(e,!0);return Sk.misceval.chain(e,f=>{f=new Sk.builtin.list(f);f.list$sort(l,r,h);return f})};Sk.builtin.filter=function(e,l){var r;Sk.builtin.pyCheckArgsLen("filter",arguments.length,
2,2);if(!Sk.builtin.checkIterable(l))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(l)+"' object is not iterable");var h=function(){return[]};var f=function(g,p){g.push(p);return g};var n=function(g){return new Sk.builtin.list(g)};l.ob$type===Sk.builtin.str?(h=function(){return new Sk.builtin.str("")},f=function(g,p){return g.sq$concat(p)},n=function(g){return g}):l.ob$type===Sk.builtin.tuple&&(n=function(g){return new Sk.builtin.tuple(g)});var d=h();var m=Sk.abstr.iter(l);for(r=m.tp$iternext();void 0!==
r;r=m.tp$iternext())h=e===Sk.builtin.none.none$?new Sk.builtin.bool(r):Sk.misceval.callsimArray(e,[r]),Sk.misceval.isTrue(h)&&(d=f(d,r));return n(d)};Sk.builtin.hasattr=function(e,l){if(!Sk.builtin.checkString(l))throw new Sk.builtin.TypeError("hasattr(): attribute name must be string");const r=Sk.misceval.tryCatch(()=>e.tp$getattr(l,!0),h=>{if(!(h instanceof Sk.builtin.AttributeError))throw h;});return Sk.misceval.chain(r,h=>void 0===h?Sk.builtin.bool.false$:Sk.builtin.bool.true$)};Sk.builtin.pow=
function(e,l,r){if(void 0===r||Sk.builtin.checkNone(r))return Sk.abstr.numberBinOp(e,l,"Pow");if(!(Sk.builtin.checkInt(e)&&Sk.builtin.checkInt(l)&&Sk.builtin.checkInt(r))){if(Sk.builtin.checkFloat(e)||Sk.builtin.checkComplex(e))return e.nb$power(l,r);throw new Sk.builtin.TypeError("unsupported operand type(s) for ** or pow(): '"+Sk.abstr.typeName(e)+"', '"+Sk.abstr.typeName(l)+"', '"+Sk.abstr.typeName(r)+"'");}return e.nb$power(l,r)};Sk.builtin.quit=function(e){e=(new Sk.builtin.str(e)).v;throw new Sk.builtin.SystemExit(e);
};Sk.builtin.issubclass=function(e,l){if(!Sk.builtin.checkClass(e))throw new Sk.builtin.TypeError("issubclass() arg 1 must be a class");var r=Sk.builtin.checkClass(l);if(!(r||l instanceof Sk.builtin.tuple))throw new Sk.builtin.TypeError("issubclass() arg 2 must be a class or tuple of classes");if(r)return e.$isSubType(l)?Sk.builtin.bool.true$:Sk.builtin.bool.false$;for(r=0;r<l.v.length;++r)if(Sk.misceval.isTrue(Sk.builtin.issubclass(e,l.v[r])))return Sk.builtin.bool.true$;return Sk.builtin.bool.false$};
Sk.builtin.globals=function(){var e,l=new Sk.builtin.dict([]);for(e in Sk.globals){var r=Sk.unfixReserved(e);l.mp$ass_subscript(new Sk.builtin.str(r),Sk.globals[e])}return l};Sk.builtin.divmod=function(e,l){return Sk.abstr.numberBinOp(e,l,"DivMod")};Sk.builtin.format=function(e,l){return Sk.abstr.objectFormat(e,l)};const c=new WeakMap;let b=0;Sk.builtin.id=function(e){const l=c.get(e);if(void 0!==l)return new Sk.builtin.int_(l);c.set(e,b);return new Sk.builtin.int_(b++)};Sk.builtin.bytearray=function(){throw new Sk.builtin.NotImplementedError("bytearray is not yet implemented");
};Sk.builtin.callable=function(e){return Sk.builtin.checkCallable(e)?Sk.builtin.bool.true$:Sk.builtin.bool.false$};Sk.builtin.delattr=function(e,l){return Sk.builtin.setattr(e,l,void 0)};Sk.builtin.execfile=function(){throw new Sk.builtin.NotImplementedError("execfile is not yet implemented");};Sk.builtin.help=function(){throw new Sk.builtin.NotImplementedError("help is not yet implemented");};Sk.builtin.iter=function(e,l){return 1===arguments.length?Sk.abstr.iter(e):Sk.abstr.iter(new Sk.builtin.callable_iter_(e,
l))};Sk.builtin.locals=function(){throw new Sk.builtin.NotImplementedError("locals is not yet implemented");};Sk.builtin.memoryview=function(){throw new Sk.builtin.NotImplementedError("memoryview is not yet implemented");};Sk.builtin.next_=function(e,l){if(!e.tp$iternext)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object is not an iterator");return Sk.misceval.chain(e.tp$iternext(!0),r=>{if(void 0===r){if(l)return l;r=e.gi$ret;if(void 0!==r&&r!==Sk.builtin.none.none$)throw new Sk.builtin.StopIteration(r);
throw new Sk.builtin.StopIteration;}return r})};Sk.builtin.reload=function(){throw new Sk.builtin.NotImplementedError("reload is not yet implemented");};Sk.builtin.vars=function(){throw new Sk.builtin.NotImplementedError("vars is not yet implemented");};Sk.builtin.apply_=function(){throw new Sk.builtin.NotImplementedError("apply is not yet implemented");};Sk.builtin.buffer=function(){throw new Sk.builtin.NotImplementedError("buffer is not yet implemented");};Sk.builtin.coerce=function(){throw new Sk.builtin.NotImplementedError("coerce is not yet implemented");
};Sk.builtin.intern=function(){throw new Sk.builtin.NotImplementedError("intern is not yet implemented");}},function(G,V){function a(W,ea){ea=new this.constructor;this.ht$type&&r.call(ea);ea.args=new Sk.builtin.tuple(W.slice(0));return ea}function c(W,ea){Sk.abstr.checkNoKwargs(Sk.abstr.typeName(this),ea);this.args=new Sk.builtin.tuple(W.slice(0))}function b(){return 1>=this.args.v.length?new Sk.builtin.str(this.args.v[0]):this.args.$r()}function e(W,ea,I,S,aa,B){aa||(aa=[]);const u=S?{}:{sk$solidBase:!1};
I={tp$init:S||c,tp$doc:I};B&&(I.tp$str=B);return Sk.abstr.buildNativeClass(ea,{base:W,constructor:function(...A){W.apply(this,A);aa.forEach((H,M)=>{this["$"+H]=Sk.ffi.remapToPy(A[M])})},slots:I,getsets:Object.fromEntries(aa.map(A=>[A,{$get(){return this["$"+A]||Sk.builtin.none.none$},$set(H){this["$"+A]=H||Sk.builtin.none.none$}}])),flags:u})}function l(W,ea,I){const S=W.prototype.tp$init;I={tp$doc:I,tp$init:S};S===c&&(I.tp$new=a);return Sk.abstr.buildNativeClass(ea,{base:W,constructor:function(...aa){W.apply(this,
aa)},slots:I,flags:{sk$solidBase:!1}})}const r=Sk.abstr.buildNativeClass("BaseException",{constructor:function S(ea,...I){Sk.asserts.assert(this instanceof S,"bad call to exception constructor, use 'new'");"string"===typeof ea&&(ea=new Sk.builtin.str(ea));this.args=new Sk.builtin.tuple(ea?[ea]:[]);this.traceback=2<=I.length?[{filename:I[0]||"<unknown>",lineno:I[1]}]:[];this.context=this.cause=null;this.$d=new Sk.builtin.dict},slots:{tp$getattr:Sk.generic.getAttr,tp$doc:"Common base class for all exceptions",
tp$new:a,tp$init:c,$r(){let ea=this.tp$name;ea+="("+this.args.v.map(I=>Sk.misceval.objectRepr(I)).join(", ")+")";return new Sk.builtin.str(ea)},tp$str:b},getsets:{args:{$get(){return this.args},$set(ea){if(void 0===ea)throw new Sk.builtin.TypeError("args may not be deleted");this.args=new Sk.builtin.tuple(ea)}},__cause__:{$get(){return this.$cause||Sk.builtin.none.none$},$set(ea){if(!(Sk.builtin.checkNone(ea)||ea instanceof Sk.builtin.BaseException))throw new qa("exception cause must be None or derive from BaseException");
this.$cause=ea}},__dict__:Sk.generic.getSetDict},proto:{toString(){let ea=this.tp$name;ea+=": "+this.tp$str().v;return ea=0!==this.traceback.length?ea+(" on line "+this.traceback[0].lineno):ea+" at <unknown>"}}});G=l(r,"SystemExit","Request to exit from the interpreter.");V=l(r,"KeyboardInterrupt","Program interrupted by user.");const h=l(r,"GeneratorExit","Request that a generator exit."),f=l(r,"Exception","Common base class for all non-exit exceptions."),n=e(f,"StopIteration","Signal the end from iterator.__next__().",
function(ea,I){c.call(this,ea,I);this.$value=ea[0]||Sk.builtin.none.none$},["value"]),d=l(f,"StopAsyncIteration","Signal the end from iterator.__anext__()."),m=l(f,"ArithmeticError","Base class for arithmetic errors."),g=l(m,"FloatingPointError","Floating point operation failed."),p=l(m,"OverflowError","Result too large to be represented."),k=l(m,"ZeroDivisionError","Second argument to a division or modulo operation was zero."),q=l(f,"AssertionError","Assertion failed."),x=l(f,"AttributeError","Attribute not found."),
v=l(f,"BufferError","Buffer error."),w=l(f,"EOFError","Read beyond end of file."),C=e(f,"ImportError","Import can't find module, or can't find name in module.",function(ea,I){c.call(this,ea);const [S,aa]=Sk.abstr.copyKeywordsToNamedArgs("ImportError",["name","path"],[],I);this.$name=S;this.$path=aa;1===ea.length&&(this.$msg=ea[0])},["msg","name","path"],function(){return Sk.builtin.checkString(this.$msg)?this.$msg:b.call(this)}),F=l(C,"ModuleNotFoundError","Module not found."),L=l(f,"LookupError",
"Base class for lookup errors."),z=l(L,"IndexError","Sequence index out of range."),D=e(L,"KeyError","Mapping key not found.",null,null,function(){return 1===this.args.v.length?this.args.v[0].$r():b.call(this)}),K=l(f,"MemoryError","Out of memory."),R=l(f,"NameError","Name not found globally."),T=l(R,"UnboundLocalError","Local name referenced but not bound to a value."),t=e(f,"OSError","Base class for I/O related errors.",function(ea,I){c.call(this,ea,I)}),y=l(t,"FileNotFoundError","File not found."),
E=l(t,"TimeoutError","Timeout expired."),J=l(f,"ReferenceError","Weak ref proxy used after referent went away."),Q=l(f,"RuntimeError","Unspecified run-time error."),X=l(Q,"NotImplementedError","Method or function hasn't been implemented yet."),ba=l(Q,"RecursionError","Recursion limit exceeded."),ia=e(f,"SyntaxError","Invalid syntax.",function(ea,I){c.call(this,ea,I);1<=ea.length&&(this.$msg=ea[0]);2===ea.length&&(ea=(new Sk.builtin.tuple(ea[1])).v,this.$filename=ea[0],this.$lineno=ea[1],this.$offset=
ea[2],this.$text=ea[3])},["msg","filename","lineno","offset","text"],function(){return b.call(this)}),oa=l(ia,"IndentationError","Improper indentation."),pa=l(oa,"TabError","Improper mixture of spaces and tabs."),la=l(f,"SystemError","Internal error in the Skulpt interpreter."),qa=l(f,"TypeError","Inappropriate argument type."),na=l(f,"ValueError","Inappropriate argument value (of correct type)."),Z=l(na,"UnicodeError","Unicode related error."),ja=l(Z,"UnicodeDecodeError","Unicode decoding error."),
N=l(Z,"UnicodeEncodeError","Unicode encoding error.");Object.assign(Sk.builtin,{BaseException:r,SystemExit:G,KeyboardInterrupt:V,GeneratorExit:h,Exception:f,StopIteration:n,StopAsyncIteration:d,ArithmeticError:m,FloatingPointError:g,OverflowError:p,ZeroDivisionError:k,AssertionError:q,AttributeError:x,BufferError:v,EOFError:w,ImportError:C,ModuleNotFoundError:F,LookupError:L,IndexError:z,KeyError:D,MemoryError:K,NameError:R,UnboundLocalError:T,OSError:t,IOError:t,FileNotFoundError:y,TimeoutError:E,
ReferenceError:J,RuntimeError:Q,NotImplementedError:X,RecursionError:ba,SyntaxError:ia,IndentationError:oa,TabError:pa,SystemError:la,TypeError:qa,ValueError:na,UnicodeError:Z,UnicodeDecodeError:ja,UnicodeEncodeError:N});Sk.builtin.SuspensionError=l(f,"SuspensionError","Unsupported Suspension in code.");Sk.builtin.ExternalError=Sk.abstr.buildNativeClass("ExternalError",{constructor:function ExternalError(...ea){this.nativeError=ea[0];if(!Sk.builtin.checkString(this.nativeError)&&(ea[0]=this.nativeError.toString(),
ea[0].startsWith("RangeError: Maximum call")))return ea[0]="Maximum call stack size exceeded",new ba(...ea);f.apply(this,ea)},base:f});Sk.builtin.getExcInfo=function(ea){return new Sk.builtin.tuple([ea.ob$type||Sk.builtin.none.none$,ea,Sk.builtin.none.none$])}},function(G,V){Sk.builtin.method=Sk.abstr.buildNativeClass("method",{constructor:function method(a,c){Sk.asserts.assert(this instanceof Sk.builtin.method,"bad call to method constructor, use 'new'");this.im_func=a;this.im_self=c;this.im_call=a.tp$call},
slots:{$r(){let a=this.im_func.tp$getattr(Sk.builtin.str.$qualname)||this.im_func.tp$getattr(Sk.builtin.str.$name);a=a&&a.v||"?";return new Sk.builtin.str("<bound method "+a+" of "+Sk.misceval.objectRepr(this.im_self)+">")},tp$hash(){const a=Sk.abstr.objectHash(this.im_self),c=Sk.abstr.objectHash(this.im_func);return a+c},tp$call(a,c){var b=this.im_call;if(void 0===b)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(this.im_func)+"' object is not callable");a=[this.im_self,...a];return b.call(this.im_func,
a,c)},tp$new(a,c){Sk.abstr.checkNoKwargs("method",c);Sk.abstr.checkArgsLen("method",a,2,2);c=a[0];a=a[1];if(!Sk.builtin.checkCallable(c))throw new Sk.builtin.TypeError("first argument must be callable");if(Sk.builtin.checkNone(a))throw new Sk.builtin.TypeError("self must not be None");return new Sk.builtin.method(c,a)},tp$richcompare(a,c){if("Eq"!=c&&"NotEq"!=c||!(a instanceof Sk.builtin.method))return Sk.builtin.NotImplemented.NotImplemented$;let b;try{b=Sk.misceval.richCompareBool(this.im_self,
a.im_self,"Eq",!1)&&this.im_func===a.im_func}catch(e){b=!1}return"Eq"==c?b:!b},tp$descr_get(a,c){return this},tp$getattr(a,c){const b=Sk.abstr.lookupSpecial(this,a);return void 0!==b?b:this.im_func.tp$getattr(a,c)}},getsets:{__func__:{$get(){return this.im_func}},__self__:{$get(){return this.im_self}},__doc__:{$get(){return this.im_func.tp$getattr(Sk.builtin.str.$doc)}}},flags:{sk$unacceptableBase:!0}})},function(G,V){function a(r){if(null!==r&&void 0!==r){if(!0===r.sk$int)return r.v;if(void 0!==
r.nb$index)return r.nb$index();if("number"===typeof r&&Number.isInteger(r))return r}}function c(r,h){const f=a(r);if(void 0!==f)return f;h=(h||"'{tp$name}' object cannot be interpreted as an integer").replace("{tp$name}",Sk.abstr.typeName(r));throw new Sk.builtin.TypeError(h);}function b(){const r=(Sk.global.navigator||{}).userAgent||"";return-1<r.indexOf("MSIE ")||-1<r.indexOf("Trident/")}function e(r,h){let f=r;h.forEach(n=>{n=n.ob$type;if(!f.$isSubType(n))if(n.$isSubType(f))f=n;else throw new Sk.builtin.TypeError("metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases");
});return f}function l(r,h,f,n,d){const m=r.tp$getattr(Sk.builtin.str.$prepare);let g,p=null;if(void 0===m)return[p,g];p=Sk.misceval.callsimArray(m,[h,f],n);if(!Sk.builtin.checkMapping(p))throw new Sk.builtin.TypeError(d?r.prototype.tp$name:"<metaclass>.__prepare__() must return a mapping not '"+Sk.abstr.typeName(p)+"'");g={get(k,q){try{return Sk.abstr.objectGetItem(k,new Sk.builtin.str(Sk.unfixReserved(q)))}catch(x){if(!(x instanceof Sk.builtin.KeyError))throw x;}},set(k,q,x){Sk.abstr.objectSetItem(k,
new Sk.builtin.str(Sk.unfixReserved(q)),x);return!0}};return[p,g]}Sk.misceval={};Sk.misceval.Suspension=function(r,h,f){this.$isSuspension=!0;void 0!==r&&void 0!==h&&(this.resume=function(){return r(h.resume())});this.child=h;this.optional=void 0!==h&&h.optional;this.data=void 0===f&&void 0!==h?h.data:f};Sk.exportSymbol("Sk.misceval.Suspension",Sk.misceval.Suspension);Sk.misceval.retryOptionalSuspensionOrThrow=function(r,h){for(;r instanceof Sk.misceval.Suspension;){if(!r.optional){h=new Sk.builtin.SuspensionError(h||
"Cannot call a function that blocks or suspends here");const f=[];for(;null!=r;)r.$lineno&&f.push({filename:r.$filename,lineno:r.$lineno,colno:r.$colno}),r=r.child;f.reverse();h.traceback.push(...f);throw h;}r=r.resume()}return r};Sk.exportSymbol("Sk.misceval.retryOptionalSuspensionOrThrow",Sk.misceval.retryOptionalSuspensionOrThrow);Sk.misceval.isIndex=function(r){return null!==r&&void 0!==r&&(void 0!==r.nb$index||"number"===typeof r&&Number.isInteger(r))};Sk.exportSymbol("Sk.misceval.isIndex",Sk.misceval.isIndex);
Sk.misceval.asIndex=a;Sk.misceval.asIndexSized=function(r,h,f){f=c(r,f);if("number"===typeof f)return f;if(null==h)return JSBI.lessThan(f,JSBI.__ZERO)?-Number.MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER;throw new h("cannot fit '"+Sk.abstr.typeName(r)+"' into an index-sized integer");};Sk.misceval.asIndexOrThrow=c;Sk.misceval.applySlice=function(r,h,f,n){return Sk.abstr.objectGetItem(r,new Sk.builtin.slice(h,f,null),n)};Sk.exportSymbol("Sk.misceval.applySlice",Sk.misceval.applySlice);Sk.misceval.assignSlice=
function(r,h,f,n,d){h=new Sk.builtin.slice(h,f);return null===n?Sk.abstr.objectDelItem(r,h):Sk.abstr.objectSetItem(r,h,n,d)};Sk.exportSymbol("Sk.misceval.assignSlice",Sk.misceval.assignSlice);Sk.misceval.arrayFromArguments=function(r){var h;if(1!=r.length)return r;var f=r[0];f instanceof Sk.builtin.set?f=f.tp$iter().$obj:f instanceof Sk.builtin.dict&&(f=Sk.builtin.dict.prototype.keys.func_code(f));if(f instanceof Sk.builtin.list||f instanceof Sk.builtin.tuple)return f.v;if(Sk.builtin.checkIterable(f)){r=
[];f=Sk.abstr.iter(f);for(h=f.tp$iternext();void 0!==h;h=f.tp$iternext())r.push(h);return r}throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(f)+"' object is not iterable");};Sk.exportSymbol("Sk.misceval.arrayFromArguments",Sk.misceval.arrayFromArguments);Sk.misceval.iterator=Sk.abstr.buildIteratorClass("iterator",{constructor:function iterator(r,h){this.tp$iternext=h?r:function(f){let n=r();return f||void 0===n||!n.$isSuspension?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)}},iternext:function(r){return this.tp$iternext(r)},
flags:{sk$unacceptableBase:!0}});Sk.misceval.swappedOp_={Eq:"Eq",NotEq:"NotEq",Lt:"Gt",LtE:"GtE",Gt:"Lt",GtE:"LtE"};Sk.misceval.opSymbols={Eq:"==",NotEq:"!=",Lt:"<",LtE:"<=",Gt:">",GtE:">=",Is:"is",IsNot:"is not",In_:"in",NotIn:"not in"};Sk.misceval.richCompareBool=function(r,h,f,n){Sk.asserts.assert(r.sk$object&&h.sk$object,"JS object passed to richCompareBool");var d=r.ob$type,m=h.ob$type,g=m!==d&&void 0===m.sk$baseClass&&m.$isSubType(d);if(!Sk.__future__.python3&&d!==m&&("GtE"===f||"Gt"===f||"LtE"===
f||"Lt"===f)){var p=[Sk.builtin.float_,Sk.builtin.int_,Sk.builtin.lng,Sk.builtin.bool];const q=[Sk.builtin.dict,Sk.builtin.enumerate,Sk.builtin.filter_,Sk.builtin.list,Sk.builtin.map_,Sk.builtin.str,Sk.builtin.tuple,Sk.builtin.zip_];var k=p.indexOf(d);d=q.indexOf(d);p=p.indexOf(m);m=q.indexOf(m);if(r===Sk.builtin.none.none$)switch(f){case "Lt":return!0;case "LtE":return!0;case "Gt":return!1;case "GtE":return!1}if(h===Sk.builtin.none.none$)switch(f){case "Lt":return!1;case "LtE":return!1;case "Gt":return!0;
case "GtE":return!0}if(-1!==k&&-1!==m)switch(f){case "Lt":return!0;case "LtE":return!0;case "Gt":return!1;case "GtE":return!1}if(-1!==d&&-1!==p)switch(f){case "Lt":return!1;case "LtE":return!1;case "Gt":return!0;case "GtE":return!0}if(-1!==d&&-1!==m)switch(f){case "Lt":return d<m;case "LtE":return d<=m;case "Gt":return d>m;case "GtE":return d>=m}}if("Is"===f)return r===h;if("IsNot"===f)return r!==h;if("In"===f)return Sk.misceval.chain(Sk.abstr.sequenceContains(h,r,n),Sk.misceval.isTrue);if("NotIn"===
f)return Sk.misceval.chain(Sk.abstr.sequenceContains(h,r,n),function(q){return!Sk.misceval.isTrue(q)});m={Eq:"ob$eq",NotEq:"ob$ne",Gt:"ob$gt",GtE:"ob$ge",Lt:"ob$lt",LtE:"ob$le"};k=m[f];if(g&&(n=m[Sk.misceval.swappedOp_[f]],(n=h[n](r))!==Sk.builtin.NotImplemented.NotImplemented$)||(n=r[k](h))!==Sk.builtin.NotImplemented.NotImplemented$||!g&&(n=m[Sk.misceval.swappedOp_[f]],(n=h[n](r))!==Sk.builtin.NotImplemented.NotImplemented$))return Sk.misceval.isTrue(n);if(!Sk.__future__.python3){if(g=Sk.abstr.lookupSpecial(r,
Sk.builtin.str.$cmp))try{n=Sk.misceval.callsimArray(g,[h]);if(Sk.builtin.checkNumber(n)){n=Sk.builtin.asnum$(n);if("Eq"===f)return 0===n;if("NotEq"===f)return 0!==n;if("Lt"===f)return 0>n;if("Gt"===f)return 0<n;if("LtE"===f)return 0>=n;if("GtE"===f)return 0<=n}if(n!==Sk.builtin.NotImplemented.NotImplemented$)throw new Sk.builtin.TypeError("comparison did not return an int");}catch(q){throw new Sk.builtin.TypeError("comparison did not return an int");}if(g=Sk.abstr.lookupSpecial(h,Sk.builtin.str.$cmp))try{n=
Sk.misceval.callsimArray(g,[r]);if(Sk.builtin.checkNumber(n)){n=Sk.builtin.asnum$(n);if("Eq"===f)return 0===n;if("NotEq"===f)return 0!==n;if("Lt"===f)return 0<n;if("Gt"===f)return 0>n;if("LtE"===f)return 0<=n;if("GtE"===f)return 0>=n}if(n!==Sk.builtin.NotImplemented.NotImplemented$)throw new Sk.builtin.TypeError("comparison did not return an int");}catch(q){throw new Sk.builtin.TypeError("comparison did not return an int");}if(r===Sk.builtin.none.none$&&h===Sk.builtin.none.none$){if("Eq"===f)return r.v===
h.v;if("NotEq"===f)return r.v!==h.v;if("Gt"===f)return r.v>h.v;if("GtE"===f)return r.v>=h.v;if("Lt"===f)return r.v<h.v;if("LtE"===f)return r.v<=h.v}}if("Eq"===f)return r===h;if("NotEq"===f)return r!==h;r=Sk.abstr.typeName(r);h=Sk.abstr.typeName(h);throw new Sk.builtin.TypeError("'"+Sk.misceval.opSymbols[f]+"' not supported between instances of '"+r+"' and '"+h+"'");};Sk.exportSymbol("Sk.misceval.richCompareBool",Sk.misceval.richCompareBool);Sk.misceval.objectRepr=function(r){Sk.asserts.assert(void 0!==
r,"trying to repr undefined");if(null!==r&&r.$r)return r.$r().v;try{return(new Sk.builtin.str(r)).v}catch(h){if(h instanceof Sk.builtin.TypeError)return"<unknown>";throw h;}};Sk.exportSymbol("Sk.misceval.objectRepr",Sk.misceval.objectRepr);Sk.misceval.opAllowsEquality=function(r){switch(r){case "LtE":case "Eq":case "GtE":return!0}return!1};Sk.exportSymbol("Sk.misceval.opAllowsEquality",Sk.misceval.opAllowsEquality);Sk.misceval.isTrue=function(r){return!0===r||r===Sk.builtin.bool.true$?!0:!1===r||
r===Sk.builtin.bool.false$||null===r||void 0===r?!1:r.nb$bool?r.nb$bool():r.sq$length?0!==r.sq$length():!!r};Sk.exportSymbol("Sk.misceval.isTrue",Sk.misceval.isTrue);Sk.misceval.softspace_=!1;Sk.misceval.print_=function(r){Sk.misceval.softspace_&&("\n"!==r&&Sk.output(" "),Sk.misceval.softspace_=!1);var h=new Sk.builtin.str(r);return Sk.misceval.chain(Sk.importModule("sys",!1,!0),function(f){return Sk.misceval.apply(f.$d.stdout.write,void 0,void 0,void 0,[f.$d.stdout,h])},function(){var f;(f=0===h.v.length)||
(f=h.v[h.v.length-1],f=!("\n"===f||"\t"===f||"\r"===f));if(f||" "===h.v[h.v.length-1])Sk.misceval.softspace_=!0})};Sk.exportSymbol("Sk.misceval.print_",Sk.misceval.print_);Sk.misceval.loadname=function(r,h){h=h[r];if(void 0!==h)return h;h=Sk.builtins[r];if(void 0!==h)return h;throw new Sk.builtin.NameError("name '"+Sk.unfixReserved(r)+"' is not defined");};Sk.exportSymbol("Sk.misceval.loadname",Sk.misceval.loadname);Sk.misceval.call=function(r,h,f,n,d){d=Array.prototype.slice.call(arguments,4);return Sk.misceval.apply(r,
h,f,n,d)};Sk.exportSymbol("Sk.misceval.call",Sk.misceval.call);Sk.misceval.callAsync=function(r,h,f,n,d,m){m=Array.prototype.slice.call(arguments,5);return Sk.misceval.applyAsync(r,h,f,n,d,m)};Sk.exportSymbol("Sk.misceval.callAsync",Sk.misceval.callAsync);Sk.misceval.callOrSuspend=function(r,h,f,n,d){d=Array.prototype.slice.call(arguments,4);return Sk.misceval.applyOrSuspend(r,h,f,n,d)};Sk.exportSymbol("Sk.misceval.callOrSuspend",Sk.misceval.callOrSuspend);Sk.misceval.callsim=function(r,h){h=Array.prototype.slice.call(arguments,
1);return Sk.misceval.apply(r,void 0,void 0,void 0,h)};Sk.exportSymbol("Sk.misceval.callsim",Sk.misceval.callsim);Sk.misceval.callsimArray=function(r,h,f){h=h||[];return Sk.misceval.retryOptionalSuspensionOrThrow(Sk.misceval.callsimOrSuspendArray(r,h,f))};Sk.exportSymbol("Sk.misceval.callsimArray",Sk.misceval.callsimArray);Sk.misceval.callsimAsync=function(r,h,f){f=Array.prototype.slice.call(arguments,2);return Sk.misceval.applyAsync(r,h,void 0,void 0,void 0,f)};Sk.exportSymbol("Sk.misceval.callsimAsync",
Sk.misceval.callsimAsync);Sk.misceval.callsimOrSuspend=function(r,h){h=Array.prototype.slice.call(arguments,1);return Sk.misceval.applyOrSuspend(r,void 0,void 0,void 0,h)};Sk.exportSymbol("Sk.misceval.callsimOrSuspend",Sk.misceval.callsimOrSuspend);Sk.misceval.callsimOrSuspendArray=function(r,h,f){h=h||[];return void 0!==r&&r.tp$call?r.tp$call(h,f):Sk.misceval.applyOrSuspend(r,void 0,void 0,f,h)};Sk.exportSymbol("Sk.misceval.callsimOrSuspendArray",Sk.misceval.callsimOrSuspendArray);Sk.misceval.apply=
function(r,h,f,n,d){r=Sk.misceval.applyOrSuspend(r,h,f,n,d);return r instanceof Sk.misceval.Suspension?Sk.misceval.retryOptionalSuspensionOrThrow(r):r};Sk.exportSymbol("Sk.misceval.apply",Sk.misceval.apply);Sk.misceval.defaultHandlers={};Sk.misceval.asyncToPromise=function(r,h){return new Promise(function(f,n){try{(function g(m){try{for(var p=function(){try{g(m.resume())}catch(v){n(v)}},k=function(v){try{m.data.result=v,p()}catch(w){n(w)}},q=function(v){try{m.data.error=v,p()}catch(w){n(w)}};m instanceof
Sk.misceval.Suspension;){const v=m.data.type;let w=h&&(h[v]||h["*"]);w||(w=Sk.misceval.defaultHandlers[v]||Sk.misceval.defaultHandlers["*"]);if(w){var x=w(m);if(x){x.then(g,n);return}}if("Sk.promise"===v){m.data.promise.then(k,q);return}if("Sk.yield"===v){Sk.global.setImmediate(p);return}if("Sk.delay"===v){Sk.global.setImmediate(p);return}if(m.optional)m=m.resume();else throw new Sk.builtin.SuspensionError("Unhandled non-optional suspension of type '"+m.data.type+"'");}f(m)}catch(v){n(v)}})(r())}catch(d){n(d)}})};
Sk.exportSymbol("Sk.misceval.asyncToPromise",Sk.misceval.asyncToPromise);Sk.misceval.applyAsync=function(r,h,f,n,d,m){return Sk.misceval.asyncToPromise(function(){return Sk.misceval.applyOrSuspend(h,f,n,d,m)},r)};Sk.exportSymbol("Sk.misceval.applyAsync",Sk.misceval.applyAsync);Sk.misceval.chain=function(r,h){for(var f=1,n=r,d,m;;){if(f==arguments.length)return n;if(n&&n.$isSuspension)break;n=arguments[f](n);f++}m=Array(arguments.length-f);for(d=0;d<arguments.length-f;d++)m[d]=arguments[f+d];d=0;return function k(p){for(;d<
m.length;){if(p instanceof Sk.misceval.Suspension)return new Sk.misceval.Suspension(k,p);p=m[d](p);d++}return p}(n)};Sk.exportSymbol("Sk.misceval.chain",Sk.misceval.chain);Sk.misceval.tryCatch=function(r,h){try{var f=r()}catch(n){return h(n)}return f instanceof Sk.misceval.Suspension?(r=new Sk.misceval.Suspension(void 0,f),r.resume=function(){return Sk.misceval.tryCatch(f.resume,h)},r):f};Sk.exportSymbol("Sk.misceval.tryCatch",Sk.misceval.tryCatch);Sk.misceval.iterFor=function(r,h,f){var n=f,d=function(m){n=
m;return m instanceof Sk.misceval.Break?m:r.tp$iternext(!0)};return function p(g){for(;void 0!==g;){if(g instanceof Sk.misceval.Suspension)return new Sk.misceval.Suspension(p,g);if(g===Sk.misceval.Break||g instanceof Sk.misceval.Break)return g.brValue;g=Sk.misceval.chain(h(g,n),d)}return n}(r.tp$iternext(!0))};Sk.exportSymbol("Sk.misceval.iterFor",Sk.misceval.iterFor);Sk.misceval.iterArray=function(r,h,f){Sk.asserts.assert(Array.isArray(r),"iterArgs requires an array");let n=0;return Sk.misceval.iterFor({tp$iternext:()=>
r[n++]},h,f)};Sk.misceval.arrayFromIterable=function(r,h){if(void 0===r)return[];if(void 0===r.ht$type&&void 0!==r.sk$asarray)return r.sk$asarray();const f=[];r=Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(r),n=>{f.push(n)}),()=>f);return h?r:Sk.misceval.retryOptionalSuspensionOrThrow(r)};Sk.misceval.Break=function(r){if(!(this instanceof Sk.misceval.Break))return new Sk.misceval.Break(r);this.brValue=r};Sk.exportSymbol("Sk.misceval.Break",Sk.misceval.Break);Sk.misceval.applyOrSuspend=function(r,
h,f,n,d){var m;if(null==r||r===Sk.builtin.none.none$)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(r)+"' object is not callable");"function"===typeof r&&void 0===r.tp$call&&(r=new Sk.builtin.func(r));var g=r.tp$call;if(void 0!==g){if(f)for(f=f.tp$iter(),m=f.tp$iternext();void 0!==m;m=f.tp$iternext())d.push(m);if(h)for(f=Sk.abstr.iter(h),m=f.tp$iternext();void 0!==m;m=f.tp$iternext()){if(!Sk.builtin.checkString(m))throw new Sk.builtin.TypeError("Function keywords must be strings");n.push(m.v);
n.push(Sk.abstr.objectGetItem(h,m,!1))}return g.call(r,d,n,h)}g=r.__call__;if(void 0!==g)return d.unshift(r),Sk.misceval.apply(g,h,f,n,d);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(r)+"' object is not callable");};Sk.exportSymbol("Sk.misceval.applyOrSuspend",Sk.misceval.applyOrSuspend);Sk.misceval.promiseToSuspension=function(r){var h=new Sk.misceval.Suspension;h.resume=function(){if(h.data.error)throw h.data.error;return h.data.result};h.data={type:"Sk.promise",promise:r};return h};Sk.exportSymbol("Sk.misceval.promiseToSuspension",
Sk.misceval.promiseToSuspension);Sk.misceval.buildClass=function(r,h,f,n,d,m){f=new Sk.builtin.str(f);const g=new Sk.builtin.tuple(n);m=m||[];n=n||[];let p;var k=!0;const q=m.indexOf("metaclass");-1<q?(p=m[q+1],m[q]=m[m.length-2],m[q+1]=m[m.length-1],m.pop(),m.pop(),k=Sk.builtin.checkClass(p)):p=n.length?n[0].ob$type:Sk.builtin.type;k&&(p=e(p,n));let x=null;p!==Sk.builtin.type&&([x,w]=l(p,f,g,m,k));n=!1;let v={};if(null===x)x=new Sk.builtin.dict([]);else if(x.constructor===Sk.builtin.dict||b()){var w=
Sk.abstr.iter(Sk.misceval.callsimArray(x.tp$getattr(Sk.builtin.str.$keys)));for(k=w.tp$iternext();void 0!==k;k=w.tp$iternext())Sk.builtin.checkString(k)&&(v[k.toString()]=x.mp$subscript(k))}else v=new Proxy(x,w),n=!0;r.__name__&&(v.__module__=r.__name__);h(r,v,void 0===d?{}:d);n||Object.keys(v).forEach(C=>{Sk.abstr.objectSetItem(x,new Sk.builtin.str(C),v[C])});return Sk.misceval.callsimOrSuspendArray(p,[f,g,x],m)};Sk.exportSymbol("Sk.misceval.buildClass",Sk.misceval.buildClass)},function(G,V){Sk.builtin.callable_iter_=
Sk.abstr.buildIteratorClass("callable_iterator",{constructor:function(a,c){if(!Sk.builtin.checkCallable(a))throw new Sk.builtin.TypeError("iter(v, w): v must be callable");this.$callable=a;this.$sentinel=c;this.$flag=!1},iternext(a){if(!0!==this.$flag){if(a)return a=Sk.misceval.callsimOrSuspendArray(this.$callable,[]),Sk.misceval.chain(a,c=>{if(Sk.misceval.richCompareBool(c,this.$sentinel,"Eq",!0))this.$flag=!0;else return c});a=Sk.misceval.callsimArray(this.$callable,[]);if(Sk.misceval.richCompareBool(a,
this.$sentinel,"Eq",!1))this.$flag=!0;else return a}},flags:{sk$unacceptableBase:!0}});Sk.builtin.seq_iter_=Sk.abstr.buildIteratorClass("iterator",{constructor:function seq_iter_(a){this.$index=0;this.$seq=a},iternext(a){let c;c=Sk.misceval.tryCatch(()=>this.$seq.mp$subscript(new Sk.builtin.int_(this.$index++),a),b=>{if(b instanceof Sk.builtin.IndexError||b instanceof Sk.builtin.StopIteration)this.gi$ret=b.$value||Sk.builtin.none.none$;else throw b;});return a?c:Sk.misceval.retryOptionalSuspensionOrThrow(c)},
methods:{__length_hint__:{$flags:{NoArgs:!0},$meth(){if(this.$seq.sq$length)return this.$seq.sq$length()-this.$index;throw new Sk.builtin.NotImplementedError("len is not implemented for "+Sk.abstr.typeName(this.$seq));}}},flags:{sk$unacceptableBase:!0}});Sk.exportSymbol("Sk.builtin.callable_iter_",Sk.builtin.callable_iter_)},function(G,V){Sk.builtin.list=Sk.abstr.buildNativeClass("list",{constructor:function list(b){void 0===b?b=[]:Array.isArray(b)||(b=Sk.misceval.arrayFromIterable(b));Sk.asserts.assert(this instanceof
Sk.builtin.list,"bad call to list, use 'new' with an Array of python objects");this.v=b;this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,tp$doc:"Built-in mutable sequence.\n\nIf no argument is given, the constructor creates a new empty list.\nThe argument must be an iterable if specified.",tp$new:Sk.generic.new,tp$init(b,e){Sk.abstr.checkNoKwargs("list",e);Sk.abstr.checkArgsLen("list",b,0,1);return Sk.misceval.chain(Sk.misceval.arrayFromIterable(b[0],
!0),l=>{this.v=l})},$r(){if(this.in$repr)return new Sk.builtin.str("[...]");this.in$repr=!0;const b=this.v.map(e=>Sk.misceval.objectRepr(e));this.in$repr=!1;return new Sk.builtin.str("["+b.join(", ")+"]")},tp$richcompare:Sk.generic.seqCompare,tp$iter(){return new a(this)},sq$length(){return this.v.length},sq$concat(b){if(!(b instanceof Sk.builtin.list))throw new Sk.builtin.TypeError("can only concatenate list to list");return new Sk.builtin.list(this.v.concat(b.v))},sq$contains(b){for(let e=this.tp$iter(),
l=e.tp$iternext();void 0!==l;l=e.tp$iternext())if(l===b||Sk.misceval.richCompareBool(l,b,"Eq"))return!0;return!1},sq$repeat(b){if(!Sk.misceval.isIndex(b))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(b)+"'");b=Sk.misceval.asIndexSized(b,Sk.builtin.OverflowError);if(b*this.v.length>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;const e=[];for(let l=0;l<b;l++)for(let r=0;r<this.v.length;r++)e.push(this.v[r]);return new Sk.builtin.list(e)},
mp$subscript(b){if(Sk.misceval.isIndex(b))return b=Sk.misceval.asIndexSized(b,Sk.builtin.IndexError),b=this.list$inRange(b,"list index out of range"),this.v[b];if(b instanceof Sk.builtin.slice){const e=[];b.sssiter$(this.v.length,l=>{e.push(this.v[l])});return new Sk.builtin.list(e)}throw new Sk.builtin.TypeError("list indices must be integers or slices, not "+Sk.abstr.typeName(b));},mp$ass_subscript(b,e){void 0===e?this.del$subscript(b):this.ass$subscript(b,e)},sq$inplace_concat(b){return b===this?
(this.v.push(...this.v),this):Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(b),e=>{this.v.push(e)}),()=>this)},sq$inplace_repeat(b){if(!Sk.misceval.isIndex(b))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(b)+"'");b=Sk.misceval.asIndexSized(b,Sk.builtin.OverflowError);const e=this.v.length;if(0>=b)this.v.length=0;else if(b*e>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;for(let l=1;l<b;l++)for(let r=0;r<e;r++)this.v.push(this.v[r]);
return this}},methods:{__reversed__:{$meth(){return new c(this)},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a reverse iterator over the list."},clear:{$meth(){this.v.length=0;return Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Remove all items from list."},copy:{$meth(){return new Sk.builtin.list(this.v.slice(0))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a shallow copy of the list."},append:{$meth(b){this.v.push(b);return Sk.builtin.none.none$},$flags:{OneArg:!0},
$textsig:"($self, object, /)",$doc:"Append object to the end of the list."},insert:{$meth(b,e){b=Sk.misceval.asIndexSized(b,Sk.builtin.OverflowError);({start:b}=Sk.builtin.slice.startEnd$wrt(this,b));this.v.splice(b,0,e);return Sk.builtin.none.none$},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($self, index, object, /)",$doc:"Insert object before index."},extend:{$meth(b){return b===this?(this.v.push(...this.v),Sk.builtin.none.none$):Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(b),e=>{this.v.push(e)}),
()=>Sk.builtin.none.none$)},$flags:{OneArg:!0},$textsig:"($self, iterable, /)",$doc:"Extend list by appending elements from the iterable."},pop:{$meth(b){b=void 0===b?this.v.length-1:Sk.misceval.asIndexSized(b,Sk.builtin.OverflowError);b=this.list$inRange(b,"pop index out of range");const e=this.v[b];this.v.splice(b,1);return e},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, index=-1, /)",$doc:"Remove and return item at index (default last).\n\nRaises IndexError if list is empty or index is out of range."},
remove:{$meth(b){b=this.list$indexOf(b);if(-1===b)throw new Sk.builtin.ValueError("list.remove(x): x not in list");this.v.splice(b,1);return Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:"($self, value, /)",$doc:"Remove first occurrence of value.\n\nRaises ValueError if the value is not present."},sort:{$meth(b,e){if(b.length)throw new Sk.builtin.TypeError("sort() takes no positional arguments");const [l,r]=Sk.abstr.copyKeywordsToNamedArgs("sort",["key","reverse"],b,e,[Sk.builtin.none.none$,
Sk.builtin.bool.false$]);return this.list$sort(void 0,l,r)},$flags:{FastCall:!0},$textsig:"($self, /, *, key=None, reverse=False)",$doc:"Stable sort *IN PLACE*."},index:{$meth(b,e,l){if(void 0!==e&&!Sk.misceval.isIndex(e)||void 0!==l&&!Sk.misceval.isIndex(l))throw new Sk.builtin.TypeError("slice indices must be integers or have an __index__ method");e=this.list$indexOf(b,e,l);if(-1===e)throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(b)+" is not in list");return new Sk.builtin.int_(e)},$flags:{MinArgs:1,
MaxArgs:3},$textsig:"($self, value, start=0, stop=sys.maxsize, /)",$doc:"Return first index of value.\n\nRaises ValueError if the value is not present."},count:{$meth(b){let e=0;const l=this.v.length;for(let r=0;r<l;r++)if(this.v[r]===b||Sk.misceval.richCompareBool(this.v[r],b,"Eq"))e+=1;return new Sk.builtin.int_(e)},$flags:{OneArg:!0},$textsig:"($self, value, /)",$doc:"Return number of occurrences of value."},reverse:{$meth(){this.list$reverse();return Sk.builtin.none.none$},$flags:{NoArgs:!0},
$textsig:"($self, /)",$doc:"Reverse *IN PLACE*."}},classmethods:Sk.generic.classGetItem,proto:{sk$asarray(){return this.v.slice(0)},list$sort:function(b,e,l){const r=null!=e&&e!==Sk.builtin.none.none$;var h=null!=b&&b!==Sk.builtin.none.none$;let f;if(void 0===l)f=!1;else if(Sk.builtin.checkInt(l))f=Sk.misceval.isTrue(l);else throw new Sk.builtin.TypeError("an integer is required");l=new Sk.builtin.timSort(this);this.v=[];const n=new Sk.builtin.int_(0);if(r){l.lt=h?function(d,m){d=Sk.misceval.callsimArray(b,
[d[0],m[0]]);return Sk.misceval.richCompareBool(d,n,"Lt")}:function(d,m){return Sk.misceval.richCompareBool(d[0],m[0],"Lt")};for(let d=0;d<l.listlength;d++){h=l.list.v[d];const m=Sk.misceval.callsimArray(e,[h]);l.list.v[d]=[m,h]}}else h&&(l.lt=function(d,m){d=Sk.misceval.callsimArray(b,[d,m]);return Sk.misceval.richCompareBool(d,n,"Lt")});f&&l.list.list$reverse();l.sort();f&&l.list.list$reverse();if(r)for(e=0;e<l.listlength;e++)h=l.list.v[e][1],l.list.v[e]=h;e=0<this.sq$length();this.v=l.list.v;if(e)throw new Sk.builtin.ValueError("list modified during sort");
return Sk.builtin.none.none$},list$inRange(b,e){0>b&&(b+=this.v.length);if(0<=b&&b<this.v.length)return b;throw new Sk.builtin.IndexError(e);},list$indexOf(b,e,l){for({start:e,end:l}=Sk.builtin.slice.startEnd$wrt(this,e,l);e<l&&e<this.v.length;e++)if(this.v[e]===b||Sk.misceval.richCompareBool(this.v[e],b,"Eq"))return e;return-1},list$reverse(){this.v.reverse()},ass$subscript(b,e){if(Sk.misceval.isIndex(b))this.ass$index(b,e);else if(b instanceof Sk.builtin.slice){const {start:l,stop:r,step:h}=b.slice$indices(this.v.length);
1===h?this.ass$slice(l,r,e):this.ass$ext_slice(b,e)}else throw new Sk.builtin.TypeError("list indices must be integers or slices, not "+Sk.abstr.typeName(b));},ass$index(b,e){b=Sk.misceval.asIndexSized(b,Sk.builtin.IndexError);b=this.list$inRange(b,"list assignment index out of range");this.v[b]=e},ass$slice(b,e,l){if(!Sk.builtin.checkIterable(l))throw new Sk.builtin.TypeError("can only assign an iterable");l=Sk.misceval.arrayFromIterable(l);this.v.splice(b,e-b,...l)},ass$ext_slice(b,e){const l=[];
b.sssiter$(this.v.length,r=>{l.push(r)});if(!Sk.builtin.checkIterable(e))throw new Sk.builtin.TypeError("must assign iterable to extended slice");b=Sk.misceval.arrayFromIterable(e);if(l.length!==b.length)throw new Sk.builtin.ValueError("attempt to assign sequence of size "+b.length+" to extended slice of size "+l.length);for(e=0;e<l.length;e++)this.v.splice(l[e],1,b[e])},del$subscript(b){if(Sk.misceval.isIndex(b))this.del$index(b);else if(b instanceof Sk.builtin.slice){const {start:e,stop:l,step:r}=
b.slice$indices(this.v.length);1===r?this.del$slice(e,l):this.del$ext_slice(b,0<r?1:0)}else throw new Sk.builtin.TypeError("list indices must be integers, not "+Sk.abstr.typeName(b));},del$index(b){b=Sk.misceval.asIndexSized(b,Sk.builtin.IndexError);b=this.list$inRange(b,"list assignment index out of range");this.v.splice(b,1)},del$slice(b,e){this.v.splice(b,e-b)},del$ext_slice(b,e){let l=0;b.sssiter$(this.v.length,r=>{this.v.splice(r-l,1);l+=e})},valueOf(){return this.v}}});Sk.exportSymbol("Sk.builtin.list",
Sk.builtin.list);Sk.builtin.list.py2$methods={sort:{$name:"sort",$meth(b,e){const [l,r,h]=Sk.abstr.copyKeywordsToNamedArgs("sort",["cmp","key","reverse"],b,e,[Sk.builtin.none.none$,Sk.builtin.none.none$,Sk.builtin.bool.false$]);return this.list$sort(l,r,h)},$flags:{FastCall:!0},$textsig:"($self, cmp=None, key=None, reverse=False)",$doc:"Stable sort *IN PLACE*."}};var a=Sk.abstr.buildIteratorClass("list_iterator",{constructor:function(b){this.$index=0;this.$seq=b.v},iternext:Sk.generic.iterNextWithArray,
methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}}),c=Sk.abstr.buildIteratorClass("list_reverseiterator",{constructor:function(b){this.$index=b.v.length-1;this.$seq=b.v},iternext(){const b=this.$seq[this.$index--];if(void 0===b)this.tp$iternext=()=>{};else return b},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef},flags:{sk$unacceptableBase:!0}})},function(G,V,a){function c(t){var y=t.replace(z,"").replace(D,"_").toLowerCase();
y=L[y];return void 0===y?t:y}function b(t,y,E){if(void 0===y)y="utf-8";else if(Sk.builtin.checkString(y))y=y.$jsstr();else throw new Sk.builtin.TypeError(t+"() argument "+("bytesstr".includes(t)?2:1)+" must be str not "+Sk.abstr.typeName(y));if(void 0===E)E="strict";else if(Sk.builtin.checkString(E))E=E.$jsstr();else throw new Sk.builtin.TypeError(t+"() argument "+("bytesstr".includes(t)?3:2)+" must be str not "+Sk.abstr.typeName(E));return{encoding:y,errors:E}}function e(t){if("strict"!==t&&"ignore"!==
t&&"replace"!==t)throw new Sk.builtin.LookupError("Unsupported or invalid error type '"+t+"'");}function l(t,y,E){t=t.$jsstr();y=c(y);e(E);if("ascii"===y){y=[];for(J in t){const Q=t.charCodeAt(J);if(127<Q){if("strict"===E)throw E=r(Q),new Sk.builtin.UnicodeEncodeError("'ascii' codec can't encode character '"+E+"' in position "+J+": ordinal not in range(128)");"replace"===E&&y.push(63)}else y.push(Q)}var J=new Uint8Array(y)}else if("utf-8"===y)J=K.encode(t);else throw new Sk.builtin.LookupError("Unsupported or unknown encoding: '"+
y+"'");return new Sk.builtin.bytes(J)}function r(t){var y=265>=t?"\\x":"\\u";t=t.toString(16);3===t.length&&(t=t.slice(1,3));return t=1===t.length?y+"0"+t:y+t}function h(t,y,E,J){t=t.decode(y);if("replace"===E)return t;if("strict"===E){E=t.indexOf("\ufffd");if(-1===E)return t;throw new Sk.builtin.UnicodeDecodeError(`'${J}' codec can't decode byte 0x ${y[E].toString(16)} in position ${E}: invalid start byte`);}return t.replace(/\ufffd/g,"")}function f(t,y){({encoding:t,errors:y}=b("decode",t,y));t=
c(t);e(y);if("ascii"===t){t=this.v;var E="";for(let J=0;J<t.length;J++){const Q=t[J];if(127<Q){if("strict"===y)throw new Sk.builtin.UnicodeDecodeError("'ascii' codec can't decode byte 0x"+Q.toString(16)+" in position "+J+": ordinal not in range(128)");"replace"===y&&(E+=String.fromCharCode(65533))}else E+=String.fromCharCode(Q)}t=E}else if("utf-8"===t)t=h(R,this.v,y,t);else{try{E=new TextDecoder(t)}catch(J){throw new Sk.builtin.LookupError(`Unsupported or unknown encoding: ${t}. ${J.message}`);}t=
h(E,this.v,y,t)}return new Sk.builtin.str(t)}function n(t,y){return function(E,J,Q){if(!(E instanceof Sk.builtin.bytes||E instanceof Sk.builtin.tuple))throw new Sk.builtin.TypeError(t+" first arg must be bytes or a tuple of bytes, not "+Sk.abstr.typeName(E));({start:J,end:Q}=Sk.builtin.slice.startEnd$wrt(this,J,Q));if(Q<J)return Sk.builtin.bool.false$;J=this.v.subarray(J,Q);if(E instanceof Sk.builtin.tuple){for(let X=Sk.abstr.iter(E),ba=X.tp$iternext();void 0!==ba;ba=X.tp$iternext())if(ba=this.get$raw(ba),
y(J,ba))return Sk.builtin.bool.true$;return Sk.builtin.bool.false$}return y(J,E.v)?Sk.builtin.bool.true$:Sk.builtin.bool.false$}}function d(t){return function(y,E,J){y=this.get$tgt(y);({start:E,end:J}=Sk.builtin.slice.startEnd$wrt(this,E,J));return J<E?-1:"number"===typeof y?(y=t?this.v.lastIndexOf(y,J-1):this.v.indexOf(y,E),y>=E&&y<J?y:-1):t?this.find$subright(y,E,J):this.find$subleft(y,E,J)}}function m(t){return function(y){y=this.get$raw(y);let E;if(t){if(E=this.find$subright(y,0,this.v.length),
0>E)return new Sk.builtin.tuple([new Sk.builtin.bytes,new Sk.builtin.bytes,this])}else if(E=this.find$subleft(y,0,this.v.length),0>E)return new Sk.builtin.tuple([this,new Sk.builtin.bytes,new Sk.builtin.bytes]);return new Sk.builtin.tuple([new Sk.builtin.bytes(this.v.subarray(0,E)),new Sk.builtin.bytes(y),new Sk.builtin.bytes(this.v.subarray(E+y.length))])}}function g(t,y){return function(E){var J=void 0===E||E===Sk.builtin.none.none$?new Uint8Array([9,10,11,12,13,32,133]):this.get$raw(E);E=0;var Q=
this.v.length;if(t)for(;E<Q&&J.includes(this.v[E]);)E++;if(y)for(;Q>E&&J.includes(this.v[Q-1]);)Q--;J=new Uint8Array(Q-E);for(Q=0;Q<J.length;Q++)J[Q]=this.v[Q+E];return new Sk.builtin.bytes(J)}}function p(t,y,E){return function(J,Q){if(void 0===Q)Q=32;else if(Q instanceof Sk.builtin.bytes&&1==Q.v.length)Q=Q.v[0];else throw new Sk.builtin.TypeError(t+"() argument 2 must be a byte string of length 1, not "+Sk.abstr.typeName(Q));const X=this.v.length;J=Sk.misceval.asIndexSized(J,Sk.builtin.OverflowError);
if(J<=X)return new Sk.builtin.bytes(this.v);const ba=new Uint8Array(J);let ia,oa;E?(ia=Math.floor((J-X)/2),oa=(J-X)%2?ia+1:ia):y?(ia=J-X,oa=0):(ia=0,oa=J-X);ba.fill(Q,0,ia);for(let pa=0;pa<X;pa++)ba[pa+ia]=this.v[pa];ba.fill(Q,J-oa);return new Sk.builtin.bytes(ba)}}function k(t){return 9<=t&&13>=t||32===t}function q(t){return 97<=t&&122>=t}function x(t){return 65<=t&&90>=t}function v(t){return 48<=t&&57>=t}function w(t,y){return function(){return 0===this.v.length?y?Sk.builtin.bool.true$:Sk.builtin.bool.false$:
this.v.every(E=>t(E))?Sk.builtin.bool.true$:Sk.builtin.bool.false$}}function C(t,y){return function(){let E=!1;for(let J=0;J<this.v.length;J++){if(y(this.v[J]))return Sk.builtin.bool.false$;!E&&t(this.v[J])&&(E=!0)}return E?Sk.builtin.bool.true$:Sk.builtin.bool.false$}}function F(t){return function(){const y=new Uint8Array(this.v.length);for(let E=0;E<this.v.length;E++)y[E]=t(this.v[E]);return new Sk.builtin.bytes(y)}}a(31);const L={utf:"utf-8",utf8:"utf-8",utf_8:"utf-8",latin_1:"latin1",ascii:"ascii",
utf16:"utf-16",utf_16:"utf-16"};var z=/\s+/g,D=/[_-]+/g;const K=new TextEncoder,R=new TextDecoder;Sk.builtin.bytes=Sk.abstr.buildNativeClass("bytes",{constructor:function bytes(t){if(!(this instanceof Sk.builtin.bytes))throw new TypeError("bytes is a constructor use 'new'");if(void 0===t)this.v=new Uint8Array;else if(t instanceof Uint8Array)this.v=t;else if(Array.isArray(t))Sk.asserts.assert(t.every(y=>0<=y&&255>=y),"bad internal call to bytes with array"),this.v=new Uint8Array(t);else if("string"===typeof t){let y;
const E=new Uint8Array(t.length),J=t.length;for(let Q=0;Q<J;Q++){y=t.charCodeAt(Q);if(255<y)throw new Sk.builtin.UnicodeDecodeError("invalid string at index "+Q+" (possibly contains a unicode character)");E[Q]=y}this.v=E}else if("number"===typeof t)this.v=new Uint8Array(t);else throw new TypeError(`bad internal argument to bytes constructor (got '${typeof t}': ${t})`);},slots:{tp$getattr:Sk.generic.getAttr,tp$doc:"bytes(iterable_of_ints) -> bytes\nbytes(string, encoding[, errors]) -> bytes\nbytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer\nbytes(int) -> bytes object of size given by the parameter initialized with null bytes\nbytes() -> empty bytes object\n\nConstruct an immutable array of bytes from:\n  - an iterable yielding integers in range(256)\n  - a text string encoded using the specified encoding\n  - any object implementing the buffer API.\n  - an integer",
tp$new(t,y){if(this!==Sk.builtin.bytes.prototype)return this.$subtype_new(t,y);y=y||[];let E;if(1>=t.length&&0===+y.length)t=t[0];else{[t,y,E]=Sk.abstr.copyKeywordsToNamedArgs("bytes",[null,"encoding","errors"],t,y);({encoding:y,errors:E}=b("bytes",y,E));if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("encoding or errors without a string argument");return l(t,y,E)}if(void 0===t)return new Sk.builtin.bytes;if(void 0!==(y=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$bytes)))return t=Sk.misceval.callsimOrSuspendArray(y,
[]),Sk.misceval.chain(t,J=>{if(!Sk.builtin.checkBytes(J))throw new Sk.builtin.TypeError("__bytes__ returned non-bytes (type "+Sk.abstr.typeName(J)+")");return J});if(Sk.misceval.isIndex(t)){t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError);if(0>t)throw new Sk.builtin.ValueError("negative count");return new Sk.builtin.bytes(t)}if(Sk.builtin.checkBytes(t))return new Sk.builtin.bytes(t.v);if(Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("string argument without an encoding");if(Sk.builtin.checkIterable(t)){let J=
[];t=Sk.misceval.iterFor(Sk.abstr.iter(t),Q=>{Q=Sk.misceval.asIndexSized(Q);if(0>Q||255<Q)throw new Sk.builtin.ValueError("bytes must be in range(0, 256)");J.push(Q)});return Sk.misceval.chain(t,()=>new Sk.builtin.bytes(J))}throw new Sk.builtin.TypeError("cannot convert '"+Sk.abstr.typeName(t)+"' object into bytes");},$r(){let t,y="'";const E=-1!==this.v.indexOf(34);let J="";for(let Q=0;Q<this.v.length;Q++)if(t=this.v[Q],9>t||10<t&&13>t||13<t&&32>t||126<t)J+=r(t);else if(9===t||10===t||13===t||39===
t||92===t)switch(t){case 9:J+="\\t";break;case 10:J+="\\n";break;case 13:J+="\\r";break;case 39:E?J+="\\'":(J+="'",y='"');break;case 92:J+="\\\\"}else J+=String.fromCharCode(t);return new Sk.builtin.str("b"+y+J+y)},tp$str(){return this.$r()},tp$iter(){return new T(this)},tp$richcompare(t,y){if(this===t&&Sk.misceval.opAllowsEquality(y))return!0;if(!(t instanceof Sk.builtin.bytes))return Sk.builtin.NotImplemented.NotImplemented$;const E=this.v;t=t.v;if(E.length!==t.length&&("Eq"===y||"NotEq"===y))return"Eq"===
y?!1:!0;let J;const Q=Math.min(E.length,t.length);for(J=0;J<Q&&E[J]===t[J];J++);switch(y){case "Lt":return J===Q&&E.length<t.length||E[J]<t[J];case "LtE":return J===Q&&E.length<=t.length||E[J]<=t[J];case "Eq":return J===Q;case "NotEq":return J<Q;case "Gt":return J===Q&&E.length>t.length||E[J]>t[J];case "GtE":return J===Q&&E.length>=t.length||E[J]>=t[J]}},tp$hash(){return(new Sk.builtin.str(this.$jsstr())).tp$hash()},tp$as_sequence_or_mapping:!0,mp$subscript(t){if(Sk.misceval.isIndex(t)){let y=Sk.misceval.asIndexSized(t,
Sk.builtin.IndexError);if(void 0!==y){0>y&&(y=this.v.length+y);if(0>y||y>=this.v.length)throw new Sk.builtin.IndexError("index out of range");return new Sk.builtin.int_(this.v[y])}}else if(t instanceof Sk.builtin.slice){const y=[];t.sssiter$(this.v.length,E=>{y.push(this.v[E])});return new Sk.builtin.bytes(new Uint8Array(y))}throw new Sk.builtin.TypeError("byte indices must be integers or slices, not "+Sk.abstr.typeName(t));},sq$length(){return this.v.length},sq$concat(t){if(!(t instanceof Sk.builtin.bytes))throw new Sk.builtin.TypeError("can't concat "+
Sk.abstr.typeName(t)+" to bytes");const y=new Uint8Array(this.v.length+t.v.length);let E;for(E=0;E<this.v.length;E++)y[E]=this.v[E];for(let J=0;J<t.v.length;J++,E++)y[E]=t.v[J];return new Sk.builtin.bytes(y)},sq$repeat(t){if(!Sk.misceval.isIndex(t))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(t)+"'");t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError);const y=t*this.v.length;if(y>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;if(0>=
t)return new Sk.builtin.bytes;t=new Uint8Array(y);let E=0;for(;E<y;)for(let J=0;J<this.v.length;J++)t[E++]=this.v[J];return new Sk.builtin.bytes(t)},sq$contains(t){return-1!==this.find$left(t)},tp$as_number:!0,nb$remainder:Sk.builtin.str.prototype.nb$remainder},proto:{$jsstr(){let t="";for(let y=0;y<this.v.length;y++)t+=String.fromCharCode(this.v[y]);return t},get$tgt(t){if(t instanceof Sk.builtin.bytes)return t.v;t=Sk.misceval.asIndexOrThrow(t,"argument should be integer or bytes-like object, not {tp$name}");
if(0>t||255<t)throw new Sk.builtin.ValueError("bytes must be in range(0, 256)");return t},get$raw(t){if(t instanceof Sk.builtin.bytes)return t.v;throw new Sk.builtin.TypeError("a bytes-like object is required, not '"+Sk.abstr.typeName(t)+"'");},get$splitArgs:function(t,y){y=Sk.misceval.asIndexSized(y,Sk.builtin.OverflowError);y=0>y?Infinity:y;t=Sk.builtin.checkNone(t)?null:this.get$raw(t);if(null!==t&&!t.length)throw new Sk.builtin.ValueError("empty separator");return{sep:t,maxsplit:y}},find$left:d(!1),
find$right:d(!0),find$subleft:function(t,y,E){E=E-t.length+1;let J=y;for(;J<E;){if(t.every((Q,X)=>Q===this.v[J+X]))return J;J++}return-1},find$subright(t,y,E){let J=E-t.length;for(;J>=y;){if(t.every((Q,X)=>Q===this.v[J+X]))return J;J--}return-1},$subtype_new(t,y){const E=new this.constructor;t=Sk.builtin.bytes.prototype.tp$new(t,y);E.v=t.v;return E},sk$asarray(){const t=[];this.v.forEach(y=>{t.push(new Sk.builtin.int_(y))});return t},valueOf(){return this.v}},flags:{str$encode:l,$decode:f,check$encodeArgs:b},
methods:{__getnewargs__:{$meth(){return new Sk.builtin.tuple(new Sk.builtin.bytes(this.v))},$flags:{NoArgs:!0},$textsig:null,$doc:null},capitalize:{$meth(){const t=this.v.length;if(0===t)return new Sk.builtin.bytes(this.v);const y=new Uint8Array(t);let E=this.v[0];y[0]=q(E)?E-32:E;for(let J=1;J<t;J++)E=this.v[J],y[J]=x(E)?E+32:E;return new Sk.builtin.bytes(y)},$flags:{NoArgs:!0},$textsig:null,$doc:"B.capitalize() -> copy of B\n\nReturn a copy of B with only its first character capitalized (ASCII)\nand the rest lower-cased."},
center:{$meth:p("center",!1,!0),$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"B.center(width[, fillchar]) -> copy of B\n\nReturn B centered in a string of length width.  Padding is\ndone using the specified fill character (default is a space)."},count:{$meth(t,y,E){t=this.get$tgt(t);({start:y,end:E}=Sk.builtin.slice.startEnd$wrt(this,y,E));let J=0;if("number"===typeof t)for(;y<E;y++)this.v[y]===t&&J++;else{E=E-t.length+1;for(let Q=y;Q<E;Q++)t.every((X,ba)=>X===this.v[Q+ba])&&(J++,Q+=t.length-1)}return new Sk.builtin.int_(J)},
$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.count(sub[, start[, end]]) -> int\n\nReturn the number of non-overlapping occurrences of subsection sub in\nbytes B[start:end].  Optional arguments start and end are interpreted\nas in slice notation."},decode:{$meth:f,$flags:{NamedArgs:["encoding","errors"]},$textsig:"($self, /, encoding='utf-8', errors='strict')",$doc:"Decode the bytes using the codec registered for encoding.\n\n  encoding\n    The encoding with which to decode the bytes.\n  errors\n    The error handling scheme to use for the handling of decoding errors.\n    The default is 'strict' meaning that decoding errors raise a\n    UnicodeDecodeError. Other possible values are 'ignore' and 'replace'\n    as well as any other name registered with codecs.register_error that\n    can handle UnicodeDecodeErrors."},
endswith:{$meth:n("endswith",(t,y)=>{const E=t.length-y.length;return 0<=E&&y.every((J,Q)=>J===t[E+Q])}),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.endswith(suffix[, start[, end]]) -> bool\n\nReturn True if B ends with the specified suffix, False otherwise.\nWith optional start, test B beginning at that position.\nWith optional end, stop comparing B at that position.\nsuffix can also be a tuple of bytes to try."},expandtabs:{$meth(t){t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError,"an integer is required (got type {tp$nam})");
const y=[];let E=0;for(let Q=0;Q<this.v.length;Q++){var J=this.v[Q];9===J?(J=t-E%t,y.push(...Array(J).fill(32)),E+=J):10===J||13===J?(y.push(J),E=0):(y.push(J),E++)}return new Sk.builtin.bytes(new Uint8Array(y))},$flags:{NamedArgs:["tabsize"],Defaults:[8]},$textsig:null,$doc:"B.expandtabs(tabsize=8) -> copy of B\n\nReturn a copy of B where all tab characters are expanded using spaces.\nIf tabsize is not given, a tab size of 8 characters is assumed."},find:{$meth:function(t,y,E){return new Sk.builtin.int_(this.find$left(t,
y,E))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.find(sub[, start[, end]]) -> int\n\nReturn the lowest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end].  Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},hex:{$meth(){let t="";for(let y=0;y<this.v.length;y++)t+=this.v[y].toString(16).padStart(2,"0");return new Sk.builtin.str(t)},$flags:{NoArgs:!0},$textsig:null,$doc:"B.hex() -> string\n\nCreate a string of hexadecimal numbers from a bytes object.\nExample: b'\\xb9\\x01\\xef'.hex() -> 'b901ef'."},
index:{$meth:function(t,y,E){t=this.find$left(t,y,E);if(-1===t)throw new Sk.builtin.ValueError("subsection not found");return new Sk.builtin.int_(t)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.index(sub[, start[, end]]) -> int\n\nReturn the lowest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end].  Optional\narguments start and end are interpreted as in slice notation.\n\nRaises ValueError when the subsection is not found."},isalnum:{$meth:w(t=>v(t)||
q(t)||x(t)),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isalnum() -> bool\n\nReturn True if all characters in B are alphanumeric\nand there is at least one character in B, False otherwise."},isalpha:{$meth:w(t=>65<=t&&90>=t||97<=t&&122>=t),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isalpha() -> bool\n\nReturn True if all characters in B are alphabetic\nand there is at least one character in B, False otherwise."},isascii:{$meth:w(t=>0<=t&&127>=t,!0),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isascii() -> bool\n\nReturn True if B is empty or all characters in B are ASCII,\nFalse otherwise."},
isdigit:{$meth:w(v),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isdigit() -> bool\n\nReturn True if all characters in B are digits\nand there is at least one character in B, False otherwise."},islower:{$meth:C(q,x),$flags:{NoArgs:!0},$textsig:null,$doc:"B.islower() -> bool\n\nReturn True if all cased characters in B are lowercase and there is\nat least one cased character in B, False otherwise."},isspace:{$meth:w(k),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isspace() -> bool\n\nReturn True if all characters in B are whitespace\nand there is at least one character in B, False otherwise."},
istitle:{$meth:function(){let t=!1,y=!1;for(let E=0;E<this.v.length;E++){const J=this.v[E];if(x(J)){if(t)return Sk.builtin.bool.false$;y=t=!0}else if(q(J)){if(!t)return Sk.builtin.bool.false$;y=!0}else t=!1}return y?Sk.builtin.bool.true$:Sk.builtin.bool.false$},$flags:{NoArgs:!0},$textsig:null,$doc:"B.istitle() -> bool\n\nReturn True if B is a titlecased string and there is at least one\ncharacter in B, i.e. uppercase characters may only follow uncased\ncharacters and lowercase characters only cased ones. Return False\notherwise."},
isupper:{$meth:C(x,q),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isupper() -> bool\n\nReturn True if all cased characters in B are uppercase and there is\nat least one cased character in B, False otherwise."},join:{$meth(t){const y=[];let E=0;return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),J=>{if(!(J instanceof Sk.builtin.bytes))throw new Sk.builtin.TypeError("sequence item "+E+": expected a bytes-like object, "+Sk.abstr.typeName(J)+" found");E++;y.length&&y.push(...this.v);y.push(...J.v)}),
()=>new Sk.builtin.bytes(new Uint8Array(y)))},$flags:{OneArg:!0},$textsig:"($self, iterable_of_bytes, /)",$doc:"Concatenate any number of bytes objects.\n\nThe bytes whose method is called is inserted in between each pair.\n\nThe result is returned as a new bytes object.\n\nExample: b'.'.join([b'ab', b'pq', b'rs']) -> b'ab.pq.rs'."},ljust:{$meth:p("ljust",!1,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"B.ljust(width[, fillchar]) -> copy of B\n\nReturn B left justified in a string of length width. Padding is\ndone using the specified fill character (default is a space)."},
lower:{$meth:F(t=>x(t)?t+32:t),$flags:{NoArgs:!0},$textsig:null,$doc:"B.lower() -> copy of B\n\nReturn a copy of B with all ASCII characters converted to lowercase."},lstrip:{$meth:g(!0,!1),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, bytes=None, /)",$doc:"Strip leading bytes contained in the argument.\n\nIf the argument is omitted or None, strip leading  ASCII whitespace."},partition:{$meth:m(!1),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the bytes into three parts using the given separator.\n\nThis will search for the separator sep in the bytes. If the separator is found,\nreturns a 3-tuple containing the part before the separator, the separator\nitself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing the original bytes\nobject and two empty bytes objects."},
replace:{$meth(t,y,E){t=this.get$raw(t);y=this.get$raw(y);E=void 0===E?-1:Sk.misceval.asIndexSized(E,Sk.builtin.OverflowError);E=0>E?Infinity:E;const J=[];let Q=0;for(var X=0;X<this.v.length&&Q<E;){const ba=this.find$subleft(t,X,this.v.length);if(-1===ba)break;for(;X<ba;X++)J.push(this.v[X]);J.push(...y);X=ba+t.length;Q++}for(X;X<this.v.length;X++)J.push(this.v[X]);return new Sk.builtin.bytes(new Uint8Array(J))},$flags:{MinArgs:2,MaxArgs:3},$textsig:"($self, old, new, count=-1, /)",$doc:"Return a copy with all occurrences of substring old replaced by new.\n\n  count\n    Maximum number of occurrences to replace.\n    -1 (the default value) means replace all occurrences.\n\nIf the optional argument count is given, only the first count occurrences are\nreplaced."},
rfind:{$meth(t,y,E){return new Sk.builtin.int_(this.find$right(t,y,E))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.rfind(sub[, start[, end]]) -> int\n\nReturn the highest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end].  Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},rindex:{$meth:function(t,y,E){t=this.find$right(t,y,E);if(-1===t)throw new Sk.builtin.ValueError("subsection not found");return new Sk.builtin.int_(t)},
$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.rindex(sub[, start[, end]]) -> int\n\nReturn the highest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end].  Optional\narguments start and end are interpreted as in slice notation.\n\nRaise ValueError when the subsection is not found."},rjust:{$meth:p("rjust",!0,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"B.rjust(width[, fillchar]) -> copy of B\n\nReturn B right justified in a string of length width. Padding is\ndone using the specified fill character (default is a space)"},
rpartition:{$meth:m(!0),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the bytes into three parts using the given separator.\n\nThis will search for the separator sep in the bytes, starting at the end. If\nthe separator is found, returns a 3-tuple containing the part before the\nseparator, the separator itself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing two empty bytes\nobjects and the original bytes object."},rsplit:{$meth:function(t,y){({sep:t,
maxsplit:y}=this.get$splitArgs(t,y));const E=[];let J=0,Q=this.v.length;if(null!==t){for(;0<=Q&&J<y;){const X=this.find$subright(t,0,Q);if(-1===X)break;E.push(new Sk.builtin.bytes(this.v.subarray(X+t.length,Q)));Q=X;J++}E.push(new Sk.builtin.bytes(this.v.subarray(0,Q)))}else{for(Q--;J<y;){for(;k(this.v[Q]);)Q--;if(0>Q)break;t=Q+1;for(Q--;0<=Q&&!k(this.v[Q]);)Q--;E.push(new Sk.builtin.bytes(this.v.subarray(Q+1,t)));J++}if(0<=Q){for(;k(this.v[Q]);)Q--;0<=Q&&E.push(new Sk.builtin.bytes(this.v.subarray(0,
Q+1)))}}return new Sk.builtin.list(E.reverse())},$flags:{NamedArgs:["sep","maxsplit"],Defaults:[Sk.builtin.none.none$,-1]},$textsig:"($self, /, sep=None, maxsplit=-1)",$doc:"Return a list of the sections in the bytes, using sep as the delimiter.\n\n  sep\n    The delimiter according which to split the bytes.\n    None (the default value) means split on ASCII whitespace characters\n    (space, tab, return, newline, formfeed, vertical tab).\n  maxsplit\n    Maximum number of splits to do.\n    -1 (the default value) means no limit.\n\nSplitting is done starting at the end of the bytes and working to the front."},
rstrip:{$meth:g(!1,!0),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, bytes=None, /)",$doc:"Strip trailing bytes contained in the argument.\n\nIf the argument is omitted or None, strip trailing ASCII whitespace."},split:{$meth:function(t,y){({sep:t,maxsplit:y}=this.get$splitArgs(t,y));const E=[],J=this.v.length;let Q=0,X=0;if(null!==t){for(;X<J&&Q<y;){const ba=this.find$subleft(t,X,J);if(-1===ba)break;E.push(new Sk.builtin.bytes(this.v.subarray(X,ba)));X=ba+t.length;Q++}E.push(new Sk.builtin.bytes(this.v.subarray(X,
J)))}else{for(;Q<y;){for(;k(this.v[X]);)X++;if(X===J)break;t=X;for(X++;X<J&&!k(this.v[X]);)X++;E.push(new Sk.builtin.bytes(this.v.subarray(t,X)));Q++}if(X<J){for(;k(this.v[X]);)X++;X<J&&E.push(new Sk.builtin.bytes(this.v.subarray(X,J)))}}return new Sk.builtin.list(E)},$flags:{NamedArgs:["sep","maxsplit"],Defaults:[Sk.builtin.none.none$,-1]},$textsig:"($self, /, sep=None, maxsplit=-1)",$doc:"Return a list of the sections in the bytes, using sep as the delimiter.\n\n  sep\n    The delimiter according which to split the bytes.\n    None (the default value) means split on ASCII whitespace characters\n    (space, tab, return, newline, formfeed, vertical tab).\n  maxsplit\n    Maximum number of splits to do.\n    -1 (the default value) means no limit."},
splitlines:{$meth(t){t=Sk.misceval.isTrue(t);const y=[];let E=0;let J=0;const Q=this.v.length;for(;J<Q;){var X=this.v[J];if(13===X){const ba=10===this.v[J+1];X=t?ba?J+2:J+1:J;y.push(new Sk.builtin.bytes(this.v.subarray(E,X)));J=E=ba?J+2:J+1}else 10===X?(X=t?J+1:J,y.push(new Sk.builtin.bytes(this.v.subarray(E,X))),J=E=J+1):J++}E<Q&&y.push(new Sk.builtin.bytes(this.v.subarray(E,Q)));return new Sk.builtin.list(y)},$flags:{NamedArgs:["keepends"],Defaults:[!1]},$textsig:"($self, /, keepends=False)",$doc:"Return a list of the lines in the bytes, breaking at line boundaries.\n\nLine breaks are not included in the resulting list unless keepends is given and\ntrue."},
startswith:{$meth:n("startswith",(t,y)=>y.length<=t.length&&y.every((E,J)=>E===t[J])),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.startswith(prefix[, start[, end]]) -> bool\n\nReturn True if B starts with the specified prefix, False otherwise.\nWith optional start, test B beginning at that position.\nWith optional end, stop comparing B at that position.\nprefix can also be a tuple of bytes to try."},strip:{$meth:g(!0,!0),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, bytes=None, /)",$doc:"Strip leading and trailing bytes contained in the argument.\n\nIf the argument is omitted or None, strip leading and trailing ASCII whitespace."},
swapcase:{$meth:F(t=>x(t)?t+32:q(t)?t-32:t),$flags:{NoArgs:!0},$textsig:null,$doc:"B.swapcase() -> copy of B\n\nReturn a copy of B with uppercase ASCII characters converted\nto lowercase ASCII and vice versa."},title:{$meth(){const t=this.v.length,y=new Uint8Array(t);let E=!1;for(let J=0;J<t;J++){const Q=this.v[J];x(Q)?(y[J]=E?Q+32:Q,E=!0):q(Q)?(y[J]=E?Q:Q-32,E=!0):(y[J]=Q,E=!1)}return new Sk.builtin.bytes(y)},$flags:{NoArgs:!0},$textsig:null,$doc:"B.title() -> copy of B\n\nReturn a titlecased version of B, i.e. ASCII words start with uppercase\ncharacters, all remaining cased characters have lowercase."},
upper:{$meth:F(t=>q(t)?t-32:t),$flags:{NoArgs:!0},$textsig:null,$doc:"B.upper() -> copy of B\n\nReturn a copy of B with all ASCII characters converted to uppercase."},zfill:{$meth(t){t=Sk.misceval.asIndexSized(t,Sk.builtin.IndexError);const y=t-this.v.length;if(0>=y)return new Sk.builtin.bytes(this.v);const E=new Uint8Array(t);let J=0,Q;if(43===this.v[0]||45===this.v[0])E[0]=this.v[0],J++;E.fill(48,J,J+y);Q=J;for(J+=y;J<t;J++,Q++)E[J]=this.v[Q];return new Sk.builtin.bytes(E)},$flags:{OneArg:!0},$textsig:null,
$doc:"B.zfill(width) -> copy of B\n\nPad a numeric string B with zeros on the left, to fill a field\nof the specified width.  B is never truncated."}},classmethods:{fromhex:{$meth:function(t){function y(ia){for(let oa=X;oa<ia;oa+=2){let pa=t.substr(oa,2);if(!J.test(pa))throw new Sk.builtin.ValueError("non-hexadecimal number found in fromhex() arg at position "+(oa+1));Q.push(parseInt(pa,16))}}if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("fromhex() argument must be str, not "+Sk.abstr.typeName(t));
t=t.$jsstr();const E=/\s+/g,J=/^[abcdefABCDEF0123456789]{2}$/,Q=[];let X=0,ba;for(;null!==(ba=E.exec(t));)y(ba.index),X=E.lastIndex;y(t.length);return new this(Q)},$flags:{OneArg:!0},$textsig:"($type, string, /)",$doc:"Create a bytes object from a string of hexadecimal numbers.\n\nSpaces between two numbers are accepted.\nExample: bytes.fromhex('B9 01EF') -> b'\\\\xb9\\\\x01\\\\xef'."}}});var T=Sk.abstr.buildIteratorClass("bytes_iterator",{constructor:function(t){this.$index=0;this.$seq=t.v},iternext(){const t=
this.$seq[this.$index++];if(void 0!==t)return new Sk.builtin.int_(t)},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}});Sk.exportSymbol("Sk.builtin.bytes",Sk.builtin.bytes)},function(G,V,a){(function(c){(function(b){function e(){}function l(){}var r=String.fromCharCode,h={}.toString,f=h.call(b.SharedArrayBuffer),n=h(),d=b.Uint8Array,m=d||Array,g=d?ArrayBuffer:m,p=g.isView||function(v){return v&&"length"in v},k=h.call(g.prototype);g=l.prototype;
var q=b.TextEncoder,x=new (d?Uint16Array:m)(32);e.prototype.decode=function(v){if(!p(v)){var w=h.call(v);if(w!==k&&w!==f&&w!==n)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");v=d?new m(v):v||[]}for(var C=w="",F=0,L=v.length|0,z=L-32|0,D,K,R=0,T=0,t,y=0,E=-1;F<L;){for(D=F<=z?32:L-F|0;y<D;F=F+1|0,y=y+1|0){K=v[F]&255;switch(K>>4){case 15:t=v[F=F+1|0]&255;if(2!==t>>6||247<K){F=F-1|0;break}R=(K&7)<<6|t&63;T=5;K=256;case 14:t=
v[F=F+1|0]&255,R<<=6,R|=(K&15)<<6|t&63,T=2===t>>6?T+4|0:24,K=K+256&768;case 13:case 12:t=v[F=F+1|0]&255,R<<=6,R|=(K&31)<<6|t&63,T=T+7|0,F<L&&2===t>>6&&R>>T&&1114112>R?(K=R,R=R-65536|0,0<=R&&(E=(R>>10)+55296|0,K=(R&1023)+56320|0,31>y?(x[y]=E,y=y+1|0,E=-1):(t=E,E=K,K=t))):(K>>=8,F=F-K-1|0,K=65533),R=T=0,D=F<=z?32:L-F|0;default:x[y]=K;continue;case 11:case 10:case 9:case 8:}x[y]=65533}C+=r(x[0],x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15],x[16],x[17],x[18],x[19],x[20],
x[21],x[22],x[23],x[24],x[25],x[26],x[27],x[28],x[29],x[30],x[31]);32>y&&(C=C.slice(0,y-32|0));if(F<L){if(x[0]=E,y=~E>>>31,E=-1,C.length<w.length)continue}else-1!==E&&(C+=r(E));w+=C;C=""}return w};g.encode=function(v){v=void 0===v?"":""+v;var w=v.length|0,C=new m((w<<1)+8|0),F,L=0,z=!d;for(F=0;F<w;F=F+1|0,L=L+1|0){var D=v.charCodeAt(F)|0;if(127>=D)C[L]=D;else{if(2047>=D)C[L]=192|D>>6;else{a:{if(55296<=D)if(56319>=D){var K=v.charCodeAt(F=F+1|0)|0;if(56320<=K&&57343>=K){D=(D<<10)+K-56613888|0;if(65535<
D){C[L]=240|D>>18;C[L=L+1|0]=128|D>>12&63;C[L=L+1|0]=128|D>>6&63;C[L=L+1|0]=128|D&63;continue}break a}D=65533}else 57343>=D&&(D=65533);!z&&F<<1<L&&F<<1<(L-7|0)&&(z=!0,K=new m(3*w),K.set(C),C=K)}C[L]=224|D>>12;C[L=L+1|0]=128|D>>6&63}C[L=L+1|0]=128|D&63}}return d?C.subarray(0,L):C.slice(0,L)};q||(b.TextDecoder=e,b.TextEncoder=l)})("undefined"==typeof c?"undefined"==typeof self?this:self:c)}).call(this,a(0))},function(G,V){Sk.builtin.tuple=Sk.abstr.buildNativeClass("tuple",{constructor:function tuple(c){void 0===
c?c=[]:Array.isArray(c)||(c=Sk.misceval.arrayFromIterable(c));Sk.asserts.assert(this instanceof Sk.builtin.tuple,"bad call to tuple, use 'new' with an Array of python objects");this.v=c;this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:"Built-in immutable sequence.\n\nIf no argument is given, the constructor returns an empty tuple.\nIf iterable is specified the tuple is initialized from iterable's items.\n\nIf the argument is a tuple, the return value is the same object.",
$r(){if(this.in$repr)return new Sk.builtin.str("(...)");this.in$repr=!0;let c=this.v.map(b=>Sk.misceval.objectRepr(b));this.in$repr=!1;c=c.join(", ");1===this.v.length&&(c+=",");return new Sk.builtin.str("("+c+")")},tp$new(c,b){if(this!==Sk.builtin.tuple.prototype)return this.$subtype_new(c,b);Sk.abstr.checkNoKwargs("tuple",b);Sk.abstr.checkArgsLen("tuple",c,0,1);c=c[0];return void 0===c?new Sk.builtin.tuple([]):c.constructor===Sk.builtin.tuple?c:Sk.misceval.chain(Sk.misceval.arrayFromIterable(c,
!0),e=>new Sk.builtin.tuple(e))},tp$hash(){let c,b=3430008,e=1000003;const l=this.v.length;for(let r=0;r<l;++r){c=Sk.abstr.objectHash(this.v[r]);if(-1===c)return-1;b=(b^c)*e;e+=82520+l+l}b+=97531;-1===b&&(b=-2);return b|0},tp$richcompare:Sk.generic.seqCompare,tp$iter(){return new a(this)},mp$subscript(c){if(Sk.misceval.isIndex(c)){c=Sk.misceval.asIndexSized(c,Sk.builtin.IndexError);0>c&&(c=this.v.length+c);if(0>c||c>=this.v.length)throw new Sk.builtin.IndexError("tuple index out of range");return this.v[c]}if(c instanceof
Sk.builtin.slice){const b=[];c.sssiter$(this.v.length,e=>{b.push(this.v[e])});return new Sk.builtin.tuple(b)}throw new Sk.builtin.TypeError("tuple indices must be integers or slices, not "+Sk.abstr.typeName(c));},sq$length(){return this.v.length},sq$repeat(c){c=Sk.misceval.asIndexSized(c,Sk.builtin.OverflowError);if(1===c&&this.constructor===Sk.builtin.tuple)return this;const b=[];for(let e=0;e<c;e++)for(let l=0;l<this.v.length;l++)b.push(this.v[l]);return new Sk.builtin.tuple(b)},sq$concat(c){if(!(c instanceof
Sk.builtin.tuple))throw new Sk.builtin.TypeError("can only concatenate tuple (not '"+Sk.abstr.typeName(c)+"') to tuple");return new Sk.builtin.tuple(this.v.concat(c.v))},sq$contains(c){for(let b=this.tp$iter(),e=b.tp$iternext();void 0!==e;e=b.tp$iternext())if(e===c||Sk.misceval.richCompareBool(e,c,"Eq"))return!0;return!1}},proto:{$subtype_new(c,b){b=new this.constructor;c=Sk.builtin.tuple.prototype.tp$new(c);b.v=c.v;return b},sk$asarray(){return this.v.slice(0)},valueOf(){return this.v}},methods:{__getnewargs__:{$meth(){return new Sk.builtin.tuple(this.v.slice(0))},
$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:null},index:{$meth(c,b,e){if(void 0!==b&&!Sk.misceval.isIndex(b)||void 0!==e&&!Sk.misceval.isIndex(e))throw new Sk.builtin.TypeError("slice indices must be integers or have an __index__ method");({start:b,end:e}=Sk.builtin.slice.startEnd$wrt(this,b,e));const l=this.v;for(;b<e;b++)if(l[b]===c||Sk.misceval.richCompareBool(l[b],c,"Eq"))return new Sk.builtin.int_(b);throw new Sk.builtin.ValueError("tuple.index(x): x not in tuple");},$flags:{MinArgs:1,MaxArgs:3},
$textsig:"($self, value, start=0, stop=sys.maxsize, /)",$doc:"Return first index of value.\n\nRaises ValueError if the value is not present."},count:{$meth(c){const b=this.v.length,e=this.v;let l=0;for(let r=0;r<b;++r)if(e[r]===c||Sk.misceval.richCompareBool(e[r],c,"Eq"))l+=1;return new Sk.builtin.int_(l)},$flags:{OneArg:!0},$textsig:"($self, value, /)",$doc:"Return number of occurrences of value."}},classmethods:Sk.generic.classGetItem});Sk.exportSymbol("Sk.builtin.tuple",Sk.builtin.tuple);var a=
Sk.abstr.buildIteratorClass("tuple_iterator",{constructor:function(c){this.$index=0;this.$seq=c.sk$asarray()},iternext:Sk.generic.iterNextWithArray,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}})},function(G,V){function a(v){let w=v.$savedKeyHash;return void 0!==w?w:w=Sk.abstr.objectHash(v)}function c(v){return new Sk.builtin.set(Sk.misceval.arrayFromIterable(v))}function b(v,w){for(let C=Sk.abstr.iter(v),F=C.tp$iternext();void 0!==F;F=C.tp$iternext())if(!Sk.abstr.sequenceContains(w,
F))return!1;return!0}function e(v,w,C){const F={constructor:function(L){if(1!==arguments.length)throw new Sk.builtin.TypeError("cannot create '"+Sk.abstr.typeName(this)+"' instances");this.dict=L;this.in$repr=!1}};F.slots=Object.assign(w,h);F.methods={isdisjoint:{$meth(L){const z=c(this);return z.isdisjoint.$meth.call(z,L)},$flags:{OneArg:!0},$textsig:null,$doc:"Return True if the view and the given iterable have a null intersection."},__reversed__:{$meth:C,$flags:{NoArgs:!0},$textsig:null,$doc:"Return a reverse iterator over the dict keys."}};
F.flags={sk$unacceptableBase:!0};"dict_values"===v&&(delete F.slots.tp$as_number,delete F.slots.tp$richcompare);return Sk.abstr.buildNativeClass(v,F)}function l(v,w,C){return Sk.abstr.buildIteratorClass(v,{constructor:function(F){this.$index=0;this.$orig=F;this.tp$iternext=()=>{this.$seq=F.$items();this.$version=F.$version;C&&(this.$seq=this.$seq.reverse());this.tp$iternext=this.constructor.prototype.tp$iternext;return this.tp$iternext()}},iternext:w,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},
flags:{sk$unacceptableBase:!0},proto:{next$item:r}})}function r(){if(this.$version!==this.$orig.$version){if(this.$seq.length!==this.$orig.get$size())throw new Sk.builtin.RuntimeError("dict changed size during iteration");throw new Sk.builtin.RuntimeError("dictionary keys changed during iteration");}return this.$seq[this.$index++]}Sk.builtin.dict=Sk.abstr.buildNativeClass("dict",{constructor:function dict(v){void 0===v&&(v=[]);Sk.asserts.assert(Array.isArray(v)&&0===v.length%2&&this instanceof Sk.builtin.dict,
"bad call to dict constructor");this.size=0;this.entries=Object.create(null);this.buckets={};for(let w=0;w<v.length;w+=2)this.dict$setItem(v[w],v[w+1]);this.in$repr=!1;this.$version=0},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$as_number:!0,tp$hash:Sk.builtin.none.none$,tp$doc:"dict() -> new empty dictionary\ndict(mapping) -> new dictionary initialized from a mapping object's\n    (key, value) pairs\ndict(iterable) -> new dictionary initialized as if via:\n    d = {}\n    for k, v in iterable:\n        d[k] = v\ndict(**kwargs) -> new dictionary initialized with the name=value pairs\n    in the keyword argument list.  For example:  dict(one=1, two=2)",
$r(){if(this.in$repr)return new Sk.builtin.str("{...}");this.in$repr=!0;const v=this.$items().map(([w,C])=>Sk.misceval.objectRepr(w)+": "+Sk.misceval.objectRepr(C));this.in$repr=!1;return new Sk.builtin.str("{"+v.join(", ")+"}")},tp$new:Sk.generic.new,tp$init(v,w){return this.update$common(v,w,"dict")},tp$iter(){return new m(this)},tp$richcompare(v,w){let C;if(!(v instanceof Sk.builtin.dict)||"Eq"!==w&&"NotEq"!==w)return Sk.builtin.NotImplemented.NotImplemented$;if(v===this)C=!0;else if(this.size!==
v.size)C=!1;else{let F;C=this.$items().every(([L,z])=>{F=v.mp$lookup(L);return void 0!==F&&(F===z||Sk.misceval.richCompareBool(z,F,"Eq"))})}return"Eq"===w?C:!C},nb$or(v){if(!(v instanceof Sk.builtin.dict))return Sk.builtin.NotImplemented.NotImplemented$;const w=this.dict$copy();w.dict$merge(v);return w},nb$reflected_or(v){if(!(v instanceof Sk.builtin.dict))return Sk.builtin.NotImplemented.NotImplemented$;v=v.dict$copy();v.dict$merge(this);return v},nb$inplace_or(v){return Sk.misceval.chain(this.update$onearg(v),
()=>this)},sq$length(){return this.get$size()},sq$contains(v){return void 0!==this.mp$lookup(v)},mp$subscript(v,w){var C=this.mp$lookup(v);if(void 0!==C)return C;C=Sk.abstr.lookupSpecial(this,Sk.builtin.str.$missing);if(void 0!==C)return v=Sk.misceval.callsimOrSuspendArray(C,[v]),w?v:Sk.misceval.retryOptionalSuspensionOrThrow(v);throw new Sk.builtin.KeyError(v);},mp$ass_subscript(v,w){if(void 0===w){if(v=this.dict$delItem(v))throw v;}else this.dict$setItem(v,w)}},methods:{__reversed__:{$meth(){return new k(this)},
$flags:{NoArgs:!0},$textsig:null,$doc:"Return a reverse iterator over the dict keys."},get:{$meth(v,w){return this.mp$lookup(v)||w||Sk.builtin.none.none$},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, key, default=None, /)",$doc:"Return the value for key if key is in the dictionary, else default."},setdefault:{$meth(v,w){if(this.ob$type!==Sk.builtin.dict){var C=this.mp$lookup(v);if(void 0!==C)return C;w||(w=Sk.builtin.none.none$);this.dict$setItem(v,w)}else{const F=a(v);C="string"===typeof F?this.entries[F]:
this.get$bucket_item(v,F);if(void 0!==C)return C[1];w||(w=Sk.builtin.none.none$);"string"===typeof F?this.entries[F]=[v,w]:this.set$bucket_item(v,w,F);this.size++;this.$version++}return w},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, key, default=None, /)",$doc:"Insert key with a value of default if key is not in the dictionary.\n\nReturn the value for key if key is in the dictionary, else default."},pop:{$meth(v,w){const C=this.pop$item(v);if(void 0!==C)return C[1];if(void 0!==w)return w;throw new Sk.builtin.KeyError(v);
},$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\nIf key is not found, d is returned if given, otherwise KeyError is raised"},popitem:{$meth(){const v=this.get$size();if(0===v)throw new Sk.builtin.KeyError("popitem(): dictionary is empty");const [w,C]=this.$items()[v-1];this.pop$item(w);return new Sk.builtin.tuple([w,C])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.popitem() -> (k, v), remove and return some (key, value) pair as a\n2-tuple; but raise KeyError if D is empty."},
keys:{$meth(){return new f(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$meth(){return new d(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$meth(){return new n(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> an object providing a view on D's values"},update:{$meth(v,w){return Sk.misceval.chain(this.update$common(v,w,"update"),()=>Sk.builtin.none.none$)},
$flags:{FastCall:!0},$textsig:null,$doc:"D.update([E, ]**F) -> None.  Update D from dict/iterable E and F.\nIf E is present and has a .keys() method, then does:  for k in E: D[k] = E[k]\nIf E is present and lacks a .keys() method, then does:  for k, v in E: D[k] = v\nIn either case, this is followed by: for k in F:  D[k] = F[k]"},clear:{$meth(){this.dict$clear();return Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:null,$doc:"D.clear() -> None.  Remove all items from D."},copy:{$meth(){return this.dict$copy()},
$flags:{NoArgs:!0},$textsig:null,$doc:"D.copy() -> a shallow copy of D"}},classmethods:Object.assign({fromkeys:{$meth:function(v,w){w=w||Sk.builtin.none.none$;let C=this===Sk.builtin.dict?new this:this.tp$call([],[]);return Sk.misceval.chain(C,F=>{C=F;return Sk.misceval.iterFor(Sk.abstr.iter(v),L=>C.mp$ass_subscript(L,w,!0))},()=>C)},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($type, iterable, value=None, /)",$doc:"Create a new dictionary with keys from iterable and values set to value."}},Sk.generic.classGetItem),
proto:{quick$lookup:function(v){v=this.entries[v.$savedKeyHash];if(void 0!==v)return v[1]},mp$lookup:function(v){const w=a(v);v="string"===typeof w?this.entries[w]:this.get$bucket_item(v,w);if(void 0!==v)return v[1]},get$size(){return this.size},sk$asarray(){return this.$items().map(v=>v[0])},update$common:function(v,w,C){Sk.abstr.checkArgsLen(C,v,0,1);v=v[0];let F;void 0!==v&&(F=this.update$onearg(v));return Sk.misceval.chain(F,()=>{if(w)for(let L=0;L<w.length;L+=2)this.dict$setItem(new Sk.builtin.str(w[L]),
w[L+1])})},update$onearg(v){return v instanceof Sk.builtin.dict||void 0!==Sk.abstr.lookupSpecial(v,Sk.builtin.str.$keys)?this.dict$merge(v):this.dict$merge_seq(v)},dict$copy(){const v=new Sk.builtin.dict([]);v.size=this.size;var w=Object.entries(this.entries);for(var C in w){var F=w[C][1];v.entries[w[C][0]]=[F[0],F[1]]}for(let L in this.buckets)for(C=this.buckets[L],v.buckets[L]=w=[],F=0;F<C.length;F++)w.push(v.entries["#"+L+"_"+F]);return v},$items(){return Object.values(this.entries)},dict$clear(){this.size=
0;this.$version++;this.entries=Object.create(null);this.buckets={}},dict$setItem:function(v,w){const C=a(v);let F;"string"===typeof C?(F=this.entries[C],void 0===F?(this.entries[C]=[v,w],this.size++,this.$version++):F[1]=w):(F=this.get$bucket_item(v,C),void 0===F?(this.set$bucket_item(v,w,C),this.size++,this.$version++):F[1]=w)},dict$delItem:function(v){if(void 0===this.pop$item(v))return new Sk.builtin.KeyError(v)},get$bucket_item:function(v,w){w=this.buckets[w];if(void 0!==w)for(let F=0;F<w.length;F++){var C=
w[F];if(void 0!==C&&(C[0]===v||Sk.misceval.richCompareBool(v,C[0],"Eq")))return C}},pop$bucket_item:function(v,w){const C=this.buckets[w];let F;if(void 0!==C)for(let L=0;L<C.length;L++)if(F=C[L],void 0!==F&&(F[0]===v||Sk.misceval.richCompareBool(v,F[0],"Eq")))return delete this.entries["#"+w+"_"+L],C[L]=void 0,C.every(z=>void 0===z)&&delete this.buckets[w],F},set$bucket_item:function(v,w,C){let F=this.buckets[C];v=[v,w];void 0===F?(this.buckets[C]=[v],C="#"+C+"_0"):(w=F.indexOf(void 0),-1!==w?(C=
"#"+C+"_"+w,F[w]=v):(C="#"+C+"_"+F.length,F.push(v)));this.entries[C]=v},pop$item:function(v){const w=a(v);"string"===typeof w?(v=this.entries[w],delete this.entries[w]):v=this.pop$bucket_item(v,w);if(void 0!==v)return this.size--,this.$version++,v},dict$merge:function(v){if(v.tp$iter===Sk.builtin.dict.prototype.tp$iter){var w=v.tp$iter();for(let C=w.tp$iternext();void 0!==C;C=w.tp$iternext()){const F=v.mp$subscript(C);this.dict$setItem(C,F)}}else{w=Sk.abstr.lookupSpecial(v,Sk.builtin.str.$keys);
if(void 0===w)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(v)+"' object is not a mapping");return Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(w),C=>Sk.misceval.iterFor(Sk.abstr.iter(C),F=>Sk.misceval.chain(Sk.abstr.objectGetItem(v,F,!0),L=>{this.dict$setItem(F,L)})))}},dict$merge_seq:function(v){let w=0;return Sk.misceval.iterFor(Sk.abstr.iter(v),C=>{if(!Sk.builtin.checkIterable(C))throw new Sk.builtin.TypeError("cannot convert dictionary update sequence element #"+w+" to a sequence");
C=Sk.misceval.arrayFromIterable(C);if(2!==C.length)throw new Sk.builtin.ValueError("dictionary update sequence element #"+w+" has length "+C.length+"; 2 is required");this.dict$setItem(C[0],C[1]);w++})}}});const h={tp$getattr:Sk.generic.getAttr,tp$as_number:!0,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,$r(){if(this.in$repr)return new Sk.builtin.str("...");this.in$repr=!0;let v=Sk.misceval.arrayFromIterable(this);v=v.map(w=>Sk.misceval.objectRepr(w));this.in$repr=!1;return new Sk.builtin.str(Sk.abstr.typeName(this)+
"(["+v.join(", ")+"])")},tp$richcompare(v,w){if(!(Sk.builtin.checkAnySet(v)||v instanceof f||v instanceof d))return Sk.builtin.NotImplemented.NotImplemented$;const C=this.sq$length(),F=v.sq$length();switch(w){case "NotEq":case "Eq":let L;this===v?L=!0:C===F&&(L=b(this,v));return"NotEq"===w?!L:L;case "Lt":return C<F&&b(this,v);case "LtE":return C<=F&&b(this,v);case "Gt":return C>F&&b(v,this);case "GtE":return C>=F&&b(v,this)}},nb$subtract(v){const w=c(this);return w.difference.$meth.call(w,v)},nb$and(v){const w=
c(this);return w.intersection.$meth.call(w,v)},nb$or(v){const w=c(this);return w.union.$meth.call(w,v)},nb$xor(v){const w=c(this);return w.symmetric_difference.$meth.call(w,v)},sq$length(){return this.dict.get$size()}};var f=e("dict_keys",{sq$contains(v){return void 0!==this.dict.mp$lookup(v)},tp$iter(){return new m(this.dict)}},function(){return new k(this.dict)}),n=e("dict_values",{tp$iter(){return new p(this.dict)}},function(){return new x(this.dict)}),d=e("dict_items",{sq$contains(v){if(!(v instanceof
Sk.builtin.tuple&&2===v.sq$length()))return!1;var w=v.mp$subscript(new Sk.builtin.int_(0));v=v.mp$subscript(new Sk.builtin.int_(1));w=this.dict.mp$lookup(w);return void 0===w?!1:w===v||Sk.misceval.richCompareBool(w,v,"Eq")},tp$iter(){return new g(this.dict)}},function(){return new q(this.dict)}),m=l("dict_keyiterator",function(){const v=this.next$item();return v&&v[0]}),g=l("dict_itemiterator",function(){const v=this.next$item();return v&&new Sk.builtin.tuple([v[0],v[1]])}),p=l("dict_valueiterator",
function(){const v=this.next$item();return v&&v[1]}),k=l("dict_reversekeyiterator",m.prototype.tp$iternext,!0),q=l("dict_reverseitemiterator",g.prototype.tp$iternext,!0),x=l("dict_reversevalueiterator",p.prototype.tp$iternext,!0);Sk.builtin.dict.py2$methods={has_key:{$name:"has_key",$flags:{OneArg:!0},$meth(v){return new Sk.builtin.bool(this.sq$contains(v))},$doc:"D.has_key(k) -> True if D has a key k, else False"},keys:{$name:"keys",$meth(){return new Sk.builtin.list(this.sk$asarray())},$flags:{NoArgs:!0},
$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$name:"items",$meth(){return new Sk.builtin.list(this.$items().map(([v,w])=>new Sk.builtin.tuple([v,w])))},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$name:"values",$meth(){return new Sk.builtin.list(this.$items().map(([,v])=>v))},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> an object providing a view on D's values"}}},function(G,V){function a(c,
b){Object.defineProperties(c,{entries:{get:()=>{const e=Object.create(null);Object.entries(b).forEach(([l,r])=>{l=Sk.unfixReserved(l);l.includes("$")||(l=new Sk.builtin.str(l),e[l.$savedKeyHash]=[l,r])});return e},configurable:!0},size:{get:()=>Object.keys(b).map(e=>Sk.unfixReserved(e)).filter(e=>!e.includes("$")).length,configurable:!0}})}Sk.builtin.mappingproxy=Sk.abstr.buildNativeClass("mappingproxy",{constructor:function mappingproxy(c){Sk.asserts.assert(this instanceof Sk.builtin.mappingproxy,"bad call to mapping proxy, use 'new'");
if(void 0!==c){const b=c.constructor;b===Object||null===b||c.hasOwnProperty("sk$object")?(this.mapping=new Sk.builtin.dict([]),a(this.mapping,c)):Sk.builtin.checkMapping(c)?this.mapping=c:Sk.asserts.fail("unhandled case for mappingproxy")}},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,tp$new(c,b){Sk.abstr.checkNoKwargs("mappingproxy",b);Sk.abstr.checkOneArg("mappingproxy",c,b);c=c[0];if(!Sk.builtin.checkMapping(c))throw new Sk.builtin.TypeError("mappingproxy() argument must be a mapping, not "+
Sk.abstr.typeName(c));b=new Sk.builtin.mappingproxy;b.mapping=c;return b},tp$richcompare(c,b){return Sk.misceval.richCompareBool(this.mapping,c,b)},tp$str(){return this.mapping.tp$str()},$r(){return new Sk.builtin.str("mappingproxy("+Sk.misceval.objectRepr(this.mapping)+")")},mp$subscript(c,b){return this.mapping.mp$subscript(c,b)},sq$contains(c){return this.mapping.sq$contains(c)},sq$length(){return this.mapping.sq$length()},tp$iter(){return this.mapping.tp$iter()},tp$as_number:!0,nb$or(c){c instanceof
Sk.builtin.mappingproxy&&(c=c.mapping);return Sk.abstr.numberBinOp(this.mapping,c,"BitOr")},nb$reflected_or(c){c instanceof Sk.builtin.mappingproxy&&(c=c.mapping);return Sk.abstr.numberBinOp(c,this.mapping,"BitOr")},nb$inplace_or(c){throw new Sk.builtin.TypeError("'|=' is not supported by "+Sk.abstr.typeName(this)+"; use '|' instead");}},methods:{get:{$meth(c,b){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$get),c,b)},$flags:{FastCall:!0},$textsig:null,$doc:"D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."},
keys:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$keys),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$items),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$values),[])},$flags:{NoArgs:!0},$textsig:null,
$doc:"D.values() -> a set-like object providing a view on D's values"},copy:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$copy),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.copy() -> a shallow copy of D"}},classmethods:Sk.generic.classGetItem,proto:{str$get:new Sk.builtin.str("get"),str$copy:new Sk.builtin.str("copy"),str$keys:new Sk.builtin.str("keys"),str$items:new Sk.builtin.str("items"),str$values:new Sk.builtin.str("values"),mp$lookup(c){return this.mapping.mp$lookup(c)}},
flags:{sk$unacceptableBase:!0}})},function(G,V){function a(b,e,l){try{const r=e.tp$getattr(l);b.tp$setattr(l,r)}catch(r){}}function c(b,e){a(b,e,Sk.builtin.str.$module);a(b,e,Sk.builtin.str.$name);a(b,e,Sk.builtin.str.$qualname);a(b,e,Sk.builtin.str.$doc);a(b,e,Sk.builtin.str.$ann)}Sk.builtin.property=Sk.abstr.buildNativeClass("property",{constructor:function property(b,e,l,r){this.prop$get=b||Sk.builtin.none.none$;this.prop$set=e||Sk.builtin.none.none$;this.prop$del=l||Sk.builtin.none.none$;this.getter$doc=
b&&!r;this.prop$doc=r||b&&b.$doc||Sk.builtin.none.none$},slots:{tp$getattr:Sk.generic.getAttr,tp$new:Sk.generic.new,tp$init(b,e){b=Sk.abstr.copyKeywordsToNamedArgs("property",["fget","fset","fdel","doc"],b,e,Array(4).fill(Sk.builtin.none.none$));this.prop$get=b[0];this.prop$set=b[1];this.prop$del=b[2];Sk.builtin.checkNone(b[3])?(this.getter$doc=!0,Sk.builtin.checkNone(b[0])||(this.prop$doc=b[0].$doc||b[3])):this.prop$doc=b[3];this.ob$type!==Sk.builtin.property&&this.tp$setattr(Sk.builtin.str.$doc,
this.prop$doc)},tp$doc:"Property attribute.\n\n  fget\n    function to be used for getting an attribute value\n  fset\n    function to be used for setting an attribute value\n  fdel\n    function to be used for del'ing an attribute\n  doc\n    docstring\n\nTypical use is to define a managed attribute x:\n\nclass C(object):\n    def getx(self): return self._x\n    def setx(self, value): self._x = value\n    def delx(self): del self._x\n    x = property(getx, setx, delx, 'I'm the 'x' property.')\n\nDecorators make defining new properties or modifying existing ones easy:\n\nclass C(object):\n    @property\n    def x(self):\n        'I am the 'x' property.'\n        return self._x\n    @x.setter\n    def x(self, value):\n        self._x = value\n    @x.deleter\n    def x(self):\n        del self._x",
tp$descr_get(b,e,l){if(null===b)return this;if(void 0===this.prop$get)throw new Sk.builtin.AttributeError("unreadable attribute");b=Sk.misceval.callsimOrSuspendArray(this.prop$get,[b]);return l?b:Sk.misceval.retryOptionalSuspensionOrThrow(b)},tp$descr_set(b,e,l){let r;r=null==e?this.prop$del:this.prop$set;if(Sk.builtin.checkNone(r))throw new Sk.builtin.AttributeError("can't "+(null==e?"delete":"set")+" attribute");if(!r.tp$call)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(r)+"' is not callable");
b=null==e?r.tp$call([b]):r.tp$call([b,e]);return l?b:Sk.misceval.retryOptionalSuspensionOrThrow(b)}},methods:{getter:{$meth(b){return this.$copy([b,this.prop$set,this.prop$del])},$flags:{OneArg:!0}},setter:{$meth(b){return this.$copy([this.prop$get,b,this.prop$del])},$flags:{OneArg:!0}},deleter:{$meth(b){return this.$copy([this.prop$get,this.prop$set,b])},$flags:{OneArg:!0}}},getsets:{fget:{$get(){return this.prop$get}},fset:{$get(){return this.prop$set}},fdel:{$get(){return this.prop$del}},__doc__:{$get(){return this.prop$doc},
$set(b){this.prop$doc=b=b||Sk.builtin.none.none$}}},proto:{$copy(b){const e=this.ob$type;this.getter$doc||b.push(this.prop$doc);return e===Sk.builtin.property?new e(...b):e.tp$call(b)}}});Sk.builtin.classmethod=Sk.abstr.buildNativeClass("classmethod",{constructor:function classmethod(b){this.cm$callable=b;this.$d=new Sk.builtin.dict},slots:{tp$getattr:Sk.generic.getAttr,tp$new:Sk.generic.new,tp$init(b,e){Sk.abstr.checkNoKwargs("classmethod",e);Sk.abstr.checkArgsLen("classmethod",b,1,1);this.cm$callable=b[0];
c(this,b[0])},$r(){return new Sk.builtin.str(`<classmethod(${Sk.misceval.objectRepr(this.cm$callable)})>`)},tp$doc:"classmethod(function) -> method\n\nConvert a function to be a class method.\n\nA class method receives the class as implicit first argument,\njust like an instance method receives the instance.\nTo declare a class method, use this idiom:\n\n  class C:\n      @classmethod\n      def f(cls, arg1, arg2, ...):\n          ...\n\nIt can be called either on the class (e.g. C.f()) or on an instance\n(e.g. C().f()).  The instance is ignored except for its class.\nIf a class method is called for a derived class, the derived class\nobject is passed as the implied first argument.\n\nClass methods are different than C++ or Java static methods.\nIf you want those, see the staticmethod builtin.",
tp$descr_get(b,e,l){const r=this.cm$callable;if(void 0===r)throw new Sk.builtin.RuntimeError("uninitialized classmethod object");null==e&&(e=b.ob$type);return(b=r.tp$descr_get)?b.call(r,e,null,l):new Sk.builtin.method(r,e)}},getsets:{__func__:{$get(){return this.cm$callable}},__wrapped__:{$get(){return this.cm$callable}},__dict__:Sk.generic.getSetDict}});Sk.builtin.staticmethod=Sk.abstr.buildNativeClass("staticmethod",{constructor:function staticmethod(b){this.sm$callable=b;this.$d=new Sk.builtin.dict},slots:{tp$getattr:Sk.generic.getAttr,
tp$new:Sk.generic.new,tp$init(b,e){Sk.abstr.checkNoKwargs("staticmethod",e);Sk.abstr.checkArgsLen("staticmethod",b,1,1);this.sm$callable=b[0];c(this,b[0])},$r(){return new Sk.builtin.str(`<staticmethod(${Sk.misceval.objectRepr(this.sm$callable)})>`)},tp$call(b,e){return Sk.misceval.callsimOrSuspendArray(this.sm$callable,b,e)},tp$doc:"staticmethod(function) -> method\n\nConvert a function to be a static method.\n\nA static method does not receive an implicit first argument.\nTo declare a static method, use this idiom:\n\n     class C:\n         @staticmethod\n         def f(arg1, arg2, ...):\n             ...\n\nIt can be called either on the class (e.g. C.f()) or on an instance\n(e.g. C().f()).  The instance is ignored except for its class.\n\nStatic methods in Python are similar to those found in Java or C++.\nFor a more advanced concept, see the classmethod builtin.",
tp$descr_get(b,e){if(void 0===this.sm$callable)throw new Sk.builtin.RuntimeError("uninitialized staticmethod object");return this.sm$callable}},getsets:{__func__:{$get(){return this.sm$callable}},__wrapped__:{$get(){return this.sm$callable}},__dict__:Sk.generic.getSetDict}})},function(G,V){function a(t,y){return function(E){if(!(E instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let J=this.v;E=E.v;if("number"===typeof J&&"number"===typeof E){const Q=t(J,E);if(d(Q))return new Sk.builtin.int_(Q)}J=
g(J);E=g(E);return new Sk.builtin.int_(y(J,E))}}function c(t,y){return function(E){if(!(E instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let J=this.v;E=E.v;if("number"===typeof J&&"number"===typeof E)return t(J,E);J=g(J);E=g(E);return y(J,E)}}function b(t,y){return function(){let E=this.v;if("number"===typeof E){const J=t(E);if(void 0!==J)return new Sk.builtin.int_(J);E=g(E)}return new Sk.builtin.int_(y(E))}}function e(){return new Sk.builtin.int_(this.v)}function l(t,
y){return function(E){if(!(E instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let J=this.v;E=E.v;if(0===E)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");if("number"===typeof J&&"number"===typeof E)return new Sk.builtin.int_(t(J,E));J=g(J);E=g(E);return new Sk.builtin.int_(JSBI.numberIfSafe(y(J,E)))}}function r(t,y){return function(E){if(!(E instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;if(E.nb$isnegative())throw new Sk.builtin.ValueError("negative shift count");
let J=this.v;if(0===J)return new Sk.builtin.int_(0);E=E.v;if("number"===typeof J&&"number"===typeof E&&53>E){const Q=t(J,E);if(void 0!==Q)return new Sk.builtin.int_(Q)}J=g(J);E=g(E);return new Sk.builtin.int_(y(J,E))}}function h(t,y){return function(E){if(!(E instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let J=this.v;E=E.v;if("number"===typeof J&&"number"===typeof E&&Math.abs(J)<2**31&&Math.abs(E)<2**31)return new Sk.builtin.int_(t(J,E));J=g(J);E=g(E);return new Sk.builtin.int_(JSBI.numberIfSafe(y(J,
E)))}}function f(t){return JSBI.lessThan(t,JSBI.__ZERO)?JSBI.unaryMinus(t):t}function n(t,y){if(JSBI.greaterThanOrEqual(JSBI.bitwiseXor(t,y),JSBI.__ZERO))return JSBI.divide(t,y);t=JSBI.lessThan(t,JSBI.__ZERO)?JSBI.add(t,C):JSBI.subtract(t,C);return JSBI.subtract(JSBI.divide(t,y),C)}function d(t){return t<=Number.MAX_SAFE_INTEGER&&t>=-Number.MAX_SAFE_INTEGER}function m(t){return t<=Number.MAX_SAFE_INTEGER&&t>=-Number.MAX_SAFE_INTEGER?+t:JSBI.BigInt(t)}function g(t){return"number"===typeof t?JSBI.BigInt(t):
t}function p(t,y){y=y!==Sk.builtin.none.none$?Sk.misceval.asIndexOrThrow(y):null;if(t instanceof Sk.builtin.str)return null===y&&(y=10),new Sk.builtin.int_(Sk.str2number(t.v,y));if(null!==y)throw new Sk.builtin.TypeError("int() can't convert non-string with explicit base");if(void 0!==t.nb$int)return t.nb$int();if(void 0!==t.nb$index)return new Sk.builtin.int_(t.nb$index());if(y=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$trunc)){y=Sk.misceval.callsimArray(y,[]);if(!Sk.builtin.checkInt(y))throw new Sk.builtin.TypeError(Sk.builtin.str.$trunc.$jsstr()+
" returned non-Integral (type "+Sk.abstr.typeName(t)+")");return new Sk.builtin.int_(y.v)}throw new Sk.builtin.TypeError("int() argument must be a string, a bytes-like object or a number, not '"+Sk.abstr.typeName(t)+"'");}function k(t){if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("'byteorder' must be str, not "+Sk.abstr.typeName(t));t=t.toString();if("little"===t)return 1;if("big"===t)return 0;throw new Sk.builtin.ValueError("byteorder must be either 'little' or 'big'");}Sk.builtin.int_=
Sk.abstr.buildNativeClass("int",{constructor:function(t){Sk.asserts.assert(this instanceof Sk.builtin.int_,"bad call to int use 'new'");let y;if("number"===typeof t){if(-6<t&&257>t)return K[t];y=t}else if(JSBI.__isBigInt(t))y=t;else{if(void 0===t)return R;if("string"===typeof t)y=m(t);else{if(t.nb$int)return t.nb$int();Sk.asserts.fail("bad argument to int constructor")}}this.v=y},slots:{tp$as_number:!0,tp$doc:"int(x=0) -> integer\nint(x, base=10) -> integer\n\nConvert a number or string to an integer, or return 0 if no arguments\nare given.  If x is a number, return x.__int__().  For floating point\nnumbers, this truncates towards zero.\n\nIf x is not a number or if base is given, then x must be a string,\nbytes, or bytearray instance representing an integer literal in the\ngiven base.  The literal can be preceded by '+' or '-' and be surrounded\nby whitespace.  The base defaults to 10.  Valid bases are 0 and 2-36.\nBase 0 means to interpret the base from the string as an integer literal.\n>>> int('0b100', base=0)\n4",
$r(){return new Sk.builtin.str(this.v.toString())},tp$hash(){var t=this.v;if("number"===typeof t){if(-1===t)return-2;if(536870911>t&&-536870911<t)return t;t=g(t)}t=JSBI.toNumber(JSBI.remainder(t,q));return-1===t?-2:t},tp$new(t,y){1===t.length+(y?y.length:0)?(y=t[0],t=Sk.builtin.none.none$):(t=Sk.abstr.copyKeywordsToNamedArgs("int",[null,"base"],t,y,[R,Sk.builtin.none.none$]),y=t[0],t=t[1]);y=p(y,t);if(this===Sk.builtin.int_.prototype)return y;t=new this.constructor;t.v=y.v;return t},tp$getattr:Sk.generic.getAttr,
ob$eq:c((t,y)=>t==y,JSBI.equal),ob$ne:c((t,y)=>t!=y,JSBI.notEqual),ob$gt:c((t,y)=>t>y,JSBI.greaterThan),ob$ge:c((t,y)=>t>=y,JSBI.greaterThanOrEqual),ob$lt:c((t,y)=>t<y,JSBI.lessThan),ob$le:c((t,y)=>t<=y,JSBI.lessThanOrEqual),nb$int:e,nb$index(){return this.v},nb$float(){var t=this.v;if("number"===typeof t)return new Sk.builtin.float_(t);t=parseFloat(JSBI.toNumber(t));if(Infinity===t||-Infinity===t)throw new Sk.builtin.OverflowError("int too large to convert to float");return new Sk.builtin.float_(t)},
nb$isnegative(){const t=this.v;return"number"===typeof t?0>t:JSBI.lessThan(t,JSBI.__ZERO)},nb$ispositive(){const t=this.v;return"number"===typeof t?0<=t:JSBI.greaterThanOrEqual(t,JSBI.__ZERO)},nb$bool(){return 0!==this.v},nb$positive:e,nb$negative:b(t=>-t,JSBI.unaryMinus),nb$add:a((t,y)=>t+y,(t,y)=>JSBI.numberIfSafe(JSBI.add(t,y))),nb$subtract:a((t,y)=>t-y,(t,y)=>JSBI.numberIfSafe(JSBI.subtract(t,y))),nb$multiply:a((t,y)=>t*y,(t,y)=>t===JSBI.__ZERO||y===JSBI.__ZERO?0:JSBI.multiply(t,y)),nb$divide:function(t){if(!Sk.__future__.python3)return this.nb$floor_divide(t);
if(!(t instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;var y=this.v,E=t.v;if(0===E)throw new Sk.builtin.ZeroDivisionError("division by zero");if("number"===typeof y&&"number"===typeof E)return new Sk.builtin.float_(y/E);y=g(y);E=g(E);t=JSBI.lessThan(JSBI.bitwiseXor(y,E),JSBI.__ZERO);if(JSBI.equal(y,JSBI.__ZERO))return new Sk.builtin.float_(t?-0:0);y=f(y);E=f(E);if(JSBI.greaterThanOrEqual(y,JSBI.multiply(F,E)))throw new Sk.builtin.OverflowError("int/int too large to represent as a float");
var J=y.toString(2).length-E.toString(2).length,Q=JSBI.BigInt(0>J?-J:J);if(0<=J&&JSBI.greaterThanOrEqual(y,JSBI.multiply(JSBI.exponentiate(w,Q),E))||0>J&&JSBI.greaterThanOrEqual(JSBI.multiply(y,JSBI.exponentiate(w,Q)),E))J+=1;J=Math.max(J,v)-x;y=JSBI.leftShift(y,JSBI.BigInt(Math.max(-J,0)));E=JSBI.leftShift(E,JSBI.BigInt(Math.max(J,0)));Q=JSBI.divide(y,E);y=JSBI.remainder(y,E);y=JSBI.multiply(w,y);if(JSBI.greaterThan(y,E)||JSBI.equal(y,E)&&JSBI.equal(JSBI.remainder(Q,w),C))Q=JSBI.add(Q,C);Q=JSBI.toNumber(Q);
if(Infinity===Q||-Infinity===Q)throw new Sk.builtin.OverflowError("int/int too large to represent as a float");E=Q*Math.pow(2,J);return new Sk.builtin.float_(t?-E:E)},nb$floor_divide:l((t,y)=>Math.floor(t/y),n),nb$remainder:l((t,y)=>t-Math.floor(t/y)*y,(t,y)=>JSBI.subtract(t,JSBI.multiply(y,n(t,y)))),nb$divmod(t){const y=this.nb$floor_divide(t);t=this.nb$remainder(t);return y===Sk.builtin.NotImplemented.NotImplemented$||t===Sk.builtin.NotImplemented.NotImplemented$?Sk.builtin.NotImplemented.NotImplemented$:
new Sk.builtin.tuple([y,t])},nb$and:h((t,y)=>t&y,JSBI.bitwiseAnd),nb$or:h((t,y)=>t|y,JSBI.bitwiseOr),nb$xor:h((t,y)=>t^y,JSBI.bitwiseXor),nb$abs:b(Math.abs,f),nb$lshift:r((t,y)=>{t=2*t*z[y];if(d(t))return t},JSBI.leftShift),nb$rshift:r((t,y)=>{Math.floor(t/z[y+1])},(t,y)=>JSBI.numberIfSafe(JSBI.signedRightShift(t,y))),nb$invert:b(t=>Math.abs(t)<2**31?~t:void 0,t=>JSBI.numberIfSafe(JSBI.bitwiseNot(t))),nb$power(t,y){let E;void 0!==y&&Sk.builtin.checkNone(y)&&(y=void 0);if(!(t instanceof Sk.builtin.int_&&
(void 0===y||y instanceof Sk.builtin.int_)))return Sk.builtin.NotImplemented.NotImplemented$;const J=t.nb$isnegative();if(J&&void 0===y)return this.nb$float().nb$power(t.nb$float());let Q=this.v;t=t.v;if("number"===typeof Q&&"number"===typeof t){const X=Math.pow(Q,t);if(d(X)&&(E=new Sk.builtin.int_(X),void 0===y))return E}if(void 0!==y){if(J)throw new Sk.builtin.ValueError("pow() 2nd argument cannot be negative when 3rd argument specified");if(0===y.v)throw new Sk.builtin.ValueError("pow() 3rd argument cannot be 0");
return void 0!==E?E.nb$remainder(y):new Sk.builtin.int_(JSBI.numberIfSafe(JSBI.powermod(g(Q),g(t),g(y.v))))}return new Sk.builtin.int_(JSBI.exponentiate(g(Q),g(t)))},nb$long(){return new Sk.builtin.lng(this.v)}},getsets:{real:{$get:e,$doc:"the real part of a complex number"},imag:{$get(){return R},$doc:"the imaginary part of a complex number"},numerator:{$get:e},denominator:{$get(){return T}}},classmethods:{from_bytes:{$meth(t,y){Sk.abstr.checkArgsLen("from_bytes",t,0,2);let [E,J,Q]=Sk.abstr.copyKeywordsToNamedArgs("from_bytes",
["bytes","byteorder","signed"],t,y,[Sk.builtin.bool.false$]);t=k(J);E instanceof Sk.builtin.bytes||(E=Sk.misceval.callsimArray(Sk.builtin.bytes,[E]));if(Sk.misceval.isTrue(Q))throw new Sk.builtin.NotImplementedError("from_bytes with signed=True is not yet implemented in Skulpt");const X=[];E.valueOf().forEach(ba=>{X.push(ba.toString(16).padStart(2,"0"))});t&&X.reverse();t=new Sk.builtin.int_(JSBI.numberIfSafe(JSBI.BigInt("0x"+(X.join("")||"0"))));return this===Sk.builtin.int_?t:Sk.misceval.callsimArray(this,
[t])},$flags:{FastCall:!0}}},methods:{conjugate:{$meth:e,$flags:{NoArgs:!0},$textsig:null,$doc:"Returns self, the complex conjugate of any int."},bit_length:{$meth(){let t=this.v;if(0===t)return new Sk.builtin.int_(0);t="number"===typeof t?Math.abs(t):f(t);return new Sk.builtin.int_(t.toString(2).length)},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Number of bits necessary to represent self in binary.\n\n>>> bin(37)\n'0b100101'\n>>> (37).bit_length()\n6"},to_bytes:{$meth(t,y){Sk.abstr.checkArgsLen("to_bytes",
t,0,2);let [E,J,Q]=Sk.abstr.copyKeywordsToNamedArgs("to_bytes",["length","byteorder","signed"],t,y,[Sk.builtin.bool.false$]);t=k(J);E=Sk.misceval.asIndexSized(E,Sk.builtin.OverflowError);if(0>E)throw new Sk.builtin.ValueError("length argument must be non-negative");if(Sk.misceval.isTrue(Q))throw new Sk.builtin.NotImplementedError("to_bytes with signed=True is not yet implemented in Skulpt");if(this.nb$isnegative())throw new Sk.builtin.OverflowError("can't convert negative int to unsigned");y=JSBI.BigInt(this.v).toString(16);
y.length%2&&(y="0"+y);var X=y.length/2;if(X>E){if(0===E&&"00"===y)return new Sk.builtin.bytes;throw new Sk.builtin.OverflowError("int too big to convert");}const ba=Array(E).fill(0);X=E-X;let ia=0;for(;X<E;)ba[X]=parseInt(y.slice(ia,ia+2),16),X+=1,ia+=2;t&&ba.reverse();return new Sk.builtin.bytes(ba)},$flags:{FastCall:!0},$textsig:"($self, /, length, byteorder, *, signed=False)",$doc:"Return an array of bytes representing an integer.\n\n  length\n    Length of bytes object to use.  An OverflowError is raised if the\n    integer is not representable with the given number of bytes.\n  byteorder\n    The byte order used to represent the integer.  If byteorder is 'big',\n    the most significant byte is at the beginning of the byte array.  If\n    byteorder is 'little', the most significant byte is at the end of the\n    byte array.  To request the native byte order of the host system, use\n    `sys.byteorder' as the byte order value.\n  signed\n    Determines whether two's complement is used to represent the integer.\n    If signed is False and a negative integer is given, an OverflowError\n    is raised."},
__trunc__:{$meth:e,$flags:{NoArgs:!0},$textsig:null,$doc:"Truncating an Integral returns itself."},__floor__:{$meth:e,$flags:{NoArgs:!0},$textsig:null,$doc:"Flooring an Integral returns itself."},__ceil__:{$meth:e,$flags:{NoArgs:!0},$textsig:null,$doc:"Ceiling of an Integral returns itself."},__round__:{$meth(t){return this.round$(t)},$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:"Rounding an Integral returns itself.\nRounding with an ndigits argument also returns an integer."},__getnewargs__:{$meth(){return new Sk.builtin.tuple([new Sk.builtin.int_(this.v)])},
$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:Sk.builtin.none.none$},__format__:{$meth:Sk.formatting.mkNumber__format__(!1),$flags:{OneArg:!0},$textsig:"($self, format_spec, /)",$doc:Sk.builtin.none.none$}},proto:{str$(t,y){t=void 0===t||10===t?this.v.toString():this.v.toString(t);y||void 0===y||"-"===t[0]&&(t=t.substring(1));return t},round$(t){t=void 0===t?0:Sk.misceval.asIndexSized(t);var y=this.v;if(0<=t)return new Sk.builtin.int_(y);if("number"!==typeof y){{var E=t;(t=JSBI.lessThan(y,JSBI.__ZERO))&&
(y=JSBI.unaryMinus(y));E=JSBI.exponentiate(JSBI.BigInt(10),JSBI.unaryMinus(JSBI.BigInt(E)));let J=JSBI.divide(y,E);y=JSBI.remainder(y,E);y=JSBI.multiply(y,w);JSBI.greaterThan(y,E)?J=JSBI.add(J,C):JSBI.equal(y,E)&&(Sk.__future__.bankers_rounding?JSBI.equal(JSBI.remainder(J,w),C)&&(J=JSBI.add(J,C)):J=JSBI.add(J,C));J=JSBI.multiply(J,E);t&&(J=JSBI.unaryMinus(J));t=new Sk.builtin.int_(J)}return t}t=Math.pow(10,-t);if(t/10>Math.abs(y))return new Sk.builtin.int_(0);if(!Sk.__future__.bankers_rounding)return new Sk.builtin.int_(Math.round(y/
t)*t);y/=t;E=Math.round(y);return new Sk.builtin.int_((.5===(0<y?y:-y)%1?0===E%2?E:E-1:E)*t)},valueOf(){return this.v},sk$int:!0}});Sk.exportSymbol("Sk.builtin.int_",Sk.builtin.int_);const q=JSBI.BigInt("536870911"),x=Math.log2(Number.MAX_SAFE_INTEGER);G=JSBI.BigInt(Math.floor(Math.log2(Number.MAX_VALUE)));const v=Math.ceil(Math.log2(Number.MIN_VALUE)),w=JSBI.BigInt(2),C=JSBI.BigInt(1),F=JSBI.subtract(JSBI.exponentiate(w,G),JSBI.exponentiate(w,JSBI.subtract(G,JSBI.add(JSBI.BigInt(x),C)))),L=/_(?=[^_])/g;
Sk.str2number=function(t,y){var E=t,J=!1,Q;t=t.replace(/^\s+|\s+$/g,"");"-"===t.charAt(0)&&(J=!0,t=t.substring(1));"+"===t.charAt(0)&&(t=t.substring(1));if(null===y||void 0===y)y=10;if((2>y||36<y)&&0!==y)throw new Sk.builtin.ValueError("int() base must be >= 2 and <= 36");"string"===typeof y&&(y=Number(y));if("0x"===t.substring(0,2).toLowerCase())if(16===y||0===y)t=t.substring(2),y=16;else{if(34>y)throw new Sk.builtin.ValueError("invalid literal for int() with base "+y+": '"+E+"'");}else if("0b"===
t.substring(0,2).toLowerCase())if(2===y||0===y)t=t.substring(2),y=2;else{if(12>y)throw new Sk.builtin.ValueError("invalid literal for int() with base "+y+": '"+E+"'");}else if("0o"===t.substring(0,2).toLowerCase())if(8===y||0===y)t=t.substring(2),y=8;else{if(25>y)throw new Sk.builtin.ValueError("invalid literal for int() with base "+y+": '"+E+"'");}else if("0"===t.charAt(0)){if("0"===t)return 0;if(8===y||0===y)y=8}0===y&&(y=10);if(-1!==t.indexOf("_")){if(-1!==t.indexOf("__"))throw new Sk.builtin.ValueError("invalid literal for int() with base "+
y+": '"+E+"'");t=10!==y?t.replace(L,""):t.charAt(0)+t.substring(1).replace(L,"")}if(0===t.length)throw new Sk.builtin.ValueError("invalid literal for int() with base "+y+": '"+E+"'");for(Q=0;Q<t.length;Q+=1){var X=t.charCodeAt(Q);var ba=y;48<=X&&57>=X?ba=X-48:65<=X&&90>=X?ba=X-65+10:97<=X&&122>=X&&(ba=X-97+10);if(ba>=y)throw new Sk.builtin.ValueError("invalid literal for int() with base "+y+": '"+E+"'");}J&&(t="-"+t);ba=parseInt(t,y);if(d(ba))return ba;E=!1;"-"===t[0]&&(E=!0,t=t.substring(1));y=JSBI.BigInt(y);
J=C;Q=JSBI.__ZERO;for(X=t.length-1;0<=X;X--)ba=t.charCodeAt(X),48<=ba&&57>=ba?ba-=48:65<=ba&&90>=ba?ba=ba-65+10:97<=ba&&122>=ba&&(ba=ba-97+10),ba=JSBI.multiply(JSBI.BigInt(ba),J),Q=JSBI.add(Q,ba),J=JSBI.multiply(J,y);E&&(Q=JSBI.multiply(Q,JSBI.BigInt(-1)));return t=Q};Sk.builtin.int_.py2$methods={};Sk.longFromStr=function(t,y){if(Sk.__future__.python3)return new Sk.builtin.int_(m(t));t=Sk.str2number(t,y);return new Sk.builtin.lng(t)};Sk.exportSymbol("Sk.longFromStr",Sk.longFromStr);Sk.builtin.int_.withinThreshold=
d;Sk.builtin.int_.stringToNumberOrBig=m;const z=[.5,1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,4194304,8388608,16777216,33554432,67108864,134217728,268435456,536870912,1073741824,2147483648,4294967296,8589934592,17179869184,34359738368,68719476736,137438953472,274877906944,549755813888,1099511627776,2199023255552,4398046511104,8796093022208,17592186044416,35184372088832,70368744177664,0x800000000000,281474976710656,562949953421312,0x4000000000000,
0x8000000000000,4503599627370496,9007199254740992];Sk.builtin.lng=Sk.abstr.buildNativeClass("long",{base:Sk.builtin.int_,constructor:function(t){t=Sk.builtin.int_.call(this,t);void 0!==t&&(this.v=t.v)},slots:{$r(){return new Sk.builtin.str(this.v.toString()+"L")},tp$as_number:!0,nb$negative(){return new Sk.builtin.lng(D.nb$negative.call(this).v)},nb$positive(){return new Sk.builtin.lng(D.nb$positive.call(this).v)}}});const D=Sk.builtin.int_.prototype,K=[];for(G=-5;257>G;G++)K[G]=Object.create(Sk.builtin.int_.prototype,
{v:{value:G}});const R=K[0],T=K[1]},function(G,V){const a=Sk.builtin.int_.prototype;Sk.builtin.bool=Sk.abstr.buildNativeClass("bool",{constructor:function bool(c){return Sk.misceval.isTrue(c)?Sk.builtin.bool.true$:Sk.builtin.bool.false$},base:Sk.builtin.int_,slots:{tp$doc:"bool(x) -> bool\n\nReturns True when the argument x is true, False otherwise.\nThe builtins True and False are the only two instances of the class bool.\nThe class bool is a subclass of the class int, and cannot be subclassed.",tp$new(c,
b){Sk.abstr.checkNoKwargs("bool",b);Sk.abstr.checkArgsLen("bool",c,0,1);return new Sk.builtin.bool(c[0])},$r(){return this.v?this.str$True:this.str$False},tp$as_number:!0,nb$and(c){return c.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v&c.v):a.nb$and.call(this,c)},nb$or(c){return c.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v|c.v):a.nb$or.call(this,c)},nb$xor(c){return c.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v^c.v):a.nb$xor.call(this,c)}},flags:{sk$unacceptableBase:!0},
methods:{__format__:{$meth(){return this.$r()},$flags:{OneArg:!0}}},proto:{str$False:new Sk.builtin.str("False"),str$True:new Sk.builtin.str("True"),valueOf(){return!!this.v}}});Sk.exportSymbol("Sk.builtin.bool",Sk.builtin.bool);Sk.builtin.bool.true$=Object.create(Sk.builtin.bool.prototype,{v:{value:1,enumerable:!0}});Sk.builtin.bool.false$=Object.create(Sk.builtin.bool.prototype,{v:{value:0,enumerable:!0}})},function(G,V){function a(g){const p=[g,0];if(0===g)return p;var k=Math.abs(g);let q=Math.max(-1023,
Math.floor(Math.log2(k))+1);for(k*=Math.pow(2,-q);.5>k;)k*=2,q--;for(;1<=k;)k*=.5,q++;0>g&&(k=-k);p[0]=k;p[1]=q;return p}function c(){return new Sk.builtin.float_(this.v)}function b(g){return function(p){const k=this.v;p=p.v;if("number"!==typeof p)if(JSBI.__isBigInt(p)){if(p=parseFloat(JSBI.toNumber(p)),Infinity==p||-Infinity==p)throw new Sk.builtin.OverflowError("int too large to convert to float");}else return Sk.builtin.NotImplemented.NotImplemented$;return g(k,p)}}function e(g,p){return function(k){const q=
this.v;k=k.v;if("number"!==typeof k){if(!JSBI.__isBigInt(k))return Sk.builtin.NotImplemented.NotImplemented$;if(void 0!==p)return p(q,k)}return g(q,k)}}function l(g){const p=b(g);return function(k,q){if(void 0!==q&&!Sk.builtin.checkNone(q))throw new Sk.builtin.TypeError("pow() 3rd argument not allowed unless all arguments are integers");return p.call(this,k)}}function r(g,p){if(0===p)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return Infinity===g?Infinity===p||-Infinity===
g?new Sk.builtin.float_(NaN):0>p?new Sk.builtin.float_(-Infinity):new Sk.builtin.float_(Infinity):-Infinity===g?Infinity===p||-Infinity===g?new Sk.builtin.float_(NaN):0>p?new Sk.builtin.float_(Infinity):new Sk.builtin.float_(-Infinity):new Sk.builtin.float_(g/p)}function h(g,p){if(Infinity===g||-Infinity===g)return new Sk.builtin.float_(NaN);if(0===p)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return Infinity===p?0>g?new Sk.builtin.float_(-1):new Sk.builtin.float_(0):
-Infinity===p?0>g||0!==g?new Sk.builtin.float_(0):new Sk.builtin.float_(-1):new Sk.builtin.float_(Math.floor(g/p))}function f(g,p){if(0===p)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");if(0===g)return new Sk.builtin.float_(0);if(Infinity===p)return Infinity===g||-Infinity===g?new Sk.builtin.float_(NaN):0<g?new Sk.builtin.float_(g):new Sk.builtin.float_(Infinity);let k=g%p;0>g?0<p&&0>k&&(k+=p):0>p&&0!==k&&(k+=p);0===k&&(0>p?k=-0:-Infinity===Infinity/k&&(k=0));return new Sk.builtin.float_(k)}
function n(g,p){if(0>g&&0!==p%1)return(new Sk.builtin.complex(g,0)).nb$power(new Sk.builtin.complex(p,0));if(0===g&&0>p)throw new Sk.builtin.ZeroDivisionError("0.0 cannot be raised to a negative power");const k=Math.pow(g,p);if(Infinity===Math.abs(k)&&Infinity!==Math.abs(g)&&Infinity!==Math.abs(p))throw new Sk.builtin.OverflowError("Numerical result out of range");return new Sk.builtin.float_(k)}Sk.builtin.float_=Sk.abstr.buildNativeClass("float",{constructor:function float_(g){Sk.asserts.assert(this instanceof
Sk.builtin.float_,"bad call to float use 'new'");if("number"===typeof g)this.v=g;else if(void 0===g)this.v=0;else if("string"===typeof g)this.v=parseFloat(g);else{if(g.nb$float)return g.nb$float();Sk.asserts.fail("bad argument to float constructor")}},slots:{tp$getattr:Sk.generic.getAttr,tp$as_number:!0,tp$doc:"Convert a string or number to a floating point number, if possible.",tp$hash(){var g=this.v;if(!Number.isFinite(g))return Number.isNaN(g)?0:0<g?314159:-314159;let [p,k]=a(g);g=1;0>p&&(g=-1,
p=-p);let q=0,x;for(;p;)q=q<<28&536870911|q>>1,p*=268435456,k-=28,x=Math.trunc(p),p-=x,q+=x,536870911<=q&&(q-=536870911);k=0<=k?k%29:28-(-1-k)%29;q=(q<<k&536870911|q>>29-k)*g;return-1===q?-2:q},$r(){return new Sk.builtin.str(this.str$(10,!0))},tp$new(g,p){if(p&&p.length)throw new Sk.builtin.TypeError("float() takes no keyword arguments");if(g&&1<g.length)throw new Sk.builtin.TypeError("float expected at most 1 arguments, got "+g.length);g=g[0];if(void 0===g)var k=new Sk.builtin.float_(0);else if(void 0!==
g.nb$float)k=g.nb$float();else if(void 0!==g.nb$index)k=(new Sk.builtin.int_(g.nb$index())).nb$float();else if(Sk.builtin.checkString(g)){k=g.v;g=k;if(-1!==k.indexOf("_")){if(d.test(k))throw new Sk.builtin.ValueError("could not convert string to float: '"+k+"'");g=k.charAt(0)+k.substring(1).replace(m,"")}if(k.match(/^-inf$/i))var q=-Infinity;else k.match(/^[+]?inf$/i)?q=Infinity:k.match(/^[-+]?nan$/i)?q=NaN:isNaN(g)||(q=parseFloat(g),Number.isNaN(q)&&(q=void 0));if(void 0===q)throw new Sk.builtin.ValueError("could not convert string to float: "+
Sk.misceval.objectRepr(new Sk.builtin.str(k)));k=new Sk.builtin.float_(q)}if(void 0===k)throw new Sk.builtin.TypeError("float() argument must be a string or a number");if(this===Sk.builtin.float_.prototype)return k;q=new this.constructor;q.v=k.v;return q},nb$int(){let g=this.v;if(!Number.isFinite(g)){if(Infinity===g||-Infinity===g)throw new Sk.builtin.OverflowError("cannot convert float infinity to integer");throw new Sk.builtin.ValueError("cannot convert float NaN to integer");}g=0>g?Math.ceil(g):
Math.floor(g);return Sk.builtin.int_.withinThreshold(g)?new Sk.builtin.int_(g):new Sk.builtin.int_(JSBI.BigInt(g))},nb$float:c,nb$long(){return new Sk.builtin.lng(this.nb$int().v)},nb$add:b((g,p)=>new Sk.builtin.float_(g+p)),nb$subtract:b((g,p)=>new Sk.builtin.float_(g-p)),nb$reflected_subtract:b((g,p)=>new Sk.builtin.float_(p-g)),nb$multiply:b((g,p)=>new Sk.builtin.float_(g*p)),nb$divide:b(r),nb$reflected_divide:b((g,p)=>r(p,g)),nb$floor_divide:b(h),nb$reflected_floor_divide:b((g,p)=>h(p,g)),nb$remainder:b(f),
nb$reflected_remainder:b((g,p)=>f(p,g)),nb$divmod:b((g,p)=>new Sk.builtin.tuple([h(g,p),f(g,p)])),nb$reflected_divmod:b((g,p)=>new Sk.builtin.tuple([h(p,g),f(p,g)])),nb$power:l(n),nb$reflected_power:l((g,p)=>n(p,g)),nb$abs(){return new Sk.builtin.float_(Math.abs(this.v))},nb$negative(){return new Sk.builtin.float_(-this.v)},nb$positive(){return new Sk.builtin.float_(this.v)},nb$bool(){return 0!==this.v},nb$isnegative(){return 0>this.v},nb$ispositive(){return 0<=this.v},ob$eq:e((g,p)=>g==p,JSBI.EQ),
ob$ne:e((g,p)=>g!=p,JSBI.NE),ob$gt:e((g,p)=>g>p,JSBI.GT),ob$ge:e((g,p)=>g>=p,JSBI.GE),ob$lt:e((g,p)=>g<p,JSBI.LT),ob$le:e((g,p)=>g<=p,JSBI.LE)},getsets:{real:{$get:c,$doc:"the real part of a complex number"},imag:{$get(){return new Sk.builtin.float_(0)},$doc:"the imaginary part of a complex number"}},methods:{conjugate:{$meth:c,$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return self, the complex conjugate of any float."},__trunc__:{$meth(){return this.nb$int()},$flags:{NoArgs:!0},$textsig:"($self, /)",
$doc:"Return the Integral closest to x between 0 and x."},__round__:{$meth(g){return this.round$(g)},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, ndigits=None, /)",$doc:"Return the Integral closest to x, rounding half toward even.\n\nWhen an argument is passed, work like built-in round(x, ndigits)."},as_integer_ratio:{$meth(){if(!Number.isFinite(this.v)){if(Number.isNaN(this.v))throw new Sk.builtin.ValueError("cannot convert NaN to integer ratio");throw new Sk.builtin.OverflowError("cannot convert Infinity to integer ratio");
}let [g,p]=a(this.v);for(var k=0;300>k&&g!=Math.floor(g);k++)g*=2,p--;k=new Sk.builtin.int_(Math.abs(p));let q=new Sk.builtin.int_(g),x=new Sk.builtin.int_(1);0<p?q=q.nb$lshift(k):x=x.nb$lshift(k);return new Sk.builtin.tuple([q,x])},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return integer ratio.\n\nReturn a pair of integers, whose ratio is exactly equal to the original float\nand with a positive denominator.\n\nRaise OverflowError on infinities and a ValueError on NaNs.\n\n>>> (10.0).as_integer_ratio()\n(10, 1)\n>>> (0.0).as_integer_ratio()\n(0, 1)\n>>> (-.25).as_integer_ratio()\n(-1, 4)"},
is_integer:{$meth(){return new Sk.builtin.bool(Number.isInteger(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the float is an integer."},__getnewargs__:{$meth(){return new Sk.builtin.tuple([this])},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:Sk.builtin.none.none$},__format__:{$meth:Sk.formatting.mkNumber__format__(!0),$flags:{OneArg:!0},$textsig:"($self, format_spec, /)",$doc:Sk.builtin.none.none$}},proto:{valueOf(){return this.v}}});const d=/_[eE]|[eE]_|\._|_\.|[+-]_|__/,
m=/_(?=[^_])/g;Sk.builtin.float_.PyFloat_Check=function(g){return void 0===g?!1:Sk.builtin.checkNumber(g)||Sk.builtin.checkFloat(g)||g.ob$type.$isSubType(Sk.builtin.float_)?!0:!1};Sk.builtin.float_.prototype.toFixed=function(g){g=Sk.builtin.asnum$(g);return this.v.toFixed(g)};Sk.builtin.float_.prototype.round$=function(g){var p=Sk.builtin.asnum$(this);var k=void 0===g?0:Sk.misceval.asIndexSized(g);if(Sk.__future__.bankers_rounding){p*=Math.pow(10,k);var q=Math.round(p);k=(.5===(0<p?p:-p)%1?0===q%
2?q:q-1:q)/Math.pow(10,k);return void 0===g?new Sk.builtin.int_(k):new Sk.builtin.float_(k)}g=Math.pow(10,k);k=Math.round(p*g)/g;return new Sk.builtin.float_(k)};Sk.builtin.float_.prototype.str$=function(g,p){if(isNaN(this.v))return"nan";void 0===p&&(p=!0);if(Infinity==this.v)return"inf";if(-Infinity==this.v&&p)return"-inf";if(-Infinity==this.v&&!p)return"inf";p=p?this.v:Math.abs(this.v);if(void 0===g||10===g){var k=Sk.__future__.python3?p.toPrecision(16):p.toPrecision(12);var q=k.indexOf(".");g=
p.toString().slice(0,q);q=p.toString().slice(q);g.match(/^-?0$/)&&q.slice(1).match(/^0{4,}/)&&(k=12>k.length?p.toExponential():p.toExponential(11));if(0>k.indexOf("e")&&0<=k.indexOf(".")){for(;"0"==k.charAt(k.length-1);)k=k.substring(0,k.length-1);"."==k.charAt(k.length-1)&&(k+="0")}k=k.replace(/\.0+e/,"e","i");k=k.replace(/(e[-+])([1-9])$/,"$10$2");k=k.replace(/0+(e.*)/,"$1")}else k=p.toString(g);0===this.v&&-Infinity===1/this.v&&(k="-"+k);0>k.indexOf(".")&&0>k.indexOf("E")&&0>k.indexOf("e")&&(k+=
".0");return k};Sk.builtin.float_.py2$methods={}},function(G,V){function a(k){let q=k.v;if("number"===typeof q)return q;k.nb$float&&(q=k.nb$float());if(void 0===q)throw new Sk.builtin.TypeError("a float is required");return q.v}function c(k,q,x){if(x===Sk.builtin.complex.prototype)return new Sk.builtin.complex(k,q);x=new x.constructor;Sk.builtin.complex.call(x,k,q);return x}function b(k,q){return function(x){const v=this.real,w=this.imag;var C=x.real;const F=x.v;if("number"===typeof C)x=x.imag;else if("number"===
typeof F)C=F,x=0;else if(JSBI.__isBigInt(F)){if(void 0===q){if(C=parseFloat(JSBI.toNumber(F)),Infinity==C||-Infinity==C)throw new Sk.builtin.OverflowError("int too large to convert to float");}else C=F.toString();x=0}else return Sk.builtin.NotImplemented.NotImplemented$;return k(v,w,C,x)}}function e(k,q,x,v){var w=Math.abs(x);const C=Math.abs(v);if(w>=C){if(0===w)throw new Sk.builtin.ZeroDivisionError("complex division by zero");w=v/x;x+=v*w;v=(k+q*w)/x;k=(q-k*w)/x}else C>=w?(w=x/v,x=x*w+v,Sk.asserts.assert(0!==
v),v=(k*w+q)/x,k=(q*w-k)/x):k=v=NaN;return new Sk.builtin.complex(v,k)}function l(k,q,x,v){if(0===x&&0===v){v=1;var w=0}else if(0===k&&0===q){if(0!==v||0>x)throw new Sk.builtin.ZeroDivisionError("complex division by zero");w=v=0}else{const C=Math.hypot(k,q);w=Math.pow(C,x);k=Math.atan2(q,k);x*=k;0!==v&&(w/=Math.exp(k*v),x+=v*Math.log(C));v=w*Math.cos(x);w*=Math.sin(x)}return new Sk.builtin.complex(v,w)}function r(k,q,x){let v=1;var w=new Sk.builtin.complex(1,0);for(k=new Sk.builtin.complex(k,q);0<
v&&x>=v;)x&v&&(w=new Sk.builtin.complex(w.real*k.real-w.imag*k.imag,w.real*k.imag+k.real*w.imag)),v<<=1,k=new Sk.builtin.complex(k.real*k.real-k.imag*k.imag,2*k.real*k.imag);return w}function h(k,q,x,v,w){w=!1;switch(q){case "e":case "f":case "g":break;case "E":w=!0;q="e";break;case "F":w=!0;q="f";break;case "r":if(0!==x)throw Error("Bad internall call");x=17;q="g";break;default:throw Error("Bad internall call");}if(isNaN(k))k="nan";else if(Infinity===k)k="inf";else if(-Infinity===k)k="-inf";else{v&
h.Py_DTSF_ADD_DOT_0&&(q="g");var C="%"+(v&h.Py_DTSF_ALT?"#":"");null!=x&&(C=C+"."+x);C=new Sk.builtin.str(C+q);k=C.nb$remainder(new Sk.builtin.float_(k));k=k.v}v&h.Py_DTSF_SIGN&&"-"!==k[0]&&(k="+"+k);w&&(k=k.toUpperCase());return k}Sk.builtin.complex=Sk.abstr.buildNativeClass("complex",{constructor:function complex(k,q){Sk.asserts.assert(this instanceof Sk.builtin.complex,"bad call to complex constructor, use 'new'");this.real=k;this.imag=q},slots:{tp$as_number:!0,tp$doc:"Create a complex number from a real part and an optional imaginary part.\n\nThis is equivalent to (real + imag*1j) where imag defaults to 0.",
tp$hash(){var k=(new Sk.builtin.float_(this.real)).tp$hash();k=1003*(new Sk.builtin.float_(this.imag)).tp$hash()+k;return Sk.builtin.int_.withinThreshold(k)?k:(new Sk.builtin.int_(JSBI.BigInt(k))).tp$hash()},tp$getattr:Sk.generic.getAttr,tp$new(k,q){k=Sk.abstr.copyKeywordsToNamedArgs("complex",["real","imag"],k,q,[null,null]);{var x=k[1],v;let C=q=!1;var w=k[0];if(null!=w&&w.constructor===Sk.builtin.complex&&null==x)q=w;else if(Sk.builtin.checkString(w)){if(null!=x)throw new Sk.builtin.TypeError("complex() can't take second arg if first is a string");
q=Sk.builtin.complex.complex_subtype_from_string(w,this)}else{if(null!=x&&Sk.builtin.checkString(x))throw new Sk.builtin.TypeError("complex() second arg can't be a string");null==w?k=null:(k=Sk.abstr.lookupSpecial(w,Sk.builtin.str.$complex),k=void 0!==k?Sk.misceval.callsimArray(k,[]):null);if(null!=k&&k!==Sk.builtin.NotImplemented.NotImplemented$){if(!f(k))throw new Sk.builtin.TypeError("__complex__ should return a complex object");w=k}if(null!=w&&void 0===w.nb$float)throw new Sk.builtin.TypeError("complex() first argument must be a string or a number, not '"+
Sk.abstr.typeName(w)+"'");if(null!=x&&void 0===x.nb$float)throw new Sk.builtin.TypeError("complex() second argument must be a number, not '"+Sk.abstr.typeName(w)+"'");null==w?w=k=0:f(w)?(k=w.real,w=w.imag,q=!0):(k=a(w),w=0);null==x?x=v=0:f(x)?(v=x.real,x=x.imag,C=!0):(v=a(x),x=0);!0===C&&(k-=x);!0===q&&(v+=w);q=c(k,v,this)}}return q},tp$richcompare(k,q){if("Eq"!==q&&"NotEq"!==q){if(Sk.builtin.checkNumber(k)||f(k))throw new Sk.builtin.TypeError("no ordering relation is defined for complex numbers");
return Sk.builtin.NotImplemented.NotImplemented$}return b(function(x,v,w,C){x=x==w&&v==C;return"Eq"===q?x:!x},!0).call(this,k)},$r(){{var k,q;let w=k="";var x=this.real;var v=this.imag;if(q=0===x)q=1==(x?0>x?-1:1:0>1/x?-1:1);q?(x="",q=h(v,"g",null,0,null)):(x=k=h(x,"g",null,0,null),q=h(v,"g",null,h.Py_DTSF_SIGN,null),0===v&&-Infinity===1/v&&q&&"-"!==q[0]&&(q="-"+q),k="(",w=")");v=new Sk.builtin.str(""+k+x+q+"j"+w)}return v},nb$int(){throw new Sk.builtin.TypeError("can't convert complex to int");},
nb$long(){throw new Sk.builtin.TypeError("can't convert complex to long");},nb$float(){throw new Sk.builtin.TypeError("can't convert complex to float");},nb$positive(){return new Sk.builtin.complex(this.real,this.imag)},nb$negative(){return new Sk.builtin.complex(-this.real,-this.imag)},nb$bool(){return this.real||this.imag},nb$add:b((k,q,x,v)=>new Sk.builtin.complex(k+x,q+v)),nb$subtract:b((k,q,x,v)=>new Sk.builtin.complex(k-x,q-v)),nb$reflected_subtract:b((k,q,x,v)=>new Sk.builtin.complex(x-k,v-
q)),nb$multiply:b((k,q,x,v)=>new Sk.builtin.complex(x*k-v*q,k*v+q*x)),nb$divide:b(e),nb$reflected_divide:b((k,q,x,v)=>e(x,v,k,q)),nb$floor_divide(k){throw new Sk.builtin.TypeError("can't take floor of complex number.");},nb$reflected_floor_divide(k){throw new Sk.builtin.TypeError("can't take floor of complex number.");},nb$remainder(k){throw new Sk.builtin.TypeError("can't mod complex numbers.");},nb$reflected_remainder(k){throw new Sk.builtin.TypeError("can't mod complex numbers.");},nb$divmod(k){throw new Sk.builtin.TypeError("can't take floor or mod of complex number.");
},nb$power(k,q){if(null!=q&&!Sk.builtin.checkNone(q))throw new Sk.builtin.ValueError("complex modulo");return g.call(this,k)},nb$reflected_power(k,q){if(null!=q&&!Sk.builtin.checkNone(q))throw new Sk.builtin.ValueError("complex modulo");return p.call(this,k)},nb$abs(){var k=this.real;const q=this.imag;if(!Number.isFinite(k)||!Number.isFinite(q))return Infinity===k||-Infinity===k?new Sk.builtin.float_(Math.abs(k)):Infinity===q||-Infinity===q?new Sk.builtin.float_(Math.abs(q)):new Sk.builtin.float_(NaN);
k=Math.hypot(k,q);if(!Number.isFinite(k))throw new Sk.builtin.OverflowError("absolute value too large");return new Sk.builtin.float_(k)}},getsets:{real:{$get(){return new Sk.builtin.float_(this.real)},$doc:"the real part of a complex number"},imag:{$get(){return new Sk.builtin.float_(this.imag)},$doc:"the imaginary part of a complex number"}},methods:{conjugate:{$meth(){return new Sk.builtin.complex(this.real,-this.imag)},$flags:{NoArgs:!0},$textsig:null,$doc:"complex.conjugate() -> complex\n\nReturn the complex conjugate of its argument. (3-4j).conjugate() == 3+4j."},
__getnewargs__:{$meth(){return new Sk.builtin.tuple([new Sk.builtin.float_(this.real),new Sk.builtin.float_(this.imag)])},$flags:{NoArgs:!0},$textsig:null,$doc:Sk.builtin.none.none$},__format__:{$meth(k){if(Sk.builtin.checkString(k))throw new Sk.builtin.NotImplementedError("__format__ is not implemented for complex type.");throw new Sk.builtin.TypeError("__format__ requires str");},$flags:{OneArg:!0},$textsig:null,$doc:"complex.__format__() -> str\n\nConvert to a string according to format_spec."}}});
Sk.exportSymbol("Sk.builtin.complex",Sk.builtin.complex);const f=Sk.builtin.checkComplex,n=/_[eE]|[eE]_|\._|_\.|[+-]_|_j|j_/,d=/_(?=[^_])/g;Sk.builtin.complex.complex_subtype_from_string=function(k,q){q=q||Sk.builtin.complex.prototype;var x=0,v=0,w=!1;if(Sk.builtin.checkString(k))k=Sk.ffi.remapToJs(k);else if("string"!==typeof k)throw new TypeError("provided unsupported string-alike argument");if(-1!==k.indexOf("\x00")||0===k.length||""===k)throw new Sk.builtin.ValueError("complex() arg is a malformed string");
var C=0;k=k.replace(/inf|infinity/gi,"Infinity");for(k=k.replace(/nan/gi,"NaN");" "===k[C];)C++;if("("===k[C])for(w=!0,C++;" "===k[C];)C++;if(-1!==k.indexOf("_")){if(n.test(k))throw new Sk.builtin.ValueError("could not convert string to complex: '"+k+"'");k=k.charAt(0)+k.substring(1).replace(d,"")}var F=/^(?:[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+\.?))(?:[eE][+-]?\d+)?|NaN|Infinity))/;var L=k.substr(C);var z=L.match(F);if(null!==z)if(C+=z[0].length,"j"===k[C]||"J"===k[C])v=parseFloat(z[0]),C++;else if("+"===
k[C]||"-"===k[C]){x=parseFloat(z[0]);z=k.substr(C).match(F);null!==z?(v=parseFloat(z[0]),C+=z[0].length):(v="+"===k[C]?1:-1,C++);if("j"!==k[C]&&"J"!==k[C])throw new Sk.builtin.ValueError("complex() arg is malformed string");C++}else x=parseFloat(z[0]);else z=z=L.match(/^([+-]?[jJ])/),null!==z&&(v=1===z[0].length?1:"+"===z[0][0]?1:-1,C+=z[0].length);for(;" "===k[C];)C++;if(w){if(")"!==k[C])throw new Sk.builtin.ValueError("complex() arg is malformed string");for(C++;" "===k[C];)C++}if(k.length!==C)throw new Sk.builtin.ValueError("complex() arg is malformed string");
return c(x,v,q)};const m=(k,q,x,v)=>{const w=x|0;return 0===v&&x===w?(100<w||-100>w?k=l(k,q,w,0):0<w?k=r(k,q,w):(k=r(k,q,-w),k=e(1,0,k.real,k.imag)),k):l(k,q,x,v)},g=b(m),p=b((k,q,x,v)=>m(x,v,k,q));h.Py_DTSF_SIGN=1;h.Py_DTSF_ADD_DOT_0=2;h.Py_DTSF_ALT=4;h.Py_DTST_FINITE=0;h.Py_DTST_INFINITE=1;h.Py_DTST_NAN=2},function(G,V){Sk.builtin.slice=Sk.abstr.buildNativeClass("slice",{constructor:function slice(a,c,b){void 0===c&&void 0===b&&(c=a,a=Sk.builtin.none.none$);void 0===c&&(c=Sk.builtin.none.none$);void 0===
b&&(b=Sk.builtin.none.none$);this.start=a;this.stop=c;this.step=b},slots:{tp$getattr:Sk.generic.getAttr,tp$doc:"slice(stop)\nslice(start, stop[, step])\n\nCreate a slice object.  This is used for extended slicing (e.g. a[0:10:2]).",tp$hash:Sk.builtin.none.none$,tp$new(a,c){Sk.abstr.checkNoKwargs("slice",c);Sk.abstr.checkArgsLen("slice",a,1,3);return new Sk.builtin.slice(...a)},$r(){const a=Sk.misceval.objectRepr(this.start),c=Sk.misceval.objectRepr(this.stop),b=Sk.misceval.objectRepr(this.step);return new Sk.builtin.str("slice("+
a+", "+c+", "+b+")")},tp$richcompare(a,c){if(a.ob$type!==Sk.builtin.slice)return Sk.builtin.NotImplemented.NotImplemented$;const b=new Sk.builtin.tuple([this.start,this.stop,this.step]);a=new Sk.builtin.tuple([a.start,a.stop,a.step]);return b.tp$richcompare(a,c)}},getsets:{start:{$get(){return this.start}},step:{$get(){return this.step}},stop:{$get(){return this.stop}}},methods:{indices:{$meth:function(a){a=Sk.misceval.asIndexSized(a,Sk.builtin.OverflowError);if(0>a)throw new Sk.builtin.TypeError("length should not be negative");
const {start:c,stop:b,step:e}=this.slice$indices(a);return new Sk.builtin.tuple([new Sk.builtin.int_(c),new Sk.builtin.int_(b),new Sk.builtin.int_(e)])},$doc:"S.indices(len) -> (start, stop, stride)\n\nAssuming a sequence of length len, calculate the start and stop\nindices, and the stride length of the extended slice described by\nS. Out of bounds indices are clipped in a manner consistent with the\nhandling of normal slices.",$textsig:null,$flags:{OneArg:!0}}},proto:{slice$as_indices(a){let c;var b=
a?e=>Sk.misceval.asIndexSized(e,null,"slice indices must be integers or None or have an __index__ method"):e=>Sk.misceval.asIndexOrThrow(e,"slice indices must be integers or None or have an __index__ method");if(Sk.builtin.checkNone(this.step))c=1;else if(c=b(this.step),0===c)throw new Sk.builtin.ValueError("slice step cannot be zero");a=Sk.builtin.checkNone(this.start)?null:b(this.start);b=Sk.builtin.checkNone(this.stop)?null:b(this.stop);return{start:a,stop:b,step:c}},$wrt(a,c,b,e,l){l=l?r=>JSBI.__isBigInt(r)?
JSBI.add(r,JSBI.BigInt(a)):r+a:r=>r+a;0<e?(null===c?c=0:0>c&&(c=l(c),0>c&&(c=0)),null===b?b=a:b>a?b=a:0>b&&(b=l(b))):(null===c?c=a-1:c>=a?c=a-1:0>c&&(c=l(c)),null===b?b=-1:0>b&&(b=l(b),0>b&&(b=-1)));return{start:c,stop:b,step:e}},slice$indices(a,c){let {start:b,stop:e,step:l}=this.slice$as_indices(!0,c);return this.$wrt(a,b,e,l,c)},sssiter$(a,c){let {start:b,stop:e,step:l}=this.slice$indices(a,!0);if(0<l)for(a=b;a<e;a+=l)c(a);else for(a=b;a>e;a+=l)c(a)}},flags:{sk$unacceptableBase:!0}});Sk.builtin.slice.startEnd$wrt=
function(a,c,b){a=a.sq$length();void 0===c||Sk.builtin.checkNone(c)?c=0:(c=Sk.misceval.asIndexSized(c,null,"slice indices must be integers or have an __index__ method"),0>c&&(c+=a,0>c&&(c=0)));void 0===b||Sk.builtin.checkNone(b)?b=a:(b=Sk.misceval.asIndexSized(b,null,"slice indices must be integers or have an __index__ method"),0>b?(b+=a,0>b&&(b=0)):b>a&&(b=a));return{start:c,end:b}}},function(G,V){function a(e){return function(l){return Sk.builtin.checkAnySet(l)?e.call(this,l):Sk.builtin.NotImplemented.NotImplemented$}}
function c(e){e instanceof Sk.builtin.set&&e.tp$hash===Sk.builtin.none.none$&&(e=new Sk.builtin.frozenset(Sk.misceval.arrayFromIterable(e)));return e}G={};Sk.builtin.set=Sk.abstr.buildNativeClass("set",{constructor:function set(e){void 0===e?e=[]:Array.isArray(e)||(e=Sk.misceval.arrayFromIterable(e));Sk.asserts.assert(this instanceof Sk.builtin.set,"Bad call to set - must be called with an Array and 'new'");const l=[];for(let r=0;r<e.length;r++)l.push(e[r]),l.push(!0);this.v=new Sk.builtin.dict(l);this.in$repr=
!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_number:!0,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,tp$doc:"set() -> new empty set object\nset(iterable) -> new set object\n\nBuild an unordered collection of unique elements.",tp$init(e,l){Sk.abstr.checkNoKwargs("set",l);Sk.abstr.checkArgsLen("set",e,0,1);this.set$clear();return(e=e[0])&&this.set$update(e)},tp$new:Sk.generic.new,$r(){if(this.in$repr)return new Sk.builtin.str(Sk.abstr.typeName(this)+"(...)");this.in$repr=!0;const e=this.sk$asarray().map(l=>
Sk.misceval.objectRepr(l));this.in$repr=!1;return Sk.__future__.python3?0===e.length?new Sk.builtin.str(Sk.abstr.typeName(this)+"()"):this.ob$type!==Sk.builtin.set?new Sk.builtin.str(Sk.abstr.typeName(this)+"({"+e.join(", ")+"})"):new Sk.builtin.str("{"+e.join(", ")+"}"):new Sk.builtin.str(Sk.abstr.typeName(this)+"(["+e.join(", ")+"])")},tp$iter(){return new b(this)},tp$richcompare(e,l){if(!Sk.builtin.checkAnySet(e))return Sk.builtin.NotImplemented.NotImplemented$;switch(l){case "NotEq":case "Eq":return e=
this===e?!0:this.get$size()!==e.get$size()?!1:Sk.misceval.isTrue(this.set$issubset(e)),"Eq"===l?e:!e;case "LtE":return this===e||Sk.misceval.isTrue(this.set$issubset(e));case "GtE":return this===e||Sk.misceval.isTrue(e.set$issubset(this));case "Lt":return this.get$size()<e.get$size()&&Sk.misceval.isTrue(this.set$issubset(e));case "Gt":return this.get$size()>e.get$size()&&Sk.misceval.isTrue(e.set$issubset(this))}},nb$subtract:a(function(e){return this.difference.$meth.call(this,e)}),nb$and:a(function(e){return this.intersection.$meth.call(this,
e)}),nb$or:a(function(e){return this.union.$meth.call(this,e)}),nb$xor:a(function(e){return this.symmetric_difference.$meth.call(this,e)}),nb$inplace_subtract:a(function(e){e===this&&(e=e.set$copy());return Sk.misceval.chain(this.difference_update.$meth.call(this,e),()=>this)}),nb$inplace_and:a(function(e){return Sk.misceval.chain(this.intersection_update.$meth.call(this,e),()=>this)}),nb$inplace_or:a(function(e){return Sk.misceval.chain(this.update.$meth.call(this,e),()=>this)}),nb$inplace_xor:a(function(e){e===
this&&(e=e.set$copy());return Sk.misceval.chain(this.symmetric_difference_update.$meth.call(this,e),()=>this)}),sq$length(){return this.get$size()},sq$contains(e){e=c(e);return this.v.sq$contains(e)}},methods:{add:{$meth(e){this.set$add(e);return Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Add an element to a set.\n\nThis has no effect if the element is already present."},clear:{$meth(){this.set$clear();return Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove all elements from this set."},
copy:{$meth(){return this.set$copy()},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a shallow copy of a set."},discard:{$meth(e){e=c(e);this.set$discard(e);return Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Remove an element from a set if it is a member.\n\nIf the element is not a member, do nothing."},difference:{$meth(...e){const l=this.set$copy();return Sk.misceval.chain(Sk.misceval.iterArray(e,r=>l.set$difference_update(r)),()=>l)},$flags:{MinArgs:0},$textsig:null,$doc:"Return the difference of two or more sets as a new set.\n\n(i.e. all elements that are in this set but not the others.)"},
difference_update:{$meth(...e){return Sk.misceval.chain(Sk.misceval.iterArray(e,l=>this.set$difference_update(l)),()=>Sk.builtin.none.none$)},$flags:{MinArgs:0},$textsig:null,$doc:"Remove all elements of another set from this set."},intersection:{$meth(...e){return this.set$intersection_multi(...e)},$flags:{MinArgs:0},$textsig:null,$doc:"Return the intersection of two sets as a new set.\n\n(i.e. all elements that are in both sets.)"},intersection_update:{$meth(...e){return Sk.misceval.chain(this.set$intersection_multi(...e),
l=>{this.swap$bodies(l);return Sk.builtin.none.none$})},$flags:{MinArgs:0},$textsig:null,$doc:"Update a set with the intersection of itself and another."},isdisjoint:{$meth(e){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(e),l=>{if(this.sq$contains(l))return new Sk.misceval.Break(Sk.builtin.bool.false$)}),l=>l||Sk.builtin.bool.true$)},$flags:{OneArg:!0},$textsig:null,$doc:"Return True if two sets have a null intersection."},issubset:{$meth(e){Sk.builtin.checkAnySet(e)||(e=this.set$make_basetype(e));
return Sk.misceval.chain(e,l=>this.set$issubset(l))},$flags:{OneArg:!0},$textsig:null,$doc:"Report whether another set contains this set."},issuperset:{$meth(e){Sk.builtin.checkAnySet(e)||(e=this.set$make_basetype(e));return Sk.misceval.chain(e,l=>l.set$issubset(this))},$flags:{OneArg:!0},$textsig:null,$doc:"Report whether this set contains another set."},pop:{$meth(){if(0===this.get$size())throw new Sk.builtin.KeyError("pop from an empty set");return Sk.misceval.callsimArray(this.v.popitem,[this.v]).v[0]},
$flags:{NoArgs:!0},$textsig:null,$doc:"Remove and return an arbitrary set element.\nRaises KeyError if the set is empty."},remove:{$meth(e){const l=c(e);if(this.v.mp$lookup(l))return this.v.mp$ass_subscript(l),Sk.builtin.none.none$;throw new Sk.builtin.KeyError(e);},$flags:{OneArg:!0},$textsig:null,$doc:"Remove an element from a set; it must be a member.\n\nIf the element is not a member, raise a KeyError."},symmetric_difference:{$meth(e){let l;return Sk.misceval.chain(this.set$make_basetype(e),r=>
{l=r;return l.set$symmetric_diff_update(this)},()=>l)},$flags:{OneArg:!0},$textsig:null,$doc:"Return the symmetric difference of two sets as a new set.\n\n(i.e. all elements that are in exactly one of the sets.)"},symmetric_difference_update:{$meth(e){Sk.builtin.checkAnySet(e)||(e=this.set$make_basetype(e));return Sk.misceval.chain(e,l=>this.set$symmetric_diff_update(l),()=>Sk.builtin.none.none$)},$flags:{OneArg:!0},$textsig:null,$doc:"Update a set with the symmetric difference of itself and another."},
union:{$meth(...e){const l=this.set$copy();return Sk.misceval.chain(Sk.misceval.iterArray(e,r=>l.set$update(r)),()=>l)},$flags:{MinArgs:0},$textsig:null,$doc:"Return the union of sets as a new set.\n\n(i.e. all elements that are in either set.)"},update:{$meth(...e){return Sk.misceval.chain(Sk.misceval.iterArray(e,l=>this.set$update(l)),()=>Sk.builtin.none.none$)},$flags:{MinArgs:0},$textsig:null,$doc:"Update a set with the union of itself and others."}},classmethods:Sk.generic.classGetItem,proto:Object.assign(G,
{sk$asarray(){return this.v.sk$asarray()},get$size(){return this.v.sq$length()},set$add(e){this.v.mp$ass_subscript(e,!0)},set$make_basetype(e){return Sk.misceval.chain(Sk.misceval.arrayFromIterable(e,!0),l=>new this.sk$builtinBase(l))},set$discard(e){return this.v.pop$item(e)},set$clear(){this.v.dict$clear()},set$copy(){const e=new this.sk$builtinBase;e.v=this.v.dict$copy();return e},set$difference_update(e){return Sk.misceval.iterFor(Sk.abstr.iter(e),l=>{this.set$discard(l)})},set$intersection(e){const l=
new this.sk$builtinBase;return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(e),r=>{this.sq$contains(r)&&l.set$add(r)}),()=>l)},set$intersection_multi(...e){if(!e.length)return this.set$copy();let l=this;return Sk.misceval.chain(Sk.misceval.iterArray(e,r=>Sk.misceval.chain(l.set$intersection(r),h=>{l=h})),()=>l)},set$issubset(e){const l=this.get$size(),r=e.get$size();if(l>r)return Sk.builtin.bool.false$;for(let h=this.tp$iter(),f=h.tp$iternext();void 0!==f;f=h.tp$iternext())if(!e.sq$contains(f))return Sk.builtin.bool.false$;
return Sk.builtin.bool.true$},set$symmetric_diff_update(e){return Sk.misceval.iterFor(Sk.abstr.iter(e),l=>{void 0===this.set$discard(l)&&this.set$add(l)})},set$update(e){return Sk.misceval.iterFor(Sk.abstr.iter(e),l=>{this.set$add(l)})},swap$bodies(e){this.v=e.v}})});Sk.exportSymbol("Sk.builtin.set",Sk.builtin.set);V=Sk.builtin.set.prototype;Sk.builtin.frozenset=Sk.abstr.buildNativeClass("frozenset",{constructor:function frozenset(e){void 0===e?e=[]:Array.isArray(e)||(e=Sk.misceval.arrayFromIterable(e));Sk.asserts.assert(this instanceof
Sk.builtin.frozenset,"bad call to frozen set - must be called with 'new'");const l=[];for(let r=0;r<e.length;r++)l.push(e[r]),l.push(!0);this.v=new Sk.builtin.dict(l);this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_number:!0,tp$as_sequence_or_mapping:!0,tp$doc:"frozenset() -> empty frozenset object\nfrozenset(iterable) -> frozenset object\n\nBuild an immutable unordered collection of unique elements.",tp$hash(){let e=1927868237;const l=this.sk$asarray();e*=l.length+1;for(let r=0;r<l.length;r++){const h=
Sk.abstr.objectHash(l[r]);e^=3644798167*(h^h<<16^89869747)}return 69069*e+907133923},tp$new(e,l){if(this!==Sk.builtin.frozenset.prototype)return this.$subtype_new(e,l);Sk.abstr.checkNoKwargs("frozenset",l);Sk.abstr.checkArgsLen("frozenset",e,0,1);e=e[0];return void 0!==e&&e.ob$type===Sk.builtin.frozenset?e:Sk.misceval.chain(Sk.misceval.arrayFromIterable(e,!0),r=>r.length?new Sk.builtin.frozenset(r):Sk.builtin.frozenset.$emptyset)},$r:V.$r,tp$iter:V.tp$iter,tp$richcompare:V.tp$richcompare,nb$subtract:V.nb$subtract,
nb$and:V.nb$and,nb$or:V.nb$or,nb$xor:V.nb$xor,sq$length:V.sq$length,sq$contains:V.sq$contains},methods:{copy:Object.assign({},V.copy.d$def,{$meth(){return this.constructor===this.sk$builtinBase?this:new Sk.builtin.frozenset(this.sk$asarray())}}),difference:V.difference.d$def,intersection:V.intersection.d$def,isdisjoint:V.isdisjoint.d$def,issubset:V.issubset.d$def,issuperset:V.issuperset.d$def,symmetric_difference:V.symmetric_difference.d$def,union:V.union.d$def},classmethods:Sk.generic.classGetItem,
proto:Object.assign({$subtype_new(e,l){const r=new this.constructor;return Sk.misceval.chain(Sk.builtin.frozenset.prototype.tp$new(e),h=>{r.v=h.v;return r})}},G)});Sk.builtin.frozenset.$emptyset=new Sk.builtin.frozenset([]);Sk.exportSymbol("Sk.builtin.frozenset",Sk.builtin.frozenset);var b=Sk.abstr.buildIteratorClass("set_iterator",{constructor:function(e){this.$index=0;this.$seq=e.sk$asarray();this.$orig=e},iternext:Sk.generic.iterNextWithArrayCheckSize,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},
flags:{sk$unacceptableBase:!0}})},function(G,V){Sk.builtin.print=function(a,c){let [b,e,l]=Sk.abstr.copyKeywordsToNamedArgs("print",["sep","end","file","flush"],[],c);if(void 0===b||Sk.builtin.checkNone(b))b=" ";else if(Sk.builtin.checkString(b))b=b.$jsstr();else throw new Sk.builtin.TypeError("sep must be None or a string, not "+Sk.abstr.typeName(b));if(void 0===e||Sk.builtin.checkNone(e))e="\n";else if(Sk.builtin.checkString(e))e=e.$jsstr();else throw new Sk.builtin.TypeError("end must be None or a string, not "+
Sk.abstr.typeName(e));let r;if(void 0!==l&&!Sk.builtin.checkNone(l)&&(r=Sk.abstr.lookupSpecial(l,Sk.builtin.str.$write),void 0===r))throw new Sk.builtin.AttributeError("'"+Sk.abstr.typeName(l)+"' object has no attribute 'write'");const h=new Sk.builtin.str(a.map(f=>(new Sk.builtin.str(f)).toString()).join(b)+e);if(void 0!==r)Sk.misceval.callsimArray(r,[h]);else return Sk.misceval.chain(Sk.importModule("sys",!1,!0),f=>(r=Sk.abstr.lookupSpecial(f.$d.stdout,Sk.builtin.str.$write))&&Sk.misceval.callsimOrSuspendArray(r,
[h]))};Sk.builtin.print.co_fastcall=1},function(G,V){Sk.builtin.module=Sk.abstr.buildNativeClass("module",{constructor:function module(){this.$d={}},slots:{tp$doc:"Create a module object.\n\nThe name must be a string; the optional doc argument can have any type.",tp$getattr(a,c){var b=this.$d[a.$mangled];if(void 0!==b)return b;b=this.ob$type.$typeLookup(a);if(void 0!==b){const l=b.tp$descr_get;return l?l.call(b,this,this.ob$type,c):b}const e=this.$d.__getattr__;if(void 0!==e)return b=Sk.misceval.tryCatch(()=>
Sk.misceval.callsimOrSuspendArray(e,[a]),l=>{if(!(l instanceof Sk.builtin.AttributeError))throw l;}),c?b:Sk.misceval.retryOptionalSuspensionOrThrow(b)},tp$setattr:Sk.generic.setAttr,tp$new:Sk.generic.new,tp$init(a,c){const [b,e]=Sk.abstr.copyKeywordsToNamedArgs("module",["name","doc"],a,c,[Sk.builtin.none.none$]);Sk.builtin.pyCheckType("module","string",b);this.init$dict(b,e)},$r(){let a=this.get$name();if(void 0!==a){var c=this.get$mod_reprf();if(void 0!==c)return Sk.misceval.callsimOrSuspendArray(c,
[this])}a=void 0===a?"'?'":a;c=this.from$file();c=void 0===c?this.empty_or$loader():c;return new Sk.builtin.str("<module "+a+c+">")}},getsets:{__dict__:{$get(){return new Sk.builtin.mappingproxy(this.$d)}}},methods:{__dir__:{$meth(){const a=this.tp$getattr(Sk.builtin.str.$dict);if(!Sk.builtin.checkMapping(a))throw new Sk.builtin.TypeError("__dict__ is not a dictionary");const c=a.mp$lookup(Sk.builtin.str.$dir);return void 0!==c?Sk.misceval.callsimOrSuspendArray(c,[]):new Sk.builtin.list(Sk.misceval.arrayFromIterable(a))},
$flags:{NoArgs:!0},$doc:"__dir__() -> list\nspecialized dir() implementation"}},proto:{sk$hasDict:!0,init$dict(a,c){this.$d.__name__=a;this.$d.__doc__=c;this.$d.__package__=Sk.builtin.none.none$;this.$d.__spec__=Sk.builtin.none.none$;this.$d.__loader__=Sk.builtin.none.none$},sk$attrError(){let a=this.get$name();a=void 0===a?"module":"module "+a;this.$initializing&&(a="(most likely due to a circular import) partially initialized "+a);return a},get$name(){const a=this.tp$getattr(Sk.builtin.str.$name);
return a&&Sk.misceval.objectRepr(a)},from$file(){const a=this.tp$getattr(Sk.builtin.str.$file);return a&&" from "+Sk.misceval.objectRepr(a)},empty_or$loader(){if(this.$js&&this.$js.includes("$builtinmodule"))return" (built-in)";const a=this.tp$getattr(Sk.builtin.str.$loader);return void 0===a||Sk.builtin.checkNone(a)?"":" ("+Sk.misceval.objectRepr(a)+")"},get$mod_reprf(){const a=this.tp$getattr(Sk.builtin.str.$loader);return a&&a.tp$getattr(this.str$mod_repr)},str$mod_repr:new Sk.builtin.str("module_repr")}});
Sk.exportSymbol("Sk.builtin.module",Sk.builtin.module)},function(G,V){Sk.builtin.structseq_types={};Sk.builtin.make_structseq=function(a,c,b,e={},l=null){const r=a+"."+c,h=[],f={};Object.keys(b).forEach((g,p)=>{h.push(g);f[g]={$get(){return this.v[p]},$doc:b[g]}});const n=h.length;let d=n;Object.keys(e).forEach((g,p)=>{f[g]={$get(){return this.$hidden[p]||Sk.builtin.none.none$},$doc:e[g]};d++});var m=Sk.abstr.buildNativeClass(r,{constructor:function(g,p){Sk.asserts.assert(this instanceof m);Sk.builtin.tuple.call(this,
g);this.$hidden=p||[]},base:Sk.builtin.tuple,slots:{tp$new(g,p){Sk.abstr.checkOneArg(r,g,p);g=Sk.misceval.arrayFromIterable(g[0]);if(g.length<n)throw new Sk.builtin.TypeError(r+"() takes an at least "+n+"-sequence ("+g.length+"-sequence given)");if(g.length>d)throw new Sk.builtin.TypeError(r+"() takes an at most "+d+"-sequence ("+g.length+"-sequence given)");return new m(g.slice(0,n),g.slice(n))},tp$doc:l?l:Sk.builtin.none.none$,$r(){var g;if(0===this.v.length)return new Sk.builtin.str(r+"()");var p=
[];for(g=0;g<h.length;++g)p[g]=h[g]+"="+Sk.misceval.objectRepr(this.v[g]);g=p.join(", ");1===this.v.length&&(g+=",");return new Sk.builtin.str(r+"("+g+")")}},methods:{__reduce__:{$meth(){throw new Sk.builtin.NotImplementedError("__reduce__ is not implemented");},$flags:{NoArgs:!0}}},getsets:f,proto:{num_sequence_fields:new Sk.builtin.int_(n)}});return m};Sk.exportSymbol("Sk.builtin.make_structseq",Sk.builtin.make_structseq)},function(G,V){Sk.builtin.generator=Sk.abstr.buildIteratorClass("generator",
{constructor:function(a,c,b,e,l){var r;if(a){if(!(this instanceof Sk.builtin.generator))throw new TypeError("bad internal call to generator, use 'new'");this.func_code=a;this.func_globals=c||null;this.gi$running=!1;this.gi$resumeat=0;this.gi$sentvalue=Sk.builtin.none.none$;this.gi$locals={};this.gi$cells={};if(0<b.length)for(c=0;c<a.co_varnames.length;++c)this.gi$locals[a.co_varnames[c]]=b[c];if(void 0!==l)for(r in l)e[r]=l[r];this.func_closure=e}},slots:{$r(){return new Sk.builtin.str("<generator object "+
this.func_code.co_name.v+">")}},iternext(a,c){var b=this;if(this.gi$running)throw new Sk.builtin.ValueError("generator already executing");this.gi$running=!0;void 0===c&&(c=Sk.builtin.none.none$);this.gi$sentvalue=c;c=[this];this.func_closure&&c.push(this.func_closure);return function r(l){if(l instanceof Sk.misceval.Suspension){if(a)return new Sk.misceval.Suspension(r,l);l=Sk.misceval.retryOptionalSuspensionOrThrow(l)}b.gi$running=!1;Sk.asserts.assert(void 0!==l);if(Array.isArray(l))return b.gi$resumeat=
l[0],l=l[1];b.gi$ret=l}(this.func_code.apply(this.func_globals,c))},methods:{send:{$meth(a){return Sk.misceval.chain(this.tp$iternext(!0,a),c=>{if(void 0===c)throw c=this.gi$ret,void 0!==c&&c!==Sk.builtin.none.none$?new Sk.builtin.StopIteration(c):new Sk.builtin.StopIteration;return c})},$flags:{OneArg:!0},$doc:"send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration."}}});Sk.exportSymbol("Sk.builtin.generator",Sk.builtin.generator);Sk.builtin.makeGenerator=function(a,
c){var b,e=new Sk.builtin.generator(null,null,null);e.tp$iternext=a;for(b in c)c.hasOwnProperty(b)&&(e[b]=c[b]);return e};Sk.exportSymbol("Sk.builtin.makeGenerator",Sk.builtin.makeGenerator)},function(G,V){Sk.builtin.file=function(a,c,b){var e;if(!(this instanceof Sk.builtin.file))return new Sk.builtin.file(a,c,b);this.mode=c;this.name=Sk.ffi.remapToJs(a);this.closed=!1;if("/dev/stdout"===this.name)this.data$=Sk.builtin.none.none$,this.fileno=1;else if("/dev/stdin"===this.name)this.fileno=0;else if("/dev/stderr"===
this.name)this.fileno=2;else{if(Sk.inBrowser)if(this.fileno=10,b=document.getElementById(a.v),null==b)if("w"==c.v||"a"==c.v)this.data$="";else throw new Sk.builtin.IOError("[Errno 2] No such file or directory: '"+a.v+"'");else"textarea"==b.nodeName.toLowerCase()?this.data$=b.value:this.data$=b.textContent;else this.fileno=11,this.data$=Sk.read(a.v);this.lineList=this.data$.split("\n");this.lineList=this.lineList.slice(0,-1);for(e in this.lineList)this.lineList[e]+="\n";this.currentLine=0}this.pos$=
0;Sk.fileopen&&10<=this.fileno&&Sk.fileopen(this);return this};Sk.abstr.setUpInheritance("file",Sk.builtin.file,Sk.builtin.object);Sk.abstr.setUpBuiltinMro(Sk.builtin.file);Sk.builtin.file.prototype.$r=function(){return new Sk.builtin.str("<"+(this.closed?"closed":"open")+"file '"+this.name+"', mode '"+Sk.ffi.remapToJs(this.mode)+"'>")};Sk.builtin.file.prototype.tp$iter=function(){var a={tp$iter:function(){return a},$obj:this,$index:this.currentLine,$lines:this.lineList,tp$iternext:function(){if(!(a.$index>=
a.$lines.length))return new Sk.builtin.str(a.$lines[a.$index++])}};return a};Sk.abstr.setUpSlots(Sk.builtin.file);Sk.builtin.file.prototype.__enter__=new Sk.builtin.func(function(a){return a});Sk.builtin.file.prototype.__exit__=new Sk.builtin.func(function(a){return Sk.misceval.callsimArray(Sk.builtin.file.prototype.close,[a])});Sk.builtin.file.prototype.close=new Sk.builtin.func(function(a){a.closed=!0;return Sk.builtin.none.none$});Sk.builtin.file.prototype.flush=new Sk.builtin.func(function(a){});
Sk.builtin.file.prototype.fileno=new Sk.builtin.func(function(a){return this.fileno});Sk.builtin.file.prototype.isatty=new Sk.builtin.func(function(a){return!1});Sk.builtin.file.prototype.read=new Sk.builtin.func(function(a,c){var b=a.data$.length;if(a.closed)throw new Sk.builtin.ValueError("I/O operation on closed file");var e=void 0===c?b:Sk.ffi.remapToJs(c);e=new Sk.builtin.str(a.data$.substr(a.pos$,e));a.pos$=void 0===c?b:a.pos$+Sk.ffi.remapToJs(c);a.pos$>=b&&(a.pos$=b);return e});Sk.builtin.file.$readline=
function(a,c,b){if(0===a.fileno){a=Sk.ffi.remapToJs(b);a=Sk.inputfun(a?a:"");if(a instanceof Promise||a&&"function"===typeof a.then){var e=new Sk.misceval.Suspension;e.resume=function(){if(e.data.error)throw e.data.error;return new Sk.builtin.str(e.data.result)};e.data={type:"Sk.promise",promise:a};return e}return new Sk.builtin.str(a)}c="";a.currentLine<a.lineList.length&&(c=a.lineList[a.currentLine],a.currentLine++);return new Sk.builtin.str(c)};Sk.builtin.file.prototype.readline=new Sk.builtin.func(function(a,
c){return Sk.builtin.file.$readline(a,c,void 0)});Sk.builtin.file.prototype.readlines=new Sk.builtin.func(function(a,c){if(0===a.fileno)return new Sk.builtin.NotImplementedError("readlines ins't implemented because the web doesn't support Ctrl+D");var b=[];for(c=a.currentLine;c<a.lineList.length;c++)b.push(new Sk.builtin.str(a.lineList[c]));return new Sk.builtin.list(b)});Sk.builtin.file.prototype.seek=new Sk.builtin.func(function(a,c,b){c=Sk.ffi.remapToJs(c);void 0===b&&(b=0);0===b?a.pos$=c:1==b?
a.pos$=a.data$.length+c:2==b&&(a.pos$=a.data$.length+c);return Sk.builtin.none.none$});Sk.builtin.file.prototype.tell=new Sk.builtin.func(function(a){return Sk.ffi.remapToPy(a.pos$)});Sk.builtin.file.prototype.truncate=new Sk.builtin.func(function(a,c){Sk.asserts.fail()});Sk.builtin.file.prototype.write=new Sk.builtin.func(function(a,c){var b=Sk.ffi.remapToJs(a.mode);if("w"===b||"wb"===b||"a"===b||"ab"===b)if(Sk.filewrite){if(a.closed)throw new Sk.builtin.ValueError("I/O operation on closed file");
1===a.fileno||2===a.fileno?Sk.output(Sk.ffi.remapToJs(c)):Sk.filewrite(a,c)}else 1===a.fileno||2===a.fileno?Sk.output(Sk.ffi.remapToJs(c)):Sk.asserts.fail();else throw new Sk.builtin.IOError("File not open for writing");return Sk.builtin.none.none$});Sk.exportSymbol("Sk.builtin.file",Sk.builtin.file)},function(G,V){function a(I,S){if(null===I||void 0===I)return Sk.builtin.none.none$;var aa=typeof I;if("object"===aa||"function"===aa){if("sk$object"in I&&!0===I.sk$object)return I;if("$isPyWrapped"in
I&&!0===I.$isPyWrapped&&I.unwrap)return I.unwrap()}S=S||{};if("string"===aa)return new Sk.builtin.str(I);if("symbol"===aa)return new ea(I);if("number"===aa)return l(I);if("boolean"===aa)return new Sk.builtin.bool(I);if("function"===aa)return S.funcHook?S.funcHook(I):n(I);if(JSBI.__isBigInt(I))return new Sk.builtin.int_(JSBI.numberIfSafe(I));if(Array.isArray(I))return S.arrayHook?S.arrayHook(I):new Sk.builtin.list(I.map(B=>a(B,S)));if("object"===aa){aa=I.constructor;if(aa===Object&&Object.getPrototypeOf(I)===
v||void 0===aa)return S.dictHook?S.dictHook(I):f(I,S);if(aa===Uint8Array)return new Sk.builtin.bytes(I);if(aa===Set)return S.setHook?S.setHook(I):h(I,S);if(aa===Map){if(S.mapHook)return S.mapHook(I);const B=new Sk.builtin.dict;I.forEach((u,A)=>{B.mp$ass_subscript(a(A,S),a(u,S))});return B}return aa===Sk.misceval.Suspension?I:S.proxyHook?S.proxyHook(I):n(I)}if(S.unhandledHook)return S.unhandledHook(I);Sk.asserts.fail("unhandled remap case of type "+aa)}function c(I,S){if(void 0===I||null===I)return I;
const aa=I.valueOf();if(null===aa)return aa;const B=typeof aa;S=S||{};if("string"===B)return S.stringHook?S.stringHook(aa):aa;if("symbol"===B||"boolean"===B)return aa;if("number"===B)return S.numberHook?S.numberHook(aa,I):aa;if(JSBI.__isBigInt(aa))return S.bigintHook?S.bigintHook(aa,I):aa;if(Array.isArray(aa))return S.arrayHook?S.arrayHook(aa,I):aa.map(u=>c(u,S));if(aa.sk$object)return I instanceof Sk.builtin.dict?S.dictHook?S.dictHook(I):e(I,S):I instanceof Sk.builtin.set?S.setHook?S.setHook(I):
new Set(b(I,S)):S.unhandledHook?S.unhandledHook(I):void 0;if("object"===B)return S.objectHook?S.objectHook(aa,I):aa;if("function"===B)return S.funcHook?S.funcHook(aa,I):aa;Sk.asserts.fail("unhandled type "+B)}function b(I,S){return Array.from(I,aa=>c(aa,S))}function e(I,S){const aa={};I.$items().forEach(([B,u])=>{aa[B.valueOf()]=c(u,S)});return aa}function l(I){return Number.isInteger(I)?Math.abs(I)<Number.MAX_SAFE_INTEGER?new Sk.builtin.int_(I):new Sk.builtin.int_(JSBI.BigInt(I)):new Sk.builtin.float_(I)}
function r(I,S){return new Sk.builtin.list(Array.from(I,aa=>a(aa,S)))}function h(I,S){return new Sk.builtin.set(Array.from(I,aa=>a(aa,S)))}function f(I,S){const aa=new Sk.builtin.dict;Object.entries(I).forEach(([B,u])=>{aa.mp$ass_subscript(new Sk.builtin.str(B),a(u,S))});return aa}function n(I,S){if(null===I||void 0===I)return Sk.builtin.none.none$;var aa=typeof I;if("object"!==aa&&"function"!==aa)return a(I);S=S||{};const B=z.get(I);if(B){if(S.bound===B.$bound)return B;S.name||(S.name=B.$name)}"function"===
aa?S=new Q(I,S):Array.isArray(I)?S=new Z(I):(aa=Object.getPrototypeOf(I),S=aa===C?new X(I):aa===F?new ia(I):new Q(I,S));z.set(I,S);return S}function d(I,S){I=I.toString();void 0===S?delete this.js$wrapped[I]:this.js$wrapped[I]=c(S,J)}function m(I){return Sk.generic.getAttr.call(this,I)||this.$lookup(I)}function g(){this.js$wrapped.clear()}function p(){return Sk.misceval.callsimOrSuspendArray(Sk.builtin.dict,[this])}function k(){return this.js$wrapped.size}function q(I){I=c(I,J);if(this.js$wrapped.has(I))return this.proxy$getItem(I)}
function x(I){I=c(I,J);if(this.js$wrapped.has(I)){const S=this.proxy$getItem(I);this.js$wrapped.delete(I);return S}}Sk.ffi={remapToPy:a,remapToJs:c,remapToJsOrWrap:function(I){return c(I,J)},toPy:a,toJs:c,isTrue:function(I){return null!=I&&I.nb$bool?I.nb$bool():I.sq$length?0!==I.sq$length():!!I},toJsString:function(I){return String(I)},toJsNumber:function(I){return Number(I)},toJsArray:b,toJsHashMap:e,toPyDict:f,toPyFloat:function(I){return new Sk.builtin.float_(Number(I))},toPyInt:function(I){if("number"===
typeof I)return I=Math.trunc(I),Math.abs(I)<Number.MAX_SAFE_INTEGER?new Sk.builtin.int_(I):new Sk.builtin.int_(JSBI.BigInt(I));if(JSBI.__isBigInt(I))return new Sk.builtin.int_(JSBI.numberIfSafe(I));if("string"===typeof I&&I.match(L))return new Sk.builtin.int_(I);throw new TypeError("bad type passed to toPyInt() got "+I);},toPyNumber:function(I){const S=typeof I;return"number"===S?l(I):"string"===S?I.match(L)?new Sk.builtin.int_(I):new Sk.builtin.float_(parseFloat(I)):JSBI.__isBigInt(I)?new Sk.builtin.int_(JSBI.numberIfSafe(I)):
new Sk.builtin.float_(Number(I))},toPyStr:function(I){return new Sk.builtin.str(I)},toPyList:r,toPyTuple:function(I,S){return new Sk.builtin.tuple(Array.from(I,aa=>a(aa,S)))},toPySet:h,numberToPy:l,proxy:n};const v=Object.prototype,w=Function.prototype,C=Map.prototype,F=Set.prototype,L=/^-?\d+$/,z=new WeakMap,D=new WeakMap,K=I=>n(I),R=I=>Object.isFrozen(I)?r(I,t):n(I),T=I=>String(I),t={arrayHook:R,dictHook:K,unhandledHook:T,setHook:K,mapHook:K},y=(I,S)=>({dictHook:K,funcHook:aa=>n(aa,{bound:I,name:S}),
unhandledHook:T,arrayHook:R,setHook:K,mapHook:K}),E=I=>({dictHook:K,proxyHook:S=>n(S,{name:I}),arrayHook:R,setHook:K,mapHook:K}),J={unhandledHook:I=>{var S=z.get(I);if(S)return S;S={v:I,$isPyWrapped:!0,unwrap:()=>I};if(void 0===I.tp$call)return z.set(I,S),S;if(I.ob$type===Sk.builtin.method){var aa=I.im_self,B=I.im_func;let u=D.get(aa);void 0===u&&(u=new Map,D.set(aa,u));aa=u.get(B);if(void 0===aa)aa=I,u.set(B,I);else if(I=aa,B=z.get(I))return B}B=(...u)=>{u=u.map(H=>a(H,t));let A=Sk.misceval.tryCatch(()=>
Sk.misceval.chain(I.tp$call(u),H=>c(H,J)),H=>{if(Sk.uncaughtException)Sk.uncaughtException(H);else throw H;});for(;A instanceof Sk.misceval.Suspension;){if(!A.optional||A.data&&"Sk.debug"===A.data.type&&"Sk.debug"in Sk.misceval.defaultHandlers)return Sk.misceval.asyncToPromise(()=>A);A=A.resume()}return A};z.set(I,Object.assign(B,S));return B},arrayHook:I=>I[qa]||I.map(S=>c(S,J))};G={__dir__:{$meth:function(){const I=[];for(var S=this.js$wrapped;null!=S&&S!==v&&S!==w;)I.push(...Object.getOwnPropertyNames(S)),
S=Object.getPrototypeOf(S);S=b(Sk.misceval.callsimArray(Sk.builtin.type.prototype.__dir__,[this.ob$type]));return new r(new Set([...S,...I]))},$flags:{NoArgs:!0}}};const Q=Sk.abstr.buildNativeClass("Proxy",{constructor:function(I,S){if(void 0===I)throw new Sk.builtin.TypeError("Proxy cannot be called from python");this.js$wrapped=I;this.$module=null;this.$methods=Object.create(null);this.in$repr=!1;S||(S={});Object.defineProperties(this,this.memoized$slots);"function"===typeof I?(this.is$callable=
!0,this.$bound=S.bound,this.$name=S.name||I.name||"(native JS)",2>=this.$name.length&&(this.$name+=" (native JS)")):(this.is$callable=!1,delete this.is$type,this.is$type=!1,this.$name=S.name)},slots:{tp$doc:"proxy for a javascript object",tp$hash(){return Sk.builtin.object.prototype.tp$hash.call(this.js$wrapped)},tp$getattr(I){return this.$lookup(I)||Sk.generic.getAttr.call(this,I)},tp$setattr:d,$r(){if(this.is$callable){if(this.is$type||!this.$bound)return new Sk.builtin.str("<"+this.tp$name+" '"+
this.$name+"'>");var I=Sk.misceval.objectRepr(n(this.$bound));return new Sk.builtin.str("<bound "+this.tp$name+" '"+this.$name+"' of "+I+">")}if(this.js$proto===v){if(this.in$repr)return new Sk.builtin.str("{...}");this.in$repr=!0;I=Object.entries(this.js$wrapped).map(([S,aa])=>{aa=a(aa,y(this.js$wrapped,S));return"'"+S+"': "+Sk.misceval.objectRepr(aa)});I=new Sk.builtin.str("proxyobject({"+I.join(", ")+"})");this.in$repr=!1;return I}return new Sk.builtin.str("<"+this.tp$name+" "+("proxyobject"===
this.tp$name?"object":"proxyobject")+">")},tp$as_sequence_or_mapping:!0,mp$subscript(I){const S=this.$lookup(I);if(void 0===S)throw new Sk.builtin.LookupError(I);return S},mp$ass_subscript(I,S){return this.tp$setattr(I,S)},sq$contains(I){return c(I)in this.js$wrapped},ob$eq(I){return this.js$wrapped===I.js$wrapped},ob$ne(I){return this.js$wrapped!==I.js$wrapped},tp$as_number:!0,nb$bool(){return this.js$proto===v?0<Object.keys(this.js$wrapped).length:this.sq$length?0<this.sq$length():!0}},methods:{...G,
__new__:{$meth(I,...S){if(!(I instanceof Q))throw new Sk.builtin.TypeError("expected a proxy object as the first argument not "+Sk.abstr.typeName(I));try{return I.$new(S)}catch(aa){if(aa instanceof TypeError&&aa.message.includes("not a constructor"))throw new Sk.builtin.TypeError(Sk.misceval.objectRepr(I)+" is not a constructor");throw aa;}},$flags:{MinArgs:1}},__call__:{$meth(I,S){if("function"!==typeof this.js$wrapped)throw new Sk.builtin.TypeError("'"+this.tp$name+"' object is not callable");return this.$call(I,
S)},$flags:{FastCall:!0}},keys:{$meth(){return new Sk.builtin.list(Object.keys(this.js$wrapped).map(I=>new Sk.builtin.str(I)))},$flags:{NoArgs:!0}},get:{$meth(I,S){return this.$lookup(I)||S||Sk.builtin.none.none$},$flags:{MinArgs:1,MaxArgs:2}}},getsets:{__class__:{$get(){return a(this.js$wrapped.constructor,t)},$set(){throw new Sk.builtin.TypeError("not writable");}},__name__:{$get(){return new Sk.builtin.str(this.$name)}},__module__:{$get(){return this.$module||Sk.builtin.none.none$},$set(I){this.$module=
I}}},proto:{valueOf(){return this.js$wrapped},$new(I,S){Sk.abstr.checkNoKwargs("__new__",S);return a(new this.js$wrapped(...I.map(aa=>c(aa,J))),E(this.$name))},$call(I,S){Sk.abstr.checkNoKwargs("__call__",S);return Sk.misceval.chain(this.js$wrapped.apply(this.$bound,I.map(aa=>c(aa,J))),aa=>aa instanceof Promise?Sk.misceval.promiseToSuspension(aa):aa,aa=>a(aa,t))},$lookup(I){I=I.toString();const S=this.js$wrapped[I];if(void 0!==S)return null!==S&&"object"===typeof S&&S.window===S&&null===Object.getPrototypeOf(S)?
n(S,{name:"CrossOriginWindow"}):a(S,y(this.js$wrapped,I));if(I in this.js$wrapped)return Sk.builtin.none.none$},memoized$slots:{js$proto:{configurable:!0,get(){delete this.js$proto;return this.js$proto=Object.getPrototypeOf(this.js$wrapped)}},tp$iter:{configurable:!0,get(){delete this.tp$iter;return void 0!==this.js$wrapped[Symbol.iterator]?this.tp$iter=()=>n(this.js$wrapped[Symbol.iterator]()):this.tp$iter=()=>{throw new Sk.builtin.TypeError(Sk.misceval.objectRepr(this)+" is not iterable");}}},tp$iternext:{configurable:!0,
get(){delete this.tp$iternext;if(void 0!==this.js$wrapped.next)return this.tp$iternext=()=>{const I=this.js$wrapped.next().value;return I&&a(I,t)}}},sq$length:{configurable:!0,get(){delete this.sq$length;if(!this.is$callable&&void 0!==this.js$wrapped.length)return this.sq$length=()=>this.js$wrapped.length}},tp$call:{configurable:!0,get(){delete this.tp$call;if(this.is$callable)return this.tp$call=this.is$type?this.$new:this.$call}},tp$name:{configurable:!0,get(){delete this.tp$name;if(this.is$callable)return this.tp$name=
this.is$type?"proxyclass":this.$bound?"proxymethod":"proxyfunction";{const I=this.js$wrapped;let S=I[Symbol.toStringTag]||this.$name||I.constructor&&I.constructor.name||"proxyobject";"Object"===S?S="proxyobject":2>=S.length&&(S=n(I.constructor).$name);return this.tp$name=S}}},is$type:{configurable:!0,get(){delete this.is$type;var I=this.js$wrapped;const S=I.prototype;if(void 0===S)return this.is$type=I===Sk.global.Proxy;{const aa=N.call(I).match(ja);I=null===aa?null:"class"===aa[0]?!0:!W.has(I)}return!0===
I?this.is$type=!0:!1===I?this.is$type=!1:1<Object.getOwnPropertyNames(S).length?this.is$type=!0:this.is$type=Object.getPrototypeOf(S)!==v}}}},flags:{sk$unacceptableBase:!0}});Sk.abstr.buildNativeClass("ProxyObject",{constructor:function(I){Sk.builtin.dict.call(this);this.js$wrapped=I}});const X=Sk.abstr.buildNativeClass("ProxyMap",{base:Sk.builtin.dict,constructor:function(I){Sk.builtin.dict.call(this);this.js$wrapped=I},slots:{tp$getattr:m,$r(){return new Sk.builtin.str(`ProxyMap(${Sk.builtin.dict.prototype.$r.call(this)})`)}},
methods:G,proto:{$lookup:Q.prototype.$lookup,proxy$getItem(I){return a(this.js$wrapped.get(I),t)},mp$lookup:q,dict$setItem(I,S){this.js$wrapped.set(c(I,J),c(S,J))},dict$clear:g,pop$item:x,dict$copy:p,get$size:k,$items(){return[...this.js$wrapped].map(([I,S])=>[a(I,t),a(S,t)])},valueOf:Q.prototype.valueOf},flags:{sk$unacceptableBase:!0}}),ba=Sk.abstr.buildNativeClass("InternalProxySet",{base:Sk.builtin.dict,constructor:function(I){Sk.builtin.dict.call(this);this.js$wrapped=I},proto:{proxy$getItem(I){return!0},
mp$lookup:q,dict$setItem(I,S){this.js$wrapped.add(c(I,J))},dict$clear:g,pop$item:x,dict$copy:p,get$size:k,$items(){return[...this.js$wrapped].map(I=>[a(I,t),!0])}},flags:{sk$unacceptableBase:!0}}),ia=Sk.abstr.buildNativeClass("ProxySet",{base:Sk.builtin.set,constructor:function(I){Sk.builtin.set.call(this);this.v=new ba(I);this.js$wrapped=I},slots:{tp$getattr:m},methods:G,proto:{$lookup:Q.prototype.$lookup,valueOf:Q.prototype.valueOf},flags:{sk$unacceptableBase:!0}}),oa={apply(I,S,aa){aa=b(aa,J);
return I.apply(S,aa)}},pa={},la=Array.prototype,qa=Symbol("$proxy"),na={get(I,S){if(S===qa)return I;const aa=I[S];return S in la?"function"===typeof aa?pa[S]||(pa[S]=new Proxy(aa,oa)):aa:void 0!==aa||S in I?a(aa,t):aa},set(I,S,aa){I[S]=c(aa,J);return!0}},Z=Sk.abstr.buildNativeClass("ProxyList",{base:Sk.builtin.list,constructor:function(I){Sk.builtin.list.call(this,I);this.js$wrapped=this.v;this.v=new Proxy(this.v,na)},slots:{tp$getattr:m,tp$setattr:d,$r(){return new Sk.builtin.str("proxylist("+Sk.builtin.list.prototype.$r.call(this)+
")")}},methods:G,proto:{$lookup:Q.prototype.$lookup}}),ja=/^class|^function[a-zA-Z\d\(\)\{\s]+\[native code\]\s+\}$/,N=w.toString,W=new Set([Number,String,Symbol,Boolean]);"undefined"!==typeof Sk.global.BigInt&&W.add(Sk.global.BigInt);const ea=Sk.abstr.buildNativeClass("ProxySymbol",{constructor:function(I){this.v=I},slots:{$r(){return new Sk.builtin.str(this.toString())}},proto:{toString(){return this.v.toString()},valueOf(){return this.v}}})},function(G,V){function a(l,r,h){l=void 0===l?l:Sk.misceval.asIndexOrThrow(l);
r=void 0===r?r:Sk.misceval.asIndexOrThrow(r);h=void 0===h?h:Sk.misceval.asIndexOrThrow(h);if(void 0===r&&void 0===h)r=l,l=0,h=1;else if(void 0===h)h=1;else if(0===h)throw new Sk.builtin.ValueError("range() step argument must not be zero");const f=[];if("number"===typeof l&&"number"===typeof r&&"number"===typeof h)if(0<h)for(var n=l;n<r;n+=h)f.push(new Sk.builtin.int_(n));else for(n=l;n>r;n+=h)f.push(new Sk.builtin.int_(n));else{l=n=JSBI.BigInt(l);h=JSBI.BigInt(h);r=JSBI.BigInt(r);if(JSBI.greaterThan(h,
JSBI.__ZERO))for(;JSBI.lessThan(n,r);)f.push(new Sk.builtin.int_(c(n))),n=JSBI.add(n,h);else for(;JSBI.greaterThan(n,r);)f.push(new Sk.builtin.int_(c(n))),n=JSBI.add(n,h);l=c(l);h=c(h);r=c(r)}return new Sk.builtin.range_(l,r,h,f)}function c(l){return JSBI.lessThan(l,JSBI.__MAX_SAFE)&&JSBI.greaterThan(l,JSBI.__MIN_SAFE)?JSBI.toNumber(l):l}Sk.builtin.range_=Sk.abstr.buildNativeClass("range",{constructor:function range_(l,r,h,f){this.start=l;this.stop=r;this.step=h;this.v=f},slots:{tp$getattr:Sk.generic.getAttr,
tp$as_sequence_or_mapping:!0,tp$doc:"range(stop) -> range object\nrange(start, stop[, step]) -> range object\n\nReturn an object that produces a sequence of integers from start (inclusive)\nto stop (exclusive) by step.  range(i, j) produces i, i+1, i+2, ..., j-1.\nstart defaults to 0, and stop is omitted!  range(4) produces 0, 1, 2, 3.\nThese are exactly the valid indices for a list of 4 elements.\nWhen step is given, it specifies the increment (or decrement).",tp$new(l,r){Sk.abstr.checkNoKwargs("range",
r);Sk.abstr.checkArgsLen("range",l,1,3);return a(l[0],l[1],l[2])},$r(){let l="range("+this.start+", "+this.stop;1!=this.step&&(l+=", "+this.step);return new Sk.builtin.str(l+")")},tp$richcompare(l,r){if("Eq"!==r&&"NotEq"!==r||l.ob$type!==Sk.builtin.range_)return Sk.builtin.NotImplemented.NotImplemented$;l=new Sk.builtin.list(l.v);return(new Sk.builtin.list(this.v)).tp$richcompare(l,r)},tp$iter(){return new b(this)},nb$bool(){return 0!==this.v.length},sq$contains(l){const r=this.v;for(let h=0;h<r.length;h++)if(Sk.misceval.richCompareBool(l,
r[h],"Eq"))return!0;return!1},sq$length(){return this.v.length},mp$subscript(l){if(Sk.misceval.isIndex(l)){l=Sk.misceval.asIndexSized(l);0>l&&(l=this.v.length+l);if(0>l||l>=this.v.length)throw new Sk.builtin.IndexError("range object index out of range");return this.v[l]}if(l.constructor===Sk.builtin.slice){const r=[],h=this.v;l.sssiter$(h.length,m=>{r.push(h[m])});let {start:f,stop:n,step:d}=l.slice$indices(h.length);f=Sk.misceval.asIndex(h[f])||this.start;n=Sk.misceval.asIndex(h[n])||this.stop;d=
"number"===typeof this.step?d*this.step:JSBI.multiply(this.step,JSBI.BigInt(d));return new Sk.builtin.range_(f,n,d,r)}throw new Sk.builtin.TypeError("range indices must be integers or slices, not "+Sk.abstr.typeName(l));}},getsets:{start:{$get(){return new Sk.builtin.int_(this.start)}},step:{$get(){return new Sk.builtin.int_(this.step)}},stop:{$get(){return new Sk.builtin.int_(this.stop)}}},methods:{__reversed__:{$meth(){return new e(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a reverse iterator."},
count:{$meth(l){let r=0;for(let h=0;h<this.v.length;h++)Sk.misceval.richCompareBool(l,this.v[h],"Eq")&&r++;return new Sk.builtin.int_(r)},$flags:{OneArg:!0},$textsig:null,$doc:"rangeobject.count(value) -> integer -- return number of occurrences of value"},index:{$meth(l){for(let r=0;r<this.v.length;r++)if(Sk.misceval.richCompareBool(l,this.v[r],"Eq"))return new Sk.builtin.int_(r);throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(l)+"is not in range");},$flags:{OneArg:!0},$textsig:null,$doc:"rangeobject.index(value, [start, [stop]]) -> integer -- return index of value.\nRaise ValueError if the value is not present."}},
proto:{sk$asarray(){return this.v.slice(0)}},flags:{sk$unacceptableBase:!0}});var b=Sk.abstr.buildIteratorClass("range_iterator",{constructor:function(l){this.$index=0;this.$seq=l.v},iternext(){return this.$seq[this.$index++]},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}}),e=Sk.abstr.buildIteratorClass("range_reverseiterator",{constructor:function(l){this.$seq=l.v;this.$index=this.$seq.length-1},iternext(){return this.$seq[this.$index--]},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef},
flags:{sk$unacceptableBase:!0}});Sk.builtin.range=Sk.builtin.xrange=function(l,r,h){l=a(l,r,h);return new Sk.builtin.list(l.v)}},function(G,V){Sk.builtin.enumerate=Sk.abstr.buildIteratorClass("enumerate",{constructor:function enumerate(a,c){if(!(this instanceof Sk.builtin.enumerate))throw TypeError("Failed to construct 'enumerate': Please use the 'new' operator");this.$iterable=a;this.$index=c;return this},iternext(a){const c=Sk.misceval.chain(this.$iterable.tp$iternext(a),b=>{if(void 0!==b)return new Sk.builtin.tuple([new Sk.builtin.int_(this.$index++),
b])});return a?c:Sk.misceval.retryOptionalSuspensionOrThrow(c)},slots:{tp$doc:"Return an enumerate object.\n\n  iterable\n    an object supporting iteration\n\nThe enumerate object yields pairs containing a count (from start, which\ndefaults to zero) and a value yielded by the iterable argument.\n\nenumerate is useful for obtaining an indexed list:\n    (0, seq[0]), (1, seq[1]), (2, seq[2]), ...",tp$new(a,c){let [b,e]=Sk.abstr.copyKeywordsToNamedArgs("enumerate",["iterable","start"],a,c,[new Sk.builtin.int_(0)]);
b=Sk.abstr.iter(b);e=Sk.misceval.asIndexOrThrow(e);if(this===Sk.builtin.enumerate.prototype)return new Sk.builtin.enumerate(b,e);a=new this.constructor;Sk.builtin.enumerate.call(a,b,e);return a}},classmethods:Sk.generic.classGetItem});Sk.exportSymbol("Sk.builtin.enumerate",Sk.builtin.enumerate)},function(G,V){Sk.builtin.filter_=Sk.abstr.buildIteratorClass("filter",{constructor:function filter_(a,c){this.$func=a;this.$iterable=c},iternext(a){const c=Sk.misceval.iterFor(this.$iterable,b=>Sk.misceval.chain(this.check$filter(b),
e=>e?new Sk.misceval.Break(e):void 0));return a?c:Sk.misceval.retryOptionalSuspensionOrThrow(c)},slots:{tp$doc:"Return an iterator yielding those items of iterable for which function(item)\nis true. If function is None, return the items that are true.",tp$new(a,c){let [b,e]=Sk.abstr.copyKeywordsToNamedArgs("filter",["predicate","iterable"],a,c,[]);b=Sk.builtin.checkNone(b)?null:b;e=Sk.abstr.iter(e);if(this===Sk.builtin.filter_.prototype)return new Sk.builtin.filter_(b,e);a=new this.constructor;Sk.builtin.filter_.call(a,
b,e);return a}},proto:{check$filter(a){let c;c=null===this.$func?a:Sk.misceval.callsimOrSuspendArray(this.$func,[a]);return Sk.misceval.chain(c,b=>Sk.misceval.isTrue(b)?a:void 0)}}});Sk.exportSymbol("Sk.builtin.filter_",Sk.builtin.filter_)},function(G,V){Sk.builtin.map_=Sk.abstr.buildIteratorClass("map",{constructor:function map_(a,c){this.$func=a;this.$iters=c},iternext(a){const c=[],b=Sk.misceval.chain(Sk.misceval.iterArray(this.$iters,e=>Sk.misceval.chain(e.tp$iternext(a),l=>{if(void 0===l)return new Sk.misceval.Break(!0);
c.push(l)})),e=>e?void 0:Sk.misceval.callsimOrSuspendArray(this.$func,c));return a?b:Sk.misceval.retryOptionalSuspensionOrThrow(b)},slots:{tp$doc:"map(func, *iterables) --\x3e map object\n\nMake an iterator that computes the function using arguments from\neach of the iterables.  Stops when the shortest iterable is exhausted.",tp$new(a,c){this===Sk.builtin.map_.prototype&&Sk.abstr.checkNoKwargs("map",c);Sk.abstr.checkArgsLen("map",a,2);c=a[0];const b=[];for(let e=1;e<a.length;e++)b.push(Sk.abstr.iter(a[e]));
if(this===Sk.builtin.map_.prototype)return new Sk.builtin.map_(c,b);a=new this.constructor;Sk.builtin.map_.call(a,c,b);return a}}});Sk.exportSymbol("Sk.builtin.map_",Sk.builtin.map_)},function(G,V){Sk.builtin.reversed=Sk.abstr.buildIteratorClass("reversed",{constructor:function reversed(a){this.$idx=a.sq$length()-1;this.$seq=a;return this},iternext(a){if(!(0>this.$idx)){var c=Sk.misceval.tryCatch(()=>Sk.abstr.objectGetItem(this.$seq,new Sk.builtin.int_(this.$idx--),a),b=>{if(b instanceof Sk.builtin.IndexError)this.$idx=
-1;else throw b;});return a?c:Sk.misceval.retryOptionalSuspensionOrThrow(c)}},slots:{tp$doc:"Return a reverse iterator over the values of the given sequence.",tp$new(a,c){this===Sk.builtin.reversed.prototype&&Sk.abstr.checkNoKwargs("reversed",c);Sk.abstr.checkArgsLen("reversed",a,1,1);a=a[0];c=Sk.abstr.lookupSpecial(a,Sk.builtin.str.$reversed);if(void 0!==c)return Sk.misceval.callsimArray(c,[]);if(!Sk.builtin.checkSequence(a)||void 0===Sk.abstr.lookupSpecial(a,Sk.builtin.str.$len))throw new Sk.builtin.TypeError("'"+
Sk.abstr.typeName(a)+"' object is not a sequence");if(this===Sk.builtin.reversed.prototype)return new Sk.builtin.reversed(a);c=new this.constructor;Sk.builtin.reversed.call(c,a);return c}},methods:{__length_hint__:{$meth:function(){return 0<=this.$idx?new Sk.builtin.int_(this.$idx):new Sk.builtin.int_(0)},$flags:{NoArgs:!0}}}})},function(G,V){Sk.builtin.zip_=Sk.abstr.buildIteratorClass("zip",{constructor:function zip_(a){this.$iters=a;0===a.length&&(this.tp$iternext=()=>{})},iternext(a){const c=[],b=Sk.misceval.chain(Sk.misceval.iterArray(this.$iters,
e=>Sk.misceval.chain(e.tp$iternext(a),l=>{if(void 0===l)return new Sk.misceval.Break(!0);c.push(l)})),e=>e?void 0:new Sk.builtin.tuple(c));return a?b:Sk.misceval.retryOptionalSuspensionOrThrow(b)},slots:{tp$doc:"zip(iter1 [,iter2 [...]]) --\x3e zip object\n\nReturn a zip object whose .__next__() method returns a tuple where\nthe i-th element comes from the i-th iterable argument.  The .__next__()\nmethod continues until the shortest iterable in the argument sequence\nis exhausted and then it raises StopIteration.",
tp$new(a,c){this===Sk.builtin.zip_.prototype&&Sk.abstr.checkNoKwargs("zip",c);c=[];for(let b=0;b<a.length;b++)try{c.push(Sk.abstr.iter(a[b]))}catch(e){if(e instanceof Sk.builtin.TypeError)throw new Sk.builtin.TypeError("zip argument #"+(b+1)+" must support iteration");throw e;}if(this===Sk.builtin.zip_.prototype)return new Sk.builtin.zip_(c);a=new this.constructor;Sk.builtin.zip_.call(a,c);return a}}});Sk.exportSymbol("Sk.builtin.zip_",Sk.builtin.zip_)},function(G,V){var a={T_ENDMARKER:0,T_NAME:1,
T_NUMBER:2,T_STRING:3,T_NEWLINE:4,T_INDENT:5,T_DEDENT:6,T_LPAR:7,T_RPAR:8,T_LSQB:9,T_RSQB:10,T_COLON:11,T_COMMA:12,T_SEMI:13,T_PLUS:14,T_MINUS:15,T_STAR:16,T_SLASH:17,T_VBAR:18,T_AMPER:19,T_LESS:20,T_GREATER:21,T_EQUAL:22,T_DOT:23,T_PERCENT:24,T_LBRACE:25,T_RBRACE:26,T_EQEQUAL:27,T_NOTEQUAL:28,T_LESSEQUAL:29,T_GREATEREQUAL:30,T_TILDE:31,T_CIRCUMFLEX:32,T_LEFTSHIFT:33,T_RIGHTSHIFT:34,T_DOUBLESTAR:35,T_PLUSEQUAL:36,T_MINEQUAL:37,T_STAREQUAL:38,T_SLASHEQUAL:39,T_PERCENTEQUAL:40,T_AMPEREQUAL:41,T_VBAREQUAL:42,
T_CIRCUMFLEXEQUAL:43,T_LEFTSHIFTEQUAL:44,T_RIGHTSHIFTEQUAL:45,T_DOUBLESTAREQUAL:46,T_DOUBLESLASH:47,T_DOUBLESLASHEQUAL:48,T_AT:49,T_ATEQUAL:50,T_RARROW:51,T_ELLIPSIS:52,T_OP:53,T_AWAIT:54,T_ASYNC:55,T_ERRORTOKEN:56,T_NT_OFFSET:256,T_N_TOKENS:60,T_COMMENT:57,T_NL:58,T_ENCODING:59};G={"!=":a.T_NOTEQUAL,"%":a.T_PERCENT,"%=":a.T_PERCENTEQUAL,"&":a.T_AMPER,"&=":a.T_AMPEREQUAL,"(":a.T_LPAR,")":a.T_RPAR,"*":a.T_STAR,"**":a.T_DOUBLESTAR,"**=":a.T_DOUBLESTAREQUAL,"*=":a.T_STAREQUAL,"+":a.T_PLUS,"+=":a.T_PLUSEQUAL,
",":a.T_COMMA,"-":a.T_MINUS,"-=":a.T_MINEQUAL,"->":a.T_RARROW,".":a.T_DOT,"...":a.T_ELLIPSIS,"/":a.T_SLASH,"//":a.T_DOUBLESLASH,"//=":a.T_DOUBLESLASHEQUAL,"/=":a.T_SLASHEQUAL,":":a.T_COLON,";":a.T_SEMI,"<":a.T_LESS,"<<":a.T_LEFTSHIFT,"<<=":a.T_LEFTSHIFTEQUAL,"<=":a.T_LESSEQUAL,"=":a.T_EQUAL,"==":a.T_EQEQUAL,">":a.T_GREATER,">=":a.T_GREATEREQUAL,">>":a.T_RIGHTSHIFT,">>=":a.T_RIGHTSHIFTEQUAL,"@":a.T_AT,"@=":a.T_ATEQUAL,"[":a.T_LSQB,"]":a.T_RSQB,"^":a.T_CIRCUMFLEX,"^=":a.T_CIRCUMFLEXEQUAL,"{":a.T_LBRACE,
"|":a.T_VBAR,"|=":a.T_VBAREQUAL,"}":a.T_RBRACE,"~":a.T_TILDE};var c={};(function(){for(var b in a)c[a[b]]=b})();["tok_name","ISTERMINAL","ISNONTERMINAL","ISEOF"].concat(Object.keys(c).map(function(b){return c[b]}));Sk.token={};Sk.token.tokens=a;Sk.token.tok_name=c;Sk.token.EXACT_TOKEN_TYPES=G;Sk.token.ISTERMINAL=function(b){return b<a.T_NT_OFFSET};Sk.token.ISNONTERMINAL=function(b){return b>=a.T_NT_OFFSET};Sk.token.ISEOF=function(b){return b==a.T_ENDMARKER};Sk.exportSymbol("Sk.token",Sk.token);Sk.exportSymbol("Sk.token.tokens",
Sk.token.tokens);Sk.exportSymbol("Sk.token.tok_name",Sk.token.tok_name);Sk.exportSymbol("Sk.token.EXACT_TOKEN_TYPES");Sk.exportSymbol("Sk.token.ISTERMINAL",Sk.token.ISTERMINAL);Sk.exportSymbol("Sk.token.ISNONTERMINAL",Sk.token.ISNONTERMINAL);Sk.exportSymbol("Sk.token.ISEOF",Sk.token.ISEOF)},function(G,V,a){function c(la,qa,na,Z,ja){this.type=la;this.string=qa;this.start=na;this.end=Z;this.line=ja}function b(la){return"("+Array.prototype.slice.call(arguments).join("|")+")"}function e(la){return b.apply(null,
arguments)+"?"}function l(la,qa){for(var na=la.length;na--;)if(la[na]===qa)return!0;return!1}function r(la){la=la.normalize("NFKC");return R.test(la)}function h(){return" FR RF Br BR Fr r B R b bR f rb rB F Rf U rF u RB br fR fr rf Rb".split(" ")}function f(la){la?delete Sk.token.EXACT_TOKEN_TYPES["<>"]:Sk.token.EXACT_TOKEN_TYPES["<>"]=Sk.token.tokens.T_NOTEQUAL;y=Object.keys(Sk.token.EXACT_TOKEN_TYPES).sort();E=b.apply(this,y.reverse().map(function(qa){return qa&&p.test(qa)?qa.replace(g,"\\$&"):
qa}));J=b("\\r?\\n",E)}a.r(V);G=a(1);var n=Sk.token.tokens;const d=Sk.builtin.SyntaxError,m=Sk.builtin.SyntaxError;c.prototype.exact_type=function(){return this.type==n.T_OP&&this.string in Sk.token.EXACT_TOKEN_TYPES?Sk.token.EXACT_TOKEN_TYPES[this.string]:this.type};var g=/[\\^$.*+?()[\]{}|]/g,p=RegExp(g.source);const {Lu:k,Ll:q,Lt:x,Lm:v,Lo:w,Nl:C,Mn:F,Mc:L,Nd:z,Pc:D}=G["default"];G=k+q+x+v+w+C+"_\\u1885-\\u1886\\u2118\\u212E\\u309B-\\u309C";const K="["+G+"]+["+(G+F+L+z+D+"\\u00B7\\u0387\\u1369-\\u1371\\u19DA]*"),
R=new RegExp("^"+K+"$");Sk.token.isIdentifier=r;(function(la){return b.apply(null,arguments)+"*"})("\\\\\\r?\\n[ \\f\\t]*");e("#[^\\r\\n]*");G=b("[0-9](?:_?[0-9])*\\.(?:[0-9](?:_?[0-9])*)?","\\.[0-9](?:_?[0-9])*")+e("[eE][-+]?[0-9](?:_?[0-9])*");var T=b(G,"[0-9](?:_?[0-9])*[eE][-+]?[0-9](?:_?[0-9])*"),t=b("[0-9](?:_?[0-9])*[jJ]",T+"[jJ]");G=b.apply(null,h());V=b(G+"'''",G+'"""');b(G+"'[^\\n'\\\\]*(?:\\\\.[^\\n'\\\\]*)*'",G+'"[^\\n"\\\\]*(?:\\\\.[^\\n"\\\\]*)*"');var y,E,J;f(!0);Sk.token.setupTokens=
f;var Q=b(G+"'[^\\n'\\\\]*(?:\\\\.[^\\n'\\\\]*)*"+b("'","\\\\\\r?\\n"),G+'"[^\\n"\\\\]*(?:\\\\.[^\\n"\\\\]*)*'+b('"',"\\\\\\r?\\n")),X=b("\\\\\\r?\\n|$","#[^\\r\\n]*",V),ba={};G=h();for(let la of G)ba[la+"'"]="^[^'\\\\]*(?:\\\\.[^'\\\\]*)*'",ba[la+'"']='^[^"\\\\]*(?:\\\\.[^"\\\\]*)*"',ba[la+"'''"]="^[^'\\\\]*(?:(?:\\\\.|'(?!''))[^'\\\\]*)*'''",ba[la+'"""']='^[^"\\\\]*(?:(?:\\\\.|"(?!""))[^"\\\\]*)*"""';let ia=[],oa=[];for(let la of G)ia.push(la+'"'),ia.push(la+"'"),oa.push(la+'"""'),oa.push(la+"'''");
var pa=new Map;Sk._tokenize=function(la,qa,na,Z){var ja=Sk.__future__.python3;if(pa.has(ja))ja=pa.get(ja);else{var N=ja?"":"(?:L?)";N=b("0[xX](?:_?[0-9a-fA-F])+"+N,"0[bB](?:_?[01])+"+N,Sk.__future__.silent_octal_literal?"0([oO]?)(?:_?[0-7])+"+N:"0([oO])(?:_?[0-7])+"+N,"(?:0(?:_?0)*|[1-9](?:_?[0-9])*)"+N);N=b(t,T,N);N="[ \\f\\t]*"+b(X,N,J,Q,K);N=new RegExp(N);pa.set(ja,N);ja=N}var W=N=0,ea=0,I="",S=0,aa=null,B=[0],u,A=void 0,H=void 0,M,O;void 0!==na&&("utf-8-sig"==na&&(na="utf-8"),Z(new c(n.T_ENCODING,
na,[0,0],[0,0],"")));for(var P=na="";;){try{na=P,P=qa()}catch(ha){P=""}N+=1;var U=0,ca=P.length;if(I){if(!P)throw new d("EOF in multi-line string",la,H[0],H[1]);A.lastIndex=0;var Y=A.exec(P);if(Y)U=M=Y[0].length,Z(new c(n.T_STRING,I+P.substring(0,M),H,[N,M],aa+P)),I="",S=0,aa=null;else{S&&"\\\n"!==P.substring(P.length-2)&&"\\\r\n"!==P.substring(P.length-3)?(Z(new c(n.T_ERRORTOKEN,I+P,H,[N,P.length],aa)),I="",aa=null):(I+=P,aa+=P);continue}}else if(0!=W||ea){if(!P)throw new d("EOF in multi-line statement",
la,N,0);ea=0}else{if(!P)break;for(u=0;U<ca;){if(" "==P[U])u+=1;else if("\t"==P[U])u=8*Math.floor(u/8+1);else if("\f"==P[U])u=0;else break;U+=1}if(U==ca)break;if(l("#\r\n",P[U])){if("#"==P[U]){u=P.substring(U);for(ca=u.length;0<ca&&-1!=="\r\n".indexOf(u.charAt(ca-1));--ca);ca=u.substring(0,ca);Z(new c(n.T_COMMENT,ca,[N,U],[N,U+ca.length],P));U+=ca.length}Z(new c(n.T_NL,P.substring(U),[N,U],[N,P.length],P));continue}u>B[B.length-1]&&(B.push(u),Z(new c(n.T_INDENT,P.substring(U),[N,0],[N,U],P)));for(;u<
B[B.length-1];){if(!l(B,u))throw new m("unindent does not match any outer indentation level",la,N,U);B=B.slice(0,-1);Z(new c(n.T_DEDENT,"",[N,U],[N,U],P))}}for(;U<ca;){for(u=P.charAt(U);" "===u||"\f"===u||"\t"===u;)U+=1,u=P.charAt(U);if(O=ja.exec(P.substring(U))){if(u=U,M=u+O[1].length,O=[N,u],Y=[N,M],U=M,u!=M){M=P.substring(u,M);var da=P[u];if(l("0123456789",da)||"."==da&&"."!=M&&"..."!=M)Z(new c(n.T_NUMBER,M,O,Y,P));else if(l("\r\n",da))0<W?Z(new c(n.T_NL,M,O,Y,P)):Z(new c(n.T_NEWLINE,M,O,Y,P));
else if("#"==da)Z(new c(n.T_COMMENT,M,O,Y,P));else if(l(oa,M))if(A=RegExp(ba[M]),Y=A.exec(P.substring(U)))U=Y[0].length+U,M=P.substring(u,U),Z(new c(n.T_STRING,M,O,[N,U],P));else{H=[N,u];I=P.substring(u);aa=P;break}else if(l(ia,da)||l(ia,M.substring(0,2))||l(ia,M.substring(0,3)))if("\n"==M[M.length-1]){H=[N,u];A=RegExp(ba[da]||ba[M[1]]||ba[M[2]]);I=P.substring(u);S=1;aa=P;break}else Z(new c(n.T_STRING,M,O,Y,P));else r(da)?Z(new c(n.T_NAME,M,O,Y,P)):"\\"==da?ea=1:(l("([{",da)?W+=1:l(")]}",da)&&--W,
Z(new c(n.T_OP,M,O,Y,P)))}}else Z(new c(n.T_ERRORTOKEN,P[U],[N,U],[N,U+1],P)),U+=1}}na&&!l("\r\n",na[na.length-1])&&Z(new c(n.T_NEWLINE,"",[N-1,na.length],[N-1,na.length+1],""));for(var fa in B.slice(1))Z(new c(n.T_DEDENT,"",[N,0],[N,0],""));Z(new c(n.T_ENDMARKER,"",[N,0],[N,0],""))};Sk._tokenize.Floatnumber=T;Sk.exportSymbol("Sk._tokenize",Sk._tokenize)},function(G,V){Sk.OpMap={"(":Sk.token.tokens.T_LPAR,")":Sk.token.tokens.T_RPAR,"[":Sk.token.tokens.T_LSQB,"]":Sk.token.tokens.T_RSQB,":":Sk.token.tokens.T_COLON,
",":Sk.token.tokens.T_COMMA,";":Sk.token.tokens.T_SEMI,"+":Sk.token.tokens.T_PLUS,"-":Sk.token.tokens.T_MINUS,"*":Sk.token.tokens.T_STAR,"/":Sk.token.tokens.T_SLASH,"|":Sk.token.tokens.T_VBAR,"&":Sk.token.tokens.T_AMPER,"<":Sk.token.tokens.T_LESS,">":Sk.token.tokens.T_GREATER,"=":Sk.token.tokens.T_EQUAL,".":Sk.token.tokens.T_DOT,"%":Sk.token.tokens.T_PERCENT,"`":Sk.token.tokens.T_BACKQUOTE,"{":Sk.token.tokens.T_LBRACE,"}":Sk.token.tokens.T_RBRACE,"@":Sk.token.tokens.T_AT,"@=":Sk.token.tokens.T_ATEQUAL,
"==":Sk.token.tokens.T_EQEQUAL,"!=":Sk.token.tokens.T_NOTEQUAL,"<>":Sk.token.tokens.T_NOTEQUAL,"<=":Sk.token.tokens.T_LESSEQUAL,">=":Sk.token.tokens.T_GREATEREQUAL,"~":Sk.token.tokens.T_TILDE,"^":Sk.token.tokens.T_CIRCUMFLEX,"<<":Sk.token.tokens.T_LEFTSHIFT,">>":Sk.token.tokens.T_RIGHTSHIFT,"**":Sk.token.tokens.T_DOUBLESTAR,"+=":Sk.token.tokens.T_PLUSEQUAL,"-=":Sk.token.tokens.T_MINEQUAL,"*=":Sk.token.tokens.T_STAREQUAL,"/=":Sk.token.tokens.T_SLASHEQUAL,"%=":Sk.token.tokens.T_PERCENTEQUAL,"&=":Sk.token.tokens.T_AMPEREQUAL,
"|=":Sk.token.tokens.T_VBAREQUAL,"^=":Sk.token.tokens.T_CIRCUMFLEXEQUAL,"<<=":Sk.token.tokens.T_LEFTSHIFTEQUAL,">>=":Sk.token.tokens.T_RIGHTSHIFTEQUAL,"**=":Sk.token.tokens.T_DOUBLESTAREQUAL,"//":Sk.token.tokens.T_DOUBLESLASH,"//=":Sk.token.tokens.T_DOUBLESLASHEQUAL,"->":Sk.token.tokens.T_RARROW,"...":Sk.token.tokens.T_ELLIPSIS};Sk.ParseTables={sym:{and_expr:257,and_test:258,annassign:259,arglist:260,argument:261,arith_expr:262,assert_stmt:263,async_funcdef:264,async_stmt:265,atom:266,atom_expr:267,
augassign:268,break_stmt:269,classdef:270,comp_for:271,comp_if:272,comp_iter:273,comp_op:274,comparison:275,compound_stmt:276,continue_stmt:277,debugger_stmt:278,decorated:279,decorator:280,decorators:281,del_stmt:282,dictorsetmaker:283,dotted_as_name:284,dotted_as_names:285,dotted_name:286,encoding_decl:287,eval_input:288,except_clause:289,expr:290,expr_stmt:291,exprlist:292,factor:293,file_input:294,flow_stmt:295,for_stmt:296,funcdef:297,global_stmt:298,if_stmt:299,import_as_name:300,import_as_names:301,
import_from:302,import_name:303,import_stmt:304,lambdef:305,lambdef_nocond:306,nonlocal_stmt:307,not_test:308,or_test:309,parameters:310,pass_stmt:311,power:312,print_stmt:313,raise_stmt:314,return_stmt:315,shift_expr:316,simple_stmt:317,single_input:256,sliceop:318,small_stmt:319,star_expr:320,stmt:321,subscript:322,subscriptlist:323,suite:324,term:325,test:326,test_nocond:327,testlist:328,testlist_comp:329,testlist_star_expr:330,tfpdef:331,trailer:332,try_stmt:333,typedargslist:334,varargslist:335,
vfpdef:336,while_stmt:337,with_item:338,with_stmt:339,xor_expr:340,yield_arg:341,yield_expr:342,yield_stmt:343},number2symbol:{256:"single_input",257:"and_expr",258:"and_test",259:"annassign",260:"arglist",261:"argument",262:"arith_expr",263:"assert_stmt",264:"async_funcdef",265:"async_stmt",266:"atom",267:"atom_expr",268:"augassign",269:"break_stmt",270:"classdef",271:"comp_for",272:"comp_if",273:"comp_iter",274:"comp_op",275:"comparison",276:"compound_stmt",277:"continue_stmt",278:"debugger_stmt",
279:"decorated",280:"decorator",281:"decorators",282:"del_stmt",283:"dictorsetmaker",284:"dotted_as_name",285:"dotted_as_names",286:"dotted_name",287:"encoding_decl",288:"eval_input",289:"except_clause",290:"expr",291:"expr_stmt",292:"exprlist",293:"factor",294:"file_input",295:"flow_stmt",296:"for_stmt",297:"funcdef",298:"global_stmt",299:"if_stmt",300:"import_as_name",301:"import_as_names",302:"import_from",303:"import_name",304:"import_stmt",305:"lambdef",306:"lambdef_nocond",307:"nonlocal_stmt",
308:"not_test",309:"or_test",310:"parameters",311:"pass_stmt",312:"power",313:"print_stmt",314:"raise_stmt",315:"return_stmt",316:"shift_expr",317:"simple_stmt",318:"sliceop",319:"small_stmt",320:"star_expr",321:"stmt",322:"subscript",323:"subscriptlist",324:"suite",325:"term",326:"test",327:"test_nocond",328:"testlist",329:"testlist_comp",330:"testlist_star_expr",331:"tfpdef",332:"trailer",333:"try_stmt",334:"typedargslist",335:"varargslist",336:"vfpdef",337:"while_stmt",338:"with_item",339:"with_stmt",
340:"xor_expr",341:"yield_arg",342:"yield_expr",343:"yield_stmt"},dfas:{256:[[[[1,1],[2,1],[3,2]],[[0,1]],[[2,1]]],{2:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1}],257:[[[[44,1]],[[45,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],258:[[[[46,1]],[[47,0],[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,
35:1,38:1,43:1}],259:[[[[48,1]],[[49,2]],[[50,3],[0,2]],[[49,4]],[[0,4]]],{48:1}],260:[[[[51,1]],[[52,2],[0,1]],[[51,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],261:[[[[49,1],[15,2],[53,2]],[[50,2],[54,3],[0,1]],[[49,3]],[[0,3]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],262:[[[[55,1]],[[30,0],[43,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],263:[[[[24,1]],[[49,
2]],[[52,3],[0,2]],[[49,4]],[[0,4]]],{24:1}],264:[[[[10,1]],[[56,2]],[[0,2]]],{10:1}],265:[[[[10,1]],[[57,2],[56,2],[58,2]],[[0,2]]],{10:1}],266:[[[[6,1],[25,1],[33,1],[9,1],[11,1],[12,2],[35,3],[38,4],[19,1],[7,5]],[[0,1]],[[59,1],[60,6]],[[61,1],[62,7],[63,7]],[[64,1],[63,8]],[[7,5],[0,5]],[[59,1]],[[61,1]],[[64,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,33:1,35:1,38:1}],267:[[[[29,1],[65,2]],[[65,2]],[[66,2],[0,2]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,29:1,33:1,35:1,38:1}],268:[[[[67,1],[68,1],[69,1],
[70,1],[71,1],[72,1],[73,1],[74,1],[75,1],[76,1],[77,1],[78,1],[79,1]],[[0,1]]],{67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:1,75:1,76:1,77:1,78:1,79:1}],269:[[[[39,1]],[[0,1]]],{39:1}],270:[[[[13,1]],[[25,2]],[[48,3],[35,4]],[[80,5]],[[61,6],[81,7]],[[0,5]],[[48,3]],[[61,6]]],{13:1}],271:[[[[10,1],[34,2]],[[34,2]],[[82,3]],[[83,4]],[[84,5]],[[85,6],[0,5]],[[0,6]]],{10:1,34:1}],272:[[[[37,1]],[[86,2]],[[85,3],[0,2]],[[0,3]]],{37:1}],273:[[[[87,1],[54,1]],[[0,1]]],{10:1,34:1,37:1}],274:[[[[88,1],[89,1],
[8,2],[90,1],[88,1],[83,1],[91,1],[92,3],[93,1],[94,1]],[[0,1]],[[83,1]],[[8,1],[0,3]]],{8:1,83:1,88:1,89:1,90:1,91:1,92:1,93:1,94:1}],275:[[[[95,1]],[[96,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],276:[[[[97,1],[98,1],[58,1],[99,1],[57,1],[100,1],[56,1],[101,1],[102,1]],[[0,1]]],{4:1,10:1,13:1,20:1,21:1,34:1,37:1,41:1,42:1}],277:[[[[40,1]],[[0,1]]],{40:1}],278:[[[[17,1]],[[0,1]]],{17:1}],279:[[[[103,1]],[[56,2],[104,2],[99,2]],[[0,2]]],{41:1}],280:[[[[41,1]],
[[105,2]],[[2,4],[35,3]],[[61,5],[81,6]],[[0,4]],[[2,4]],[[61,5]]],{41:1}],281:[[[[106,1]],[[106,1],[0,1]]],{41:1}],282:[[[[27,1]],[[82,2]],[[0,2]]],{27:1}],283:[[[[49,1],[107,2],[53,3]],[[48,4],[54,5],[52,6],[0,1]],[[54,5],[52,6],[0,2]],[[95,7]],[[49,7]],[[0,5]],[[49,8],[107,8],[0,6]],[[54,5],[52,9],[0,7]],[[52,6],[0,8]],[[49,10],[53,11],[0,9]],[[48,12]],[[95,13]],[[49,13]],[[52,9],[0,13]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],284:[[[[105,1]],[[108,
2],[0,1]],[[25,3]],[[0,3]]],{25:1}],285:[[[[109,1]],[[52,0],[0,1]]],{25:1}],286:[[[[25,1]],[[110,0],[0,1]]],{25:1}],287:[[[[25,1]],[[0,1]]],{25:1}],288:[[[[111,1]],[[2,1],[112,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],289:[[[[113,1]],[[49,2],[0,1]],[[108,3],[52,3],[0,2]],[[49,4]],[[0,4]]],{113:1}],290:[[[[114,1]],[[115,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],291:[[[[116,1]],[[117,2],[50,3],[118,4],[0,1]],[[111,
4],[62,4]],[[116,5],[62,5]],[[0,4]],[[50,3],[0,5]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],292:[[[[95,1],[107,1]],[[52,2],[0,1]],[[95,1],[107,1],[0,2]]],{6:1,7:1,9:1,11:1,12:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],293:[[[[119,2],[30,1],[22,1],[43,1]],[[120,2]],[[0,2]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],294:[[[[2,0],[112,1],[121,0]],[[0,1]]],{2:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,
17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1,112:1}],295:[[[[122,1],[123,1],[124,1],[125,1],[126,1]],[[0,1]]],{5:1,23:1,31:1,39:1,40:1}],296:[[[[34,1]],[[82,2]],[[83,3]],[[111,4]],[[48,5]],[[80,6]],[[127,7],[0,6]],[[48,8]],[[80,9]],[[0,9]]],{34:1}],297:[[[[4,1]],[[25,2]],[[128,3]],[[48,4],[129,5]],[[80,6]],[[49,7]],[[0,6]],[[48,4]]],{4:1}],298:[[[[26,1]],[[25,2]],[[52,1],[0,2]]],{26:1}],299:[[[[37,1]],[[49,2]],
[[48,3]],[[80,4]],[[127,5],[130,1],[0,4]],[[48,6]],[[80,7]],[[0,7]]],{37:1}],300:[[[[25,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],{25:1}],301:[[[[131,1]],[[52,2],[0,1]],[[131,1],[0,2]]],{25:1}],302:[[[[36,1]],[[105,2],[19,3],[110,3]],[[32,4]],[[105,2],[19,3],[32,4],[110,3]],[[132,5],[15,5],[35,6]],[[0,5]],[[132,7]],[[61,5]]],{36:1}],303:[[[[32,1]],[[133,2]],[[0,2]]],{32:1}],304:[[[[134,1],[135,1]],[[0,1]]],{32:1,36:1}],305:[[[[14,1]],[[48,2],[136,3]],[[49,4]],[[48,2]],[[0,4]]],{14:1}],306:[[[[14,1]],
[[48,2],[136,3]],[[86,4]],[[48,2]],[[0,4]]],{14:1}],307:[[[[18,1]],[[25,2]],[[52,1],[0,2]]],{18:1}],308:[[[[8,1],[137,2]],[[46,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],309:[[[[138,1]],[[139,0],[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],310:[[[[35,1]],[[61,2],[140,3]],[[0,2]],[[61,2]]],{35:1}],311:[[[[28,1]],[[0,1]]],{28:1}],312:[[[[141,1]],[[53,2],[0,1]],[[120,3]],[[0,3]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,29:1,33:1,
35:1,38:1}],313:[[[[16,1]],[[49,2],[142,3],[0,1]],[[52,4],[0,2]],[[49,5]],[[49,2],[0,4]],[[52,6],[0,5]],[[49,7]],[[52,8],[0,7]],[[49,7],[0,8]]],{16:1}],314:[[[[5,1]],[[49,2],[0,1]],[[36,3],[52,3],[0,2]],[[49,4]],[[52,5],[0,4]],[[49,6]],[[0,6]]],{5:1}],315:[[[[23,1]],[[111,2],[0,1]],[[0,2]]],{23:1}],316:[[[[143,1]],[[144,0],[142,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],317:[[[[145,1]],[[2,2],[146,3]],[[0,2]],[[145,1],[2,2]]],{5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,
15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],318:[[[[48,1]],[[49,2],[0,1]],[[0,2]]],{48:1}],319:[[[[147,1],[148,1],[149,1],[150,1],[151,1],[152,1],[153,1],[154,1],[155,1],[156,1]],[[0,1]]],{5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],320:[[[[15,1]],[[95,2]],[[0,2]]],{15:1}],321:[[[[1,1],[3,1]],[[0,1]]],{4:1,5:1,6:1,7:1,
8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1}],322:[[[[49,1],[48,2]],[[48,2],[0,1]],[[49,3],[157,4],[0,2]],[[157,4],[0,3]],[[0,4]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,48:1}],323:[[[[158,1]],[[52,2],[0,1]],[[158,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,48:1}],324:[[[[1,1],[2,2]],
[[0,1]],[[159,3]],[[121,4]],[[160,1],[121,4]]],{2:1,5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],325:[[[[120,1]],[[161,0],[15,0],[162,0],[41,0],[163,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],326:[[[[84,1],[164,2]],[[37,3],[0,1]],[[0,2]],[[84,4]],[[127,5]],[[49,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],327:[[[[165,
1],[84,1]],[[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],328:[[[[49,1]],[[52,2],[0,1]],[[49,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],329:[[[[49,1],[107,1]],[[54,2],[52,3],[0,1]],[[0,2]],[[49,4],[107,4],[0,3]],[[52,3],[0,4]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],330:[[[[49,1],[107,1]],[[52,2],[0,1]],[[49,1],[107,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,
22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],331:[[[[25,1]],[[48,2],[0,1]],[[49,3]],[[0,3]]],{25:1}],332:[[[[35,1],[110,2],[38,3]],[[61,4],[81,5]],[[25,4]],[[166,6]],[[0,4]],[[61,4]],[[64,4]]],{35:1,38:1,110:1}],333:[[[[20,1]],[[48,2]],[[80,3]],[[167,4],[168,5]],[[48,6]],[[48,7]],[[80,8]],[[80,9]],[[167,4],[127,10],[168,5],[0,8]],[[0,9]],[[48,11]],[[80,12]],[[168,5],[0,12]]],{20:1}],334:[[[[15,1],[169,2],[53,3]],[[169,4],[52,5],[0,1]],[[50,6],[52,7],[0,2]],[[169,8]],[[52,5],[0,4]],[[169,9],[53,3],[0,
5]],[[49,10]],[[15,11],[169,2],[53,3],[0,7]],[[52,12],[0,8]],[[50,13],[52,5],[0,9]],[[52,7],[0,10]],[[169,14],[52,15],[0,11]],[[0,12]],[[49,4]],[[52,15],[0,14]],[[169,16],[53,3],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],{15:1,25:1,53:1}],335:[[[[15,1],[53,2],[170,3]],[[170,5],[52,4],[0,1]],[[170,6]],[[50,7],[52,8],[0,3]],[[53,2],[170,9],[0,4]],[[52,4],[0,5]],[[52,10],[0,6]],[[49,11]],[[15,12],[53,2],[170,3],[0,8]],[[50,13],[52,4],[0,9]],[[0,10]],[[52,8],[0,11]],[[52,15],[170,14],[0,12]],[[49,5]],
[[52,15],[0,14]],[[53,2],[170,16],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],{15:1,25:1,53:1}],336:[[[[25,1]],[[0,1]]],{25:1}],337:[[[[21,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[0,4]],[[48,6]],[[80,7]],[[0,7]]],{21:1}],338:[[[[49,1]],[[108,2],[0,1]],[[95,3]],[[0,3]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],339:[[[[42,1]],[[171,2]],[[48,3],[52,1]],[[80,4]],[[0,4]]],{42:1}],340:[[[[172,1]],[[173,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,
35:1,38:1,43:1}],341:[[[[111,2],[36,1]],[[49,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,36:1,38:1,43:1}],342:[[[[31,1]],[[174,2],[0,1]],[[0,2]]],{31:1}],343:[[[[62,1]],[[0,1]]],{31:1}]},states:[[[[1,1],[2,1],[3,2]],[[0,1]],[[2,1]]],[[[44,1]],[[45,0],[0,1]]],[[[46,1]],[[47,0],[0,1]]],[[[48,1]],[[49,2]],[[50,3],[0,2]],[[49,4]],[[0,4]]],[[[51,1]],[[52,2],[0,1]],[[51,1],[0,2]]],[[[49,1],[15,2],[53,2]],[[50,2],[54,3],[0,1]],[[49,3]],[[0,3]]],[[[55,1]],[[30,0],[43,0],
[0,1]]],[[[24,1]],[[49,2]],[[52,3],[0,2]],[[49,4]],[[0,4]]],[[[10,1]],[[56,2]],[[0,2]]],[[[10,1]],[[57,2],[56,2],[58,2]],[[0,2]]],[[[6,1],[25,1],[33,1],[9,1],[11,1],[12,2],[35,3],[38,4],[19,1],[7,5]],[[0,1]],[[59,1],[60,6]],[[61,1],[62,7],[63,7]],[[64,1],[63,8]],[[7,5],[0,5]],[[59,1]],[[61,1]],[[64,1]]],[[[29,1],[65,2]],[[65,2]],[[66,2],[0,2]]],[[[67,1],[68,1],[69,1],[70,1],[71,1],[72,1],[73,1],[74,1],[75,1],[76,1],[77,1],[78,1],[79,1]],[[0,1]]],[[[39,1]],[[0,1]]],[[[13,1]],[[25,2]],[[48,3],[35,4]],
[[80,5]],[[61,6],[81,7]],[[0,5]],[[48,3]],[[61,6]]],[[[10,1],[34,2]],[[34,2]],[[82,3]],[[83,4]],[[84,5]],[[85,6],[0,5]],[[0,6]]],[[[37,1]],[[86,2]],[[85,3],[0,2]],[[0,3]]],[[[87,1],[54,1]],[[0,1]]],[[[88,1],[89,1],[8,2],[90,1],[88,1],[83,1],[91,1],[92,3],[93,1],[94,1]],[[0,1]],[[83,1]],[[8,1],[0,3]]],[[[95,1]],[[96,0],[0,1]]],[[[97,1],[98,1],[58,1],[99,1],[57,1],[100,1],[56,1],[101,1],[102,1]],[[0,1]]],[[[40,1]],[[0,1]]],[[[17,1]],[[0,1]]],[[[103,1]],[[56,2],[104,2],[99,2]],[[0,2]]],[[[41,1]],[[105,
2]],[[2,4],[35,3]],[[61,5],[81,6]],[[0,4]],[[2,4]],[[61,5]]],[[[106,1]],[[106,1],[0,1]]],[[[27,1]],[[82,2]],[[0,2]]],[[[49,1],[107,2],[53,3]],[[48,4],[54,5],[52,6],[0,1]],[[54,5],[52,6],[0,2]],[[95,7]],[[49,7]],[[0,5]],[[49,8],[107,8],[0,6]],[[54,5],[52,9],[0,7]],[[52,6],[0,8]],[[49,10],[53,11],[0,9]],[[48,12]],[[95,13]],[[49,13]],[[52,9],[0,13]]],[[[105,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],[[[109,1]],[[52,0],[0,1]]],[[[25,1]],[[110,0],[0,1]]],[[[25,1]],[[0,1]]],[[[111,1]],[[2,1],[112,2]],[[0,2]]],
[[[113,1]],[[49,2],[0,1]],[[108,3],[52,3],[0,2]],[[49,4]],[[0,4]]],[[[114,1]],[[115,0],[0,1]]],[[[116,1]],[[117,2],[50,3],[118,4],[0,1]],[[111,4],[62,4]],[[116,5],[62,5]],[[0,4]],[[50,3],[0,5]]],[[[95,1],[107,1]],[[52,2],[0,1]],[[95,1],[107,1],[0,2]]],[[[119,2],[30,1],[22,1],[43,1]],[[120,2]],[[0,2]]],[[[2,0],[112,1],[121,0]],[[0,1]]],[[[122,1],[123,1],[124,1],[125,1],[126,1]],[[0,1]]],[[[34,1]],[[82,2]],[[83,3]],[[111,4]],[[48,5]],[[80,6]],[[127,7],[0,6]],[[48,8]],[[80,9]],[[0,9]]],[[[4,1]],[[25,
2]],[[128,3]],[[48,4],[129,5]],[[80,6]],[[49,7]],[[0,6]],[[48,4]]],[[[26,1]],[[25,2]],[[52,1],[0,2]]],[[[37,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[130,1],[0,4]],[[48,6]],[[80,7]],[[0,7]]],[[[25,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],[[[131,1]],[[52,2],[0,1]],[[131,1],[0,2]]],[[[36,1]],[[105,2],[19,3],[110,3]],[[32,4]],[[105,2],[19,3],[32,4],[110,3]],[[132,5],[15,5],[35,6]],[[0,5]],[[132,7]],[[61,5]]],[[[32,1]],[[133,2]],[[0,2]]],[[[134,1],[135,1]],[[0,1]]],[[[14,1]],[[48,2],[136,3]],[[49,4]],[[48,
2]],[[0,4]]],[[[14,1]],[[48,2],[136,3]],[[86,4]],[[48,2]],[[0,4]]],[[[18,1]],[[25,2]],[[52,1],[0,2]]],[[[8,1],[137,2]],[[46,2]],[[0,2]]],[[[138,1]],[[139,0],[0,1]]],[[[35,1]],[[61,2],[140,3]],[[0,2]],[[61,2]]],[[[28,1]],[[0,1]]],[[[141,1]],[[53,2],[0,1]],[[120,3]],[[0,3]]],[[[16,1]],[[49,2],[142,3],[0,1]],[[52,4],[0,2]],[[49,5]],[[49,2],[0,4]],[[52,6],[0,5]],[[49,7]],[[52,8],[0,7]],[[49,7],[0,8]]],[[[5,1]],[[49,2],[0,1]],[[36,3],[52,3],[0,2]],[[49,4]],[[52,5],[0,4]],[[49,6]],[[0,6]]],[[[23,1]],[[111,
2],[0,1]],[[0,2]]],[[[143,1]],[[144,0],[142,0],[0,1]]],[[[145,1]],[[2,2],[146,3]],[[0,2]],[[145,1],[2,2]]],[[[48,1]],[[49,2],[0,1]],[[0,2]]],[[[147,1],[148,1],[149,1],[150,1],[151,1],[152,1],[153,1],[154,1],[155,1],[156,1]],[[0,1]]],[[[15,1]],[[95,2]],[[0,2]]],[[[1,1],[3,1]],[[0,1]]],[[[49,1],[48,2]],[[48,2],[0,1]],[[49,3],[157,4],[0,2]],[[157,4],[0,3]],[[0,4]]],[[[158,1]],[[52,2],[0,1]],[[158,1],[0,2]]],[[[1,1],[2,2]],[[0,1]],[[159,3]],[[121,4]],[[160,1],[121,4]]],[[[120,1]],[[161,0],[15,0],[162,
0],[41,0],[163,0],[0,1]]],[[[84,1],[164,2]],[[37,3],[0,1]],[[0,2]],[[84,4]],[[127,5]],[[49,2]]],[[[165,1],[84,1]],[[0,1]]],[[[49,1]],[[52,2],[0,1]],[[49,1],[0,2]]],[[[49,1],[107,1]],[[54,2],[52,3],[0,1]],[[0,2]],[[49,4],[107,4],[0,3]],[[52,3],[0,4]]],[[[49,1],[107,1]],[[52,2],[0,1]],[[49,1],[107,1],[0,2]]],[[[25,1]],[[48,2],[0,1]],[[49,3]],[[0,3]]],[[[35,1],[110,2],[38,3]],[[61,4],[81,5]],[[25,4]],[[166,6]],[[0,4]],[[61,4]],[[64,4]]],[[[20,1]],[[48,2]],[[80,3]],[[167,4],[168,5]],[[48,6]],[[48,7]],
[[80,8]],[[80,9]],[[167,4],[127,10],[168,5],[0,8]],[[0,9]],[[48,11]],[[80,12]],[[168,5],[0,12]]],[[[15,1],[169,2],[53,3]],[[169,4],[52,5],[0,1]],[[50,6],[52,7],[0,2]],[[169,8]],[[52,5],[0,4]],[[169,9],[53,3],[0,5]],[[49,10]],[[15,11],[169,2],[53,3],[0,7]],[[52,12],[0,8]],[[50,13],[52,5],[0,9]],[[52,7],[0,10]],[[169,14],[52,15],[0,11]],[[0,12]],[[49,4]],[[52,15],[0,14]],[[169,16],[53,3],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],[[[15,1],[53,2],[170,3]],[[170,5],[52,4],[0,1]],[[170,6]],[[50,7],[52,
8],[0,3]],[[53,2],[170,9],[0,4]],[[52,4],[0,5]],[[52,10],[0,6]],[[49,11]],[[15,12],[53,2],[170,3],[0,8]],[[50,13],[52,4],[0,9]],[[0,10]],[[52,8],[0,11]],[[52,15],[170,14],[0,12]],[[49,5]],[[52,15],[0,14]],[[53,2],[170,16],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],[[[25,1]],[[0,1]]],[[[21,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[0,4]],[[48,6]],[[80,7]],[[0,7]]],[[[49,1]],[[108,2],[0,1]],[[95,3]],[[0,3]]],[[[42,1]],[[171,2]],[[48,3],[52,1]],[[80,4]],[[0,4]]],[[[172,1]],[[173,0],[0,1]]],[[[111,2],
[36,1]],[[49,2]],[[0,2]]],[[[31,1]],[[174,2],[0,1]],[[0,2]]],[[[62,1]],[[0,1]]]],labels:[[0,"EMPTY"],[317,null],[4,null],[276,null],[1,"def"],[1,"raise"],[1,"True"],[3,null],[1,"not"],[1,"None"],[55,null],[2,null],[25,null],[1,"class"],[1,"lambda"],[16,null],[1,"print"],[1,"debugger"],[1,"nonlocal"],[52,null],[1,"try"],[1,"while"],[31,null],[1,"return"],[1,"assert"],[1,null],[1,"global"],[1,"del"],[1,"pass"],[54,null],[15,null],[1,"yield"],[1,"import"],[1,"False"],[1,"for"],[7,null],[1,"from"],[1,
"if"],[9,null],[1,"break"],[1,"continue"],[49,null],[1,"with"],[14,null],[316,null],[19,null],[308,null],[1,"and"],[11,null],[326,null],[22,null],[261,null],[12,null],[35,null],[271,null],[325,null],[297,null],[339,null],[296,null],[26,null],[283,null],[8,null],[342,null],[329,null],[10,null],[266,null],[332,null],[45,null],[38,null],[40,null],[50,null],[46,null],[41,null],[42,null],[36,null],[43,null],[48,null],[44,null],[37,null],[39,null],[324,null],[260,null],[292,null],[1,"in"],[309,null],[273,
null],[327,null],[272,null],[28,null],[21,null],[27,null],[29,null],[1,"is"],[30,null],[20,null],[290,null],[274,null],[333,null],[299,null],[270,null],[337,null],[279,null],[265,null],[281,null],[264,null],[286,null],[280,null],[320,null],[1,"as"],[284,null],[23,null],[328,null],[0,null],[1,"except"],[340,null],[18,null],[330,null],[268,null],[259,null],[312,null],[293,null],[321,null],[269,null],[277,null],[314,null],[315,null],[343,null],[1,"else"],[310,null],[51,null],[1,"elif"],[300,null],[301,
null],[285,null],[303,null],[302,null],[335,null],[275,null],[258,null],[1,"or"],[334,null],[267,null],[34,null],[262,null],[33,null],[319,null],[13,null],[295,null],[263,null],[291,null],[311,null],[307,null],[313,null],[282,null],[298,null],[304,null],[278,null],[318,null],[322,null],[5,null],[6,null],[47,null],[17,null],[24,null],[305,null],[306,null],[323,null],[289,null],[1,"finally"],[331,null],[336,null],[338,null],[257,null],[32,null],[341,null]],keywords:{False:33,None:9,True:6,and:47,as:108,
assert:24,"break":39,"class":13,"continue":40,"debugger":17,def:4,del:27,elif:130,"else":127,except:113,"finally":168,"for":34,from:36,global:26,"if":37,"import":32,"in":83,is:92,lambda:14,nonlocal:18,not:8,or:139,pass:28,print:16,raise:5,"return":23,"try":20,"while":21,"with":42,yield:31},tokens:{0:112,1:25,2:11,3:7,4:2,5:159,6:160,7:35,8:61,9:38,10:64,11:48,12:52,13:146,14:43,15:30,16:15,17:162,18:115,19:45,20:94,21:89,22:50,23:110,24:163,25:12,26:59,27:90,28:88,29:91,30:93,31:22,32:173,33:144,
34:142,35:53,36:74,37:78,38:68,39:79,40:69,41:72,42:73,43:75,44:77,45:67,46:71,47:161,48:76,49:41,50:70,51:129,52:19,54:29,55:10},start:256}},function(G,V){function a(b,e){this.filename=b;this.grammar=e;this.p_flags=0;return this}function c(b,e){void 0===e&&(e="file_input");b=new a(b,Sk.ParseTables);"file_input"===e?b.setup(Sk.ParseTables.sym.file_input):Sk.asserts.fail("todo;");return b}a.FUTURE_PRINT_FUNCTION="print_function";a.FUTURE_UNICODE_LITERALS="unicode_literals";a.FUTURE_DIVISION="division";
a.FUTURE_ABSOLUTE_IMPORT="absolute_import";a.FUTURE_WITH_STATEMENT="with_statement";a.FUTURE_NESTED_SCOPES="nested_scopes";a.FUTURE_GENERATORS="generators";a.CO_FUTURE_PRINT_FUNCTION=65536;a.CO_FUTURE_UNICODE_LITERALS=131072;a.CO_FUTURE_DIVISON=8192;a.CO_FUTURE_ABSOLUTE_IMPORT=16384;a.CO_FUTURE_WITH_STATEMENT=32768;a.prototype.setup=function(b){b=b||this.grammar.start;this.stack=[{dfa:this.grammar.dfas[b],state:0,node:{type:b,value:null,context:null,children:[]}}];this.used_names={}};a.prototype.addtoken=
function(b,e,l){var r,h=this.classify(b,e,l);a:for(;;){var f=this.stack[this.stack.length-1];var n=f.dfa[0];var d=n[f.state];for(r=0;r<d.length;++r){var m=d[r][0];var g=d[r][1];var p=this.grammar.labels[m][0];if(h===m){Sk.asserts.assert(256>p);this.shift(b,e,g,l);for(l=g;1===n[l].length&&0===n[l][0][0]&&n[l][0][1]===l;){this.pop();if(0===this.stack.length)return!0;f=this.stack[this.stack.length-1];l=f.state;n=f.dfa[0]}return!1}if(256<=p&&(m=this.grammar.dfas[p],m=m[1],m.hasOwnProperty(h))){this.push(p,
this.grammar.dfas[p],g,l);continue a}}b:{n=[0,f.state];for(f=d.length;f--;)if(d[f][0]===n[0]&&d[f][1]===n[1]){d=!0;break b}d=!1}if(d){if(this.pop(),0===this.stack.length)throw new Sk.builtin.SyntaxError("too much input",this.filename);}else throw b=l[0][0],new Sk.builtin.SyntaxError("bad input",this.filename,b,l);}};a.prototype.classify=function(b,e,l){if(b===Sk.token.tokens.T_NAME){this.used_names[e]=!0;var r=this.grammar.keywords.hasOwnProperty(e)&&this.grammar.keywords[e];"print"===e&&(this.p_flags&
a.CO_FUTURE_PRINT_FUNCTION||!0===Sk.__future__.print_function)&&(r=!1);if(r)return r}r=this.grammar.tokens.hasOwnProperty(b)&&this.grammar.tokens[b];if(!r){e="#"+b;for(let h in Sk.token.tokens)if(Sk.token.tokens[h]==b){e=h;break}throw new Sk.builtin.SyntaxError("bad token "+e,this.filename,l[0][0],l);}return r};a.prototype.shift=function(b,e,l,r){var h=this.stack[this.stack.length-1].dfa,f=this.stack[this.stack.length-1].node;f.children.push({type:b,value:e,lineno:r[0][0],col_offset:r[0][1],children:null});
this.stack[this.stack.length-1]={dfa:h,state:l,node:f}};a.prototype.push=function(b,e,l,r){b={type:b,value:null,lineno:r[0][0],col_offset:r[0][1],children:[]};this.stack[this.stack.length-1]={dfa:this.stack[this.stack.length-1].dfa,state:l,node:this.stack[this.stack.length-1].node};this.stack.push({dfa:e,state:0,node:b})};a.prototype.pop=function(){var b=this.stack.pop().node;if(b)if(0!==this.stack.length){var e=this.stack[this.stack.length-1].node;e.children.push(b)}else this.rootnode=b,this.rootnode.used_names=
this.used_names};Sk.parse=function(b,e){var l=Sk.token.tokens.T_COMMENT,r=Sk.token.tokens.T_NL,h=Sk.token.tokens.T_OP,f=Sk.token.tokens.T_ENDMARKER,n=Sk.token.tokens.T_ENCODING,d=!1,m=c(b);Sk._tokenize(b,function(g){var p=g.split("\n").reverse().map(function(k){return k+"\n"});return function(){if(0===p.length)throw new Sk.builtin.Exception("EOF");return p.pop()}}(e),"utf-8",function(g){var p=null;g.type!==l&&g.type!==r&&g.type!==n&&(g.type===h&&(p=Sk.OpMap[g.string]),m.addtoken(p||g.type,g.string,
[g.start,g.end,g.line]),g.type===f&&(d=!0))});if(!d)throw new Sk.builtin.SyntaxError("incomplete input",this.filename);return{cst:m.rootnode,flags:m.p_flags}};Sk.parseTreeDump=function(b,e){var l;e=e||"";var r=""+e;if(256<=b.type)for(r+=Sk.ParseTables.number2symbol[b.type]+"\n",l=0;l<b.children.length;++l)r+=Sk.parseTreeDump(b.children[l],e+"  ");else r+=Sk.token.tok_name[b.type]+": "+(new Sk.builtin.str(b.value)).$r().v+"\n";return r};Sk.exportSymbol("Sk.Parser",a);Sk.exportSymbol("Sk.parse",Sk.parse);
Sk.exportSymbol("Sk.parseTreeDump",Sk.parseTreeDump)},function(G,V){Sk.astnodes={};Sk.astnodes.Load=function(){};Sk.astnodes.Store=function(){};Sk.astnodes.Del=function(){};Sk.astnodes.AugLoad=function(){};Sk.astnodes.AugStore=function(){};Sk.astnodes.Param=function(){};Sk.astnodes.And=function(){};Sk.astnodes.Or=function(){};Sk.astnodes.Add=function(){};Sk.astnodes.Sub=function(){};Sk.astnodes.Mult=function(){};Sk.astnodes.MatMult=function(){};Sk.astnodes.Div=function(){};Sk.astnodes.Mod=function(){};
Sk.astnodes.Pow=function(){};Sk.astnodes.LShift=function(){};Sk.astnodes.RShift=function(){};Sk.astnodes.BitOr=function(){};Sk.astnodes.BitXor=function(){};Sk.astnodes.BitAnd=function(){};Sk.astnodes.FloorDiv=function(){};Sk.astnodes.Invert=function(){};Sk.astnodes.Not=function(){};Sk.astnodes.UAdd=function(){};Sk.astnodes.USub=function(){};Sk.astnodes.Eq=function(){};Sk.astnodes.NotEq=function(){};Sk.astnodes.Lt=function(){};Sk.astnodes.LtE=function(){};Sk.astnodes.Gt=function(){};Sk.astnodes.GtE=
function(){};Sk.astnodes.Is=function(){};Sk.astnodes.IsNot=function(){};Sk.astnodes.In=function(){};Sk.astnodes.NotIn=function(){};Sk.astnodes.Module=function(a,c){this.body=a;this.docstring=c;return this};Sk.astnodes.Interactive=function(a){this.body=a;return this};Sk.astnodes.Expression=function(a){this.body=a;return this};Sk.astnodes.Suite=function(a){this.body=a;return this};Sk.astnodes.FunctionDef=function(a,c,b,e,l,r,h,f){Sk.asserts.assert(null!==h&&void 0!==h);Sk.asserts.assert(null!==f&&void 0!==
f);this.name=a;this.args=c;this.body=b;this.decorator_list=e;this.returns=l;this.docstring=r;this.lineno=h;this.col_offset=f;return this};Sk.astnodes.AsyncFunctionDef=function(a,c,b,e,l,r,h,f){Sk.asserts.assert(null!==h&&void 0!==h);Sk.asserts.assert(null!==f&&void 0!==f);this.name=a;this.args=c;this.body=b;this.decorator_list=e;this.returns=l;this.docstring=r;this.lineno=h;this.col_offset=f;return this};Sk.astnodes.ClassDef=function(a,c,b,e,l,r,h,f){Sk.asserts.assert(null!==h&&void 0!==h);Sk.asserts.assert(null!==
f&&void 0!==f);this.name=a;this.bases=c;this.keywords=b;this.body=e;this.decorator_list=l;this.docstring=r;this.lineno=h;this.col_offset=f;return this};Sk.astnodes.Return=function(a,c,b){Sk.asserts.assert(null!==c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==b);this.value=a;this.lineno=c;this.col_offset=b;return this};Sk.astnodes.Delete=function(a,c,b){Sk.asserts.assert(null!==c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==b);this.targets=a;this.lineno=c;this.col_offset=b;return this};Sk.astnodes.Assign=
function(a,c,b,e){Sk.asserts.assert(null!==b&&void 0!==b);Sk.asserts.assert(null!==e&&void 0!==e);this.targets=a;this.value=c;this.lineno=b;this.col_offset=e;return this};Sk.astnodes.AugAssign=function(a,c,b,e,l){Sk.asserts.assert(null!==e&&void 0!==e);Sk.asserts.assert(null!==l&&void 0!==l);this.target=a;this.op=c;this.value=b;this.lineno=e;this.col_offset=l;return this};Sk.astnodes.AnnAssign=function(a,c,b,e,l,r){Sk.asserts.assert(null!==l&&void 0!==l);Sk.asserts.assert(null!==r&&void 0!==r);this.target=
a;this.annotation=c;this.value=b;this.simple=e;this.lineno=l;this.col_offset=r;return this};Sk.astnodes.For=function(a,c,b,e,l,r){Sk.asserts.assert(null!==l&&void 0!==l);Sk.asserts.assert(null!==r&&void 0!==r);this.target=a;this.iter=c;this.body=b;this.orelse=e;this.lineno=l;this.col_offset=r;return this};Sk.astnodes.AsyncFor=function(a,c,b,e,l,r){Sk.asserts.assert(null!==l&&void 0!==l);Sk.asserts.assert(null!==r&&void 0!==r);this.target=a;this.iter=c;this.body=b;this.orelse=e;this.lineno=l;this.col_offset=
r;return this};Sk.astnodes.While=function(a,c,b,e,l){Sk.asserts.assert(null!==e&&void 0!==e);Sk.asserts.assert(null!==l&&void 0!==l);this.test=a;this.body=c;this.orelse=b;this.lineno=e;this.col_offset=l;return this};Sk.astnodes.If=function(a,c,b,e,l){Sk.asserts.assert(null!==e&&void 0!==e);Sk.asserts.assert(null!==l&&void 0!==l);this.test=a;this.body=c;this.orelse=b;this.lineno=e;this.col_offset=l;return this};Sk.astnodes.With=function(a,c,b,e){Sk.asserts.assert(null!==b&&void 0!==b);Sk.asserts.assert(null!==
e&&void 0!==e);this.items=a;this.body=c;this.lineno=b;this.col_offset=e;return this};Sk.astnodes.AsyncWith=function(a,c,b,e){Sk.asserts.assert(null!==b&&void 0!==b);Sk.asserts.assert(null!==e&&void 0!==e);this.items=a;this.body=c;this.lineno=b;this.col_offset=e;return this};Sk.astnodes.Raise=function(a,c,b,e,l,r){Sk.asserts.assert(null!==l&&void 0!==l);Sk.asserts.assert(null!==r&&void 0!==r);this.exc=a;this.cause=c;this.inst=b;this.tback=e;this.lineno=l;this.col_offset=r;return this};Sk.astnodes.Try=
function(a,c,b,e,l,r){Sk.asserts.assert(null!==l&&void 0!==l);Sk.asserts.assert(null!==r&&void 0!==r);this.body=a;this.handlers=c;this.orelse=b;this.finalbody=e;this.lineno=l;this.col_offset=r;return this};Sk.astnodes.Assert=function(a,c,b,e){Sk.asserts.assert(null!==b&&void 0!==b);Sk.asserts.assert(null!==e&&void 0!==e);this.test=a;this.msg=c;this.lineno=b;this.col_offset=e;return this};Sk.astnodes.Import=function(a,c,b){Sk.asserts.assert(null!==c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==
b);this.names=a;this.lineno=c;this.col_offset=b;return this};Sk.astnodes.ImportFrom=function(a,c,b,e,l){Sk.asserts.assert(null!==e&&void 0!==e);Sk.asserts.assert(null!==l&&void 0!==l);this.module=a;this.names=c;this.level=b;this.lineno=e;this.col_offset=l;return this};Sk.astnodes.Global=function(a,c,b){Sk.asserts.assert(null!==c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==b);this.names=a;this.lineno=c;this.col_offset=b;return this};Sk.astnodes.Nonlocal=function(a,c,b){Sk.asserts.assert(null!==
c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==b);this.names=a;this.lineno=c;this.col_offset=b;return this};Sk.astnodes.Expr=function(a,c,b){Sk.asserts.assert(null!==c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==b);this.value=a;this.lineno=c;this.col_offset=b;return this};Sk.astnodes.Pass=function(a,c){Sk.asserts.assert(null!==a&&void 0!==a);Sk.asserts.assert(null!==c&&void 0!==c);this.lineno=a;this.col_offset=c;return this};Sk.astnodes.Break=function(a,c){Sk.asserts.assert(null!==a&&void 0!==
a);Sk.asserts.assert(null!==c&&void 0!==c);this.lineno=a;this.col_offset=c;return this};Sk.astnodes.Continue=function(a,c){Sk.asserts.assert(null!==a&&void 0!==a);Sk.asserts.assert(null!==c&&void 0!==c);this.lineno=a;this.col_offset=c;return this};Sk.astnodes.Print=function(a,c,b,e,l){Sk.asserts.assert(null!==e&&void 0!==e);Sk.asserts.assert(null!==l&&void 0!==l);this.dest=a;this.values=c;this.nl=b;this.lineno=e;this.col_offset=l;return this};Sk.astnodes.Debugger=function(a,c){Sk.asserts.assert(null!==
a&&void 0!==a);Sk.asserts.assert(null!==c&&void 0!==c);this.lineno=a;this.col_offset=c;return this};Sk.astnodes.BoolOp=function(a,c,b,e){Sk.asserts.assert(null!==b&&void 0!==b);Sk.asserts.assert(null!==e&&void 0!==e);this.op=a;this.values=c;this.lineno=b;this.col_offset=e;return this};Sk.astnodes.BinOp=function(a,c,b,e,l){Sk.asserts.assert(null!==e&&void 0!==e);Sk.asserts.assert(null!==l&&void 0!==l);this.left=a;this.op=c;this.right=b;this.lineno=e;this.col_offset=l;return this};Sk.astnodes.UnaryOp=
function(a,c,b,e){Sk.asserts.assert(null!==b&&void 0!==b);Sk.asserts.assert(null!==e&&void 0!==e);this.op=a;this.operand=c;this.lineno=b;this.col_offset=e;return this};Sk.astnodes.Lambda=function(a,c,b,e){Sk.asserts.assert(null!==b&&void 0!==b);Sk.asserts.assert(null!==e&&void 0!==e);this.args=a;this.body=c;this.lineno=b;this.col_offset=e;return this};Sk.astnodes.IfExp=function(a,c,b,e,l){Sk.asserts.assert(null!==e&&void 0!==e);Sk.asserts.assert(null!==l&&void 0!==l);this.test=a;this.body=c;this.orelse=
b;this.lineno=e;this.col_offset=l;return this};Sk.astnodes.Dict=function(a,c,b,e){Sk.asserts.assert(null!==b&&void 0!==b);Sk.asserts.assert(null!==e&&void 0!==e);this.keys=a;this.values=c;this.lineno=b;this.col_offset=e;return this};Sk.astnodes.Set=function(a,c,b){Sk.asserts.assert(null!==c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==b);this.elts=a;this.lineno=c;this.col_offset=b;return this};Sk.astnodes.ListComp=function(a,c,b,e){Sk.asserts.assert(null!==b&&void 0!==b);Sk.asserts.assert(null!==
e&&void 0!==e);this.elt=a;this.generators=c;this.lineno=b;this.col_offset=e;return this};Sk.astnodes.SetComp=function(a,c,b,e){Sk.asserts.assert(null!==b&&void 0!==b);Sk.asserts.assert(null!==e&&void 0!==e);this.elt=a;this.generators=c;this.lineno=b;this.col_offset=e;return this};Sk.astnodes.DictComp=function(a,c,b,e,l){Sk.asserts.assert(null!==e&&void 0!==e);Sk.asserts.assert(null!==l&&void 0!==l);this.key=a;this.value=c;this.generators=b;this.lineno=e;this.col_offset=l;return this};Sk.astnodes.GeneratorExp=
function(a,c,b,e){Sk.asserts.assert(null!==b&&void 0!==b);Sk.asserts.assert(null!==e&&void 0!==e);this.elt=a;this.generators=c;this.lineno=b;this.col_offset=e;return this};Sk.astnodes.Await=function(a,c,b){Sk.asserts.assert(null!==c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==b);this.value=a;this.lineno=c;this.col_offset=b;return this};Sk.astnodes.Yield=function(a,c,b){Sk.asserts.assert(null!==c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==b);this.value=a;this.lineno=c;this.col_offset=
b;return this};Sk.astnodes.YieldFrom=function(a,c,b){Sk.asserts.assert(null!==c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==b);this.value=a;this.lineno=c;this.col_offset=b;return this};Sk.astnodes.Compare=function(a,c,b,e,l){Sk.asserts.assert(null!==e&&void 0!==e);Sk.asserts.assert(null!==l&&void 0!==l);this.left=a;this.ops=c;this.comparators=b;this.lineno=e;this.col_offset=l;return this};Sk.astnodes.Call=function(a,c,b,e,l){Sk.asserts.assert(null!==e&&void 0!==e);Sk.asserts.assert(null!==l&&
void 0!==l);this.func=a;this.args=c;this.keywords=b;this.lineno=e;this.col_offset=l;return this};Sk.astnodes.Num=function(a,c,b){Sk.asserts.assert(null!==c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==b);this.n=a;this.lineno=c;this.col_offset=b;return this};Sk.astnodes.Str=function(a,c,b){Sk.asserts.assert(null!==c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==b);this.s=a;this.lineno=c;this.col_offset=b;return this};Sk.astnodes.FormattedValue=function(a,c,b,e,l){Sk.asserts.assert(null!==
e&&void 0!==e);Sk.asserts.assert(null!==l&&void 0!==l);this.value=a;this.conversion=c;this.format_spec=b;this.lineno=e;this.col_offset=l;return this};Sk.astnodes.JoinedStr=function(a,c,b){Sk.asserts.assert(null!==c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==b);this.values=a;this.lineno=c;this.col_offset=b;return this};Sk.astnodes.Bytes=function(a,c,b){Sk.asserts.assert(null!==c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==b);this.s=a;this.lineno=c;this.col_offset=b;return this};Sk.astnodes.NameConstant=
function(a,c,b){Sk.asserts.assert(null!==c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==b);this.value=a;this.lineno=c;this.col_offset=b;return this};Sk.astnodes.Ellipsis=function(a,c){Sk.asserts.assert(null!==a&&void 0!==a);Sk.asserts.assert(null!==c&&void 0!==c);this.lineno=a;this.col_offset=c;return this};Sk.astnodes.Constant=function(a,c,b){Sk.asserts.assert(null!==c&&void 0!==c);Sk.asserts.assert(null!==b&&void 0!==b);this.value=a;this.lineno=c;this.col_offset=b;return this};Sk.astnodes.Attribute=
function(a,c,b,e,l){Sk.asserts.assert(null!==e&&void 0!==e);Sk.asserts.assert(null!==l&&void 0!==l);this.value=a;this.attr=c;this.ctx=b;this.lineno=e;this.col_offset=l;return this};Sk.astnodes.Subscript=function(a,c,b,e,l){Sk.asserts.assert(null!==e&&void 0!==e);Sk.asserts.assert(null!==l&&void 0!==l);this.value=a;this.slice=c;this.ctx=b;this.lineno=e;this.col_offset=l;return this};Sk.astnodes.Starred=function(a,c,b,e){Sk.asserts.assert(null!==b&&void 0!==b);Sk.asserts.assert(null!==e&&void 0!==e);
this.value=a;this.ctx=c;this.lineno=b;this.col_offset=e;return this};Sk.astnodes.Name=function(a,c,b,e){Sk.asserts.assert(null!==b&&void 0!==b);Sk.asserts.assert(null!==e&&void 0!==e);this.id=a;this.ctx=c;this.lineno=b;this.col_offset=e;return this};Sk.astnodes.List=function(a,c,b,e){Sk.asserts.assert(null!==b&&void 0!==b);Sk.asserts.assert(null!==e&&void 0!==e);this.elts=a;this.ctx=c;this.lineno=b;this.col_offset=e;return this};Sk.astnodes.Tuple=function(a,c,b,e){Sk.asserts.assert(null!==b&&void 0!==
b);Sk.asserts.assert(null!==e&&void 0!==e);this.elts=a;this.ctx=c;this.lineno=b;this.col_offset=e;return this};Sk.astnodes.Slice=function(a,c,b){this.lower=a;this.upper=c;this.step=b;return this};Sk.astnodes.ExtSlice=function(a){this.dims=a;return this};Sk.astnodes.Index=function(a){this.value=a;return this};Sk.astnodes.comprehension=function(a,c,b,e){this.target=a;this.iter=c;this.ifs=b;this.is_async=e;return this};Sk.astnodes.ExceptHandler=function(a,c,b,e,l){Sk.asserts.assert(null!==e&&void 0!==
e);Sk.asserts.assert(null!==l&&void 0!==l);this.type=a;this.name=c;this.body=b;this.lineno=e;this.col_offset=l;return this};Sk.astnodes.arguments_=function(a,c,b,e,l,r){this.args=a;this.vararg=c;this.kwonlyargs=b;this.kw_defaults=e;this.kwarg=l;this.defaults=r;return this};Sk.astnodes.arg=function a(a,c){this.arg=a;this.annotation=c;return this};Sk.astnodes.keyword=function(a,c){this.arg=a;this.value=c;return this};Sk.astnodes.alias=function(a,c,b,e){this.name=a;this.asname=c;this.lineno=b;this.col_offset=
e;return this};Sk.astnodes.withitem=function(a,c){this.context_expr=a;this.optional_vars=c;return this};Sk.astnodes.Module.prototype._astname="Module";Sk.astnodes.Module.prototype._fields=["body",function(a){return a.body},"docstring",function(a){return a.docstring}];Sk.astnodes.Interactive.prototype._astname="Interactive";Sk.astnodes.Interactive.prototype._fields=["body",function(a){return a.body}];Sk.astnodes.Expression.prototype._astname="Expression";Sk.astnodes.Expression.prototype._fields=["body",
function(a){return a.body}];Sk.astnodes.Suite.prototype._astname="Suite";Sk.astnodes.Suite.prototype._fields=["body",function(a){return a.body}];Sk.astnodes.FunctionDef.prototype._astname="FunctionDef";Sk.astnodes.FunctionDef.prototype._fields=["name",function(a){return a.name},"args",function(a){return a.args},"body",function(a){return a.body},"decorator_list",function(a){return a.decorator_list},"returns",function(a){return a.returns},"docstring",function(a){return a.docstring}];Sk.astnodes.AsyncFunctionDef.prototype._astname=
"AsyncFunctionDef";Sk.astnodes.AsyncFunctionDef.prototype._fields=["name",function(a){return a.name},"args",function(a){return a.args},"body",function(a){return a.body},"decorator_list",function(a){return a.decorator_list},"returns",function(a){return a.returns},"docstring",function(a){return a.docstring}];Sk.astnodes.ClassDef.prototype._astname="ClassDef";Sk.astnodes.ClassDef.prototype._fields=["name",function(a){return a.name},"bases",function(a){return a.bases},"keywords",function(a){return a.keywords},
"body",function(a){return a.body},"decorator_list",function(a){return a.decorator_list},"docstring",function(a){return a.docstring}];Sk.astnodes.Return.prototype._astname="Return";Sk.astnodes.Return.prototype._fields=["value",function(a){return a.value}];Sk.astnodes.Delete.prototype._astname="Delete";Sk.astnodes.Delete.prototype._fields=["targets",function(a){return a.targets}];Sk.astnodes.Assign.prototype._astname="Assign";Sk.astnodes.Assign.prototype._fields=["targets",function(a){return a.targets},
"value",function(a){return a.value}];Sk.astnodes.AugAssign.prototype._astname="AugAssign";Sk.astnodes.AugAssign.prototype._fields=["target",function(a){return a.target},"op",function(a){return a.op},"value",function(a){return a.value}];Sk.astnodes.AnnAssign.prototype._astname="AnnAssign";Sk.astnodes.AnnAssign.prototype._fields=["target",function(a){return a.target},"annotation",function(a){return a.annotation},"value",function(a){return a.value},"simple",function(a){return a.simple}];Sk.astnodes.For.prototype._astname=
"For";Sk.astnodes.For.prototype._fields=["target",function(a){return a.target},"iter",function(a){return a.iter},"body",function(a){return a.body},"orelse",function(a){return a.orelse}];Sk.astnodes.AsyncFor.prototype._astname="AsyncFor";Sk.astnodes.AsyncFor.prototype._fields=["target",function(a){return a.target},"iter",function(a){return a.iter},"body",function(a){return a.body},"orelse",function(a){return a.orelse}];Sk.astnodes.While.prototype._astname="While";Sk.astnodes.While.prototype._fields=
["test",function(a){return a.test},"body",function(a){return a.body},"orelse",function(a){return a.orelse}];Sk.astnodes.If.prototype._astname="If";Sk.astnodes.If.prototype._fields=["test",function(a){return a.test},"body",function(a){return a.body},"orelse",function(a){return a.orelse}];Sk.astnodes.With.prototype._astname="With";Sk.astnodes.With.prototype._fields=["items",function(a){return a.items},"body",function(a){return a.body}];Sk.astnodes.AsyncWith.prototype._astname="AsyncWith";Sk.astnodes.AsyncWith.prototype._fields=
["items",function(a){return a.items},"body",function(a){return a.body}];Sk.astnodes.Raise.prototype._astname="Raise";Sk.astnodes.Raise.prototype._fields=["exc",function(a){return a.exc},"cause",function(a){return a.cause},"inst",function(a){return a.inst},"tback",function(a){return a.tback}];Sk.astnodes.Try.prototype._astname="Try";Sk.astnodes.Try.prototype._fields=["body",function(a){return a.body},"handlers",function(a){return a.handlers},"orelse",function(a){return a.orelse},"finalbody",function(a){return a.finalbody}];
Sk.astnodes.Assert.prototype._astname="Assert";Sk.astnodes.Assert.prototype._fields=["test",function(a){return a.test},"msg",function(a){return a.msg}];Sk.astnodes.Import.prototype._astname="Import";Sk.astnodes.Import.prototype._fields=["names",function(a){return a.names}];Sk.astnodes.ImportFrom.prototype._astname="ImportFrom";Sk.astnodes.ImportFrom.prototype._fields=["module",function(a){return a.module},"names",function(a){return a.names},"level",function(a){return a.level}];Sk.astnodes.Global.prototype._astname=
"Global";Sk.astnodes.Global.prototype._fields=["names",function(a){return a.names}];Sk.astnodes.Nonlocal.prototype._astname="Nonlocal";Sk.astnodes.Nonlocal.prototype._fields=["names",function(a){return a.names}];Sk.astnodes.Expr.prototype._astname="Expr";Sk.astnodes.Expr.prototype._fields=["value",function(a){return a.value}];Sk.astnodes.Pass.prototype._astname="Pass";Sk.astnodes.Pass.prototype._fields=[];Sk.astnodes.Break.prototype._astname="Break";Sk.astnodes.Break.prototype._fields=[];Sk.astnodes.Continue.prototype._astname=
"Continue";Sk.astnodes.Continue.prototype._fields=[];Sk.astnodes.Print.prototype._astname="Print";Sk.astnodes.Print.prototype._fields=["dest",function(a){return a.dest},"values",function(a){return a.values},"nl",function(a){return a.nl}];Sk.astnodes.Debugger.prototype._astname="Debugger";Sk.astnodes.Debugger.prototype._fields=[];Sk.astnodes.BoolOp.prototype._astname="BoolOp";Sk.astnodes.BoolOp.prototype._fields=["op",function(a){return a.op},"values",function(a){return a.values}];Sk.astnodes.BinOp.prototype._astname=
"BinOp";Sk.astnodes.BinOp.prototype._fields=["left",function(a){return a.left},"op",function(a){return a.op},"right",function(a){return a.right}];Sk.astnodes.UnaryOp.prototype._astname="UnaryOp";Sk.astnodes.UnaryOp.prototype._fields=["op",function(a){return a.op},"operand",function(a){return a.operand}];Sk.astnodes.Lambda.prototype._astname="Lambda";Sk.astnodes.Lambda.prototype._fields=["args",function(a){return a.args},"body",function(a){return a.body}];Sk.astnodes.IfExp.prototype._astname="IfExp";
Sk.astnodes.IfExp.prototype._fields=["test",function(a){return a.test},"body",function(a){return a.body},"orelse",function(a){return a.orelse}];Sk.astnodes.Dict.prototype._astname="Dict";Sk.astnodes.Dict.prototype._fields=["keys",function(a){return a.keys},"values",function(a){return a.values}];Sk.astnodes.Set.prototype._astname="Set";Sk.astnodes.Set.prototype._fields=["elts",function(a){return a.elts}];Sk.astnodes.ListComp.prototype._astname="ListComp";Sk.astnodes.ListComp.prototype._fields=["elt",
function(a){return a.elt},"generators",function(a){return a.generators}];Sk.astnodes.SetComp.prototype._astname="SetComp";Sk.astnodes.SetComp.prototype._fields=["elt",function(a){return a.elt},"generators",function(a){return a.generators}];Sk.astnodes.DictComp.prototype._astname="DictComp";Sk.astnodes.DictComp.prototype._fields=["key",function(a){return a.key},"value",function(a){return a.value},"generators",function(a){return a.generators}];Sk.astnodes.GeneratorExp.prototype._astname="GeneratorExp";
Sk.astnodes.GeneratorExp.prototype._fields=["elt",function(a){return a.elt},"generators",function(a){return a.generators}];Sk.astnodes.Await.prototype._astname="Await";Sk.astnodes.Await.prototype._fields=["value",function(a){return a.value}];Sk.astnodes.Yield.prototype._astname="Yield";Sk.astnodes.Yield.prototype._fields=["value",function(a){return a.value}];Sk.astnodes.YieldFrom.prototype._astname="YieldFrom";Sk.astnodes.YieldFrom.prototype._fields=["value",function(a){return a.value}];Sk.astnodes.Compare.prototype._astname=
"Compare";Sk.astnodes.Compare.prototype._fields=["left",function(a){return a.left},"ops",function(a){return a.ops},"comparators",function(a){return a.comparators}];Sk.astnodes.Call.prototype._astname="Call";Sk.astnodes.Call.prototype._fields=["func",function(a){return a.func},"args",function(a){return a.args},"keywords",function(a){return a.keywords}];Sk.astnodes.Num.prototype._astname="Num";Sk.astnodes.Num.prototype._fields=["n",function(a){return a.n}];Sk.astnodes.Str.prototype._astname="Str";Sk.astnodes.Str.prototype._fields=
["s",function(a){return a.s}];Sk.astnodes.FormattedValue.prototype._astname="FormattedValue";Sk.astnodes.FormattedValue.prototype._fields=["value",function(a){return a.value},"conversion",function(a){return a.conversion},"format_spec",function(a){return a.format_spec}];Sk.astnodes.JoinedStr.prototype._astname="JoinedStr";Sk.astnodes.JoinedStr.prototype._fields=["values",function(a){return a.values}];Sk.astnodes.Bytes.prototype._astname="Bytes";Sk.astnodes.Bytes.prototype._fields=["s",function(a){return a.s}];
Sk.astnodes.NameConstant.prototype._astname="NameConstant";Sk.astnodes.NameConstant.prototype._fields=["value",function(a){return a.value}];Sk.astnodes.Ellipsis.prototype._astname="Ellipsis";Sk.astnodes.Ellipsis.prototype._fields=[];Sk.astnodes.Constant.prototype._astname="Constant";Sk.astnodes.Constant.prototype._fields=["value",function(a){return a.value}];Sk.astnodes.Attribute.prototype._astname="Attribute";Sk.astnodes.Attribute.prototype._fields=["value",function(a){return a.value},"attr",function(a){return a.attr},
"ctx",function(a){return a.ctx}];Sk.astnodes.Subscript.prototype._astname="Subscript";Sk.astnodes.Subscript.prototype._fields=["value",function(a){return a.value},"slice",function(a){return a.slice},"ctx",function(a){return a.ctx}];Sk.astnodes.Starred.prototype._astname="Starred";Sk.astnodes.Starred.prototype._fields=["value",function(a){return a.value},"ctx",function(a){return a.ctx}];Sk.astnodes.Name.prototype._astname="Name";Sk.astnodes.Name.prototype._fields=["id",function(a){return a.id},"ctx",
function(a){return a.ctx}];Sk.astnodes.List.prototype._astname="List";Sk.astnodes.List.prototype._fields=["elts",function(a){return a.elts},"ctx",function(a){return a.ctx}];Sk.astnodes.Tuple.prototype._astname="Tuple";Sk.astnodes.Tuple.prototype._fields=["elts",function(a){return a.elts},"ctx",function(a){return a.ctx}];Sk.astnodes.Load.prototype._astname="Load";Sk.astnodes.Load.prototype._isenum=!0;Sk.astnodes.Store.prototype._astname="Store";Sk.astnodes.Store.prototype._isenum=!0;Sk.astnodes.Del.prototype._astname=
"Del";Sk.astnodes.Del.prototype._isenum=!0;Sk.astnodes.AugLoad.prototype._astname="AugLoad";Sk.astnodes.AugLoad.prototype._isenum=!0;Sk.astnodes.AugStore.prototype._astname="AugStore";Sk.astnodes.AugStore.prototype._isenum=!0;Sk.astnodes.Param.prototype._astname="Param";Sk.astnodes.Param.prototype._isenum=!0;Sk.astnodes.Slice.prototype._astname="Slice";Sk.astnodes.Slice.prototype._fields=["lower",function(a){return a.lower},"upper",function(a){return a.upper},"step",function(a){return a.step}];Sk.astnodes.ExtSlice.prototype._astname=
"ExtSlice";Sk.astnodes.ExtSlice.prototype._fields=["dims",function(a){return a.dims}];Sk.astnodes.Index.prototype._astname="Index";Sk.astnodes.Index.prototype._fields=["value",function(a){return a.value}];Sk.astnodes.And.prototype._astname="And";Sk.astnodes.And.prototype._isenum=!0;Sk.astnodes.Or.prototype._astname="Or";Sk.astnodes.Or.prototype._isenum=!0;Sk.astnodes.Add.prototype._astname="Add";Sk.astnodes.Add.prototype._isenum=!0;Sk.astnodes.Sub.prototype._astname="Sub";Sk.astnodes.Sub.prototype._isenum=
!0;Sk.astnodes.Mult.prototype._astname="Mult";Sk.astnodes.Mult.prototype._isenum=!0;Sk.astnodes.MatMult.prototype._astname="MatMult";Sk.astnodes.MatMult.prototype._isenum=!0;Sk.astnodes.Div.prototype._astname="Div";Sk.astnodes.Div.prototype._isenum=!0;Sk.astnodes.Mod.prototype._astname="Mod";Sk.astnodes.Mod.prototype._isenum=!0;Sk.astnodes.Pow.prototype._astname="Pow";Sk.astnodes.Pow.prototype._isenum=!0;Sk.astnodes.LShift.prototype._astname="LShift";Sk.astnodes.LShift.prototype._isenum=!0;Sk.astnodes.RShift.prototype._astname=
"RShift";Sk.astnodes.RShift.prototype._isenum=!0;Sk.astnodes.BitOr.prototype._astname="BitOr";Sk.astnodes.BitOr.prototype._isenum=!0;Sk.astnodes.BitXor.prototype._astname="BitXor";Sk.astnodes.BitXor.prototype._isenum=!0;Sk.astnodes.BitAnd.prototype._astname="BitAnd";Sk.astnodes.BitAnd.prototype._isenum=!0;Sk.astnodes.FloorDiv.prototype._astname="FloorDiv";Sk.astnodes.FloorDiv.prototype._isenum=!0;Sk.astnodes.Invert.prototype._astname="Invert";Sk.astnodes.Invert.prototype._isenum=!0;Sk.astnodes.Not.prototype._astname=
"Not";Sk.astnodes.Not.prototype._isenum=!0;Sk.astnodes.UAdd.prototype._astname="UAdd";Sk.astnodes.UAdd.prototype._isenum=!0;Sk.astnodes.USub.prototype._astname="USub";Sk.astnodes.USub.prototype._isenum=!0;Sk.astnodes.Eq.prototype._astname="Eq";Sk.astnodes.Eq.prototype._isenum=!0;Sk.astnodes.NotEq.prototype._astname="NotEq";Sk.astnodes.NotEq.prototype._isenum=!0;Sk.astnodes.Lt.prototype._astname="Lt";Sk.astnodes.Lt.prototype._isenum=!0;Sk.astnodes.LtE.prototype._astname="LtE";Sk.astnodes.LtE.prototype._isenum=
!0;Sk.astnodes.Gt.prototype._astname="Gt";Sk.astnodes.Gt.prototype._isenum=!0;Sk.astnodes.GtE.prototype._astname="GtE";Sk.astnodes.GtE.prototype._isenum=!0;Sk.astnodes.Is.prototype._astname="Is";Sk.astnodes.Is.prototype._isenum=!0;Sk.astnodes.IsNot.prototype._astname="IsNot";Sk.astnodes.IsNot.prototype._isenum=!0;Sk.astnodes.In.prototype._astname="In";Sk.astnodes.In.prototype._isenum=!0;Sk.astnodes.NotIn.prototype._astname="NotIn";Sk.astnodes.NotIn.prototype._isenum=!0;Sk.astnodes.comprehension.prototype._astname=
"comprehension";Sk.astnodes.comprehension.prototype._fields=["target",function(a){return a.target},"iter",function(a){return a.iter},"ifs",function(a){return a.ifs},"is_async",function(a){return a.is_async}];Sk.astnodes.ExceptHandler.prototype._astname="ExceptHandler";Sk.astnodes.ExceptHandler.prototype._fields=["type",function(a){return a.type},"name",function(a){return a.name},"body",function(a){return a.body}];Sk.astnodes.arguments_.prototype._astname="arguments";Sk.astnodes.arguments_.prototype._fields=
["args",function(a){return a.args},"vararg",function(a){return a.vararg},"kwonlyargs",function(a){return a.kwonlyargs},"kw_defaults",function(a){return a.kw_defaults},"kwarg",function(a){return a.kwarg},"defaults",function(a){return a.defaults}];Sk.astnodes.arg.prototype._astname="arg";Sk.astnodes.arg.prototype._fields=["arg",function(a){return a.arg},"annotation",function(a){return a.annotation}];Sk.astnodes.keyword.prototype._astname="keyword";Sk.astnodes.keyword.prototype._fields=["arg",function(a){return a.arg},
"value",function(a){return a.value}];Sk.astnodes.alias.prototype._astname="alias";Sk.astnodes.alias.prototype._fields=["name",function(a){return a.name},"asname",function(a){return a.asname}];Sk.astnodes.withitem.prototype._astname="withitem";Sk.astnodes.withitem.prototype._fields=["context_expr",function(a){return a.context_expr},"optional_vars",function(a){return a.optional_vars}];Sk.exportSymbol("Sk.astnodes",Sk.astnodes)},function(G,V){function a(B,u,A){this.c_encoding=B;this.c_filename=u;this.c_flags=
A||0}function c(B){Sk.asserts.assert(void 0!==B,"node must be defined");return null===B.children?0:B.children.length}function b(B,u){Sk.asserts.assert(void 0!==B,"node must be defined");Sk.asserts.assert(void 0!==u,"index of child must be specified");return B.children[u]}function e(B,u){Sk.asserts.assert(B.type===u,"node wasn't expected type")}function l(B,u,A){throw new Sk.builtin.SyntaxError(A,B.c_filename,u.lineno);}function r(B){Sk.asserts.assert("string"===typeof B,"expecting string, got "+typeof B);
return new Sk.builtin.str(B)}function h(B){var u,A;switch(B.type){case N.single_input:if(b(B,0).type===W.T_NEWLINE)break;else return h(b(B,0));case N.file_input:for(u=A=0;u<c(B);++u){var H=b(B,u);H.type===N.stmt&&(A+=h(H))}return A;case N.stmt:return h(b(B,0));case N.compound_stmt:return 1;case N.simple_stmt:return Math.floor(c(B)/2);case N.suite:if(1===c(B))return h(b(B,0));A=0;for(u=2;u<c(B)-1;++u)A+=h(b(B,u));return A;default:Sk.asserts.fail("Non-statement found")}return 0}function f(B,u,A,H){A instanceof
Sk.builtin.str&&(A=A.v);if("None"===A)throw new Sk.builtin.SyntaxError("assignment to None",B.c_filename,H);if("True"===A||"False"===A)throw new Sk.builtin.SyntaxError("assignment to True or False is forbidden",B.c_filename,H);}function n(B,u,A,H){var M;Sk.asserts.assert(A!==Sk.astnodes.AugStore&&A!==Sk.astnodes.AugLoad,"context not AugStore or AugLoad");var O=M=null;switch(u.constructor){case Sk.astnodes.Attribute:case Sk.astnodes.Name:A===Sk.astnodes.Store&&f(B,H,u.attr,H.lineno);u.ctx=A;break;
case Sk.astnodes.Starred:u.ctx=A;n(B,u.value,A,H);break;case Sk.astnodes.Subscript:u.ctx=A;break;case Sk.astnodes.List:u.ctx=A;M=u.elts;break;case Sk.astnodes.Tuple:if(0===u.elts.length)throw new Sk.builtin.SyntaxError("can't assign to ()",B.c_filename,H.lineno);u.ctx=A;M=u.elts;break;case Sk.astnodes.Lambda:O="lambda";break;case Sk.astnodes.Call:O="function call";break;case Sk.astnodes.BoolOp:case Sk.astnodes.BinOp:case Sk.astnodes.UnaryOp:O="operator";break;case Sk.astnodes.GeneratorExp:O="generator expression";
break;case Sk.astnodes.Yield:O="yield expression";break;case Sk.astnodes.ListComp:O="list comprehension";break;case Sk.astnodes.SetComp:O="set comprehension";break;case Sk.astnodes.DictComp:O="dict comprehension";break;case Sk.astnodes.Dict:case Sk.astnodes.Set:case Sk.astnodes.Num:case Sk.astnodes.Str:O="literal";break;case Sk.astnodes.NameConstant:O="True, False or None";break;case Sk.astnodes.Compare:O="comparison";break;case Sk.astnodes.Repr:O="repr";break;case Sk.astnodes.IfExp:O="conditional expression";
break;default:Sk.asserts.fail("unhandled expression in assignment")}if(O)throw new Sk.builtin.SyntaxError("can't "+(A===Sk.astnodes.Store?"assign to":"delete")+" "+O,B.c_filename,H.lineno);if(M)for(u=0;u<M.length;++u)n(B,M[u],A,H)}function d(B){if(void 0===I[B.type])throw new Sk.builtin.SyntaxError("invalid syntax",B.type,B.lineno);return I[B.type]}function m(B,u){return B.value?new Sk.builtin.str(B.value):new Sk.builtin.str(B)}function g(B,u){e(u,N.comp_op);if(1===c(u))switch(u=b(u,0),u.type){case W.T_LESS:return Sk.astnodes.Lt;
case W.T_GREATER:return Sk.astnodes.Gt;case W.T_EQEQUAL:return Sk.astnodes.Eq;case W.T_LESSEQUAL:return Sk.astnodes.LtE;case W.T_GREATEREQUAL:return Sk.astnodes.GtE;case W.T_NOTEQUAL:return Sk.astnodes.NotEq;case W.T_NAME:if("in"===u.value)return Sk.astnodes.In;if("is"===u.value)return Sk.astnodes.Is}else if(2===c(u)&&b(u,0).type===W.T_NAME){if("in"===b(u,1).value)return Sk.astnodes.NotIn;if("is"===b(u,0).value)return Sk.astnodes.IsNot}Sk.asserts.fail("invalid comp_op")}function p(B,u){B&&(B.lineno=
u.lineno,B.col_offset=u.col_offset,B.end_lineno=u.end_lineno,B.end_col_offset=u.end_col_offset);return B}function k(B,u){var A,H=[];Sk.asserts.assert(u.type===N.testlist||u.type===N.testlist_star_expr||u.type===N.listmaker||u.type===N.testlist_comp||u.type===N.testlist_safe||u.type===N.testlist1,"node type must be listlike");for(A=0;A<c(u);A+=2)Sk.asserts.assert(b(u,A).type===N.test||b(u,A).type===N.old_test||b(u,A).type===N.star_expr),H[A/2]=Z(B,b(u,A));return H}function q(B,u){var A;e(u,N.suite);
var H=[];var M=0;if(b(u,0).type===N.simple_stmt){u=b(u,0);var O=c(u)-1;b(u,O-1).type===W.T_SEMI&&--O;for(A=0;A<O;A+=2)H[M++]=ja(B,b(u,A))}else for(A=2;A<c(u)-1;++A){O=b(u,A);e(O,N.stmt);var P=h(O);if(1===P)H[M++]=ja(B,O);else for(O=b(O,0),e(O,N.simple_stmt),P=0;P<c(O);P+=2){if(0===c(b(O,P))){Sk.asserts.assert(P+1===c(O));break}H[M++]=ja(B,b(O,P))}}Sk.asserts.assert(M===h(u));return H}function x(B,u,A){var H;e(u,N.exprlist);var M=[];for(H=0;H<c(u);H+=2){var O=Z(B,b(u,H));M[H/2]=O;A&&n(B,O,A,b(u,H))}return M}
function v(B,u){a:for(;;)switch(u.type){case N.import_as_name:B=null;var A=r(b(u,0).value);3===c(u)&&(B=b(u,2).value);return new Sk.astnodes.alias(A,null==B?null:r(B),u.lineno,u.col_offset);case N.dotted_as_name:if(1===c(u)){u=b(u,0);continue a}else return B=v(B,b(u,0)),Sk.asserts.assert(!B.asname),B.asname=r(b(u,2).value),B;case N.dotted_name:if(1===c(u))return new Sk.astnodes.alias(r(b(u,0).value),null,u.lineno,u.col_offset);B="";for(A=0;A<c(u);A+=2)B+=b(u,A).value+".";return new Sk.astnodes.alias(r(B.substr(0,
B.length-1)),null,u.lineno,u.col_offset);case W.T_STAR:return new Sk.astnodes.alias(r("*"),null,u.lineno,u.col_offset);default:throw new Sk.builtin.SyntaxError("unexpected import name",B.c_filename,u.lineno);}}function w(B,u){Sk.asserts.assert(u.type==N.testlist_comp||u.type==N.argument);return J(B,u,0)}function C(B,u){if(b(u,0).type===W.T_MINUS&&2===c(u)){var A=b(u,1);if(A.type===N.factor&&1===c(A)&&(A=b(A,0),A.type===N.power&&1===c(A))){var H=b(A,0);if(H.type===N.atom&&(A=b(H,0),A.type===W.T_NUMBER))return A.value=
"-"+A.value,qa(B,H)}}B=Z(B,b(u,1));switch(b(u,0).type){case W.T_PLUS:return new Sk.astnodes.UnaryOp(Sk.astnodes.UAdd,B,u.lineno,u.col_offset);case W.T_MINUS:return new Sk.astnodes.UnaryOp(Sk.astnodes.USub,B,u.lineno,u.col_offset);case W.T_TILDE:return new Sk.astnodes.UnaryOp(Sk.astnodes.Invert,B,u.lineno,u.col_offset)}Sk.asserts.fail("unhandled factor")}function F(B,u,A,H){var M,O,P;e(u,N.arglist);for(M=P=O=0;M<c(u);M++){var U=b(u,M);U.type==N.argument&&(1==c(U)?O++:b(U,1).type==N.comp_for?(O++,H||
l(B,U,"invalid syntax"),1<c(u)&&l(B,U,"Generator expression must be parenthesized")):b(U,0).type==W.T_STAR?O++:P++)}var ca=[];var Y=[];for(M=H=P=O=0;M<c(u);M++)if(U=b(u,M),U.type==N.argument){var da=b(U,0);if(1==c(U)){P&&(H?l(B,da,"positional argument follows keyword argument unpacking"):l(B,da,"positional argument follows keyword argument"));var fa=Z(B,da);if(!fa)return null;ca[O++]=fa}else if(da.type==W.T_STAR){if(H)return l(B,da,"iterable argument unpacking follows keyword argument unpacking"),
null;fa=Z(B,b(U,1));if(!fa)return null;U=new Sk.astnodes.Starred(fa,Sk.astnodes.Load,da.lineno,da.col_offset);ca[O++]=U}else if(da.type==W.T_DOUBLESTAR){M++;fa=Z(B,b(U,1));if(!fa)return null;U=new Sk.astnodes.keyword(null,fa);Y[P++]=U;H++}else if(b(U,1).type==N.comp_for){fa=w(B,U);if(!fa)return null;ca[O++]=fa}else{var ha;fa=Z(B,da);if(!fa)return null;if(fa.constructor===Sk.astnodes.Lambda)return l(B,da,"lambda cannot contain assignment"),null;if(fa.constructor!==Sk.astnodes.Name)return l(B,da,"keyword can't be an expression"),
null;if(f(B,fa.id,U,1))return null;var ma=fa.id;for(ha=0;ha<P;ha++)if((fa=Y[ha].arg)&&fa.v===ma.v)return l(B,da,"keyword argument repeated"),null;fa=Z(B,b(U,2));if(!fa)return null;U=new Sk.astnodes.keyword(ma,fa);Y[P++]=U}}return new Sk.astnodes.Call(A,ca,Y,A.lineno,A.col_offset)}function L(B,u,A){e(u,N.trailer);if(b(u,0).type==W.T_LPAR)return 2==c(u)?new Sk.astnodes.Call(A,null,null,u.lineno,u.col_offset):F(B,b(u,1),A,!0);if(b(u,0).type==W.T_DOT){var H=m(b(u,1));return H?new Sk.astnodes.Attribute(A,
H,Sk.astnodes.Load,u.lineno,u.col_offset):null}e(b(u,0),W.T_LSQB);e(b(u,2),W.T_RSQB);u=b(u,1);if(1==c(u))return(H=la(B,b(u,0)))?new Sk.astnodes.Subscript(A,H,Sk.astnodes.Load,u.lineno,u.col_offset):null;var M,O=1,P=[];for(M=0;M<c(u);M+=2){H=la(B,b(u,M));if(!H)return null;H.kind!=ea.Index_kind&&(O=0);P[M/2]=H}if(!O)return new Sk.astnodes.Subscript(A,new Sk.astnodes.ExtSlice(P),Sk.astnodes.Load,u.lineno,u.col_offset);B=[];for(M=0;M<P.length;++M)H=P[M],Sk.asserts.assert(H.kind==ea.Index_kind&&H.v.Index.value),
B[M]=H.v.Index.value;H=new Sk.astnodes.Tuple(B,Sk.astnodes.Load,u.lineno,u.col_offset);return new Sk.astnodes.Subscript(A,new Sk.astnodes.Index(H),Sk.astnodes.Load,u.lineno,u.col_offset)}function z(B,u){e(u,N.flow_stmt);var A=b(u,0);switch(A.type){case N.break_stmt:return new Sk.astnodes.Break(u.lineno,u.col_offset,u.end_lineno,u.end_col_offset);case N.continue_stmt:return new Sk.astnodes.Continue(u.lineno,u.col_offset,u.end_lineno,u.end_col_offset);case N.yield_stmt:return(B=Z(B,b(A,0)))?new Sk.astnodes.Expr(B,
u.lineno,u.col_offset,u.end_lineno,u.end_col_offset):null;case N.return_stmt:if(1==c(A))return new Sk.astnodes.Return(null,u.lineno,u.col_offset,u.end_lineno,u.end_col_offset);var H=X(B,b(A,1));return H?new Sk.astnodes.Return(H,u.lineno,u.col_offset,u.end_lineno,u.end_col_offset):null;case N.raise_stmt:if(1==c(A))return new Sk.astnodes.Raise(null,null,null,null,u.lineno,u.col_offset,u.end_lineno,u.end_col_offset);if(2<=c(A)){var M=null;H=Z(B,b(A,1));var O=null,P=null;4==c(A)&&"from"==b(A,2).value?
(Sk.__future__.python3||l(B,b(A,2),"raise ... from ... is not available in Python 2"),M=Z(B,b(A,3))):4<=c(A)&&","==b(A,2).value&&(Sk.__future__.python3&&l(B,u,"Old raise syntax is not available in Python 3"),O=Z(B,b(A,3)),6==c(A)&&(P=Z(B,b(A,5))));return new Sk.astnodes.Raise(H,M,O,P,u.lineno,u.col_offset,u.end_lineno,u.end_col_offset)}default:return Sk.asserts.fail("unexpected flow_stmt: ",A.type),null}}function D(B,u){var A=null;Sk.asserts.assert(u.type===N.tfpdef||u.type===N.vfpdef);var H=b(u,
0);f(B,H,H.value,H.lineno);H=r(H.value);3==c(u)&&b(u,1).type===W.T_COLON&&(A=Z(B,b(u,2)));return new Sk.astnodes.arg(H,A,u.lineno,u.col_offset)}function K(B,u,A,H,M){var O=A,P=0;H||l(B,b(u,A),"named arguments must follow bare *");for(Sk.asserts.assert(M);O<c(u);){var U=b(u,O);switch(U.type){case N.vfpdef:case N.tfpdef:O+1<c(u)&&b(u,O+1).type==W.T_EQUAL?(M[P]=Z(B,b(u,O+2)),O+=2):M[P]=null;var ca=3==c(U)?Z(B,b(U,2)):null;U=b(U,0);f(B,U,U.value,U.lineno);A=r(U.value);H[P++]=new Sk.astnodes.arg(A,ca,
U.lineno,U.col_offset);O+=2;break;case W.T_DOUBLESTAR:return O;default:l(B,U,"unexpected node")}}return O}function R(B,u){var A,H,M,O=[],P=[],U=[],ca=[],Y=null,da=null;if(u.type===N.parameters){if(2===c(u))return new Sk.astnodes.arguments_([],null,[],[],null,[]);u=b(u,1)}Sk.asserts.assert(u.type===N.varargslist||u.type===N.typedargslist);for(A=H=M=0;M<c(u);){var fa=b(u,M);switch(fa.type){case N.tfpdef:case N.vfpdef:if(M+1<c(u)&&b(u,M+1).type==W.T_EQUAL){P[H++]=Z(B,b(u,M+2));M+=2;var ha=1}else if(ha)throw new Sk.builtin.SyntaxError("non-default argument follows default argument",
B.c_filename,u.lineno);O[A++]=D(B,fa);M+=2;break;case W.T_STAR:if(M+1>=c(u)||M+2==c(u)&&b(u,M+1).type==W.T_COMMA)throw new Sk.builtin.SyntaxError("named arguments must follow bare *",B.c_filename,u.lineno);fa=b(u,M+1);fa.type==W.T_COMMA?(M+=2,M=K(B,u,M,U,ca)):(Y=D(B,fa),M+=3,M<c(u)&&(b(u,M).type==N.tfpdef||b(u,M).type==N.vfpdef)&&(M=K(B,u,M,U,ca)));break;case W.T_DOUBLESTAR:fa=b(u,M+1);Sk.asserts.assert(fa.type==N.tfpdef||fa.type==N.vfpdef);da=D(B,fa);M+=3;break;default:Sk.asserts.fail("unexpected node in varargslist");
return}}return new Sk.astnodes.arguments_(O,Y,U,ca,da,P)}function T(B,u,A,H){var M=H?b(u,1):u,O=null,P=1,U=null;if(H&&5>B.c_feature_version)return l(B,M,"Async functions are only supported in Python 3.5 and greater"),null;e(M,N.funcdef);var ca=m(b(M,P));if(f(B,ca,b(M,P),0))return null;var Y=R(B,b(M,P+1));if(!Y)return null;if(b(M,P+2).type==W.T_RARROW){O=Z(B,b(M,P+3));if(!O)return null;P+=2}if(b(M,P+3).type==W.T_TYPE_COMMENT){U=W.T_NEW_TYPE_COMMENT(b(M,P+3));if(!U)return null;P+=1}var da=q(B,b(M,P+
3));if(!da)return null;if(1<c(b(M,P+3))&&(P=b(b(M,P+3),1),P.type==W.T_TYPE_COMMENT)){if(null!=U)return l(B,M,"Cannot have two type comments on def"),null;U=W.T_NEW_TYPE_COMMENT(P);if(!U)return null}return H?new Sk.astnodes.AsyncFunctionDef(ca,Y,da,A,O,U,u.lineno,u.col_offset,void 0,void 0):new Sk.astnodes.FunctionDef(ca,Y,da,A,O,U,M.lineno,M.col_offset,void 0,void 0)}function t(B,u,A){e(u,N.classdef);if(4==c(u)){var H=q(B,b(u,3));var M=m(b(u,1).value);f(B,b(u,3),M,u.lineno);return new Sk.astnodes.ClassDef(M,
[],[],H,A,null,u.lineno,u.col_offset)}if(b(u,3).type===W.T_RPAR)return H=q(B,b(u,5)),M=m(b(u,1).value),f(B,b(u,3),M,b(u,3).lineno),new Sk.astnodes.ClassDef(M,[],[],H,A,null,u.lineno,u.col_offset);M=m(b(u,1));M=new Sk.astnodes.Name(M,Sk.astnodes.Load,u.lineno,u.col_offset);var O=F(B,b(u,3),M,!1);H=q(B,b(u,6));M=m(b(u,1).value);f(B,b(u,1),M,b(u,1).lineno);return new Sk.astnodes.ClassDef(M,O.args,O.keywords,H,A,null,u.lineno,u.col_offset)}function y(B,u){function A(fa,ha){for(fa=0;;){e(ha,N.comp_iter);
if(b(ha,0).type===N.comp_for)return fa;ha=b(ha,0);e(ha,N.comp_if);fa++;if(2===c(ha))return fa;ha=b(ha,2)}}var H;var M=function(fa,ha){fa=0;a:for(;;){fa++;e(ha,N.comp_for);if(5===c(ha))ha=b(ha,4);else return fa;b:for(;;){e(ha,N.comp_iter);ha=b(ha,0);if(ha.type===N.comp_for)continue a;else if(ha.type===N.comp_if)if(3===c(ha)){ha=b(ha,2);continue b}else return fa;break}break}Sk.asserts.fail("logic error in countCompFors")}(B,u);var O=[];for(H=0;H<M;++H){e(u,N.comp_for);var P=b(u,1);var U=x(B,P,Sk.astnodes.Store);
var ca=Z(B,b(u,3));var Y=1===c(P)?new Sk.astnodes.comprehension(U[0],ca,[]):new Sk.astnodes.comprehension(new Sk.astnodes.Tuple(U,Sk.astnodes.Store,u.lineno,u.col_offset),ca,[]);if(5===c(u)){u=b(u,4);var da=A(B,u);P=[];for(U=0;U<da;++U)e(u,N.comp_iter),u=b(u,0),e(u,N.comp_if),ca=Z(B,b(u,1)),P[U]=ca,3===c(u)&&(u=b(u,2));u.type===N.comp_iter&&(u=b(u,0));Y.ifs=P}O[H]=Y}return O}function E(B,u){var A=[];a:{var H=u;var M=0;b:for(;;){var O=0;M++;e(H,N.comp_for);b(H,0).type==W.T_ASYNC&&(O=1);if(c(H)==5+
O)H=b(H,4+O);else break a;c:for(;;){e(H,N.comp_iter);H=b(H,0);if(H.type===N.comp_for)continue b;else if(H.type===N.comp_if)if(3===c(H)){H=b(H,2);continue c}else break a;break}break}M=void 0}for(H=0;H<M;H++){var P=0;b(u,0).type==W.T_ASYNC&&(P=1);var U=b(u,1+P);var ca=x(B,U,Sk.astnodes.Store);if(!ca)return null;O=Z(B,b(u,3+P));if(!O)return null;var Y=ca[0];ca=1==c(U)?new Sk.astnodes.comprehension(Y,O,null,P):new Sk.astnodes.comprehension(new Sk.astnodes.Tuple(ca,Sk.astnodes.Store,Y.lineno,Y.col_offset,
U.end_lineno,U.end_col_offset),O,null,P);if(c(u)==5+P){Y=[];u=b(u,4+P);a:for(O=u,P=0;;){e(O,N.comp_iter);if(b(O,0).type==N.comp_for){U=P;break a}O=b(O,0);e(O,N.comp_if);P++;if(2==c(O)){U=P;break a}O=b(O,2)}if(-1==U)return null;for(P=0;P<U;P++){e(u,N.comp_iter);u=b(u,0);e(u,N.comp_if);O=Z(B,b(u,1));if(!O)return null;Y[P]=O;3==c(u)&&(u=b(u,2))}u.type==N.comp_iter&&(u=b(u,0));ca.ifs=Y}A[H]=ca}return A}function J(B,u,A){Sk.asserts.assert(1<c(u));var H=b(u,0);var M=Z(B,H);if(M.constructor===Sk.astnodes.Starred)return l(B,
H,"iterable unpacking cannot be used in comprehension"),null;B=E(B,b(u,1));return 0==A?new Sk.astnodes.GeneratorExp(M,B,u.lineno,u.col_offset,u.end_lineno,u.end_col_offset):1==A?new Sk.astnodes.ListComp(M,B,u.lineno,u.col_offset,u.end_lineno,u.end_col_offset):2==A?new Sk.astnodes.SetComp(M,B,u.lineno,u.col_offset,u.end_lineno,u.end_col_offset):null}function Q(B,u){e(u,N.augassign);u=b(u,0);switch(u.value.charAt(0)){case "+":return Sk.astnodes.Add;case "-":return Sk.astnodes.Sub;case "/":return"/"===
u.value.charAt(1)?Sk.astnodes.FloorDiv:Sk.astnodes.Div;case "%":return Sk.astnodes.Mod;case "<":return Sk.astnodes.LShift;case ">":return Sk.astnodes.RShift;case "&":return Sk.astnodes.BitAnd;case "^":return Sk.astnodes.BitXor;case "|":return Sk.astnodes.BitOr;case "*":return"*"===u.value.charAt(1)?Sk.astnodes.Pow:Sk.astnodes.Mult;case "@":if(Sk.__future__.python3)return Sk.astnodes.MatMult;default:Sk.asserts.fail("invalid augassign")}}function X(B,u){Sk.asserts.assert(0<c(u));u.type===N.testlist_comp?
1<c(u)&&Sk.asserts.assert(b(u,1).type!==N.comp_for):Sk.asserts.assert(u.type===N.testlist||u.type===N.testlist_star_expr);return 1===c(u)?Z(B,b(u,0)):new Sk.astnodes.Tuple(k(B,u),Sk.astnodes.Load,u.lineno,u.col_offset)}function ba(B,u){e(u,N.expr_stmt);if(1===c(u))return new Sk.astnodes.Expr(X(B,b(u,0)),u.lineno,u.col_offset);if(b(u,1).type===N.augassign){var A=b(u,0);var H=X(B,A);n(B,H,Sk.astnodes.Store,A);switch(H.constructor){case Sk.astnodes.Name:var M=H.id;f(B,A,M,u.lineno);break;case Sk.astnodes.Attribute:case Sk.astnodes.Subscript:break;
case Sk.astnodes.GeneratorExp:throw new Sk.builtin.SyntaxError("augmented assignment to generator expression not possible",B.c_filename,u.lineno);case Sk.astnodes.Yield:throw new Sk.builtin.SyntaxError("augmented assignment to yield expression not possible",B.c_filename,u.lineno);default:throw new Sk.builtin.SyntaxError("illegal expression for augmented assignment",B.c_filename,u.lineno);}A=b(u,2);M=A.type===N.testlist?X(B,A):Z(B,A);return new Sk.astnodes.AugAssign(H,Q(B,b(u,1)),M,u.lineno,u.col_offset)}if(b(u,
1).type===N.annassign){if(!Sk.__future__.python3)throw new Sk.builtin.SyntaxError("Annotated assignment is not supported in Python 2",B.c_filename,u.lineno);A=b(u,0);var O=b(u,1);var P=1;for(H=A;1==c(H);)H=b(H,0);0<c(H)&&b(H,0).type==W.T_LPAR&&(P=0);H=X(B,A);switch(H.constructor){case Sk.astnodes.Name:M=H.id;f(B,A,M,u.lineno);n(B,H,Sk.astnodes.Store,A);break;case Sk.astnodes.Attribute:M=H.attr;f(B,A,M,u.lineno);n(B,H,Sk.astnodes.Store,A);break;case Sk.astnodes.Subscript:n(B,H,Sk.astnodes.Store,A);
break;case Sk.astnodes.List:throw new Sk.builtin.SyntaxError("only single target (not list) can be annotated",B.c_filename,u.lineno);case Sk.astnodes.Tuple:throw new Sk.builtin.SyntaxError("only single target (not tuple) can be annotated",B.c_filename,u.lineno);default:throw new Sk.builtin.SyntaxError("illegal target for annotation",B.c_filename,u.lineno);}H.constructor!=Sk.astnodes.Name&&(P=0);A=b(O,1);M=Z(B,A);if(2==c(O))return new Sk.astnodes.AnnAssign(H,M,null,P,u.lineno,u.col_offset);A=b(O,3);
B=Z(B,A);return new Sk.astnodes.AnnAssign(H,M,B,P,u.lineno,u.col_offset)}e(b(u,1),W.T_EQUAL);P=[];for(H=0;H<c(u)-2;H+=2){A=b(u,H);if(A.type===N.yield_expr)throw new Sk.builtin.SyntaxError("assignment to yield expression not possible",B.c_filename,u.lineno);A=X(B,A);n(B,A,Sk.astnodes.Store,b(u,H));P[H/2]=A}A=b(u,c(u)-1);B=A.type===N.testlist_star_expr?X(B,A):Z(B,A);return new Sk.astnodes.Assign(P,B,u.lineno,u.col_offset)}function ia(B,u,A,H,M){Sk.asserts.assert(A>=u);Sk.asserts.assert("{"==B.charAt(u-
1));Sk.asserts.assert("}"==B.charAt(A)||"!"==B.charAt(A)||":"==B.charAt(A));B=B.substring(u,A);/^\s*$/.test(B)&&l(H,M,"f-string: empty expression not allowed");try{let P=Sk.parse("<fstring>","("+B+")");var O=Sk.astFromParse(P.cst,"<fstring>",P.flags)}catch(P){throw P.traceback&&P.traceback[0]&&(O=P.traceback[0],O.lineno=(O.lineno||1)-1+M.lineno,O.filename=H.c_filename),P;}Sk.asserts.assert(1==O.body.length&&O.body[0].constructor===Sk.astnodes.Expr);return O.body[0].value}function oa(B,u,A,H,M,O,P){Sk.asserts.assert("{"==
B.charAt(u));u++;var U=u;let ca=null,Y=0,da=0,fa,ha,ma=()=>l(O,P,"f-string: expecting '}'");for(Sk.asserts.assert(u<=A);u<A;u++){let ka=B.charAt(u);"\\"==ka&&l(O,P,"f-string expression part cannot include a backslash");if(ca)ka==ca&&(3==Y?u+2<A&&B.charAt(u+1)==ka&&B.charAt(u+2)==ka&&(u+=2,ca=Y=0):Y=ca=0);else if("'"==ka||'"'==ka)u+2<A&&B.charAt(u+1)==ka&&B.charAt(u+2)==ka?(Y=3,u+=2):Y=1,ca=ka;else if("["==ka||"{"==ka||"("==ka)da++;else if(0!=da&&("]"==ka||"}"==ka||")"==ka))da--;else if("#"==ka)l(O,
P,"f-string expression part cannot include '#'");else if(!(0!=da||"!"!=ka&&":"!=ka&&"}"!=ka||"!"==ka&&u+1<A&&"="==B.charAt(u+1)))break}ca&&l(O,P,"f-string: unterminated string");da&&l(O,P,"f-string: mismatched '(', '{', or '['");U=ia(B,U,u,O,P);"!"==B.charAt(u)&&(u++,u>=A&&ma(),ha=B.charAt(u),u++,"s"!=ha&&"r"!=ha&&"a"!=ha&&l(O,P,"f-string: invalid conversion character: expected 's', 'r', or 'a'"));u>=A&&ma();":"==B.charAt(u)&&(u++,u>=A&&ma(),[fa,u]=pa(B,u,A,H,M+1,O,P));(u>=A||"}"!=B.charAt(u))&&ma();
u++;return[new Sk.astnodes.FormattedValue(U,ha,fa,P.lineno,P.col_offset),u]}function pa(B,u,A,H,M,O,P){let U=[],ca=Y=>{if(-1!==Y.indexOf("}")){if(/(^|[^}])}(}})*($|[^}])/.test(Y))throw new Sk.builtin.SyntaxError("f-string: single '}' is not allowed",O.c_filename,P.lineno,P.col_offset);Y=Y.replace(/}}/g,"}")}U.push(new Sk.astnodes.Str(new Sk.builtin.str(Y),P.lineno,P.col_offset,O.end_lineno,P.end_col_offset))};for(;u<A;){let Y=B.indexOf("{",u);if(0!==M){let da=B.indexOf("}",u);-1!==da&&(-1===Y?A=da:
Y>da&&(Y=-1,A=da))}if(-1===Y){ca(B.substring(u,A));u=A;break}else if(Y+1<A&&"{"===B.charAt(Y+1))ca(B.substring(u,Y+1)),u=Y+2;else{ca(B.substring(u,Y));u=Y;let [da,fa]=oa(B,Y,A,H,M,O,P);U.push(da);u=fa}}return[new Sk.astnodes.JoinedStr(U,P.lineno,P.col_offset),u]}function la(B,u){var A,H;e(u,N.subscript);var M=b(u,0);var O=A=H=null;if(M.type===W.T_DOT)return new Sk.astnodes.Ellipsis;if(1===c(u)&&M.type===N.test)return new Sk.astnodes.Index(Z(B,M));M.type===N.test&&(H=Z(B,M));M.type===W.T_COLON?1<c(u)&&
(M=b(u,1),M.type===N.test&&(A=Z(B,M))):2<c(u)&&(M=b(u,2),M.type===N.test&&(A=Z(B,M)));M=b(u,c(u)-1);M.type===N.sliceop&&(1===c(M)?(M=b(M,0),O=new Sk.astnodes.NameConstant(Sk.builtin.none.none$,Sk.astnodes.Load,M.lineno,M.col_offset)):(M=b(M,1),M.type===N.test&&(O=Z(B,M))));return new Sk.astnodes.Slice(H,A,O)}function qa(B,u){var A=b(u,0);switch(A.type){case W.T_NAME:var H=A.value;if(4<=H.length&&5>=H.length){if("None"===H)return new Sk.astnodes.NameConstant(Sk.builtin.none.none$,u.lineno,u.col_offset);
if("True"===H)return new Sk.astnodes.NameConstant(Sk.builtin.bool.true$,u.lineno,u.col_offset);if("False"===H)return new Sk.astnodes.NameConstant(Sk.builtin.bool.false$,u.lineno,u.col_offset)}B=m(H,B);return new Sk.astnodes.Name(B,Sk.astnodes.Load,u.lineno,u.col_offset,u.end_lineno,u.end_col_offset);case W.T_STRING:A=[];for(var M=0;M<c(u);++M){var O=b(u,M).value;var P=B;var U=b(u,M);var ca=O;var Y=ca.charAt(0);for(var da=!1,fa=O=!1;;){if("u"!==Y&&"U"!==Y)if("r"===Y||"R"===Y)da=!0;else if("b"===Y||
"B"===Y)fa=!0;else if("f"===Y||"F"===Y)O=!0;else break;ca=ca.substr(1);Y=ca.charAt(0)}Sk.asserts.assert("'"===Y||'"'===Y&&ca.charAt(ca.length-1)===Y);ca=ca.substr(1,ca.length-2);4<=ca.length&&ca.charAt(0)===Y&&ca.charAt(1)===Y&&(Sk.asserts.assert(ca.charAt(ca.length-1)===Y&&ca.charAt(ca.length-2)===Y),ca=ca.substr(2,ca.length-4));if(da||-1===ca.indexOf("\\")){if(fa)for(Y=0;Y<ca.length;Y++)127<ca.charCodeAt(Y)&&l(P,U,"bytes can only contain ASCII literal characters");P=[r(ca),O,fa]}else{da=ca;var ha=
da.length,ma="";for(ca=0;ca<ha;++ca)Y=da.charAt(ca),"\\"===Y?(++ca,Y=da.charAt(ca),"n"===Y?ma+="\n":"\\"===Y?ma+="\\":"t"===Y?ma+="\t":"r"===Y?ma+="\r":"b"===Y?ma+="\b":"f"===Y?ma+="\f":"v"===Y?ma+="\v":"0"===Y?ma+="\x00":'"'===Y?ma+='"':"'"===Y?ma+="'":"\n"!==Y&&("x"===Y?(ca+2>=ha&&l(P,U,"Truncated \\xNN escape"),ma+=String.fromCharCode(parseInt(da.substr(ca+1,2),16)),ca+=2):fa||"u"!==Y?fa||"U"!==Y?ma+="\\"+Y:(ca+8>=ha&&l(P,U,"Truncated \\UXXXXXXXX escape"),ma+=String.fromCodePoint(parseInt(da.substr(ca+
1,8),16)),ca+=8):(ca+4>=ha&&l(P,U,"Truncated \\uXXXX escape"),ma+=String.fromCharCode(parseInt(da.substr(ca+1,4),16)),ca+=4))):fa&&127<Y.charCodeAt(0)?l(P,U,"bytes can only contain ASCII literal characters"):ma+=Y;P=ma;P=[r(P),O,fa]}O=P;P=O[0];U=O[1];O=O[2];0!=M&&H!==O&&l(B,u,"cannot mix bytes and nonbytes literals");H=O;if(U){if(!Sk.__future__.python3)throw new Sk.builtin.SyntaxError("invalid string (f-strings are not supported in Python 2)",B.c_filename,b(u,M).lineno);var ka=P.$jsstr();[ka]=pa(ka,
0,ka.length,!1,0,B,b(u,M));A.push.apply(A,ka.values);ka=null}else ka?ka.s=ka.s.sq$concat(P):(ka=new (H?Sk.astnodes.Bytes:Sk.astnodes.Str)(P,u.lineno,u.col_offset,B.end_lineno,u.end_col_offset),A.push(ka))}u=1===A.length&&A[0].constructor===Sk.astnodes.Str?A[0]:new Sk.astnodes.JoinedStr(A,u.lineno,u.col_offset,B.end_lineno,u.end_col_offset);return u;case W.T_NUMBER:B=Sk.astnodes.Num;H=A.value;H=H.replace(aa,"");M=H[H.length-1];if("j"===M||"J"===M)H=new Sk.builtin.complex(0,parseFloat(H.slice(0,-1)));
else if(S.test(H))H=new Sk.builtin.float_(parseFloat(H));else{"0"===H[0]&&"0"!==H&&65>H.charCodeAt(1)&&(H="0o"+H.substring(1));A=!0;if("l"===M||"L"===M)H=H.slice(0,-1),A=!1;M=Number(H);H=M>Number.MAX_SAFE_INTEGER?A?new Sk.builtin.int_(JSBI.BigInt(H)):new Sk.builtin.lng(JSBI.BigInt(H)):A?new Sk.builtin.int_(M):new Sk.builtin.lng(M)}return new B(H,u.lineno,u.col_offset);case W.T_ELLIPSIS:return new Sk.astnodes.Ellipsis(u.lineno,u.col_offset,u.end_lineno,u.end_col_offset);case W.T_LPAR:return A=b(u,
1),A.type==W.T_RPAR?new Sk.astnodes.Tuple([],Sk.astnodes.Load,u.lineno,u.col_offset,u.end_lineno,u.end_col_offset):A.type==N.yield_expr?Z(B,A):1==c(A)?X(B,A):b(A,1).type==N.comp_for?p(w(B,A),u):p(X(B,A),u);case W.T_LSQB:A=b(u,1);if(A.type==W.T_RSQB)return new Sk.astnodes.List([],Sk.astnodes.Load,u.lineno,u.col_offset,u.end_lineno,u.end_col_offset);e(A,N.testlist_comp);if(1==c(A)||b(A,1).type==W.T_COMMA)return(B=k(B,A))?new Sk.astnodes.List(B,Sk.astnodes.Load,u.lineno,u.col_offset,u.end_lineno,u.end_col_offset):
null;H=A;Sk.asserts.assert(H.type==N.testlist_comp);B=J(B,H,1);return p(B,u);case W.T_LBRACE:A=b(u,1);if(A.type==W.T_RBRACE)return new Sk.astnodes.Dict(null,null,u.lineno,u.col_offset,u.end_lineno,u.end_col_offset);H=b(A,0).type==W.T_DOUBLESTAR;if(1==c(A)||1<c(A)&&b(A,1).type==W.T_COMMA){H=A;M=[];Sk.asserts.assert(H.type===N.dictorsetmaker);for(A=0;A<c(H);A+=2)ka=Z(B,b(H,A)),M[A/2]=ka;B=new Sk.astnodes.Set(M,H.lineno,H.col_offset)}else if(1<c(A)&&b(A,1).type==N.comp_for)H=A,Sk.asserts.assert(H.type===
N.dictorsetmaker),Sk.asserts.assert(1<c(H)),A=Z(B,b(H,0)),B=y(B,b(H,1)),B=new Sk.astnodes.SetComp(A,B,H.lineno,H.col_offset);else if(c(A)>3-H&&b(A,3-H).type==N.comp_for){if(H)return l(B,u,"dict unpacking cannot be used in dict comprehension"),null;H=A;Sk.asserts.assert(3<c(H));e(b(H,1),W.T_COLON);A=Z(B,b(H,0));M=Z(B,b(H,2));B=y(B,b(H,3));B=new Sk.astnodes.DictComp(A,M,B,H.lineno,H.col_offset)}else{H=A;M=[];ka=[];for(O=A=0;O<c(H);O++)P=B,U=H,fa=O,b(U,fa).type==W.T_DOUBLESTAR?(Sk.asserts.assert(2<=
c(U)-fa),O=Z(P,b(U,fa+1)),P={key:null,value:O,i:fa+2}):(Sk.asserts.assert(3<=c(U)-fa),(O=Z(P,b(U,fa)))?(ca=O,e(b(U,fa+1),W.T_COLON),P=(O=Z(P,b(U,fa+2)))?{key:ca,value:O,i:fa+3}:!1):P=0),O=P.i,M[A]=P.key,ka[A]=P.value,A++;B=new Sk.astnodes.Dict(M,ka,H.lineno,H.col_offset,H.end_lineno,H.end_col_offset)}return p(B,u);default:return Sk.asserts.fail("unhandled atom "+A.type),null}}function na(B,u){var A,H=0;e(u,N.atom_expr);var M=c(u);b(u,0).type===W.T_AWAIT&&(H=1,Sk.asserts.assert(1<M));var O=qa(B,b(u,
H));if(!O)return null;if(1===M)return O;if(H&&2===M)return new Sk.astnodes.Await(O,u.lineno,u.col_offset);for(A=H+1;A<M;A++){var P=b(u,A);if(P.type!==N.trailer)break;P=L(B,P,O);if(!P)return null;P.lineno=O.lineno;P.col_offset=O.col_offset;O=P}return H?new Sk.astnodes.Await(O,u.line,u.col_offset):O}function Z(B,u){a:for(;;){switch(u.type){case N.test:case N.test_nocond:if(b(u,0).type===N.lambdef||b(u,0).type===N.lambdef_nocond){var A=b(u,0);3===c(A)?(u=new Sk.astnodes.arguments_([],null,null,[]),B=
Z(B,b(A,2))):(u=R(B,b(A,1)),B=Z(B,b(A,3)));return new Sk.astnodes.Lambda(u,B,A.lineno,A.col_offset)}if(1<c(u))return Sk.asserts.assert(5===c(u)),new Sk.astnodes.IfExp(Z(B,b(u,2)),Z(B,b(u,0)),Z(B,b(u,4)),u.lineno,u.col_offset);case N.or_test:case N.and_test:if(1===c(u)){u=b(u,0);continue a}var H=[];for(A=0;A<c(u);A+=2)H[A/2]=Z(B,b(u,A));if("and"===b(u,1).value)return new Sk.astnodes.BoolOp(Sk.astnodes.And,H,u.lineno,u.col_offset);Sk.asserts.assert("or"===b(u,1).value);return new Sk.astnodes.BoolOp(Sk.astnodes.Or,
H,u.lineno,u.col_offset);case N.not_test:if(1===c(u)){u=b(u,0);continue a}else return new Sk.astnodes.UnaryOp(Sk.astnodes.Not,Z(B,b(u,1)),u.lineno,u.col_offset);case N.comparison:if(1===c(u)){u=b(u,0);continue a}else{var M=[];H=[];for(A=1;A<c(u);A+=2)M[(A-1)/2]=g(B,b(u,A)),H[(A-1)/2]=Z(B,b(u,A+1));return new Sk.astnodes.Compare(Z(B,b(u,0)),M,H,u.lineno,u.col_offset)}case N.star_expr:return e(u,N.star_expr),new Sk.astnodes.Starred(Z(B,b(u,1)),Sk.astnodes.Load,u.lineno,u.col_offset);case N.expr:case N.xor_expr:case N.and_expr:case N.shift_expr:case N.arith_expr:case N.term:if(1===
c(u)){u=b(u,0);continue a}var O=u,P=new Sk.astnodes.BinOp(Z(B,b(O,0)),d(b(O,1)),Z(B,b(O,2)),O.lineno,O.col_offset),U=(c(O)-1)/2;for(u=1;u<U;++u)A=b(O,2*u+1),H=d(A),M=Z(B,b(O,2*u+2)),P=new Sk.astnodes.BinOp(P,H,M,A.lineno,A.col_offset);return P;case N.yield_expr:return H=!1,M=null,1<c(u)&&(A=b(u,1)),A&&(M=b(A,c(A)-1),2==c(A)?(H=!0,M=Z(B,M)):M=X(B,M)),H?new Sk.astnodes.YieldFrom(M,u.lineno,u.col_offset):new Sk.astnodes.Yield(M,u.lineno,u.col_offset);case N.factor:if(1===c(u)){u=b(u,0);continue a}return C(B,
u);case N.power:return A=u,e(A,N.power),u=na(B,b(A,0)),1!==c(A)&&b(A,c(A)-1).type===N.factor&&(B=Z(B,b(A,c(A)-1)),u=new Sk.astnodes.BinOp(u,Sk.astnodes.Pow,B,A.lineno,A.col_offset)),u;default:Sk.asserts.fail("unhandled expr","n.type: %d",u.type)}break}}function ja(B,u){u.type===N.stmt&&(Sk.asserts.assert(1===c(u)),u=b(u,0));u.type===N.simple_stmt&&(Sk.asserts.assert(1===h(u)),u=b(u,0));if(u.type===N.small_stmt)switch(u=b(u,0),u.type){case N.expr_stmt:return ba(B,u);case N.del_stmt:var A=u;e(A,N.del_stmt);
return new Sk.astnodes.Delete(x(B,b(A,1),Sk.astnodes.Del),A.lineno,A.col_offset);case N.pass_stmt:return new Sk.astnodes.Pass(u.lineno,u.col_offset);case N.flow_stmt:return z(B,u);case N.import_stmt:var H=u,M;e(H,N.import_stmt);var O=H.lineno;u=H.col_offset;H=b(H,0);if(H.type===N.import_name){H=b(H,1);e(H,N.dotted_as_names);var P=[];for(M=0;M<c(H);M+=2)P[M/2]=v(B,b(H,M));B=new Sk.astnodes.Import(P,O,u)}else if(H.type===N.import_from){var U=null;A=0;for(P=1;P<c(H);++P)if(b(H,P).type===N.dotted_name){U=
v(B,b(H,P));P++;break}else if(b(H,P).type===W.T_DOT)A++;else if(b(H,P).type===W.T_ELLIPSIS)A+=3;else break;++P;switch(b(H,P).type){case W.T_STAR:H=b(H,P);break;case W.T_LPAR:H=b(H,P+1);c(H);break;case N.import_as_names:H=b(H,P);P=c(H);if(0===P%2)throw new Sk.builtin.SyntaxError("trailing comma not allowed without surrounding parentheses",B.c_filename,H.lineno);break;default:throw new Sk.builtin.SyntaxError("Unexpected node-type in from-import",B.c_filename,H.lineno);}P=[];if(H.type===W.T_STAR)P[0]=
v(B,H);else for(M=0;M<c(H);M+=2)P[M/2]=v(B,b(H,M));B=U?U.name.v:"";B=new Sk.astnodes.ImportFrom(r(B),P,A,O,u)}else throw new Sk.builtin.SyntaxError("unknown import statement",B.c_filename,H.lineno);return B;case N.global_stmt:B=u;u=[];e(B,N.global_stmt);for(A=1;A<c(B);A+=2)u[(A-1)/2]=r(b(B,A).value);return new Sk.astnodes.Global(u,B.lineno,B.col_offset);case N.nonlocal_stmt:l(B,u,"Not implemented: nonlocal");break;case N.assert_stmt:return A=u,e(A,N.assert_stmt),2===c(A)?B=new Sk.astnodes.Assert(Z(B,
b(A,1)),null,A.lineno,A.col_offset):4===c(A)?B=new Sk.astnodes.Assert(Z(B,b(A,1)),Z(B,b(A,3)),A.lineno,A.col_offset):(Sk.asserts.fail("improper number of parts to assert stmt"),B=void 0),B;case N.print_stmt:A=u;Sk.__future__.print_function&&l(B,A,"Missing parentheses in call to 'print'");H=1;O=null;e(A,N.print_stmt);2<=c(A)&&b(A,1).type===W.T_RIGHTSHIFT&&(O=Z(B,b(A,2)),H=4);u=[];for(U=0;H<c(A);H+=2,++U)u[U]=Z(B,b(A,H));B=b(A,c(A)-1).type===W.T_COMMA?!1:!0;return new Sk.astnodes.Print(O,u,B,A.lineno,
A.col_offset);case N.debugger_stmt:return new Sk.astnodes.Debugger(u.lineno,u.col_offset);default:Sk.asserts.fail("unhandled small_stmt")}else switch(A=b(u,0),e(u,N.compound_stmt),A.type){case N.if_stmt:e(A,N.if_stmt);if(4===c(A))B=new Sk.astnodes.If(Z(B,b(A,1)),q(B,b(A,3)),[],A.lineno,A.col_offset);else if(u=b(A,4).value.charAt(2),"s"===u)B=new Sk.astnodes.If(Z(B,b(A,1)),q(B,b(A,3)),q(B,b(A,6)),A.lineno,A.col_offset);else if("i"===u){O=c(A)-4;H=!1;u=[];b(A,O+1).type===W.T_NAME&&"s"===b(A,O+1).value.charAt(2)&&
(H=!0,O-=3);O/=4;H&&(u=[new Sk.astnodes.If(Z(B,b(A,c(A)-6)),q(B,b(A,c(A)-4)),q(B,b(A,c(A)-1)),b(A,c(A)-6).lineno,b(A,c(A)-6).col_offset)],O--);for(U=0;U<O;++U)H=5+4*(O-U-1),u=[new Sk.astnodes.If(Z(B,b(A,H)),q(B,b(A,H+2)),u,b(A,H).lineno,b(A,H).col_offset)];B=new Sk.astnodes.If(Z(B,b(A,1)),q(B,b(A,3)),u,A.lineno,A.col_offset)}else Sk.asserts.fail("unexpected token in 'if' statement"),B=void 0;return B;case N.while_stmt:return e(A,N.while_stmt),4===c(A)?B=new Sk.astnodes.While(Z(B,b(A,1)),q(B,b(A,3)),
[],A.lineno,A.col_offset):7===c(A)?B=new Sk.astnodes.While(Z(B,b(A,1)),q(B,b(A,3)),q(B,b(A,6)),A.lineno,A.col_offset):(Sk.asserts.fail("wrong number of tokens for 'while' stmt"),B=void 0),B;case N.for_stmt:return u=[],e(A,N.for_stmt),9===c(A)&&(u=q(B,b(A,8))),H=b(A,1),O=x(B,H,Sk.astnodes.Store),O=1===c(H)?O[0]:new Sk.astnodes.Tuple(O,Sk.astnodes.Store,A.lineno,A.col_offset),new Sk.astnodes.For(O,X(B,b(A,3)),q(B,b(A,5)),u,A.lineno,A.col_offset);case N.try_stmt:u=[];M=c(A);O=(M-3)/3;U=[];P=null;e(A,
N.try_stmt);H=q(B,b(A,2));if(b(A,M-3).type===W.T_NAME)"finally"===b(A,M-3).value?(9<=M&&b(A,M-6).type===W.T_NAME&&(U=q(B,b(A,M-4)),O--),P=q(B,b(A,M-1))):U=q(B,b(A,M-1)),O--;else if(b(A,M-3).type!==N.except_clause)throw new Sk.builtin.SyntaxError("malformed 'try' statement",B.c_filename,A.lineno);if(0<O)for(M=0;M<O;M++){var ca=M;var Y=B,da=b(A,3+3*M),fa=b(A,5+3*M);e(da,N.except_clause);e(fa,N.suite);if(1===c(da))var ha=new Sk.astnodes.ExceptHandler(null,null,q(Y,fa),da.lineno,da.col_offset);else 2===
c(da)?ha=new Sk.astnodes.ExceptHandler(Z(Y,b(da,1)),null,q(Y,fa),da.lineno,da.col_offset):4===c(da)?(Sk.__future__.python3&&","==b(da,2).value&&l(Y,da,"Old-style 'except' clauses are not supported in Python 3"),Z(Y,b(da,1)),ha=Z(Y,b(da,3)),n(Y,ha,Sk.astnodes.Store,b(da,3)),ha=new Sk.astnodes.ExceptHandler(Z(Y,b(da,1)),ha,q(Y,fa),da.lineno,da.col_offset)):(Sk.asserts.fail("wrong number of children for except clause"),ha=void 0);u[ca]=ha}Sk.asserts.assert(!!P||0!=u.length);return new Sk.astnodes.Try(H,
u,U,P,A.lineno,A.col_offset);case N.with_stmt:u=[];e(A,N.with_stmt);for(O=1;O<c(A)-2;O+=2)H=void 0,P=B,M=b(A,O),e(M,N.with_item),U=Z(P,b(M,0)),3==c(M)&&(H=Z(P,b(M,2)),n(P,H,Sk.astnodes.Store,M)),H=new Sk.astnodes.withitem(U,H),u[(O-1)/2]=H;B=q(B,b(A,c(A)-1));B=new Sk.astnodes.With(u,B,A.lineno,A.col_offset);return B;case N.funcdef:return T(B,A,[],!1);case N.classdef:return t(B,A,[]);case N.decorated:O=null;e(A,N.decorated);H=b(A,0);e(H,N.decorators);u=[];for(U=0;U<c(H);++U){P=u;M=U;ca=B;ha=b(H,U);
e(ha,N.decorator);e(b(ha,0),W.T_AT);e(b(ha,c(ha)-1),W.T_NEWLINE);var ma,ka=b(ha,1);e(ka,N.dotted_name);Y=ka.lineno;da=ka.col_offset;fa=r(b(ka,0).value);var ra=new Sk.astnodes.Name(fa,Sk.astnodes.Load,Y,da);for(ma=2;ma<c(ka);ma+=2)fa=r(b(ka,ma).value),ra=new Sk.astnodes.Attribute(ra,fa,Sk.astnodes.Load,Y,da);Y=ra;ca=3===c(ha)?Y:5===c(ha)?new Sk.astnodes.Call(Y,[],[],ha.lineno,ha.col_offset):F(ca,b(ha,3),Y);P[M]=ca}Sk.asserts.assert(b(A,1).type==N.funcdef||b(A,1).type==N.async_funcdef||b(A,1).type==
N.classdef);b(A,1).type==N.funcdef?(O=b(A,1),O=T(B,O,u,!1)):b(A,1).type==N.classdef?O=t(B,b(A,1),u):b(A,1).type==N.async_funcdef&&(O=b(A,1),e(O,N.async_funcdef),e(b(O,0),W.T_NAME),Sk.asserts.assert(("async"===b(O,0)).value),e(b(O,1),N.funcdef),O=T(B,O,u,!0));O&&(O.lineno=A.lineno,O.col_offset=A.col_offset);return O;case N.async_stmt:l(B,A,"Not implemented: async");break;default:Sk.asserts.assert("unhandled compound_stmt")}}var N=Sk.ParseTables.sym,W=Sk.token.tokens,ea={Slice_kind:1,ExtSlice_kind:2,
Index_kind:3},I={};I[W.T_VBAR]=Sk.astnodes.BitOr;I[W.T_CIRCUMFLEX]=Sk.astnodes.BitXor;I[W.T_AMPER]=Sk.astnodes.BitAnd;I[W.T_LEFTSHIFT]=Sk.astnodes.LShift;I[W.T_RIGHTSHIFT]=Sk.astnodes.RShift;I[W.T_PLUS]=Sk.astnodes.Add;I[W.T_MINUS]=Sk.astnodes.Sub;I[W.T_STAR]=Sk.astnodes.Mult;I[W.T_SLASH]=Sk.astnodes.Div;I[W.T_DOUBLESLASH]=Sk.astnodes.FloorDiv;I[W.T_PERCENT]=Sk.astnodes.Mod;Sk.setupOperators=function(B){B?I[W.T_AT]=Sk.astnodes.MatMult:I[W.T_AT]&&delete I[W.T_AT]};Sk.exportSymbol("Sk.setupOperators",
Sk.setupOperators);const S=new RegExp("^"+Sk._tokenize.Floatnumber+"$"),aa=/_/g;Sk.astFromParse=function(B,u,A){var H,M=new a("utf-8",u,A),O=[],P=0;switch(B.type){case N.file_input:for(H=0;H<c(B)-1;++H){var U=b(B,H);if(U.type!==W.T_NEWLINE)if(e(U,N.stmt),A=h(U),1===A)O[P++]=ja(M,U);else for(U=b(U,0),e(U,N.simple_stmt),u=0;u<A;++u)O[P++]=ja(M,b(U,2*u))}return new Sk.astnodes.Module(O);case N.eval_input:Sk.asserts.fail("todo;");case N.single_input:Sk.asserts.fail("todo;");default:Sk.asserts.fail("todo;")}};
Sk.astDump=function(B){var u=function(H){var M,O="";for(M=0;M<H;++M)O+=" ";return O},A=function(H,M){var O;if(null===H)return M+"None";if(H.prototype&&void 0!==H.prototype._astname&&H.prototype._isenum)return M+H.prototype._astname+"()";if(void 0!==H._astname){var P=u(H._astname.length+1);var U=[];for(O=0;O<H._fields.length;O+=2){var ca=H._fields[O];var Y=H._fields[O+1](H);var da=u(ca.length+1);U.push([ca,A(Y,M+P+da)])}Y=[];for(O=0;O<U.length;++O)da=U[O],Y.push(da[0]+"="+da[1].replace(/^\s+/,""));
O=Y.join(",\n"+M+P);return M+H._astname+"("+O+")"}if(Sk.isArrayLike(H)){P=[];for(O=0;O<H.length;++O)U=H[O],P.push(A(U,M+" "));H=P.join(",\n");return M+"["+H.replace(/^\s+/,"")+"]"}H=!0===H?"True":!1===H?"False":H instanceof Sk.builtin.lng?H.tp$str().v:H instanceof Sk.builtin.str?H.$r().v:""+H;return M+H};return A(B,"")};Sk.exportSymbol("Sk.astFromParse",Sk.astFromParse);Sk.exportSymbol("Sk.astDump",Sk.astDump)},function(G,V){function a(h,f,n){this.__name=h;this.__flags=f;this.__scope=f>>11&7;this.__namespaces=
n||[]}function c(h,f,n,d,m){this.symFlags={};this.name=f;this.varnames=[];this.children=[];this.blockType=n;this.returnsValue=this.varkeywords=this.varargs=this.generator=this.childHasFree=this.hasFree=this.isNested=!1;this.lineno=m;this.table=h;h.cur&&(h.cur.nested||"function"===h.cur.blockType)&&(this.isNested=!0);d.scopeId=r++;h.stss[d.scopeId]=this;this.symbols={}}function b(h){this.filename=h;this.top=this.cur=null;this.stack=[];this.curClass=this.global=null;this.tmpname=0;this.stss={}}function e(h,
f){var n;for(n=0;n<f.length;n++)h(f[n])}function l(h,f){for(var n in f)h[n]=f[n]}Sk.exportSymbol("Sk.SYMTAB_CONSTS",{DEF_GLOBAL:1,DEF_LOCAL:2,DEF_PARAM:4,USE:8,DEF_STAR:16,DEF_DOUBLESTAR:32,DEF_INTUPLE:64,DEF_FREE:128,DEF_FREE_GLOBAL:256,DEF_FREE_CLASS:512,DEF_IMPORT:1024,DEF_BOUND:1030,SCOPE_OFF:11,SCOPE_MASK:7,LOCAL:1,GLOBAL_EXPLICIT:2,GLOBAL_IMPLICIT:3,FREE:4,CELL:5,OPT_IMPORT_STAR:1,OPT_EXEC:2,OPT_BARE_EXEC:4,OPT_TOPLEVEL:8,GENERATOR:2,GENERATOR_EXPRESSION:2,ModuleBlock:"module",FunctionBlock:"function",
ClassBlock:"class"});a.prototype.get_name=function(){return this.__name};a.prototype.is_referenced=function(){return!!(this.__flags&8)};a.prototype.is_parameter=function(){return!!(this.__flags&4)};a.prototype.is_global=function(){return 3===this.__scope||2==this.__scope};a.prototype.is_declared_global=function(){return 2==this.__scope};a.prototype.is_local=function(){return!!(this.__flags&1030)};a.prototype.is_free=function(){return 4==this.__scope};a.prototype.is_imported=function(){return!!(this.__flags&
1024)};a.prototype.is_assigned=function(){return!!(this.__flags&2)};a.prototype.is_namespace=function(){return this.__namespaces&&0<this.__namespaces.length};a.prototype.get_namespaces=function(){return this.__namespaces};var r=0;c.prototype.get_type=function(){return this.blockType};c.prototype.get_name=function(){return this.name};c.prototype.get_lineno=function(){return this.lineno};c.prototype.is_nested=function(){return this.isNested};c.prototype.has_children=function(){return 0<this.children.length};
c.prototype.get_identifiers=function(){return this._identsMatching(function(){return!0})};c.prototype.lookup=function(h){if(this.symbols.hasOwnProperty(h))h=this.symbols[h];else{var f=this.symFlags[h];var n=this.__check_children(h);h=this.symbols[h]=new a(h,f,n)}return h};c.prototype.__check_children=function(h){var f,n=[];for(f=0;f<this.children.length;++f){var d=this.children[f];d.name===h&&n.push(d)}return n};c.prototype._identsMatching=function(h){var f,n=[];for(f in this.symFlags)this.symFlags.hasOwnProperty(f)&&
h(this.symFlags[f])&&n.push(f);n.sort();return n};c.prototype.get_parameters=function(){Sk.asserts.assert("function"==this.get_type(),"get_parameters only valid for function scopes");this._funcParams||(this._funcParams=this._identsMatching(function(h){return h&4}));return this._funcParams};c.prototype.get_locals=function(){Sk.asserts.assert("function"==this.get_type(),"get_locals only valid for function scopes");this._funcLocals||(this._funcLocals=this._identsMatching(function(h){return h&1030}));
return this._funcLocals};c.prototype.get_globals=function(){Sk.asserts.assert("function"==this.get_type(),"get_globals only valid for function scopes");this._funcGlobals||(this._funcGlobals=this._identsMatching(function(h){h=h>>11&7;return 3==h||2==h}));return this._funcGlobals};c.prototype.get_frees=function(){Sk.asserts.assert("function"==this.get_type(),"get_frees only valid for function scopes");this._funcFrees||(this._funcFrees=this._identsMatching(function(h){return 4==(h>>11&7)}));return this._funcFrees};
c.prototype.get_methods=function(){var h;Sk.asserts.assert("class"==this.get_type(),"get_methods only valid for class scopes");if(!this._classMethods){var f=[];for(h=0;h<this.children.length;++h)f.push(this.children[h].name);f.sort();this._classMethods=f}return this._classMethods};c.prototype.getScope=function(h){h=this.symFlags[h];return void 0===h?0:h>>11&7};b.prototype.getStsForAst=function(h){Sk.asserts.assert(void 0!==h.scopeId,"ast wasn't added to st?");h=this.stss[h.scopeId];Sk.asserts.assert(void 0!==
h,"unknown sym tab entry");return h};b.prototype.SEQStmt=function(h){var f,n;if(null!==h){Sk.asserts.assert(Sk.isArrayLike(h),"SEQ: nodes isn't array? got "+h.toString());var d=h.length;for(n=0;n<d;++n)(f=h[n])&&this.visitStmt(f)}};b.prototype.SEQExpr=function(h){var f,n;if(null!==h){Sk.asserts.assert(Sk.isArrayLike(h),"SEQ: nodes isn't array? got "+h.toString());var d=h.length;for(n=0;n<d;++n)(f=h[n])&&this.visitExpr(f)}};b.prototype.enterBlock=function(h,f,n,d){h=Sk.fixReserved(h);var m=null;this.cur&&
(m=this.cur,this.stack.push(this.cur));this.cur=new c(this,h,f,n,d);"top"===h&&(this.global=this.cur.symFlags);m&&m.children.push(this.cur)};b.prototype.exitBlock=function(){this.cur=null;0<this.stack.length&&(this.cur=this.stack.pop())};b.prototype.visitParams=function(h,f){var n;for(n=0;n<h.length;++n)if(f=h[n],f.constructor===Sk.astnodes.arg)this.addDef(f.arg,4,f.lineno);else throw new Sk.builtin.SyntaxError("invalid expression in parameter list",this.filename);};b.prototype.visitAnnotations=function(h,
f){h.posonlyargs&&this.visitArgAnnotations(h.posonlyargs);h.args&&this.visitArgAnnotations(h.args);h.vararg&&h.vararg.annotation&&this.visitExpr(h.vararg.annotation);h.kwarg&&h.kwarg.annotation&&this.visitExpr(h.kwarg.annotation);h.kwonlyargs&&this.visitArgAnnotations(h.kwonlyargs);f&&this.visitExpr(f)};b.prototype.visitArgAnnotations=function(h){for(let f=0;f<h.length;f++){const n=h[f];n.annotation&&this.visitExpr(n.annotation)}};b.prototype.visitArguments=function(h,f){h.args&&this.visitParams(h.args,
!0);h.kwonlyargs&&this.visitParams(h.kwonlyargs,!0);h.vararg&&(this.addDef(h.vararg.arg,4,f),this.cur.varargs=!0);h.kwarg&&(this.addDef(h.kwarg.arg,4,f),this.cur.varkeywords=!0)};b.prototype.newTmpname=function(h){this.addDef(new Sk.builtin.str("_["+ ++this.tmpname+"]"),2,h)};b.prototype.addDef=function(h,f,n){var d=Sk.mangleName(this.curClass,h).v;d=Sk.fixReserved(d);var m=this.cur.symFlags[d];if(void 0!==m){if(f&4&&m&4)throw new Sk.builtin.SyntaxError("duplicate argument '"+h.v+"' in function definition",
this.filename,n);m|=f}else m=f;this.cur.symFlags[d]=m;f&4?this.cur.varnames.push(d):f&1&&(m=f,h=this.global[d],void 0!==h&&(m|=h),this.global[d]=m)};b.prototype.visitSlice=function(h){var f;switch(h.constructor){case Sk.astnodes.Slice:h.lower&&this.visitExpr(h.lower);h.upper&&this.visitExpr(h.upper);h.step&&this.visitExpr(h.step);break;case Sk.astnodes.ExtSlice:for(f=0;f<h.dims.length;++f)this.visitSlice(h.dims[f]);break;case Sk.astnodes.Index:this.visitExpr(h.value)}};b.prototype.visitStmt=function(h){var f;
Sk.asserts.assert(void 0!==h,"visitStmt called with undefined");switch(h.constructor){case Sk.astnodes.FunctionDef:this.addDef(h.name,2,h.lineno);h.args.defaults&&this.SEQExpr(h.args.defaults);h.decorator_list&&this.SEQExpr(h.decorator_list);this.visitAnnotations(h.args,h.returns);this.enterBlock(h.name.v,"function",h,h.lineno);this.visitArguments(h.args,h.lineno);this.SEQStmt(h.body);this.exitBlock();break;case Sk.astnodes.ClassDef:this.addDef(h.name,2,h.lineno);this.SEQExpr(h.bases);h.decorator_list&&
this.SEQExpr(h.decorator_list);this.enterBlock(h.name.v,"class",h,h.lineno);this.curClass=h.name;this.SEQStmt(h.body);this.exitBlock();break;case Sk.astnodes.Return:h.value&&(this.visitExpr(h.value),this.cur.returnsValue=!0);break;case Sk.astnodes.Delete:this.SEQExpr(h.targets);break;case Sk.astnodes.Assign:this.SEQExpr(h.targets);this.visitExpr(h.value);break;case Sk.astnodes.AnnAssign:if(h.target.constructor==Sk.astnodes.Name){var n=h.target;var d=Sk.mangleName(this.curClass,n.id).v;d=Sk.fixReserved(d);
n=this.cur.symFlags[d];if(n&2049&&this.global!=this.cur.symFlags&&h.simple)throw new Sk.builtin.SyntaxError("annotated name '"+d+"' can't be global",this.filename,h.lineno);h.simple?this.addDef(new Sk.builtin.str(d),4098,h.lineno):h.value&&this.addDef(new Sk.builtin.str(d),2,h.lineno)}else this.visitExpr(h.target);this.visitExpr(h.annotation);h.value&&this.visitExpr(h.value);break;case Sk.astnodes.AugAssign:this.visitExpr(h.target);this.visitExpr(h.value);break;case Sk.astnodes.Print:h.dest&&this.visitExpr(h.dest);
this.SEQExpr(h.values);break;case Sk.astnodes.For:this.visitExpr(h.target);this.visitExpr(h.iter);this.SEQStmt(h.body);h.orelse&&this.SEQStmt(h.orelse);break;case Sk.astnodes.While:this.visitExpr(h.test);this.SEQStmt(h.body);h.orelse&&this.SEQStmt(h.orelse);break;case Sk.astnodes.If:this.visitExpr(h.test);this.SEQStmt(h.body);h.orelse&&this.SEQStmt(h.orelse);break;case Sk.astnodes.Raise:h.exc&&(this.visitExpr(h.exc),h.inst&&(this.visitExpr(h.inst),h.tback&&this.visitExpr(h.tback)),h.cause&&this.visitExpr(h.cause));
break;case Sk.astnodes.Assert:this.visitExpr(h.test);h.msg&&this.visitExpr(h.msg);break;case Sk.astnodes.Import:case Sk.astnodes.ImportFrom:this.visitAlias(h.names,h.lineno);break;case Sk.astnodes.Global:var m=h.names.length;for(f=0;f<m;++f){d=Sk.mangleName(this.curClass,h.names[f]).v;d=Sk.fixReserved(d);n=this.cur.symFlags[d];if(n&10){if(n&2)throw new Sk.builtin.SyntaxError("name '"+d+"' is assigned to before global declaration",this.filename,h.lineno);throw new Sk.builtin.SyntaxError("name '"+d+
"' is used prior to global declaration",this.filename,h.lineno);}this.addDef(new Sk.builtin.str(d),1,h.lineno)}break;case Sk.astnodes.Expr:this.visitExpr(h.value);break;case Sk.astnodes.Pass:case Sk.astnodes.Break:case Sk.astnodes.Continue:case Sk.astnodes.Debugger:break;case Sk.astnodes.With:e(this.visit_withitem.bind(this),h.items);e(this.visitStmt.bind(this),h.body);break;case Sk.astnodes.Try:this.SEQStmt(h.body);this.visitExcepthandlers(h.handlers);this.SEQStmt(h.orelse);this.SEQStmt(h.finalbody);
break;default:Sk.asserts.fail("Unhandled type "+h.constructor.name+" in visitStmt")}};b.prototype.visit_withitem=function(h){this.visitExpr(h.context_expr);h.optional_vars&&this.visitExpr(h.optional_vars)};b.prototype.visitExpr=function(h){Sk.asserts.assert(void 0!==h,"visitExpr called with undefined");switch(h.constructor){case Sk.astnodes.BoolOp:this.SEQExpr(h.values);break;case Sk.astnodes.BinOp:this.visitExpr(h.left);this.visitExpr(h.right);break;case Sk.astnodes.UnaryOp:this.visitExpr(h.operand);
break;case Sk.astnodes.Lambda:this.addDef(new Sk.builtin.str("lambda"),2,h.lineno);h.args.defaults&&this.SEQExpr(h.args.defaults);this.enterBlock("lambda","function",h,h.lineno);this.visitArguments(h.args,h.lineno);this.visitExpr(h.body);this.exitBlock();break;case Sk.astnodes.IfExp:this.visitExpr(h.test);this.visitExpr(h.body);this.visitExpr(h.orelse);break;case Sk.astnodes.Dict:this.SEQExpr(h.keys);this.SEQExpr(h.values);break;case Sk.astnodes.DictComp:case Sk.astnodes.SetComp:this.visitComprehension(h.generators,
0);break;case Sk.astnodes.ListComp:this.newTmpname(h.lineno);this.visitExpr(h.elt);this.visitComprehension(h.generators,0);break;case Sk.astnodes.GeneratorExp:this.visitGenexp(h);break;case Sk.astnodes.YieldFrom:case Sk.astnodes.Yield:h.value&&this.visitExpr(h.value);this.cur.generator=!0;if(this.cur.returnsValue)throw new Sk.builtin.SyntaxError("'return' with argument inside generator",this.filename);break;case Sk.astnodes.Compare:this.visitExpr(h.left);this.SEQExpr(h.comparators);break;case Sk.astnodes.Call:this.visitExpr(h.func);
if(h.args)for(let f of h.args)f.constructor===Sk.astnodes.Starred?this.visitExpr(f.value):this.visitExpr(f);if(h.keywords)for(let f of h.keywords)this.visitExpr(f.value);break;case Sk.astnodes.Num:case Sk.astnodes.Str:case Sk.astnodes.Bytes:break;case Sk.astnodes.JoinedStr:for(let f of h.values)this.visitExpr(f);break;case Sk.astnodes.FormattedValue:this.visitExpr(h.value);h.format_spec&&this.visitExpr(h.format_spec);break;case Sk.astnodes.Attribute:this.visitExpr(h.value);break;case Sk.astnodes.Subscript:this.visitExpr(h.value);
this.visitSlice(h.slice);break;case Sk.astnodes.Name:this.addDef(h.id,h.ctx===Sk.astnodes.Load?8:2,h.lineno);break;case Sk.astnodes.NameConstant:break;case Sk.astnodes.List:case Sk.astnodes.Tuple:case Sk.astnodes.Set:this.SEQExpr(h.elts);break;case Sk.astnodes.Starred:this.visitExpr(h.value);break;case Sk.astnodes.Ellipsis:break;default:Sk.asserts.fail("Unhandled type "+h.constructor.name+" in visitExpr")}};b.prototype.visitComprehension=function(h,f){var n,d=h.length;for(n=f;n<d;++n)f=h[n],this.visitExpr(f.target),
this.visitExpr(f.iter),this.SEQExpr(f.ifs)};b.prototype.visitAlias=function(h,f){var n,d;for(d=0;d<h.length;++d){var m=h[d];var g=n=null===m.asname?m.name.v:m.asname.v;m=n.indexOf(".");-1!==m&&(g=n.substr(0,m));if("*"!==n)this.addDef(new Sk.builtin.str(g),1024,f);else if("module"!==this.cur.blockType)throw new Sk.builtin.SyntaxError("import * only allowed at module level",this.filename);}};b.prototype.visitGenexp=function(h){var f=h.generators[0];this.visitExpr(f.iter);this.enterBlock("genexpr","function",
h,h.lineno);this.cur.generator=!0;this.addDef(new Sk.builtin.str(".0"),4,h.lineno);this.visitExpr(f.target);this.SEQExpr(f.ifs);this.visitComprehension(h.generators,1);this.visitExpr(h.elt);this.exitBlock()};b.prototype.visitExcepthandlers=function(h){var f,n;for(f=0;n=h[f];++f)n.type&&this.visitExpr(n.type),n.name&&this.visitExpr(n.name),this.SEQStmt(n.body)};b.prototype.analyzeBlock=function(h,f,n,d){var m={};var g={},p={},k={},q={};"class"==h.blockType&&(l(p,d),f&&l(k,f));for(v in h.symFlags){var x=
h.symFlags[v];this.analyzeName(h,g,v,x,f,m,n,d)}"class"!==h.blockType&&("function"===h.blockType&&l(k,m),f&&l(k,f),l(p,d));m={};var v=h.children.length;for(x=0;x<v;++x)if(d=h.children[x],this.analyzeChildBlock(d,k,q,p,m),d.hasFree||d.childHasFree)h.childHasFree=!0;l(q,m);"function"===h.blockType&&this.analyzeCells(g,q);f=this.updateSymbols(h.symFlags,g,f,q,"class"===h.blockType);h.hasFree=h.hasFree||f;l(n,q)};b.prototype.analyzeChildBlock=function(h,f,n,d,m){var g={};l(g,f);f={};l(f,n);n={};l(n,d);
this.analyzeBlock(h,g,f,n);l(m,f)};b.prototype.analyzeCells=function(h,f){var n;for(n in h){var d=h[n];1===d&&void 0!==f[n]&&(h[n]=5,delete f[n])}};b.prototype.updateSymbols=function(h,f,n,d,m){var g,p=!1;for(g in h){var k=h[g];var q=f[g];k|=q<<11;h[g]=k}for(g in d)f=h[g],void 0!==f?m&&f&1031&&(f|=512,h[g]=f):void 0!==n[g]&&(h[g]=8192,p=!0);return p};b.prototype.analyzeName=function(h,f,n,d,m,g,p,k){if(d&1){if(d&4)throw new Sk.builtin.SyntaxError("name '"+n+"' is local and global",this.filename,h.lineno);
f[n]=2;k[n]=null;m&&void 0!==m[n]&&delete m[n]}else d&1030?(f[n]=1,g[n]=null,delete k[n]):m&&void 0!==m[n]?(f[n]=4,h.hasFree=!0,p[n]=null):(k&&void 0!==k[n]||!h.isNested||(h.hasFree=!0),f[n]=3)};b.prototype.analyze=function(){this.analyzeBlock(this.top,null,{},{})};Sk.symboltable=function(h,f){var n=new b(f);n.enterBlock("top","module",h,0);n.top=n.cur;for(f=0;f<h.body.length;++f)n.visitStmt(h.body[f]);n.exitBlock();n.analyze();return n};Sk.dumpSymtab=function(h){var f=function(m){return m?"True":
"False"},n=function(m){var g,p=[];for(g=0;g<m.length;++g)p.push((new Sk.builtin.str(m[g])).$r().v);return"["+p.join(", ")+"]"},d=function(m,g){var p,k;void 0===g&&(g="");var q=g+"Sym_type: "+m.get_type()+"\n";q+=g+"Sym_name: "+m.get_name()+"\n";q+=g+"Sym_lineno: "+m.get_lineno()+"\n";q+=g+"Sym_nested: "+f(m.is_nested())+"\n";q+=g+"Sym_haschildren: "+f(m.has_children())+"\n";"class"===m.get_type()?q+=g+"Class_methods: "+n(m.get_methods())+"\n":"function"===m.get_type()&&(q+=g+"Func_params: "+n(m.get_parameters())+
"\n",q+=g+"Func_locals: "+n(m.get_locals())+"\n",q+=g+"Func_globals: "+n(m.get_globals())+"\n",q+=g+"Func_frees: "+n(m.get_frees())+"\n");q+=g+"-- Identifiers --\n";var x=m.get_identifiers();var v=x.length;for(k=0;k<v;++k){var w=m.lookup(x[k]);q+=g+"name: "+w.get_name()+"\n";q+=g+"  is_referenced: "+f(w.is_referenced())+"\n";q+=g+"  is_imported: "+f(w.is_imported())+"\n";q+=g+"  is_parameter: "+f(w.is_parameter())+"\n";q+=g+"  is_global: "+f(w.is_global())+"\n";q+=g+"  is_declared_global: "+f(w.is_declared_global())+
"\n";q+=g+"  is_local: "+f(w.is_local())+"\n";q+=g+"  is_free: "+f(w.is_free())+"\n";q+=g+"  is_assigned: "+f(w.is_assigned())+"\n";q+=g+"  is_namespace: "+f(w.is_namespace())+"\n";var C=w.get_namespaces();var F=C.length;q+=g+"  namespaces: [\n";var L=[];for(p=0;p<F;++p)w=C[p],L.push(d(w,g+"    "));q+=L.join("\n");q+=g+"  ]\n"}return q};return d(h.top,"")};Sk.exportSymbol("Sk.symboltable",Sk.symboltable);Sk.exportSymbol("Sk.dumpSymtab",Sk.dumpSymtab)},function(G,V){function a(d,m,g,p,k){this.filename=
d;this.st=m;this.flags=g;this.canSuspend=p;this.interactive=!1;this.nestlevel=0;this.u=null;this.stack=[];this.result=[];this.allUnits=[];this.source=k?k.split("\n"):!1}function c(){this.name=this.ste=null;this.doesSuspend=this.canSuspend=!1;this.private_=null;this.lineno=this.firstlineno=0;this.linenoSet=!1;this.localnames=[];this.localtemps=[];this.tempsToSave=[];this.blocknum=0;this.blocks=[];this.curblock=0;this.consts={};this.scopename=null;this.suffixCode=this.switchCode=this.varDeclsCode=this.prefixCode=
"";this.breakBlocks=[];this.continueBlocks=[];this.exceptBlocks=[];this.finallyBlocks=[]}function b(d){return void 0===h[d]?d:d+"_$rw$"}function e(d,m){var g=m.v;if(null===d||null===g||"_"!==g.charAt(0)||"_"!==g.charAt(1)||"_"===g.charAt(g.length-1)&&"_"===g.charAt(g.length-2))return m;var p=d.v;p.replace(/_/g,"");if(""===p)return m;p=d.v;p.replace(/^_*/,"");return p=new Sk.builtin.str("_"+p+g)}var l,r=Sk.gensymcount=0;c.prototype.activateScope=function(){var d=this;l=function(){var m,g=d.blocks[d.curblock];
if(null===g._next)for(m=0;m<arguments.length;++m)g.push(arguments[m])}};a.prototype.getSourceLine=function(d){Sk.asserts.assert(this.source);return this.source[d-1]};a.prototype.annotateSource=function(d){var m;if(this.source){var g=d.lineno;var p=d.col_offset;l("\n//\n// line ",g,":\n// ",this.getSourceLine(g),"\n// ");for(m=0;m<p;++m)l(" ");l("^\n//\n");Sk.asserts.assert(void 0!==d.lineno&&void 0!==d.col_offset);l("$currLineNo = ",g,";\n$currColNo = ",p,";\n\n")}};a.prototype.gensym=function(d){return d=
"$"+(d||"")+r++};a.prototype.niceName=function(d){return this.gensym(d.replace("<","").replace(">","").replace(" ","_"))};var h=Sk.builtin.str.reservedWords_;const f=/_\$rw\$$/;a.prototype.makeConstant=function(d){var m,g="";for(m=0;m<arguments.length;++m)g+=arguments[m];for(p in this.u.consts)if(this.u.consts.hasOwnProperty(p)&&(m=this.u.consts[p],m==g))return p;var p=this.u.scopename+"."+this.gensym("const");this.u.consts[p]=g;return p};a.prototype._gr=function(d,m){var g,p=this.gensym(d);this.u.localtemps.push(p);
l("var ",p,"=");for(g=1;g<arguments.length;++g)l(arguments[g]);l(";");return p};a.prototype.outputInterruptTest=function(){var d="";if(null!==Sk.execLimit||null!==Sk.yieldLimit&&this.u.canSuspend)d+="var $dateNow = Date.now();",null!==Sk.execLimit&&(d+="if ($dateNow - Sk.execStart > Sk.execLimit) {throw new Sk.builtin.TimeoutError(Sk.timeoutMsg())}"),null!==Sk.yieldLimit&&this.u.canSuspend&&(d=d+"if (!$waking && ($dateNow - Sk.lastYield > Sk.yieldLimit)) {var $susp = $saveSuspension({data: {type: 'Sk.yield'}, resume: function() {}}, '"+
(this.filename+"',$currLineNo,$currColNo);"),d+="$susp.$blk = $blk;$susp.optional = true;return $susp;}$waking = false;",this.u.doesSuspend=!0);return d};a.prototype._jumpfalse=function(d,m){d=this._gr("jfalse","(",d,"===false||!Sk.misceval.isTrue(",d,"))");l("if(",d,"){/*test failed */$blk=",m,";continue;}")};a.prototype._jumpundef=function(d,m){l("if(",d,"===undefined){$blk=",m,";continue;}")};a.prototype._jumpnotundef=function(d,m){l("if(",d,"!==undefined){$blk=",m,";continue;}")};a.prototype._jumptrue=
function(d,m){d=this._gr("jtrue","(",d,"===true||Sk.misceval.isTrue(",d,"))");l("if(",d,"){/*test passed */$blk=",m,";continue;}")};a.prototype._jump=function(d){null===this.u.blocks[this.u.curblock]._next&&(l("$blk=",d,";"),this.u.blocks[this.u.curblock]._next=d)};a.prototype._checkSuspension=function(d){if(this.u.canSuspend){var m=this.newBlock("function return or resume suspension");this._jump(m);this.setBlock(m);d=d||{lineno:"$currLineNo",col_offset:"$currColNo"};l("if ($ret && $ret.$isSuspension) { return $saveSuspension($ret,'"+
this.filename+"',"+d.lineno+","+d.col_offset+"); }");this.u.doesSuspend=!0;this.u.tempsToSave=this.u.tempsToSave.concat(this.u.localtemps)}else l("if ($ret && $ret.$isSuspension) { $ret = Sk.misceval.retryOptionalSuspensionOrThrow($ret); }")};a.prototype.cunpackstarstoarray=function(d,m){if(!d||0==d.length)return"[]";let g=!1;for(let p of d){if(m&&g)throw new Sk.builtin.SyntaxError("Extended argument unpacking is not permitted in Python 2");p.constructor===Sk.astnodes.Starred&&(g=!0)}if(g){m=this._gr("unpack",
"[]");for(let p of d)p.constructor!==Sk.astnodes.Starred?l(m,".push(",this.vexpr(p),");"):(l("$ret = Sk.misceval.iterFor(Sk.abstr.iter(",this.vexpr(p.value),"), function(e) { ",m,".push(e); });"),this._checkSuspension());return m}return"["+d.map(p=>this.vexpr(p)).join(",")+"]"};a.prototype.cunpackkwstoarray=function(d,m){var g="undefined";if(d&&0<d.length){let p=!1;g=[];for(let k of d){if(p&&!Sk.__future__.python3)throw new SyntaxError("Advanced unpacking of function arguments is not supported in Python 2");
k.arg?(g.push("'"+k.arg.v+"'"),g.push(this.vexpr(k.value))):p=!0}g="["+g.join(",")+"]";if(p){g=this._gr("keywordArgs",g);for(let k of d)k.arg||(l("$ret = Sk.abstr.mappingUnpackIntoKeywordArray(",g,",",this.vexpr(k.value),",",m,");"),this._checkSuspension())}}return g};a.prototype.ctuplelistorset=function(d,m,g){var p;Sk.asserts.assert("tuple"===g||"list"===g||"set"===g);var k=!1;for(p=0;p<d.elts.length;p++)if(d.elts[p].constructor===Sk.astnodes.Starred){k=!0;var q=p;break}if(d.ctx===Sk.astnodes.Store){if(k){if(!Sk.__future__.python3)throw new Sk.builtin.SyntaxError("assignment unpacking with stars is not supported in Python 2",
this.filename,d.lineno);for(p=q+1;p<d.elts.length;p++)if(d.elts[p].constructor===Sk.astnodes.Starred)throw new Sk.builtin.SyntaxError("multiple starred expressions in assignment",this.filename,d.lineno);}g=k?q:d.elts.length;l("$ret = Sk.abstr.sequenceUnpack("+m+","+g+","+(k?d.elts.length-1:g)+", "+k+");");this._checkSuspension();m=this._gr("items","$ret");for(p=0;p<d.elts.length;++p)p===q?this.vexpr(d.elts[p].value,m+"["+p+"]"):this.vexpr(d.elts[p],m+"["+p+"]")}else if(d.ctx===Sk.astnodes.Load||"set"===
g){if(k){if(!Sk.__future__.python3)throw new Sk.builtin.SyntaxError("List packing with stars is not supported in Python 2");return this._gr("load"+g,"new Sk.builtins['",g,"'](",this.cunpackstarstoarray(d.elts),")")}if("tuple"===g){k=!0;m=[];for(p=0;p<d.elts.length;++p)q=this.vexpr(d.elts[p]),k&&-1==q.indexOf("$const")&&(k=!1),m.push(q);if(k)return this.makeConstant("new Sk.builtin.tuple(["+m+"])");for(p=0;p<m.length;++p)m[p]=this._gr("elem",m[p]);return this._gr("load"+g,"new Sk.builtins['",g,"']([",
m,"])")}m=[];for(p=0;p<d.elts.length;++p)m.push(this._gr("elem",this.vexpr(d.elts[p])));return this._gr("load"+g,"new Sk.builtins['",g,"']([",m,"])")}};a.prototype.csubdict=function(d,m,g){const p=[];for(;m<g;m++)p.push(this.vexpr(d.keys[m])),p.push(this.vexpr(d.values[m]));return this._gr("loaddict","new Sk.builtins['dict']([",p,"])")};a.prototype.cdict=function(d){let m=0;var g;const p=d.values?d.values.length:0;let k=0,q;for(let x=0;x<p;x++)(g=null===d.keys[x])?(k&&(g=this.csubdict(d,x-k,x),m?
l(q,".dict$merge(",g,");"):(q=g,m=1),k=0),0===m&&(q=this._gr("loaddict","new Sk.builtins.dict([])"),m=1),g=this.vexpr(d.values[x]),l("$ret = ",q,".dict$merge(",g,");"),this._checkSuspension(d)):k++;k&&(g=this.csubdict(d,p-k,p),m?l(q,".dict$merge(",g,");"):(q=g,m=1));0===m&&(q=this._gr("loaddict","new Sk.builtins.dict([])"));return q};a.prototype.clistcomp=function(d){Sk.asserts.assert(d instanceof Sk.astnodes.ListComp);var m=this._gr("_compr","new Sk.builtins['list']([])");return this.ccompgen("list",
m,d.generators,0,d.elt,null,d)};a.prototype.cdictcomp=function(d){Sk.asserts.assert(d instanceof Sk.astnodes.DictComp);var m=this._gr("_dcompr","new Sk.builtins.dict([])");return this.ccompgen("dict",m,d.generators,0,d.value,d.key,d)};a.prototype.csetcomp=function(d){Sk.asserts.assert(d instanceof Sk.astnodes.SetComp);var m=this._gr("_setcompr","new Sk.builtins.set([])");return this.ccompgen("set",m,d.generators,0,d.elt,null,d)};a.prototype.ccompgen=function(d,m,g,p,k,q,x){var v=this.newBlock(d+" comp start"),
w=this.newBlock(d+" comp skip"),C=this.newBlock(d+" comp anchor"),F=g[p],L=this.vexpr(F.iter);L=this._gr("iter","Sk.abstr.iter(",L,")");var z;this._jump(v);this.setBlock(v);l("$ret = Sk.abstr.iternext(",L,", true);");this._checkSuspension(x);L=this._gr("next","$ret");this._jumpundef(L,C);this.vexpr(F.target,L);var D=F.ifs?F.ifs.length:0;for(z=0;z<D;++z)L=this.vexpr(F.ifs[z]),this._jumpfalse(L,v);++p<g.length&&this.ccompgen(d,m,g,p,k,q,x);p>=g.length&&(g=this.vexpr(k),"dict"===d?(d=this.vexpr(q),l(m,
".mp$ass_subscript(",d,",",g,");")):"list"===d?l(m,".v.push(",g,");"):"set"===d&&l(m,".v.mp$ass_subscript(",g,", true);"),this._jump(w),this.setBlock(w));this._jump(v);this.setBlock(C);return m};a.prototype.cyield=function(d){if(this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock)throw new Sk.builtin.SyntaxError("'yield' outside function",this.filename,d.lineno);var m="Sk.builtin.none.none$";d.value&&(m=this.vexpr(d.value));d=this.newBlock("after yield");l("return [/*resume*/",d,",/*ret*/",m,"];");
this.setBlock(d);return"$gen.gi$sentvalue"};a.prototype.cyieldfrom=function(d){if(this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock)throw new Sk.builtin.SyntaxError("'yield' outside function",this.filename,d.lineno);var m=this.vexpr(d.value);m=this._gr("iter","Sk.abstr.iter(",m,")");l("$gen."+m+"=",m,";");var g=this.newBlock("after iter"),p=this.newBlock("after yield from");this._jump(g);this.setBlock(g);var k=this.gensym("retval");l(m,"=$gen.",m,";");l("var ",k,";");l("if ($gen.gi$sentvalue === Sk.builtin.none.none$ || "+
m+".constructor === Sk.builtin.generator) {");l("$ret=",m,".tp$iternext(true, $gen.gi$sentvalue);");l("} else {");var q=this.makeConstant("new Sk.builtin.str('send');");l("$ret=Sk.misceval.tryCatch(");l("function(){");l("return Sk.misceval.callsimOrSuspendArray(Sk.abstr.gattr(",m,",",q,"), [$gen.gi$sentvalue]);},");l("function (e) { ");l("if (e instanceof Sk.builtin.StopIteration) { ");l(m,".gi$ret = e.$value;");l("return undefined;");l("} else { throw e; }");l("}");l(");");l("}");this._checkSuspension(d);
l(k,"=$ret;");l("if(",k,"===undefined) {");l("$gen.gi$sentvalue=$gen."+m+".gi$ret;");l("$blk=",p,";continue;");l("}");l("return [/*resume*/",g,",/*ret*/",k,"];");this.setBlock(p);return"$gen.gi$sentvalue"};a.prototype.ccompare=function(d){var m;Sk.asserts.assert(d.ops.length===d.comparators.length);var g=this.vexpr(d.left);var p=d.ops.length;var k=this.newBlock("done");var q=this._gr("compareres","null");for(m=0;m<p;++m){var x=this.vexpr(d.comparators[m]);const v=d.ops[m];v===Sk.astnodes.Is?l("$ret = ",
g,"===",x,";"):v===Sk.astnodes.IsNot?l("$ret = ",g,"!==",x,";"):(l("$ret = Sk.misceval.richCompareBool(",g,",",x,",'",v.prototype._astname,"', true);"),this._checkSuspension(d));l(q,"=Sk.builtin.bool($ret);");this._jumpfalse("$ret",k);g=x}this._jump(k);this.setBlock(k);return q};a.prototype.ccall=function(d){var m=this.vexpr(d.func);let g=this.cunpackstarstoarray(d.args,!Sk.__future__.python3),p=this.cunpackkwstoarray(d.keywords,m);Sk.__future__.super_args&&d.func.id&&"super"===d.func.id.v&&"[]"===
g&&(this.u.tempsToSave.push("$sup"),l('if (typeof $sup === "undefined") { throw new Sk.builtin.RuntimeError("super(): no arguments") };'),g="[$gbl.__class__,$sup]");l("$ret = (",m,".tp$call)?",m,".tp$call(",g,",",p,") : Sk.misceval.applyOrSuspend(",m,",undefined,undefined,",p,",",g,");");this._checkSuspension(d);return this._gr("call","$ret")};a.prototype.cslice=function(d){Sk.asserts.assert(d instanceof Sk.astnodes.Slice);if(Sk.__future__.python3){var m=d.lower?this.vexpr(d.lower):"Sk.builtin.none.none$";
var g=d.upper?this.vexpr(d.upper):"Sk.builtin.none.none$"}else m=d.lower?this.vexpr(d.lower):d.step?"Sk.builtin.none.none$":"new Sk.builtin.int_(0)",g=d.upper?this.vexpr(d.upper):d.step?"Sk.builtin.none.none$":"new Sk.builtin.int_(2147483647)";d=d.step?this.vexpr(d.step):"Sk.builtin.none.none$";return this._gr("slice","new Sk.builtins['slice'](",m,",",g,",",d,")")};a.prototype.eslice=function(d){var m;Sk.asserts.assert(d instanceof Array);var g=[];for(m=0;m<d.length;m++)g.push(this.vslicesub(d[m]));
return this._gr("extslice","new Sk.builtins['tuple']([",g,"])")};a.prototype.vslicesub=function(d){switch(d.constructor){case Sk.astnodes.Index:var m=this.vexpr(d.value);break;case Sk.astnodes.Slice:m=this.cslice(d);break;case Sk.astnodes.Ellipsis:Sk.asserts.fail("todo compile.js Ellipsis;");break;case Sk.astnodes.ExtSlice:m=this.eslice(d.dims);break;default:Sk.asserts.fail("invalid subscript kind")}return m};a.prototype.vslice=function(d,m,g,p){d=this.vslicesub(d);return this.chandlesubscr(m,g,d,
p)};a.prototype.chandlesubscr=function(d,m,g,p){if(d===Sk.astnodes.Load||d===Sk.astnodes.AugLoad)return l("$ret = Sk.abstr.objectGetItem(",m,",",g,", true);"),this._checkSuspension(),this._gr("lsubscr","$ret");d===Sk.astnodes.Store||d===Sk.astnodes.AugStore?(l("$ret = Sk.abstr.objectSetItem(",m,",",g,",",p,", true);"),this._checkSuspension()):d===Sk.astnodes.Del?l("Sk.abstr.objectDelItem(",m,",",g,");"):Sk.asserts.fail("handlesubscr fail")};a.prototype.cboolop=function(d){var m,g;Sk.asserts.assert(d instanceof
Sk.astnodes.BoolOp);var p=d.op===Sk.astnodes.And?this._jumpfalse:this._jumptrue;var k=this.newBlock("end of boolop");var q=d.values;var x=q.length;for(m=0;m<x;++m)d=this.vexpr(q[m]),0===m&&(g=this._gr("boolopsucc",d)),l(g,"=",d,";"),p.call(this,d,k);this._jump(k);this.setBlock(k);return g};a.prototype.cjoinedstr=function(d){let m;Sk.asserts.assert(d instanceof Sk.astnodes.JoinedStr);for(let g of d.values)d=this.vexpr(g),m?l(m,"=",m,".sq$concat(",d,");"):m=this._gr("joinedstr",d);m||(m="Sk.builtin.str.$emptystr");
return m};a.prototype.cformattedvalue=function(d){let m=this.vexpr(d.value);switch(d.conversion){case "s":m=this._gr("value","new Sk.builtin.str(",m,")");break;case "a":m=this._gr("value","Sk.builtin.ascii(",m,")");break;case "r":m=this._gr("value","Sk.builtin.repr(",m,")")}d=d.format_spec?this.vexpr(d.format_spec):"Sk.builtin.str.$emptystr";return this._gr("formatted","Sk.abstr.objectFormat("+m+","+d+")")};a.prototype.vexpr=function(d,m,g,p){var k;d.lineno>this.u.lineno&&(this.u.lineno=d.lineno,
this.u.linenoSet=!1);switch(d.constructor){case Sk.astnodes.BoolOp:return this.cboolop(d);case Sk.astnodes.BinOp:return this._gr("binop","Sk.abstr.numberBinOp(",this.vexpr(d.left),",",this.vexpr(d.right),",'",d.op.prototype._astname,"')");case Sk.astnodes.UnaryOp:return this._gr("unaryop","Sk.abstr.numberUnaryOp(",this.vexpr(d.operand),",'",d.op.prototype._astname,"')");case Sk.astnodes.Lambda:return this.clambda(d);case Sk.astnodes.IfExp:return this.cifexp(d);case Sk.astnodes.Dict:return this.cdict(d);
case Sk.astnodes.ListComp:return this.clistcomp(d);case Sk.astnodes.DictComp:return this.cdictcomp(d);case Sk.astnodes.SetComp:return this.csetcomp(d);case Sk.astnodes.GeneratorExp:return this.cgenexp(d);case Sk.astnodes.Yield:return this.cyield(d);case Sk.astnodes.YieldFrom:return this.cyieldfrom(d);case Sk.astnodes.Compare:return this.ccompare(d);case Sk.astnodes.Call:return m=this.ccall(d),this.annotateSource(d),m;case Sk.astnodes.Num:if("number"===typeof d.n)return d.n;if(d.n instanceof Sk.builtin.lng)return this.makeConstant("new Sk.builtin.lng('"+
d.n.v.toString()+"')");if(d.n instanceof Sk.builtin.int_)return"number"===typeof d.n.v?this.makeConstant("new Sk.builtin.int_("+d.n.v+")"):this.makeConstant("new Sk.builtin.int_('"+d.n.v.toString()+"')");if(d.n instanceof Sk.builtin.float_)return d=0===d.n.v&&-Infinity===1/d.n.v?"-0":d.n.v,this.makeConstant("new Sk.builtin.float_("+d+")");if(d.n instanceof Sk.builtin.complex)return this.makeConstant("new Sk.builtin.complex("+(0===d.n.real&&-Infinity===1/d.n.real?"-0":d.n.real)+", "+(0===d.n.imag&&
-Infinity===1/d.n.imag?"-0":d.n.imag)+")");Sk.asserts.fail("unhandled Num type");case Sk.astnodes.Bytes:if(Sk.__future__.python3){m=[];d=d.s.$jsstr();for(g=0;g<d.length;g++)m.push(d.charCodeAt(g));return this.makeConstant("new Sk.builtin.bytes([",m.join(", "),"])")}case Sk.astnodes.Str:m=this.makeConstant;d=d.s.$jsstr();g='"';for(k=0;k<d.length;k++)p=d.charCodeAt(k),g=10==p?g+"\\n":92==p?g+"\\\\":34==p||32>p||127<=p&&256>p?g+("\\x"+("0"+p.toString(16)).substr(-2)):256<=p?g+("\\u"+("000"+p.toString(16)).substr(-4)):
g+d.charAt(k);d=g+'"';return m.call(this,"new Sk.builtin.str(",d,",true)");case Sk.astnodes.Attribute:d.ctx!==Sk.astnodes.AugLoad&&d.ctx!==Sk.astnodes.AugStore&&(k=this.vexpr(d.value));p=d.attr.$r().v;p=p.substring(1,p.length-1);p=e(this.u.private_,new Sk.builtin.str(p)).v;p=this.makeConstant("new Sk.builtin.str('"+p+"')");switch(d.ctx){case Sk.astnodes.AugLoad:return l("$ret = ",g,".tp$getattr(",p,", true);"),this._checkSuspension(d),l("\nif ($ret === undefined) {"),l("\nthrow new Sk.builtin.AttributeError(",
g,'.sk$attrError() + " has no attribute \'" + ',p,'.$jsstr() + "\'");'),l("\n};"),this._gr("lattr","$ret");case Sk.astnodes.Load:return l("$ret = ",k,".tp$getattr(",p,", true);"),this._checkSuspension(d),l("\nif ($ret === undefined) {"),l("\nthrow new Sk.builtin.AttributeError(",k,'.sk$attrError() + " has no attribute \'" + ',p,'.$jsstr() + "\'");'),l("\n};"),this._gr("lattr","$ret");case Sk.astnodes.AugStore:l("$ret = undefined;");l("if(",m,"!==undefined){");l("$ret = ",g,".tp$setattr(",p,",",m,
", true);");l("}");this._checkSuspension(d);break;case Sk.astnodes.Store:l("$ret = ",k,".tp$setattr(",p,",",m,", true);");this._checkSuspension(d);break;case Sk.astnodes.Del:l("$ret = ",k,".tp$setattr(",p,", undefined, true);");this._checkSuspension(d);break;default:Sk.asserts.fail("invalid attribute expression")}break;case Sk.astnodes.Subscript:switch(d.ctx){case Sk.astnodes.AugLoad:return l("$ret = Sk.abstr.objectGetItem(",g,",",p,", true);"),this._checkSuspension(d),this._gr("gitem","$ret");case Sk.astnodes.Load:case Sk.astnodes.Store:case Sk.astnodes.Del:return this.vslice(d.slice,
d.ctx,this.vexpr(d.value),m);case Sk.astnodes.AugStore:l("$ret=undefined;");l("if(",m,"!==undefined){");l("$ret=Sk.abstr.objectSetItem(",g,",",p,",",m,", true)");l("}");this._checkSuspension(d);break;default:Sk.asserts.fail("invalid subscript expression")}break;case Sk.astnodes.Name:return this.nameop(d.id,d.ctx,m);case Sk.astnodes.NameConstant:if(d.ctx===Sk.astnodes.Store||d.ctx===Sk.astnodes.AugStore||d.ctx===Sk.astnodes.Del)throw new Sk.builtin.SyntaxError("can not assign to a constant name");
switch(d.value){case Sk.builtin.none.none$:return"Sk.builtin.none.none$";case Sk.builtin.bool.true$:return"Sk.builtin.bool.true$";case Sk.builtin.bool.false$:return"Sk.builtin.bool.false$";default:Sk.asserts.fail("invalid named constant")}break;case Sk.astnodes.List:return this.ctuplelistorset(d,m,"list");case Sk.astnodes.Tuple:return this.ctuplelistorset(d,m,"tuple");case Sk.astnodes.Set:return this.ctuplelistorset(d,m,"set");case Sk.astnodes.Starred:switch(d.ctx){case Sk.astnodes.Store:throw new Sk.builtin.SyntaxError("starred assignment target must be in a list or tuple",
this.filename,d.lineno);default:throw new Sk.builtin.SyntaxError("can't use starred expression here",this.filename,d.lineno);}case Sk.astnodes.JoinedStr:return this.cjoinedstr(d);case Sk.astnodes.FormattedValue:return this.cformattedvalue(d);case Sk.astnodes.Ellipsis:return this.makeConstant("Sk.builtin.Ellipsis");default:Sk.asserts.fail("unhandled case "+d.constructor.name+" vexpr")}};a.prototype.vseqexpr=function(d,m){var g;Sk.asserts.assert(void 0===m||d.length===m.length);var p=[];for(g=0;g<d.length;++g)p.push(this.vexpr(d[g],
void 0===m?void 0:m[g]));return p};a.prototype.cannassign=function(d){var m=d.target;let g=d.value;g&&(g=this.vexpr(d.value),this.vexpr(m,g));switch(m.constructor){case Sk.astnodes.Name:!d.simple||this.u.ste.blockType!==Sk.SYMTAB_CONSTS.ClassBlock&&this.u.ste.blockType!=Sk.SYMTAB_CONSTS.ModuleBlock||(this.u.hasAnnotations=!0,d=this.vexpr(d.annotation),m=e(this.u.private_,m.id).v,m=this.makeConstant("new Sk.builtin.str('"+m+"')"),this.chandlesubscr(Sk.astnodes.Store,"$loc.__annotations__",m,d))}};
a.prototype.caugassign=function(d){Sk.asserts.assert(d instanceof Sk.astnodes.AugAssign);var m=d.target;switch(m.constructor){case Sk.astnodes.Attribute:var g=this.vexpr(m.value);m=new Sk.astnodes.Attribute(m.value,m.attr,Sk.astnodes.AugLoad,m.lineno,m.col_offset);var p=this.vexpr(m,void 0,g);var k=this.vexpr(d.value);d=this._gr("inplbinopattr","Sk.abstr.numberInplaceBinOp(",p,",",k,",'",d.op.prototype._astname,"')");m.ctx=Sk.astnodes.AugStore;return this.vexpr(m,d,g);case Sk.astnodes.Subscript:g=
this.vexpr(m.value);var q=this.vslicesub(m.slice);m=new Sk.astnodes.Subscript(m.value,q,Sk.astnodes.AugLoad,m.lineno,m.col_offset);p=this.vexpr(m,void 0,g,q);k=this.vexpr(d.value);d=this._gr("inplbinopsubscr","Sk.abstr.numberInplaceBinOp(",p,",",k,",'",d.op.prototype._astname,"')");m.ctx=Sk.astnodes.AugStore;return this.vexpr(m,d,g,q);case Sk.astnodes.Name:return g=this.nameop(m.id,Sk.astnodes.Load),k=this.vexpr(d.value),d=this._gr("inplbinop","Sk.abstr.numberInplaceBinOp(",g,",",k,",'",d.op.prototype._astname,
"')"),this.nameop(m.id,Sk.astnodes.Store,d);default:Sk.asserts.fail("unhandled case in augassign")}};a.prototype.exprConstant=function(d){switch(d.constructor){case Sk.astnodes.Num:return Sk.misceval.isTrue(d.n)?1:0;case Sk.astnodes.Str:return Sk.misceval.isTrue(d.s)?1:0;default:return-1}};a.prototype.newBlock=function(d){var m=this.u.blocknum++;this.u.blocks[m]=[];this.u.blocks[m]._name=d||"<unnamed>";this.u.blocks[m]._next=null;return m};a.prototype.setBlock=function(d){Sk.asserts.assert(0<=d&&
d<this.u.blocknum);this.u.curblock=d};a.prototype.pushBreakBlock=function(d){Sk.asserts.assert(0<=d&&d<this.u.blocknum);this.u.breakBlocks.push(d)};a.prototype.popBreakBlock=function(){this.u.breakBlocks.pop()};a.prototype.pushContinueBlock=function(d){Sk.asserts.assert(0<=d&&d<this.u.blocknum);this.u.continueBlocks.push(d)};a.prototype.popContinueBlock=function(){this.u.continueBlocks.pop()};a.prototype.pushExceptBlock=function(d){Sk.asserts.assert(0<=d&&d<this.u.blocknum);this.u.exceptBlocks.push(d)};
a.prototype.popExceptBlock=function(){this.u.exceptBlocks.pop()};a.prototype.pushFinallyBlock=function(d){Sk.asserts.assert(0<=d&&d<this.u.blocknum);Sk.asserts.assert(this.u.breakBlocks.length===this.u.continueBlocks.length);this.u.finallyBlocks.push({blk:d,breakDepth:this.u.breakBlocks.length})};a.prototype.popFinallyBlock=function(){this.u.finallyBlocks.pop()};a.prototype.peekFinallyBlock=function(){return 0<this.u.finallyBlocks.length?this.u.finallyBlocks[this.u.finallyBlocks.length-1]:void 0};
a.prototype.setupExcept=function(d){l("$exc.push(",d,");")};a.prototype.endExcept=function(){l("$exc.pop();")};a.prototype.outputLocals=function(d){var m,g={};for(m=0;d.argnames&&m<d.argnames.length;++m)g[d.argnames[m]]=!0;d.localnames.sort();var p=[];for(m=0;m<d.localnames.length;++m){var k=d.localnames[m];void 0===g[k]&&(p.push(k),g[k]=!0)}return 0<p.length?"var "+p.join(",")+"; /* locals */":""};a.prototype.outputSuspensionHelpers=function(d){var m,g=[],p=d.localnames.concat(d.tempsToSave),k={},
q=d.ste.blockType===Sk.SYMTAB_CONSTS.FunctionBlock&&d.ste.childHasFree,x=(0<p.length?"var "+p.join(",")+";":"")+"var $wakeFromSuspension = function() {var susp = "+d.scopename+".$wakingSuspension; "+d.scopename+".$wakingSuspension = undefined;$blk=susp.$blk; $loc=susp.$loc; $gbl=susp.$gbl; $exc=susp.$exc; $err=susp.$err; $postfinally=susp.$postfinally;$currLineNo=susp.$lineno; $currColNo=susp.$colno; Sk.lastYield=Date.now();"+(q?"$cell=susp.$cell;":"");for(m=0;m<p.length;m++){var v=p[m];void 0===
k[v]&&(x+=v+"=susp.$tmps."+v+";",k[v]=!0)}x+="try { $ret=susp.child.resume(); } catch(err) { if (!(err instanceof Sk.builtin.BaseException)) { err = new Sk.builtin.ExternalError(err); } err.traceback.push({lineno: $currLineNo, colno: $currColNo, filename: '"+this.filename+"'}); if($exc.length>0) { $err=err; $blk=$exc.pop(); } else { throw err; } }};";x+="var $saveSuspension = function($child, $filename, $lineno, $colno) {var susp = new Sk.misceval.Suspension(); susp.child=$child;susp.resume=function(){"+
d.scopename+".$wakingSuspension=susp; return "+d.scopename+"("+(d.ste.generator?"$gen":"")+"); };susp.data=susp.child.data;susp.$blk=$blk;susp.$loc=$loc;susp.$gbl=$gbl;susp.$exc=$exc;susp.$err=$err;susp.$postfinally=$postfinally;susp.$filename=$filename;susp.$lineno=$lineno;susp.$colno=$colno;susp.optional=susp.child.optional;"+(q?"susp.$cell=$cell;":"");k={};for(m=0;m<p.length;m++)v=p[m],void 0===k[v]&&(g.push('"'+v+'":'+v),k[v]=!0);return x+="susp.$tmps={"+g.join(",")+"};return susp;};"};a.prototype.outputAllUnits=
function(){var d,m,g="";for(m=0;m<this.allUnits.length;++m){var p=this.allUnits[m];g+=p.prefixCode;g+=this.outputLocals(p);p.doesSuspend&&(g+=this.outputSuspensionHelpers(p));g+=p.varDeclsCode;g+=p.switchCode;var k=p.blocks;var q=Object.create(null);for(d=0;d<k.length;++d){var x=d;if(!(x in q))for(;;)if(q[x]=!0,g+="case "+x+": /* --- "+k[x]._name+" --- */",g+=k[x].join(""),null!==k[x]._next)if(k[x]._next in q){g+="/* jump */ continue;";break}else g+="/* allowing case fallthrough */",x=k[x]._next;
else{g+="throw new Sk.builtin.SystemError('internal error: unterminated block');";break}}g+=p.suffixCode}return g};a.prototype.cif=function(d){var m;Sk.asserts.assert(d instanceof Sk.astnodes.If);var g=this.exprConstant(d.test);if(0===g)d.orelse&&0<d.orelse.length&&this.vseqstmt(d.orelse);else if(1===g)this.vseqstmt(d.body);else{var p=this.newBlock("end of if");d.orelse&&0<d.orelse.length&&(m=this.newBlock("next branch of if"));g=this.vexpr(d.test);d.orelse&&0<d.orelse.length?(this._jumpfalse(g,m),
this.vseqstmt(d.body),this._jump(p),this.setBlock(m),this.vseqstmt(d.orelse)):(this._jumpfalse(g,p),this.vseqstmt(d.body));this._jump(p);this.setBlock(p)}};a.prototype.cwhile=function(d){if(0===this.exprConstant(d.test))d.orelse&&this.vseqstmt(d.orelse);else{var m=this.newBlock("while test");this._jump(m);this.setBlock(m);if((Sk.debugging||Sk.killableWhile)&&this.u.canSuspend){var g=this.newBlock("debug breakpoint for line "+d.lineno);l("if (Sk.breakpoints('"+this.filename+"',"+d.lineno+","+d.col_offset+
")) {","var $susp = $saveSuspension({data: {type: 'Sk.delay'}, resume: function() {}}, '"+this.filename+"',"+d.lineno+","+d.col_offset+");","$susp.$blk = "+g+";","$susp.optional = true;","return $susp;","}");this._jump(g);this.setBlock(g);this.u.doesSuspend=!0}var p=this.newBlock("after while");var k=0<d.orelse.length?this.newBlock("while orelse"):null;g=this.newBlock("while body");this.annotateSource(d);this._jumpfalse(this.vexpr(d.test),k?k:p);this._jump(g);this.pushBreakBlock(p);this.pushContinueBlock(m);
this.setBlock(g);this.vseqstmt(d.body);this._jump(m);this.popContinueBlock();this.popBreakBlock();0<d.orelse.length&&(this.setBlock(k),this.vseqstmt(d.orelse),this._jump(p));this.setBlock(p)}};a.prototype.cfor=function(d){var m=this.newBlock("for start"),g=this.newBlock("for cleanup"),p=this.newBlock("for end");this.pushBreakBlock(p);this.pushContinueBlock(m);var k=this.vexpr(d.iter);if(this.u.ste.generator){var q="$loc."+this.gensym("iter");l(q,"=Sk.abstr.iter(",k,");")}else q=this._gr("iter","Sk.abstr.iter(",
k,")"),this.u.tempsToSave.push(q);this._jump(m);this.setBlock(m);l("$ret = Sk.abstr.iternext(",q,this.u.canSuspend?", true":", false",");");this._checkSuspension(d);q=this._gr("next","$ret");this._jumpundef(q,g);this.vexpr(d.target,q);(Sk.debugging||Sk.killableFor)&&this.u.canSuspend&&(q=this.newBlock("debug breakpoint for line "+d.lineno),l("if (Sk.breakpoints('"+this.filename+"',"+d.lineno+","+d.col_offset+")) {","var $susp = $saveSuspension({data: {type: 'Sk.delay'}, resume: function() {}}, '"+
this.filename+"',"+d.lineno+","+d.col_offset+");","$susp.$blk = "+q+";","$susp.optional = true;","return $susp;","}"),this._jump(q),this.setBlock(q),this.u.doesSuspend=!0);this.vseqstmt(d.body);this._jump(m);this.setBlock(g);this.popContinueBlock();this.popBreakBlock();this.vseqstmt(d.orelse);this._jump(p);this.setBlock(p)};a.prototype.craise=function(d){if(d.exc){var m=this._gr("exc",this.vexpr(d.exc)),g=this.newBlock("exception now instantiated"),p=this._gr("isclass",m+".prototype instanceof Sk.builtin.BaseException");
this._jumpfalse(p,g);d.inst?(p=this._gr("inst",this.vexpr(d.inst)),l("if(!(",p," instanceof Sk.builtin.tuple)) {",p,"= new Sk.builtin.tuple([",p,"]);","}"),l("$ret = Sk.misceval.callsimOrSuspendArray(",m,",",p,".v);")):l("$ret = Sk.misceval.callsimOrSuspend(",m,");");this._checkSuspension(d);l(m,"=$ret;");this._jump(g);this.setBlock(g);l("if (",m," instanceof Sk.builtin.BaseException) {throw ",m,";} else {throw new Sk.builtin.TypeError('exceptions must derive from BaseException');};")}else l("throw $err;")};
a.prototype.outputFinallyCascade=function(d){if(0==this.u.finallyBlocks.length)l("if($postfinally!==undefined) { if ($postfinally.returning) { return $postfinally.returning; } else { $blk=$postfinally.gotoBlock; $postfinally=undefined; continue; } }");else{var m=this.peekFinallyBlock();l("if($postfinally!==undefined) {","if ($postfinally.returning",m.breakDepth==d.breakDepth?"|| $postfinally.isBreak":"",") {","$blk=",m.blk,";continue;","} else {","$blk=$postfinally.gotoBlock;$postfinally=undefined;continue;",
"}","}")}};a.prototype.ctry=function(d){var m,g=d.handlers.length;if(d.finalbody){var p=this.newBlock("finalbody");var k=this.newBlock("finalexh");var q=this._gr("finally_reraise","undefined");this.u.tempsToSave.push(q);this.pushFinallyBlock(p);var x=this.peekFinallyBlock();this.setupExcept(k)}var v=[];for(m=0;m<g;++m)v.push(this.newBlock("except_"+m+"_"));var w=this.newBlock("unhandled");var C=this.newBlock("orelse");var F=this.newBlock("end");0!=v.length&&this.setupExcept(v[0]);this.vseqstmt(d.body);
0!=v.length&&this.endExcept();this._jump(C);for(m=0;m<g;++m){this.setBlock(v[m]);var L=d.handlers[m];if(!L.type&&m<g-1)throw new Sk.builtin.SyntaxError("default 'except:' must be last",this.filename,L.lineno);if(L.type){var z=this.vexpr(L.type);var D=m==g-1?w:v[m+1];z=this._gr("instance","Sk.misceval.isTrue(Sk.builtin.isinstance($err, ",z,"))");this._jumpfalse(z,D)}L.name&&this.vexpr(L.name,"$err");this.vseqstmt(L.body);this._jump(F)}this.setBlock(w);l("throw $err;");this.setBlock(C);this.vseqstmt(d.orelse);
this._jump(F);this.setBlock(F);d.finalbody&&(this.endExcept(),this._jump(p),this.setBlock(k),l(q,"=$err;"),this._jump(p),this.setBlock(p),this.popFinallyBlock(),this.vseqstmt(d.finalbody),l("if(",q,"!==undefined) { throw ",q,";}"),this.outputFinallyCascade(x))};a.prototype.cwith=function(d,m){var g=this.newBlock("withexh"),p=this.newBlock("withtidyup"),k=this.newBlock("withcarryon");var q=this._gr("mgr",this.vexpr(d.items[m].context_expr));l("$ret = Sk.abstr.lookupSpecial(",q,",Sk.builtin.str.$exit);");
this._checkSuspension(d);var x=this._gr("exit","$ret");this.u.tempsToSave.push(x);l("$ret = Sk.abstr.lookupSpecial(",q,",Sk.builtin.str.$enter);");this._checkSuspension(d);l("$ret = Sk.misceval.callsimOrSuspendArray($ret);");this._checkSuspension(d);q=this._gr("value","$ret");this.pushFinallyBlock(p);var v=this.u.finallyBlocks[this.u.finallyBlocks.length-1];this.setupExcept(g);d.items[m].optional_vars&&this.nameop(d.items[m].optional_vars.id,Sk.astnodes.Store,q);m+1<d.items.length?this.cwith(d,m+
1):this.vseqstmt(d.body);this.endExcept();this._jump(p);this.setBlock(g);l("$ret = Sk.misceval.applyOrSuspend(",x,",undefined,Sk.builtin.getExcInfo($err),undefined,[]);");this._checkSuspension(d);this._jumptrue("$ret",k);l("throw $err;");this.setBlock(p);this.popFinallyBlock();l("$ret = Sk.misceval.callsimOrSuspendArray(",x,",[Sk.builtin.none.none$,Sk.builtin.none.none$,Sk.builtin.none.none$]);");this._checkSuspension(d);this.outputFinallyCascade(v);this._jump(k);this.setBlock(k)};a.prototype.cassert=
function(d){var m=this.vexpr(d.test),g=this.newBlock("end");this._jumptrue(m,g);l("throw new Sk.builtin.AssertionError(",d.msg?this.vexpr(d.msg):"",");");this.setBlock(g)};a.prototype.cimportas=function(d,m,g){d=d.v;var p=d.indexOf("."),k=g;if(-1!==p)for(d=d.substr(p+1);-1!==p;)p=d.indexOf("."),g=-1!==p?d.substr(0,p):d,k=this._gr("lattr","Sk.abstr.gattr(",k,", new Sk.builtin.str('",g,"'))"),d=d.substr(p+1);return this.nameop(m,Sk.astnodes.Store,k)};a.prototype.cimport=function(d){var m,g=d.names.length;
for(m=0;m<g;++m){var p=d.names[m];l("$ret = Sk.builtin.__import__(",p.name.$r().v,",$gbl,$loc,[],",Sk.__future__.absolute_import?0:-1,");");this._checkSuspension(d);var k=this._gr("module","$ret");if(p.asname)this.cimportas(p.name,p.asname,k);else{var q=p.name;p=q.v.indexOf(".");-1!==p&&(q=new Sk.builtin.str(q.v.substr(0,p)));this.nameop(q,Sk.astnodes.Store,k)}}};a.prototype.cfromimport=function(d){var m,g=d.names.length;var p=[];var k=d.level;0!=k||Sk.__future__.absolute_import||(k=-1);for(m=0;m<
g;++m)p[m]="'"+d.names[m].name.v+"'";l("$ret = Sk.builtin.__import__(",d.module.$r().v,",$gbl,$loc,[",p,"],",k,");");this._checkSuspension(d);k=this._gr("module","$ret");for(m=0;m<g;++m){p=d.names[m];var q="'"+p.name.v+"'";if(0===m&&"*"===p.name.v){Sk.asserts.assert(1===g);l("Sk.importStar(",k,",$loc, $gbl);");break}var x=this._gr("item","Sk.abstr.gattr(",k,", new Sk.builtin.str(",q,"), undefined)");q=p.name;p.asname&&(q=p.asname);this.nameop(q,Sk.astnodes.Store,x)}};a.prototype.buildcodeobj=function(d,
m,g,p,k,q){var x=[],v,w=[],C=[],F=[],L=null,z=null;g&&(w=this.vseqexpr(g));p&&p.defaults&&(C=this.vseqexpr(p.defaults));g=this.cannotations(p,d.returns);p&&p.kw_defaults&&(F=p.kw_defaults.map(Q=>Q?this.vexpr(Q):"undefined"));p&&p.vararg&&(L=p.vararg);p&&p.kwarg&&(z=p.kwarg);var D=this.enterScope(m,d,d.lineno,this.canSuspend);var K=this.u.ste.generator;var R=this.u.ste.hasFree;var T=this.u.ste.childHasFree;var t=this.newBlock("codeobj entry");this.u.prefixCode="var "+D+"=(function "+this.niceName(m.v)+
"$(";var y=[];if(K){if(z)throw new Sk.builtin.SyntaxError(m.v+"(): keyword arguments in generators not supported",this.filename,d.lineno);if(L)throw new Sk.builtin.SyntaxError(m.v+"(): variable number of arguments in generators not supported",this.filename,d.lineno);y.push("$gen")}else{z&&(y.push("$kwa"),this.u.tempsToSave.push("$kwa"));for(v=0;p&&v<p.args.length;++v)y.push(this.nameop(p.args[v].arg,Sk.astnodes.Param));for(v=0;p&&p.kwonlyargs&&v<p.kwonlyargs.length;++v)y.push(this.nameop(p.kwonlyargs[v].arg,
Sk.astnodes.Param));L&&y.push(this.nameop(p.vararg.arg,Sk.astnodes.Param))}let E=!K;R&&(E||y.push("$free"),this.u.tempsToSave.push("$free"));this.u.prefixCode=E?this.u.prefixCode+"$posargs,$kwargs":this.u.prefixCode+y.join(",");this.u.prefixCode+="){";K&&(this.u.prefixCode+="\n// generator\n");R&&(this.u.prefixCode+="\n// has free\n");T&&(this.u.prefixCode+="\n// has cell\n");E&&(this.u.prefixCode+="\n// fast call\n");var J="{}";K&&(t="$gen.gi$resumeat",J="$gen.gi$locals");v=",$cell={}";T&&K&&(v=
",$cell=$gen.gi$cells");this.u.varDeclsCode+="var $blk="+t+",$exc=[],$loc="+J+v+",$gbl="+(E?"this && this.func_globals":"this")+(E&&R?",$free=this && this.func_closure":"")+",$err=undefined,$ret=undefined,$postfinally=undefined,$currLineNo=undefined,$currColNo=undefined;";null!==Sk.execLimit&&(this.u.varDeclsCode+="if (typeof Sk.execStart === 'undefined') {Sk.execStart = Date.now()}");null!==Sk.yieldLimit&&this.u.canSuspend&&(this.u.varDeclsCode+="if (typeof Sk.lastYield === 'undefined') {Sk.lastYield = Date.now()}");
this.u.varDeclsCode+="var $waking=false; if ("+D+".$wakingSuspension!==undefined) { $wakeFromSuspension(); $waking=true; } else {";if(E){this.u.varDeclsCode=z||L||p&&p.kwonlyargs&&0!==p.kwonlyargs.length?this.u.varDeclsCode+"\nvar $args = this.$resolveArgs($posargs,$kwargs)\n":this.u.varDeclsCode+("var $args = ((!$kwargs || $kwargs.length===0) && $posargs.length==="+y.length+") ? $posargs : this.$resolveArgs($posargs,$kwargs)");for(v=0;v<y.length;v++)this.u.varDeclsCode+=","+y[v]+"=$args["+v+"]";
if(v=y[z?1:0])this.u.varDeclsCode+=`,$sup=${v}`;this.u.varDeclsCode+=";\n"}if(K&&0<C.length)for(t=p.args.length-C.length,v=0;v<C.length;++v)y=this.nameop(p.args[v+t].arg,Sk.astnodes.Param),this.u.varDeclsCode+="if("+y+"===undefined)"+y+"="+D+".$defaults["+v+"];";for(v=0;p&&v<p.args.length;++v)y=p.args[v].arg,this.isCell(y)&&(y=b(e(this.u.private_,y).v),this.u.varDeclsCode+="$cell."+y+"="+y+";");for(v=0;p&&p.kwonlyargs&&v<p.kwonlyargs.length;++v)y=p.kwonlyargs[v].arg,this.isCell(y)&&(y=b(e(this.u.private_,
y).v),this.u.varDeclsCode+="$cell."+y+"="+y+";");L&&this.isCell(L.arg)&&(v=b(e(this.u.private_,L.arg).v),this.u.varDeclsCode+="$cell."+v+"="+v+";");z&&(this.u.localnames.push(z.arg.v),this.u.varDeclsCode+=z.arg.v+"=new Sk.builtins['dict']($kwa);",this.isCell(z.arg)&&(v=b(e(this.u.private_,z.arg).v),this.u.varDeclsCode+="$cell."+v+"="+v+";"));this.u.varDeclsCode+="}";Sk.__future__.python3&&q&&(this.u.varDeclsCode+="$gbl.__class__=$gbl."+q.v+";");this.u.switchCode="while(true){try{";this.u.switchCode+=
this.outputInterruptTest();this.u.switchCode+="switch($blk){";this.u.suffixCode="} }catch(err){ if (!(err instanceof Sk.builtin.BaseException)) { err = new Sk.builtin.ExternalError(err); } err.traceback.push({lineno: $currLineNo, colno: $currColNo, filename: '"+this.filename+"'}); if ($exc.length>0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }} }});";k.call(this,D);if(p){for(let Q of p.args)x.push(Q.arg.v);for(let Q of p.kwonlyargs||[])x.push(Q.arg.v);this.u.argnames=x}this.exitScope();
0<C.length&&l(D,".$defaults=[",C.join(","),"];");p&&p.kwonlyargs&&0<p.kwonlyargs.length&&(l(D,".co_argcount=",p.args.length,";"),l(D,".co_kwonlyargcount=",p.kwonlyargs.length,";"),l(D,".$kwdefs=[",F.join(","),"];"));0<x.length?l(D,".co_varnames=['",x.join("','"),"'];"):l(D,".co_varnames=[];");l(D,".co_docstring=",this.cDocstringOfCode(d),";");z&&l(D,".co_kwargs=1;");L&&l(D,".co_varargs=1;");K||l(D,".co_fastcall=1;");d="";R&&(d=",$cell",(k=this.u.ste.hasFree)&&(d+=",$free"));if(K)return p&&0<p.args.length?
this._gr("gener","new Sk.builtins['function']((function(){var $origargs=Array.prototype.slice.call(arguments);Sk.builtin.pyCheckArgsLen(\"",m.v,'",arguments.length,',p.args.length-C.length,",",p.args.length,");return new Sk.builtins['generator'](",D,",$gbl,$origargs",d,");}))"):this._gr("gener","new Sk.builtins['function']((function(){Sk.builtin.pyCheckArgsLen(\"",m.v,"\",arguments.length,0,0);return new Sk.builtins['generator'](",D,",$gbl,[]",d,");}))");if(0<w.length){l("$ret = new Sk.builtins['function'](",
D,",$gbl",d,");");for(let Q of w.reverse())l("$ret = Sk.misceval.callsimOrSuspendArray(",Q,",[$ret]);"),this._checkSuspension();m=this._gr("funcobj","$ret")}else m=this._gr("funcobj","new Sk.builtins['function'](",D,",$gbl",d,")");g&&l(m,".func_annotations=",g,";");return m};a.prototype.cargannotation=function(d,m,g){m&&(d=e(this.u.private_,d).v,g.push(`'${d}'`),g.push(this.vexpr(m)))};a.prototype.cargannotations=function(d,m){if(d)for(let g=0;g<d.length;g++){const p=d[g];this.cargannotation(p.arg,
p.annotation,m)}};const n=new Sk.builtin.str("return");a.prototype.cannotations=function(d,m){const g=[];d&&(this.cargannotations(d.posonlyargs,g),this.cargannotations(d.args,g),d.vararg&&d.vararg.annotation&&this.cargannotation(d.vararg.arg,d.vararg.annotation,g),this.cargannotations(d.kwonlyargs,g),d.kwarg&&d.kwarg.annotation&&this.cargannotation(d.kwarg.arg,d.kwarg.annotation,g));m&&this.cargannotation(n,m,g);if(0!==g.length)return"["+g.join(",")+"]"};a.prototype.maybeCDocstringOfBody=function(d){if(0===
d.length)return null;d=d[0];if(d.constructor!==Sk.astnodes.Expr)return null;d=d.value;return d.constructor!==Sk.astnodes.Str?null:this.vexpr(d)};a.prototype.cDocstringOfCode=function(d){switch(d.constructor){case Sk.astnodes.AsyncFunctionDef:case Sk.astnodes.FunctionDef:return this.maybeCDocstringOfBody(d.body)||"Sk.builtin.none.none$";case Sk.astnodes.Lambda:case Sk.astnodes.GeneratorExp:return"Sk.builtin.none.none$";default:Sk.asserts.fail(`unexpected node kind ${d.constructor.name}`)}};a.prototype.cfunction=
function(d,m){Sk.asserts.assert(d instanceof Sk.astnodes.FunctionDef);m=this.buildcodeobj(d,d.name,d.decorator_list,d.args,function(g){this.vseqstmt(d.body);l("return Sk.builtin.none.none$;")},m);this.nameop(d.name,Sk.astnodes.Store,m)};a.prototype.clambda=function(d){Sk.asserts.assert(d instanceof Sk.astnodes.Lambda);return this.buildcodeobj(d,new Sk.builtin.str("<lambda>"),null,d.args,function(m){m=this.vexpr(d.body);l("return ",m,";")})};a.prototype.cifexp=function(d){var m=this.newBlock("next of ifexp"),
g=this.newBlock("end of ifexp"),p=this._gr("res","null"),k=this.vexpr(d.test);this._jumpfalse(k,m);l(p,"=",this.vexpr(d.body),";");this._jump(g);this.setBlock(m);l(p,"=",this.vexpr(d.orelse),";");this._jump(g);this.setBlock(g);return p};a.prototype.cgenexpgen=function(d,m,g){var p=this.newBlock("start for "+m),k=this.newBlock("skip for "+m);this.newBlock("if cleanup for "+m);var q=this.newBlock("end for "+m),x=d[m];if(0===m)var v="$loc.$iter0";else{var w=this.vexpr(x.iter);v="$loc."+this.gensym("iter");
l(v,"=","Sk.abstr.iter(",w,");")}this._jump(p);this.setBlock(p);this.annotateSource(g);l("$ret = Sk.abstr.iternext(",v,this.u.canSuspend?", true":", false",");");this._checkSuspension(g);w=this._gr("next","$ret");this._jumpundef(w,q);this.vexpr(x.target,w);var C=x.ifs?x.ifs.length:0;for(v=0;v<C;++v)this.annotateSource(x.ifs[v]),w=this.vexpr(x.ifs[v]),this._jumpfalse(w,p);++m<d.length&&this.cgenexpgen(d,m,g);m>=d.length&&(this.annotateSource(g),d=this.vexpr(g),l("return [",k,"/*resume*/,",d,"/*ret*/];"),
this.setBlock(k));this._jump(p);this.setBlock(q);1===m&&l("return Sk.builtin.none.none$;")};a.prototype.cgenexp=function(d){var m=this.buildcodeobj(d,new Sk.builtin.str("<genexpr>"),null,null,function(g){this.cgenexpgen(d.generators,0,d.elt)});m=this._gr("gener","Sk.misceval.callsimArray(",m,");");l(m,".gi$locals.$iter0=Sk.abstr.iter(",this.vexpr(d.generators[0].iter),");");return m};a.prototype.cclass=function(d){Sk.asserts.assert(d instanceof Sk.astnodes.ClassDef);var m=this.vseqexpr(d.decorator_list);
var g=this.vseqexpr(d.bases);let p=this.cunpackkwstoarray(d.keywords);var k=this.enterScope(d.name,d,d.lineno);var q=this.newBlock("class entry");this.u.prefixCode="var "+k+"=(function $"+d.name.v+"$class_outer($globals,$locals,$cell){var $gbl=$globals,$loc=$locals,$free=$globals;";this.u.switchCode+="(function $"+d.name.v+"$_closure($cell){";this.u.switchCode+="var $blk="+q+",$exc=[],$ret=undefined,$postfinally=undefined,$currLineNo=undefined,$currColNo=undefined;";null!==Sk.execLimit&&(this.u.switchCode+=
"if (typeof Sk.execStart === 'undefined') {Sk.execStart = Date.now()}");null!==Sk.yieldLimit&&this.u.canSuspend&&(this.u.switchCode+="if (typeof Sk.lastYield === 'undefined') {Sk.lastYield = Date.now()}");this.u.switchCode+="while(true){try{";this.u.switchCode+=this.outputInterruptTest();this.u.switchCode+="switch($blk){";this.u.suffixCode="}}catch(err){ if (!(err instanceof Sk.builtin.BaseException)) { err = new Sk.builtin.ExternalError(err); } err.traceback.push({lineno: $currLineNo, colno: $currColNo, filename: '"+
this.filename+"'}); if ($exc.length>0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }}}";this.u.suffixCode+="}).call(null, $cell);});";this.u.private_=d.name;this.cbody(d.body,d.name);l("return;");this.exitScope();l("$ret = Sk.misceval.buildClass($gbl,",k,",",d.name.$r().v,",[",g,"], $cell, ",p,");");this._checkSuspension();for(let x of m.reverse())l("$ret = Sk.misceval.callsimOrSuspendArray(",x,", [$ret]);"),this._checkSuspension();this.nameop(d.name,Sk.astnodes.Store,"$ret")};a.prototype.ccontinue=
function(d){var m=this.peekFinallyBlock();if(0==this.u.continueBlocks.length)throw new Sk.builtin.SyntaxError("'continue' outside loop",this.filename,d.lineno);d=this.u.continueBlocks[this.u.continueBlocks.length-1];Sk.asserts.assert(this.u.breakBlocks.length===this.u.continueBlocks.length);m&&m.breakDepth==this.u.continueBlocks.length?l("$postfinally={isBreak:true,gotoBlock:",d,"};"):this._jump(d)};a.prototype.cbreak=function(d){var m=this.peekFinallyBlock();if(0===this.u.breakBlocks.length)throw new Sk.builtin.SyntaxError("'break' outside loop",
this.filename,d.lineno);d=this.u.breakBlocks[this.u.breakBlocks.length-1];m&&m.breakDepth==this.u.breakBlocks.length?l("$postfinally={isBreak:true,gotoBlock:",d,"};"):this._jump(d)};a.prototype.vstmt=function(d,m){this.u.lineno=d.lineno;this.u.linenoSet=!1;this.u.localtemps=[];if(Sk.debugging&&this.u.canSuspend){var g=this.newBlock("debug breakpoint for line "+d.lineno);l("if (Sk.breakpoints('"+this.filename+"',"+d.lineno+","+d.col_offset+")) {","var $susp = $saveSuspension({data: {type: 'Sk.debug'}, resume: function() {}}, '"+
this.filename+"',"+d.lineno+","+d.col_offset+");","$susp.$blk = "+g+";","$susp.optional = true;","return $susp;","}");this._jump(g);this.setBlock(g);this.u.doesSuspend=!0}this.annotateSource(d);switch(d.constructor){case Sk.astnodes.FunctionDef:this.cfunction(d,m);break;case Sk.astnodes.ClassDef:this.cclass(d);break;case Sk.astnodes.Return:if(this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock)throw new Sk.builtin.SyntaxError("'return' outside function",this.filename,d.lineno);g=d.value?this.vexpr(d.value):
"Sk.builtin.none.none$";0==this.u.finallyBlocks.length?l("return ",g,";"):(l("$postfinally={returning:",g,"};"),this._jump(this.peekFinallyBlock().blk));break;case Sk.astnodes.Delete:this.vseqexpr(d.targets);break;case Sk.astnodes.Assign:var p=d.targets.length;g=this.vexpr(d.value);for(m=0;m<p;++m)this.vexpr(d.targets[m],g);break;case Sk.astnodes.AnnAssign:return this.cannassign(d);case Sk.astnodes.AugAssign:return this.caugassign(d);case Sk.astnodes.Print:this.cprint(d);break;case Sk.astnodes.For:return this.cfor(d);
case Sk.astnodes.While:return this.cwhile(d);case Sk.astnodes.If:return this.cif(d);case Sk.astnodes.Raise:return this.craise(d);case Sk.astnodes.Try:return this.ctry(d);case Sk.astnodes.With:return this.cwith(d,0);case Sk.astnodes.Assert:return this.cassert(d);case Sk.astnodes.Import:return this.cimport(d);case Sk.astnodes.ImportFrom:return this.cfromimport(d);case Sk.astnodes.Global:break;case Sk.astnodes.Expr:this.vexpr(d.value);break;case Sk.astnodes.Pass:break;case Sk.astnodes.Break:this.cbreak(d);
break;case Sk.astnodes.Continue:this.ccontinue(d);break;case Sk.astnodes.Debugger:l("debugger;");break;default:Sk.asserts.fail("unhandled case in vstmt: "+JSON.stringify(d))}};a.prototype.vseqstmt=function(d){var m;for(m=0;m<d.length;++m)this.vstmt(d[m])};a.prototype.isCell=function(d){d=b(e(this.u.private_,d).v);return this.u.ste.getScope(d)===Sk.SYMTAB_CONSTS.CELL};a.prototype.nameop=function(d,m,g){if((m===Sk.astnodes.Store||m===Sk.astnodes.AugStore||m===Sk.astnodes.Del)&&"__debug__"===d.v)throw new Sk.builtin.SyntaxError("can not assign to __debug__",
this.filename,this.u.lineno);Sk.asserts.assert("None"!==d.v);if("NotImplemented"===d.v)return"Sk.builtin.NotImplemented.NotImplemented$";var p=e(this.u.private_,d).v;p=b(p);var k=3;var q=this.u.ste.getScope(p);var x=null;switch(q){case Sk.SYMTAB_CONSTS.FREE:x="$free";k=2;break;case Sk.SYMTAB_CONSTS.CELL:x="$cell";k=2;break;case Sk.SYMTAB_CONSTS.LOCAL:this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock||this.u.ste.generator||(k=0);break;case Sk.SYMTAB_CONSTS.GLOBAL_IMPLICIT:this.u.ste.blockType===
Sk.SYMTAB_CONSTS.FunctionBlock&&(k=1);break;case Sk.SYMTAB_CONSTS.GLOBAL_EXPLICIT:k=1}Sk.asserts.assert(q||"_"===d.v.charAt(1));d=p;this.u.ste.generator||this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock?p="$loc."+p:(0===k||3===k)&&this.u.localnames.push(p);switch(k){case 0:switch(m){case Sk.astnodes.Load:case Sk.astnodes.Param:return l("if (",p," === undefined) { throw new Sk.builtin.UnboundLocalError('local variable \\'",p,"\\' referenced before assignment'); }\n"),p;case Sk.astnodes.Store:l(p,
"=",g,";");break;case Sk.astnodes.Del:l("delete ",p,";");break;default:Sk.asserts.fail("unhandled")}break;case 3:switch(m){case Sk.astnodes.Load:return this._gr("loadname",p,"!==undefined?",p,":Sk.misceval.loadname('",d,"',$gbl);");case Sk.astnodes.Store:l(p,"=",g,";");break;case Sk.astnodes.Del:l("delete ",p,";");break;case Sk.astnodes.Param:return p;default:Sk.asserts.fail("unhandled")}break;case 1:switch(m){case Sk.astnodes.Load:return this._gr("loadgbl","Sk.misceval.loadname('",d,"',$gbl)");case Sk.astnodes.Store:l("$gbl.",
d,"=",g,";");break;case Sk.astnodes.Del:l("delete $gbl.",d);break;default:Sk.asserts.fail("unhandled case in name op_global")}break;case 2:switch(m){case Sk.astnodes.Load:return x+"."+d;case Sk.astnodes.Store:l(x,".",d,"=",g,";");break;case Sk.astnodes.Param:return d;default:Sk.asserts.fail("unhandled case in name op_deref")}break;default:Sk.asserts.fail("unhandled case")}};a.prototype.enterScope=function(d,m,g,p){var k=new c;k.ste=this.st.getStsForAst(m);k.name=d;k.firstlineno=g;k.canSuspend=p||
!1;this.u&&this.u.private_&&(k.private_=this.u.private_);this.stack.push(this.u);this.allUnits.push(k);d=this.gensym("scope");k.scopename=d;this.u=k;this.u.activateScope();this.nestlevel++;return d};a.prototype.exitScope=function(){var d=this.u;this.nestlevel--;(this.u=0<=this.stack.length-1?this.stack.pop():null)&&this.u.activateScope();if("<module>"!==d.name.v){var m=d.name.$r().v;m=m.substring(1,m.length-1);l(d.scopename,".co_name=new Sk.builtins['str']('",m,"');");this.stack.length&&"class"==
this.u.ste.blockType&&l(d.scopename,".co_qualname=new Sk.builtins['str']('"+this.u.name.v+"."+m+"');")}for(var g in d.consts)d.consts.hasOwnProperty(g)&&(d.suffixCode+=g+" = "+d.consts[g]+";")};a.prototype.cbody=function(d,m){var g=0;const p=this.maybeCDocstringOfBody(d);null!==p&&(l("$loc.__doc__ = ",p,";"),g=1);for(;g<d.length;++g)this.vstmt(d[g],m);this.u.hasAnnotations&&(this.u.varDeclsCode+="$loc.__annotations__ || ($loc.__annotations__ = new Sk.builtin.dict());")};a.prototype.cprint=function(d){var m;
Sk.asserts.assert(d instanceof Sk.astnodes.Print);d.dest&&this.vexpr(d.dest);var g=d.values.length;for(m=0;m<g;++m)l("$ret = Sk.misceval.print_(","new Sk.builtins['str'](",this.vexpr(d.values[m]),").v);"),this._checkSuspension(d);d.nl&&(l("$ret = Sk.misceval.print_(",'"\\n");'),this._checkSuspension(d))};a.prototype.cmod=function(d){var m=this.enterScope(new Sk.builtin.str("<module>"),d,0,this.canSuspend),g=this.newBlock("module entry");this.u.prefixCode="var "+m+"=(function($forcegbl, $forceloc){";
this.u.varDeclsCode="var $gbl = $forcegbl || {}, $blk="+g+",$exc=[],$loc=$forceloc || $gbl,$cell={},$err=undefined;var $ret=undefined,$postfinally=undefined,$currLineNo=undefined,$currColNo=undefined;";null!==Sk.execLimit&&(this.u.varDeclsCode+="if (typeof Sk.execStart === 'undefined') {Sk.execStart = Date.now()}");null!==Sk.yieldLimit&&this.u.canSuspend&&(this.u.varDeclsCode+="if (typeof Sk.lastYield === 'undefined') {Sk.lastYield = Date.now()}");this.u.varDeclsCode+="var $waking=false; if ("+m+
".$wakingSuspension!==undefined) { $wakeFromSuspension(); $waking=true; }if (Sk.retainGlobals) {    if (Sk.globals) { $gbl = Sk.globals; Sk.globals = $gbl; $loc = $gbl; }    else { Sk.globals = $gbl; }} else { Sk.globals = $gbl; }";this.u.switchCode="while(true){try{";this.u.switchCode+=this.outputInterruptTest();this.u.switchCode+="switch($blk){";this.u.suffixCode="}";this.u.suffixCode+="}catch(err){ if (!(err instanceof Sk.builtin.BaseException)) { err = new Sk.builtin.ExternalError(err); } err.traceback.push({lineno: $currLineNo, colno: $currColNo, filename: '"+
this.filename+"'}); if ($exc.length>0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }} } });";switch(d.constructor){case Sk.astnodes.Module:this.cbody(d.body);l("return $loc;");break;default:Sk.asserts.fail("todo; unhandled case in compilerMod")}this.exitScope();this.result.push(this.outputAllUnits());return m};Sk.compile=function(d,m,g,p){g=Sk.__future__;Sk.__future__=Object.create(Sk.__future__);var k=Sk.parse(m,d),q=Sk.astFromParse(k.cst,m,k.flags);k=k.flags;var x=Sk.symboltable(q,
m);d=new a(m,x,k,p,d);p=d.cmod(q);Sk.__future__=g;return{funcname:"$compiledmod",code:`var $compiledmod = function() {${d.result.join("")}\nreturn ${p};}();\n$compiledmod;`,filename:m}};Sk.exportSymbol("Sk.compile",Sk.compile);Sk.resetCompiler=function(){r=0};Sk.exportSymbol("Sk.resetCompiler",Sk.resetCompiler);Sk.fixReserved=b;Sk.exportSymbol("Sk.fixReserved",Sk.fixReserved);Sk.unfixReserved=function(d){return d.replace(f,"")};Sk.exportSymbol("Sk.unfixReserved",Sk.unfixReserved);Sk.mangleName=e;
Sk.exportSymbol("Sk.mangleName",Sk.mangleName);Sk.reservedWords_=h;Sk.exportSymbol("Sk.reservedWords_",Sk.reservedWords_)},function(G,V){Sk.sysmodules=new Sk.builtin.dict([]);Sk.realsyspath=void 0;Sk.importSearchPathForName=function(a,c,b){var e=a.replace(/\./g,"/"),l=function(r,h){return Sk.misceval.chain(Sk.misceval.tryCatch(function(){return Sk.read(r)},function(f){}),function(f){if(void 0!==f)return new Sk.misceval.Break({filename:r,code:f,packagePath:h})})};void 0===b&&(b=Sk.realsyspath);return Sk.misceval.iterFor(b.tp$iter(),
function(r){return Sk.misceval.chain(l(r.v+"/"+e+c,!1),function(h){return h?h:l(r.v+"/"+e+"/__init__"+c,r.v+"/"+e)})})};Sk.importSetUpPath=function(a){if(!Sk.realsyspath){var c=[new Sk.builtin.str("src/builtin"),new Sk.builtin.str("src/lib"),new Sk.builtin.str(".")];for(a=0;a<Sk.syspath.length;++a)c.push(new Sk.builtin.str(Sk.syspath[a]));Sk.realsyspath=new Sk.builtin.list(c)}};Sk.importModuleInternal_=function(a,c,b,e,l,r,h){var f,n,d,m,g=null,p=void 0!==l?l.tp$getattr(Sk.builtin.str.$name):void 0,
k=void 0!==p?p.v+".":"",q=void 0!==l?l.tp$getattr(Sk.builtin.str.$path):void 0;Sk.importSetUpPath(h);if(l&&!p){if(r)return;throw new Sk.builtin.ValueError("Attempted to import relative to invalid package (no name)");}void 0===b&&(b=k+a);var x=a.split(".");if(1<x.length){var v=x.slice(0,x.length-1).join(".");g=Sk.importModuleInternal_(v,c,void 0,void 0,l,r,h)}var w=Sk.misceval.chain(g,function(C){g=C;n=Sk.sysmodules.quick$lookup(new Sk.builtin.str(b));return void 0!==n?g||n:Sk.misceval.chain(void 0,
function(){var F=a;if(1<x.length){if(!g)return;d=Sk.sysmodules.mp$subscript(new Sk.builtin.str(k+v));F=x[x.length-1];q=d.tp$getattr(Sk.builtin.str.$path)}m=new Sk.builtin.module;if("string"===typeof e){f=a+".py";var L=Sk.compile(e,f,"exec",h)}else L=Sk.misceval.chain(void 0,function(){if(Sk.onBeforeImport&&"function"===typeof Sk.onBeforeImport)return Sk.onBeforeImport(a)},function(z){if(!1===z)throw new Sk.builtin.ImportError("Importing "+a+" is not allowed");if("string"===typeof z)throw new Sk.builtin.ImportError(z);
return Sk.importSearchPathForName(F,".js",q)},function(z){return z?{funcname:"$builtinmodule",code:z.code,filename:z.filename,packagePath:z.packagePath}:Sk.misceval.chain(Sk.importSearchPathForName(F,".py",q),function(D){if(z=D)return Sk.compile(z.code,z.filename,"exec",h)},function(D){if(D)return D.packagePath=z.packagePath,D})});return L},function(F){if(F){var L=m.$js=F.code;null==f&&(f=F.filename);null!=Sk.dateSet&&Sk.dateSet||(L="Sk.execStart = Sk.lastYield = new Date();\n"+F.code,Sk.dateSet=
!0);if(c){var z=function(t){var y,E=Sk.js_beautify(t).split("\n");for(y=1;y<=E.length;++y){var J=(""+y).length;for(t="";5>J;++J)t+=" ";E[y-1]="/* "+t+y+" */ "+E[y-1]}return E.join("\n")};L=z(L);Sk.debugout(L)}"$compiledmod"!==F.funcname&&(L+="\n"+F.funcname+";");var D=new Sk.builtin.str(b),K=new Sk.builtin.str(a);Sk.sysmodules.mp$ass_subscript(D,m);l&&l.tp$setattr(K,m);var R=Sk.global.eval(L);m.init$dict(D,Sk.builtin.none.none$);m.$d.__package__=F.packagePath?D:v?new Sk.builtin.str(k+v):p?p:Sk.builtin.none.none$;
F.packagePath&&(m.$d.__path__=new Sk.builtin.tuple([new Sk.builtin.str(F.packagePath)]));F.filename&&"$builtinmodule"!==F.funcname&&(m.$d.__file__=new Sk.builtin.str(F.filename));var T=l&&l.$initializing;m.$initializing=!0;l&&!T&&(l.$initializing=!0);return Sk.misceval.tryCatch(()=>Sk.misceval.chain(R(m.$d),t=>{m.$initializing=!1;l&&!T&&(l.$initializing=!1);return t}),t=>{try{Sk.abstr.objectDelItem(Sk.sysmodules,D)}catch(y){}if(l)try{l.tp$setattr(K,void 0)}catch(y){}m.$initializing=!1;l&&!T&&(l.$initializing=
!1);throw t;})}},function(F){var L;if(void 0===F){if(r&&!g)return;throw new Sk.builtin.ModuleNotFoundError("No module named "+Sk.misceval.objectRepr(new Sk.builtin.str(a)));}if(F!==m.$d){for(L in m.$d)F[L]||(F[L]=m.$d[L]);m.$d=F}if(Sk.onAfterImport&&"function"===typeof Sk.onAfterImport)try{Sk.onAfterImport(a)}catch(z){}return g?(d.tp$setattr(new Sk.builtin.str(x[x.length-1]),m),g):m})});return h?w:Sk.misceval.retryOptionalSuspensionOrThrow(w)};Sk.importModule=function(a,c,b){return Sk.importModuleInternal_(a,
c,void 0,void 0,void 0,!1,b)};Sk.importMain=function(a,c,b){Sk.dateSet=!1;Sk.filesLoaded=!1;Sk.sysmodules=new Sk.builtin.dict([]);Sk.realsyspath=void 0;Sk.resetCompiler();return Sk.importModuleInternal_(a,c,"__main__",void 0,void 0,!1,b)};Sk.importMainWithBody=function(a,c,b,e){Sk.dateSet=!1;Sk.filesLoaded=!1;Sk.sysmodules=new Sk.builtin.dict([]);Sk.realsyspath=void 0;Sk.resetCompiler();return Sk.importModuleInternal_(a,c,"__main__",b,void 0,!1,e)};Sk.importBuiltinWithBody=function(a,c,b,e){return Sk.importModuleInternal_(a,
c,"__builtin__."+a,b,void 0,!1,e)};Sk.builtin.__import__=function(a,c,b,e,l){a=a.toString();var r=Sk.globals,h;null==l&&(l=Sk.__future__.absolute_import?0:-1);if(0!==l&&c.__package__&&c.__package__!==Sk.builtin.none.none$){if((h=c.__package__.v)&&0<l){c=h.split(".");if(l-1>=c.length)throw new Sk.builtin.ImportError("Attempted relative import beyond toplevel package");c.length-=l-1;h=c.join(".")}var f=Sk.sysmodules.quick$lookup(new Sk.builtin.str(h))}if(0<l&&void 0===f)throw new Sk.builtin.ImportError("Attempted relative import in non-package");
a.split(".");return Sk.misceval.chain(void 0,function(){if(0!==l&&void 0!==f)return""===a?f:Sk.importModuleInternal_(a,void 0,h+"."+a,void 0,f,-1==l,!0)},function(n){return void 0===n?(h=f=void 0,Sk.importModuleInternal_(a,void 0,void 0,void 0,void 0,!1,!0)):n},function(n){if(e&&0!==e.length){n=[null];const d=Sk.sysmodules.mp$subscript(new Sk.builtin.str((h||"")+(h&&a?".":"")+a));for(let m=0;m<e.length;m++){const g=e[m];"*"!==g&&void 0===d.tp$getattr(new Sk.builtin.str(g))&&n.push(()=>Sk.importModuleInternal_(g,
void 0,void 0,void 0,d,!0,!0))}return Sk.misceval.chain(...n,function(){Sk.asserts.assert(d);return d})}return n},function(n){r!==Sk.globals&&(Sk.globals=r);return n})};Sk.importStar=function(a,c,b){if(b=a.tp$getattr(new Sk.builtin.str("__all__")))for(let e=Sk.abstr.iter(b),l=e.tp$iternext();void 0!==l;l=e.tp$iternext())c[l.v]=Sk.abstr.gattr(a,l);else{b=Object.getOwnPropertyNames(a.$d);for(let e in b)"_"!=b[e].charAt(0)&&(c[b[e]]=a.$d[b[e]])}};Sk.exportSymbol("Sk.importMain",Sk.importMain);Sk.exportSymbol("Sk.importMainWithBody",
Sk.importMainWithBody);Sk.exportSymbol("Sk.importBuiltinWithBody",Sk.importBuiltinWithBody);Sk.exportSymbol("Sk.builtin.__import__",Sk.builtin.__import__);Sk.exportSymbol("Sk.importStar",Sk.importStar)},function(G,V){Sk.builtin.timSort=function(a,c){this.list=new Sk.builtin.list(a.v);this.MIN_GALLOP=7;this.listlength=c?c:a.sq$length()};Sk.builtin.timSort.prototype.lt=function(a,c){return Sk.misceval.richCompareBool(a,c,"Lt")};Sk.builtin.timSort.prototype.le=function(a,c){return!this.lt(c,a)};Sk.builtin.timSort.prototype.setitem=
function(a,c){this.list.v[a]=c};Sk.builtin.timSort.prototype.binary_sort=function(a,c){var b;for(b=a.base+c;b<a.base+a.len;b++){var e=a.base;var l=b;for(c=a.getitem(l);e<l;){var r=e+(l-e>>1);this.lt(c,a.getitem(r))?l=r:e=r+1}Sk.asserts.assert(e===l);for(r=b;r>e;r--)a.setitem(r,a.getitem(r-1));a.setitem(e,c)}};Sk.builtin.timSort.prototype.count_run=function(a){var c;if(1>=a.len){var b=a.len;var e=!1}else if(b=2,this.lt(a.getitem(a.base+1),a.getitem(a.base)))for(e=!0,c=a.base+2;c<a.base+a.len;c++)if(this.lt(a.getitem(c),
a.getitem(c-1)))b++;else break;else for(e=!1,c=a.base+2;c<a.base+a.len&&!this.lt(a.getitem(c),a.getitem(c-1));c++)b++;return{run:new Sk.builtin.listSlice(a.list,a.base,b),descending:e}};Sk.builtin.timSort.prototype.sort=function(){var a,c=new Sk.builtin.listSlice(this.list,0,this.listlength);if(!(2>c.len)){this.merge_init();for(a=this.merge_compute_minrun(c.len);0<c.len;){var b=this.count_run(c);b.descending&&b.run.reverse();if(b.run.len<a){var e=b.run.len;b.run.len=a<c.len?a:c.len;this.binary_sort(b.run,
e)}c.advance(b.run.len);this.pending.push(b.run);this.merge_collapse()}Sk.asserts.assert(c.base==this.listlength);this.merge_force_collapse();Sk.asserts.assert(1==this.pending.length);Sk.asserts.assert(0===this.pending[0].base);Sk.asserts.assert(this.pending[0].len==this.listlength)}};Sk.builtin.timSort.prototype.gallop=function(a,c,b,e){var l;Sk.asserts.assert(0<=b&&b<c.len);var r=this;e=e?function(d,m){return r.le(d,m)}:function(d,m){return r.lt(d,m)};var h=c.base+b;var f=0;var n=1;if(e(c.getitem(h),
a)){for(l=c.len-b;n<l;)if(e(c.getitem(h+n),a)){f=n;try{n=(n<<1)+1}catch(d){n=l}}else break;n>l&&(n=l);f+=b;n+=b}else{for(l=b+1;n<l&&!e(c.getitem(h-n),a);){f=n;try{n=(n<<1)+1}catch(d){n=l}}n>l&&(n=l);h=b-f;f=b-n;n=h}Sk.asserts.assert(-1<=f<n<=c.len);for(f+=1;f<n;)b=f+(n-f>>1),e(c.getitem(c.base+b),a)?f=b+1:n=b;Sk.asserts.assert(f==n);return n};Sk.builtin.timSort.prototype.merge_init=function(){this.min_gallop=this.MIN_GALLOP;this.pending=[]};Sk.builtin.timSort.prototype.merge_lo=function(a,c){var b,
e,l;Sk.asserts.assert(0<a.len&&0<c.len&&a.base+a.len==c.base);var r=this.min_gallop;var h=a.base;a=a.copyitems();try{if(this.setitem(h,c.popleft()),h++,1!=a.len&&0!==c.len)for(;;){for(e=b=0;;)if(this.lt(c.getitem(c.base),a.getitem(a.base))){this.setitem(h,c.popleft());h++;if(0===c.len)return;e++;b=0;if(e>=r)break}else{this.setitem(h,a.popleft());h++;if(1==a.len)return;b++;e=0;if(b>=r)break}for(r+=1;;){this.min_gallop=r-=1<r;b=this.gallop(c.getitem(c.base),a,0,!0);for(l=a.base;l<a.base+b;l++)this.setitem(h,
a.getitem(l)),h++;a.advance(b);if(1>=a.len)return;this.setitem(h,c.popleft());h++;if(0===c.len)return;e=this.gallop(a.getitem(a.base),c,0,!1);for(l=c.base;l<c.base+e;l++)this.setitem(h,c.getitem(l)),h++;c.advance(e);if(0===c.len)return;this.setitem(h,a.popleft());h++;if(1==a.len)return;if(b<this.MIN_GALLOP&&e<this.MIN_GALLOP)break;r++;this.min_gallop=r}}}finally{Sk.asserts.assert(0<=a.len&&0<=c.len);for(l=c.base;l<c.base+c.len;l++)this.setitem(h,c.getitem(l)),h++;for(l=a.base;l<a.base+a.len;l++)this.setitem(h,
a.getitem(l)),h++}};Sk.builtin.timSort.prototype.merge_hi=function(a,c){var b,e,l;Sk.asserts.assert(0<a.len&&0<c.len&&a.base+a.len==c.base);var r=this.min_gallop;var h=c.base+c.len;c=c.copyitems();try{if(h--,this.setitem(h,a.popright()),0!==a.len&&1!=c.len)for(;;){for(e=b=0;;){var f=a.getitem(a.base+a.len-1);var n=c.getitem(c.base+c.len-1);if(this.lt(n,f)){h--;this.setitem(h,f);a.len--;if(0===a.len)return;b++;e=0;if(b>=r)break}else{h--;this.setitem(h,n);c.len--;if(1==c.len)return;e++;b=0;if(e>=r)break}}for(r+=
1;;){this.min_gallop=r-=1<r;n=c.getitem(c.base+c.len-1);var d=this.gallop(n,a,a.len-1,!0);b=a.len-d;for(l=a.base+a.len-1;l>a.base+d-1;l--)h--,this.setitem(h,a.getitem(l));a.len-=b;if(0===a.len)return;h--;this.setitem(h,c.popright());if(1==c.len)return;f=a.getitem(a.base+a.len-1);d=this.gallop(f,c,c.len-1,!1);e=c.len-d;for(l=c.base+c.len-1;l>c.base+d-1;l--)h--,this.setitem(h,c.getitem(l));c.len-=e;if(1>=c.len)return;h--;this.setitem(h,a.popright());if(0===a.len)return;if(b<this.MIN_GALLOP&&e<this.MIN_GALLOP)break;
r++;this.min_gallop=r}}}finally{Sk.asserts.assert(0<=a.len&&0<=c.len);for(l=a.base+a.len-1;l>a.base-1;l--)h--,this.setitem(h,a.getitem(l));for(l=c.base+c.len-1;l>c.base-1;l--)h--,this.setitem(h,c.getitem(l))}};Sk.builtin.timSort.prototype.merge_at=function(a){0>a&&(a=this.pending.length+a);var c=this.pending[a];var b=this.pending[a+1];Sk.asserts.assert(0<c.len&&0<b.len);Sk.asserts.assert(c.base+c.len==b.base);this.pending[a]=new Sk.builtin.listSlice(this.list,c.base,c.len+b.len);this.pending.splice(a+
1,1);a=this.gallop(b.getitem(b.base),c,0,!0);c.advance(a);0!==c.len&&(b.len=this.gallop(c.getitem(c.base+c.len-1),b,b.len-1,!1),0!==b.len&&(c.len<=b.len?this.merge_lo(c,b):this.merge_hi(c,b)))};Sk.builtin.timSort.prototype.merge_collapse=function(){for(var a=this.pending;1<a.length;)if(3<=a.length&&a[a.length-3].len<=a[a.length-2].len+a[a.length-1].len)a[a.length-3].len<a[a.length-1].len?this.merge_at(-3):this.merge_at(-2);else if(a[a.length-2].len<=a[a.length-1].len)this.merge_at(-2);else break};
Sk.builtin.timSort.prototype.merge_force_collapse=function(){for(var a=this.pending;1<a.length;)3<=a.length&&a[a.length-3].len<a[a.length-1].len?this.merge_at(-3):this.merge_at(-2)};Sk.builtin.timSort.prototype.merge_compute_minrun=function(a){for(var c=0;64<=a;)c|=a&1,a>>=1;return a+c};Sk.builtin.listSlice=function(a,c,b){this.list=a;this.base=c;this.len=b};Sk.builtin.listSlice.prototype.copyitems=function(){var a=this.base,c=this.base+this.len;Sk.asserts.assert(0<=a<=c);return new Sk.builtin.listSlice(new Sk.builtin.list(this.list.v.slice(a,
c)),0,this.len)};Sk.builtin.listSlice.prototype.advance=function(a){this.base+=a;this.len-=a;Sk.asserts.assert(this.base<=this.list.sq$length())};Sk.builtin.listSlice.prototype.getitem=function(a){return this.list.v[a]};Sk.builtin.listSlice.prototype.setitem=function(a,c){this.list.v[a]=c};Sk.builtin.listSlice.prototype.popleft=function(){var a=this.list.v[this.base];this.base++;this.len--;return a};Sk.builtin.listSlice.prototype.popright=function(){this.len--;return this.list.v[this.base+this.len]};
Sk.builtin.listSlice.prototype.reverse=function(){for(var a,c,b=this.list,e=this.base,l=e+this.len-1;e<l;)a=b.v[l],c=b.v[e],b.v[e]=a,b.v[l]=c,e++,l--};Sk.exportSymbol("Sk.builtin.listSlice",Sk.builtin.listSlice);Sk.exportSymbol("Sk.builtin.timSort",Sk.builtin.timSort)},function(G,V){Sk.builtin.super_=Sk.abstr.buildNativeClass("super",{constructor:function super_(a,c){Sk.asserts.assert(this instanceof Sk.builtin.super_,"bad call to super, use 'new'");this.type=a;this.obj=c;if(void 0!==a&&!Sk.builtin.checkClass(a))throw new Sk.builtin.TypeError("must be type, not "+
Sk.abstr.typeName(a));this.obj_type=void 0!==this.obj?this.$supercheck(a,this.obj):null},slots:{tp$doc:"super() -> same as super(__class__, <first argument>)\nsuper(type) -> unbound super object\nsuper(type, obj) -> bound super object; requires isinstance(obj, type)\nsuper(type, type2) -> bound super object; requires issubclass(type2, type)\nTypical use to call a cooperative superclass method:\nclass C(B):\n    def meth(self, arg):\n        super().meth(arg)\nThis works for class methods too:\nclass C(B):\n    @classmethod\n    def cmeth(cls, arg):\n        super().cmeth(arg)\n",
tp$new:Sk.generic.new,tp$init(a,c){Sk.abstr.checkNoKwargs("super",c);Sk.abstr.checkArgsLen("super",a,1,2);c=a[0];a=a[1];if(!Sk.builtin.checkClass(c))throw new Sk.builtin.TypeError("must be type, not "+Sk.abstr.typeName(c));this.obj=a;this.type=c;null!=this.obj&&(this.obj_type=this.$supercheck(c,this.obj))},$r(){return this.obj?new Sk.builtin.str("<super: <class '"+this.type.prototype.tp$name+"'>, <"+Sk.abstr.typeName(this.obj)+" object>>"):new Sk.builtin.str("<super: <class '"+this.type.prototype.tp$name+
"'>, NULL>")},tp$getattr(a,c){let b=this.obj_type;if(null==b)return Sk.generic.getAttr.call(this,a,c);var e=b.prototype.tp$mro;const l=e.length;if("__class__"===a.v)return Sk.generic.getAttr.call(this,a,c);let r;for(r=0;r+1<l&&this.type!==e[r];r++);r++;if(r>=l)return Sk.generic.getAttr.call(this,a,c);a=a.$mangled;let h;for(;r<l;){c=e[r].prototype;c.hasOwnProperty(a)&&(h=c[a]);if(void 0!==h)return e=h.tp$descr_get,void 0!==e&&(h=e.call(h,this.obj===b?null:this.obj,b)),h;r++}},tp$descr_get(a,c,b){if(null===
a||null!=this.obj)return this;if(this.ob$type!==Sk.builtin.super_)return a=Sk.misceval.callsimOrSuspendArray(this.ob$type,[this.type,a]),b?a:Sk.misceval.retryOptionalSuspensionOrThrow(a);b=this.$supercheck(this.type,a);c=new Sk.builtin.super_;c.type=this.type;c.obj=a;c.obj_type=b;return c}},getsets:{__thisclass__:{$get(){return this.type},$doc:"the class invoking super()"},__self__:{$get(){return this.obj||Sk.builtin.none.none$},$doc:"the instance invoking super(); may be None"},__self_class__:{$get(){return this.obj_type||
Sk.builtin.none.none$},$doc:"the type of the instance invoking super(); may be None"}},proto:{$supercheck(a,c){if(Sk.builtin.checkClass(c)&&c.$isSubType(a))return c;if(c.ob$type.$isSubType(a))return c.ob$type;{const b=c.tp$getattr(Sk.builtin.str.$class);if(void 0!==b&&b!==c.ob$type&&Sk.builtin.checkClass(b)&&b.$isSubType(a))return b}throw new Sk.builtin.TypeError("super(type, obj): obj must be an instance or subtype of type");}}})},function(G,V){Sk.builtin.GenericAlias=Sk.abstr.buildNativeClass("types.GenericAlias",
{constructor:function(a,c){this.$origin=a;c instanceof Sk.builtin.tuple||(c=new Sk.builtin.tuple([c]));this.$args=c;this.$params=null},slots:{tp$new(a,c){Sk.abstr.checkNoKwargs("GenericAlias",c);Sk.abstr.checkArgsLen("GenericAlias",a,2,2);return new Sk.builtin.GenericAlias(a[0],a[1])},tp$getattr(a,c){return Sk.builtin.checkString(a)&&!this.attr$exc.includes(a.v)?this.$origin.tp$getattr(a,c):Sk.generic.getAttr.call(this,a,c)},$r(){const a=this.ga$repr(this.$origin);let c="";this.$args.v.forEach((b,
e)=>{c+=0<e?", ":"";c+=this.ga$repr(b)});c||(c="()");return new Sk.builtin.str(a+"["+c+"]")},tp$doc:"Represent a PEP 585 generic type\n\nE.g. for t = list[int], t.origin is list and t.args is (int,).",tp$hash(){const a=Sk.abstr.objectHash(this.$origin);if(-1==a)return-1;const c=Sk.abstr.objectHash(this.$args);return-1==c?-1:a^c},tp$call(a,c){a=Sk.misceval.callsimArray(this.$origin,a,c);try{a.tp$setattr(new Sk.builtin.str("__orig_class__"),this)}catch(b){if(!(b instanceof Sk.builtin.AttributeError||
b instanceof Sk.builtin.TypeError))throw b;}return a},tp$richcompare(a,c){if(!(a instanceof Sk.builtin.GenericAlias)||"Eq"!==c&&"NotEq"!==c)return Sk.builtin.NotImplemented.NotImplemented$;const b=Sk.misceval.richCompareBool(this.$origin,a.$origin,"Eq");if(!b)return"Eq"===c?b:!b;a=Sk.misceval.richCompareBool(this.$args,a.$args,"Eq");return"Eq"===c?a:!a},tp$as_sequence_or_mapping:!0,mp$subscript(a){null===this.$params&&this.mk$params();if(0===this.$params.sq$length())throw new Sk.builtin.TypeError("There are no type variables left in "+
Sk.misceval.objectRepr(this));}},methods:{__mro_entries__:{$meth(){return new Sk.builtin.tuple([this.$origin])},$flags:{NoArgs:!0}},__instancecheck__:{$meth(a){throw new Sk.builtin.TypeError("isinstance() argument 2 cannot be a parameterized generic");},$flags:{OneArg:!0}},__subclasscheck__:{$meth(a){throw new Sk.builtin.TypeError("issubclass() argument 2 cannot be a parameterized generic");},$flags:{OneArg:!0}}},getsets:{__parameters__:{$get(){null===this.$params&&this.mk$params();return this.$params},
$doc:"Type variables in the GenericAlias."},__origin__:{$get(){return this.$origin}},__args__:{$get(){return this.$args}}},proto:{mk$params(){const a=[];this.$args.v.forEach(c=>{this.is$typevar(c)&&0>this.tuple$index(a,c)&&a.push(c)});this.$params=new Sk.builtin.tuple(a)},tuple$index(a,c){return a.indexOf(c)},is$typevar(a){if("TypeVar"!==a.tp$name)return!1;a=Sk.abstr.lookupSpecial(a,Sk.builtin.str.$module);if(void 0===a)throw Sk.builtin.RuntimeError("found object withought a __module__");return"typing"===
a.toString()},ga$repr(a){if(a===Sk.builtin.Ellipsis)return"...";if(Sk.abstr.lookupSpecial(a,this.str$orig)&&Sk.abstr.lookupSpecial(a,this.str$args))return Sk.misceval.objectRepr(a);const c=Sk.abstr.lookupSpecial(a,Sk.builtin.str.$qualname);if(void 0===c)return Sk.misceval.objectRepr(a);const b=Sk.abstr.lookupSpecial(a,Sk.builtin.str.$module);return void 0===b||Sk.builtin.checkNone(b)?Sk.misceval.objectRepr(a):"builtins"===b.toString()?c.toString():b.toString()+"."+c.toString()},str$orig:new Sk.builtin.str("__origin__"),
str$args:new Sk.builtin.str("__args__"),attr$exc:"__origin__ __args__ __parameters__ __mro_entries__ __reduce_ex__ __reduce__".split(" ")}})},function(G,V){function a(e,l){let r=void 0;if(void 0===e||Sk.builtin.checkNone(e))e=void 0;else if(e instanceof Sk.builtin.dict)r={},e.$items().forEach(([h,f])=>{Sk.builtin.checkString(h)&&(r[h.$mangled]=f)});else throw new Sk.builtin.TypeError(l+" must be a dict or None, not "+Sk.abstr.typeName(e));return r}function c(e,l){if(void 0!==e&&!Sk.builtin.checkNone(e))for(let r in l)e.mp$ass_subscript(new Sk.builtin.str(Sk.unfixReserved(r)),
l[r])}Sk.builtins={round:null,len:null,min:null,max:null,sum:null,abs:null,fabs:null,ord:null,chr:null,hex:null,oct:null,bin:null,dir:null,repr:null,open:null,isinstance:null,hash:null,getattr:null,hasattr:null,id:null,sorted:null,any:null,all:null,enumerate:Sk.builtin.enumerate,filter:Sk.builtin.filter_,map:Sk.builtin.map_,range:Sk.builtin.range_,reversed:Sk.builtin.reversed,zip:Sk.builtin.zip_,BaseException:Sk.builtin.BaseException,AttributeError:Sk.builtin.AttributeError,ArithmeticError:Sk.builtin.ArithmeticError,
ValueError:Sk.builtin.ValueError,Exception:Sk.builtin.Exception,ZeroDivisionError:Sk.builtin.ZeroDivisionError,AssertionError:Sk.builtin.AssertionError,ImportError:Sk.builtin.ImportError,ModuleNotFoundError:Sk.builtin.ModuleNotFoundError,IndentationError:Sk.builtin.IndentationError,IndexError:Sk.builtin.IndexError,LookupError:Sk.builtin.LookupError,KeyError:Sk.builtin.KeyError,TypeError:Sk.builtin.TypeError,UnicodeDecodeError:Sk.builtin.UnicodeDecodeError,UnicodeEncodeError:Sk.builtin.UnicodeEncodeError,
NameError:Sk.builtin.NameError,UnboundLocalError:Sk.builtin.UnboundLocalError,IOError:Sk.builtin.IOError,NotImplementedError:Sk.builtin.NotImplementedError,SystemExit:Sk.builtin.SystemExit,OverflowError:Sk.builtin.OverflowError,OperationError:Sk.builtin.OperationError,NegativePowerError:Sk.builtin.NegativePowerError,RuntimeError:Sk.builtin.RuntimeError,RecursionError:Sk.builtin.RecursionError,StopIteration:Sk.builtin.StopIteration,SyntaxError:Sk.builtin.SyntaxError,SystemError:Sk.builtin.SystemError,
KeyboardInterrupt:Sk.builtin.KeyboardInterrupt,float_$rw$:Sk.builtin.float_,int_$rw$:Sk.builtin.int_,bool:Sk.builtin.bool,complex:Sk.builtin.complex,dict:Sk.builtin.dict,file:Sk.builtin.file,frozenset:Sk.builtin.frozenset,"function":Sk.builtin.func,generator:Sk.builtin.generator,list:Sk.builtin.list,long_$rw$:Sk.builtin.lng,method:Sk.builtin.method,object:Sk.builtin.object,slice:Sk.builtin.slice,str:Sk.builtin.str,set:Sk.builtin.set,tuple:Sk.builtin.tuple,type:Sk.builtin.type,input:null,raw_input:new Sk.builtin.func(Sk.builtin.raw_input),
setattr:null,jseval:Sk.builtin.jseval,jsmillis:Sk.builtin.jsmillis,quit:new Sk.builtin.func(Sk.builtin.quit),exit:new Sk.builtin.func(Sk.builtin.quit),print:null,divmod:null,format:null,globals:null,issubclass:null,iter:null,execfile:Sk.builtin.execfile,help:Sk.builtin.help,memoryview:Sk.builtin.memoryview,reload:Sk.builtin.reload,super_$rw$:Sk.builtin.super_,unichr:new Sk.builtin.func(Sk.builtin.unichr),vars:Sk.builtin.vars,apply_$rw$:Sk.builtin.apply_,buffer:Sk.builtin.buffer,coerce:Sk.builtin.coerce,
intern:Sk.builtin.intern,property:Sk.builtin.property,classmethod:Sk.builtin.classmethod,staticmethod:Sk.builtin.staticmethod,Ellipsis:Sk.builtin.Ellipsis};G=Sk.builtin.none.none$;V=new Sk.builtin.tuple;const b=new Sk.builtin.int_(0);Sk.abstr.setUpModuleMethods("builtins",Sk.builtins,{__import__:{$meth(e,l,r,h,f){if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("__import__() argument 1 must be str, not "+e.tp$name);if(""===e.v&&0===f.v)throw new Sk.builtin.ValueError("Empty module name");
l=a(l,"globals")||{};h=Sk.ffi.remapToJs(h);f=Sk.ffi.remapToJs(f);return Sk.builtin.__import__(e,l,void 0,h,f)},$flags:{NamedArgs:["name","globals","locals","fromlist","level"],Defaults:[G,G,V,b]},$textsig:null,$doc:"__import__(name, globals=None, locals=None, fromlist=(), level=0) -> module\n\nImport a module. Because this function is meant for use by the Python\ninterpreter and not for general use, it is better to use\nimportlib.import_module() to programmatically import a module.\n\nThe globals argument is only used to determine the context;\nthey are not modified.  The locals argument is unused.  The fromlist\nshould be a list of names to emulate ``from name import ...'', or an\nempty list to emulate ``import name''.\nWhen importing a module from a package, note that __import__('A.B', ...)\nreturns package A when fromlist is empty, but its submodule B when\nfromlist is not empty.  The level argument is used to determine whether to\nperform absolute or relative imports: 0 is absolute, while a positive number\nis the number of parent directories to search relative to the current module."},
abs:{$meth:Sk.builtin.abs,$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the absolute value of the argument."},all:{$meth:Sk.builtin.all,$flags:{OneArg:!0},$textsig:"($module, iterable, /)",$doc:"Return True if bool(x) is True for all values x in the iterable.\n\nIf the iterable is empty, return True."},any:{$meth:Sk.builtin.any,$flags:{OneArg:!0},$textsig:"($module, iterable, /)",$doc:"Return True if bool(x) is True for any x in the iterable.\n\nIf the iterable is empty, return False."},
ascii:{$meth:Sk.builtin.ascii,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return an ASCII-only representation of an object.\n\nAs repr(), return a string containing a printable representation of an\nobject, but escape the non-ASCII characters in the string returned by\nrepr() using \\\\x, \\\\u or \\\\U escapes. This generates a string similar\nto that returned by repr() in Python 2."},bin:{$meth:Sk.builtin.bin,$flags:{OneArg:!0},$textsig:"($module, number, /)",$doc:"Return the binary representation of an integer.\n\n   >>> bin(2796202)\n   '0b1010101010101010101010'"},
callable:{$meth:Sk.builtin.callable,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return whether the object is callable (i.e., some kind of function).\n\nNote that classes are callable, as are instances of classes with a\n__call__() method."},chr:{$meth:Sk.builtin.chr,$flags:{OneArg:!0},$textsig:"($module, i, /)",$doc:"Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff."},compile:{$meth:Sk.builtin.compile,$flags:{MinArgs:3,MaxArgs:6},$textsig:"($module, /, source, filename, mode, flags=0,\n        dont_inherit=False, optimize=-1)",
$doc:"Compile source into a code object that can be executed by exec() or eval().\n\nThe source code may represent a Python module, statement or expression.\nThe filename will be used for run-time error messages.\nThe mode must be 'exec' to compile a module, 'single' to compile a\nsingle (interactive) statement, or 'eval' to compile an expression.\nThe flags argument, if present, controls which future statements influence\nthe compilation of the code.\nThe dont_inherit argument, if true, stops the compilation inheriting\nthe effects of any future statements in effect in the code calling\ncompile; if absent or false these statements do influence the compilation,\nin addition to any features explicitly specified."},
delattr:{$meth:Sk.builtin.delattr,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, obj, name, /)",$doc:"Deletes the named attribute from the given object.\n\ndelattr(x, 'y') is equivalent to ``del x.y''"},dir:{$meth:Sk.builtin.dir,$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:"dir([object]) -> list of strings\n\nIf called without an argument, return the names in the current scope.\nElse, return an alphabetized list of names comprising (some of) the attributes\nof the given object, and of attributes reachable from it.\nIf the object supplies a method named __dir__, it will be used; otherwise\nthe default dir() logic is used and returns:\n  for a module object: the module's attributes.\n  for a class object:  its attributes, and recursively the attributes\n    of its bases.\n  for any other object: its attributes, its class's attributes, and\n    recursively the attributes of its class's base classes."},
divmod:{$meth:Sk.builtin.divmod,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return the tuple (x//y, x%y).  Invariant: div*y + mod == x."},eval_$rw$:{$name:"eval",$meth:function(e,l,r){const h=a(l,"globals"),f=a(r,"locals");return Sk.misceval.chain(Sk.builtin.eval(e,h,f),n=>{c(l,h);c(r,f);return n})},$flags:{MinArgs:1,MaxArgs:3},$textsig:"($module, source, globals=None, locals=None, /)",$doc:"Evaluate the given source in the context of globals and locals.\n\nThe source may be a string representing a Python expression\nor a code object as returned by compile().\nThe globals must be a dictionary and locals can be any mapping,\ndefaulting to the current globals and locals.\nIf only globals is given, locals defaults to it."},
exec:{$meth:function(e,l,r){const h=a(l,"globals"),f=a(r,"locals");return Sk.misceval.chain(Sk.builtin.exec(e,h,f),n=>{c(l,h);c(r,f);return Sk.builtin.none.none$})},$flags:{MinArgs:1,MaxArgs:3},$textsig:"($module, source, globals=None, locals=None, /)",$doc:"Execute the given source in the context of globals and locals.\n\nThe source may be a string representing one or more Python statements\nor a code object as returned by compile().\nThe globals must be a dictionary and locals can be any mapping,\ndefaulting to the current globals and locals.\nIf only globals is given, locals defaults to it."},
format:{$meth:Sk.builtin.format,$flags:{MinArgs:1,MaxArgs:2},$textsig:"($module, value, format_spec='', /)",$doc:"Return value.__format__(format_spec)\n\nformat_spec defaults to the empty string.\nSee the Format Specification Mini-Language section of help('FORMATTING') for\ndetails."},getattr:{$meth:Sk.builtin.getattr,$flags:{MinArgs:2,MaxArgs:3},$textsig:null,$doc:"getattr(object, name[, default]) -> value\n\nGet a named attribute from an object; getattr(x, 'y') is equivalent to x.y.\nWhen a default argument is given, it is returned when the attribute doesn't\nexist; without it, an exception is raised in that case."},
globals:{$meth:Sk.builtin.globals,$flags:{NoArgs:!0},$textsig:"($module, /)",$doc:"Return the dictionary containing the current scope's global variables.\n\nNOTE: Updates to this dictionary *will* affect name lookups in the current\nglobal scope and vice-versa."},hasattr:{$meth:Sk.builtin.hasattr,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, obj, name, /)",$doc:"Return whether the object has an attribute with the given name.\n\nThis is done by calling getattr(obj, name) and catching AttributeError."},
hash:{$meth:Sk.builtin.hash,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the hash value for the given object.\n\nTwo objects that compare equal must also have the same hash value, but the\nreverse is not necessarily true."},hex:{$meth:Sk.builtin.hex,$flags:{OneArg:!0},$textsig:"($module, number, /)",$doc:"Return the hexadecimal representation of an integer.\n\n   >>> hex(12648430)\n   '0xc0ffee'"},id:{$meth:Sk.builtin.id,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the identity of an object.\n\nThis is guaranteed to be unique among simultaneously existing objects.\n(CPython uses the object's memory address.)"},
input:{$meth:Sk.builtin.input,$flags:{MinArgs:0,MaxArgs:1},$textsig:"($module, prompt=None, /)",$doc:"Read a string from standard input.  The trailing newline is stripped.\n\nThe prompt string, if given, is printed to standard output without a\ntrailing newline before reading input.\n\nIf the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.\nOn *nix systems, readline is used if available."},isinstance:{$meth:Sk.builtin.isinstance,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, obj, class_or_tuple, /)",
$doc:"Return whether an object is an instance of a class or of a subclass thereof.\n\nA tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the target to\ncheck against. This is equivalent to ``isinstance(x, A) or isinstance(x, B)\nor ...`` etc."},issubclass:{$meth:Sk.builtin.issubclass,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, cls, class_or_tuple, /)",$doc:"Return whether 'cls' is a derived from another class or is the same class.\n\nA tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to\ncheck against. This is equivalent to ``issubclass(x, A) or issubclass(x, B)\nor ...`` etc."},
iter:{$meth:Sk.builtin.iter,$flags:{MinArgs:1,MaxArgs:2},$textsig:"($module, iterable /)",$doc:"iter(iterable) -> iterator\niter(callable, sentinel) -> iterator\n\nGet an iterator from an object.  In the first form, the argument must\nsupply its own iterator, or be a sequence.\nIn the second form, the callable is called until it returns the sentinel."},len:{$meth:Sk.builtin.len,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the number of items in a container."},locals:{$meth:Sk.builtin.locals,
$flags:{NoArgs:!0},$textsig:"($module, /)",$doc:"Return a dictionary containing the current scope's local variables.\n\nNOTE: Whether or not updates to this dictionary will affect name lookups in\nthe local scope and vice-versa is *implementation dependent* and not\ncovered by any backwards compatibility guarantees."},max:{$meth:Sk.builtin.max,$flags:{FastCall:!0},$textsig:null,$doc:"max(iterable, *[, default=obj, key=func]) -> value\nmax(arg1, arg2, *args, *[, key=func]) -> value\n\nWith a single iterable argument, return its biggest item. The\ndefault keyword-only argument specifies an object to return if\nthe provided iterable is empty.\nWith two or more arguments, return the largest argument."},
min:{$meth:Sk.builtin.min,$flags:{FastCall:!0},$textsig:null,$doc:"min(iterable, *[, default=obj, key=func]) -> value\nmin(arg1, arg2, *args, *[, key=func]) -> value\n\nWith a single iterable argument, return its smallest item. The\ndefault keyword-only argument specifies an object to return if\nthe provided iterable is empty.\nWith two or more arguments, return the smallest argument."},next:{$name:"next",$meth:Sk.builtin.next_,$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"next(iterator[, default])\n\nReturn the next item from the iterator. If default is given and the iterator\nis exhausted, it is returned instead of raising StopIteration."},
oct:{$meth:Sk.builtin.oct,$flags:{OneArg:!0},$textsig:"($module, number, /)",$doc:"Return the octal representation of an integer.\n\n   >>> oct(342391)\n   '0o1234567'"},open:{$meth:Sk.builtin.open,$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"open(name[, mode[, buffering]]) -> file object\n\nOpen a file using the file() type, returns a file object.  This is the\npreferred way to open a file.  See file.__doc__ for further information."},ord:{$meth:Sk.builtin.ord,$flags:{OneArg:!0},$textsig:"($module, c, /)",
$doc:"Return the Unicode code point for a one-character string."},pow:{$meth:Sk.builtin.pow,$flags:{MinArgs:2,MaxArgs:3},$textsig:"($module, x, y, z=None, /)",$doc:"Equivalent to x**y (with two arguments) or x**y % z (with three arguments)\n\nSome types, such as ints, are able to use a more efficient algorithm when\ninvoked using the three argument form."},print:{$meth:Sk.builtin.print,$flags:{FastCall:!0},$textsig:null,$doc:"print(value, ..., sep=' ', end='\\n', file=sys.stdout, flush=False)\n\nPrints the values to a stream, or to sys.stdout by default.\nOptional keyword arguments:\nfile:  a file-like object (stream); defaults to the current sys.stdout.\nsep:   string inserted between values, default a space.\nend:   string appended after the last value, default a newline.\nflush: whether to forcibly flush the stream."},
repr:{$meth:Sk.builtin.repr,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the canonical string representation of the object.\n\nFor many object types, including most builtins, eval(repr(obj)) == obj."},round:{$meth:Sk.builtin.round,$flags:{NamedArgs:["number","ndigits"]},$textsig:"($module, /, number, ndigits=None)",$doc:"Round a number to a given precision in decimal digits.\n\nThe return value is an integer if ndigits is omitted or None.  Otherwise\nthe return value has the same type as the number.  ndigits may be negative."},
setattr:{$meth:Sk.builtin.setattr,$flags:{MinArgs:3,MaxArgs:3},$textsig:"($module, obj, name, value, /)",$doc:"Sets the named attribute on the given object to the specified value.\n\nsetattr(x, 'y', v) is equivalent to ``x.y = v''"},sorted:{$meth:Sk.builtin.sorted,$flags:{NamedArgs:[null,"cmp","key","reverse"],Defaults:[Sk.builtin.none.none$,Sk.builtin.none.none$,Sk.builtin.bool.false$]},$textsig:"($module, iterable, /, *, key=None, reverse=False)",$doc:"Return a new list containing all items from the iterable in ascending order.\n\nA custom key function can be supplied to customize the sort order, and the\nreverse flag can be set to request the result in descending order."},
sum:{$meth:Sk.builtin.sum,$flags:{NamedArgs:[null,"start"],Defaults:[new Sk.builtin.int_(0)]},$textsig:"($module, iterable, /, start=0)",$doc:"Return the sum of a 'start' value (default: 0) plus an iterable of numbers\n\nWhen the iterable is empty, return the start value.\nThis function is intended specifically for use with numeric values and may\nreject non-numeric types."},vars:{$meth:Sk.builtin.vars,$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:"vars([object]) -> dictionary\n\nWithout arguments, equivalent to locals().\nWith an argument, equivalent to object.__dict__."}});
Sk.setupObjects=function(e){e?(Sk.builtins.filter=Sk.builtin.filter_,Sk.builtins.map=Sk.builtin.map_,Sk.builtins.zip=Sk.builtin.zip_,Sk.builtins.range=Sk.builtin.range_,delete Sk.builtins.reduce,delete Sk.builtins.xrange,delete Sk.builtins.StandardError,delete Sk.builtins.unicode,delete Sk.builtins.basestring,delete Sk.builtins.long_$rw$,Sk.builtin.int_.prototype.$r=function(){return new Sk.builtin.str(this.v.toString())},delete Sk.builtin.int_.prototype.tp$str,delete Sk.builtin.bool.prototype.tp$str,
delete Sk.builtins.raw_input,delete Sk.builtins.unichr,delete Sk.builtin.str.prototype.decode,Sk.builtins.bytes=Sk.builtin.bytes,Sk.builtins.ascii=new Sk.builtin.sk_method({$meth:Sk.builtin.ascii,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return an ASCII-only representation of an object.\n\nAs repr(), return a string containing a printable representation of an\nobject, but escape the non-ASCII characters in the string returned by\nrepr() using \\\\x, \\\\u or \\\\U escapes. This generates a string similar\nto that returned by repr() in Python 2."},
null,"builtins")):(Sk.builtins.range=new Sk.builtin.sk_method({$meth:Sk.builtin.range,$name:"range",$flags:{MinArgs:1,MaxArgs:3}},void 0,"builtins"),Sk.builtins.xrange=new Sk.builtin.sk_method({$meth:Sk.builtin.xrange,$name:"xrange",$flags:{MinArgs:1,MaxArgs:3}},null,"builtins"),Sk.builtins.reduce=new Sk.builtin.sk_method({$meth:Sk.builtin.reduce,$name:"reduce",$flags:{MinArgs:2,MaxArgs:3}},null,"builtins"),Sk.builtins.filter=new Sk.builtin.func(Sk.builtin.filter),Sk.builtins.map=new Sk.builtin.func(Sk.builtin.map),
Sk.builtins.zip=new Sk.builtin.func(Sk.builtin.zip),Sk.builtins.StandardError=Sk.builtin.Exception,Sk.builtins.unicode=Sk.builtin.str,Sk.builtins.basestring=Sk.builtin.str,Sk.builtins.long_$rw$=Sk.builtin.lng,Sk.builtin.int_.prototype.$r=function(){const l=this.v;return"number"===typeof l?new Sk.builtin.str(l.toString()):new Sk.builtin.str(l.toString()+"L")},Sk.builtin.int_.prototype.tp$str=function(){return new Sk.builtin.str(this.v.toString())},Sk.builtin.bool.prototype.tp$str=function(){return this.$r()},
Sk.builtins.raw_input=new Sk.builtin.func(Sk.builtin.raw_input),Sk.builtins.unichr=new Sk.builtin.func(Sk.builtin.unichr),Sk.builtin.str.prototype.decode=Sk.builtin.str.$py2decode,delete Sk.builtins.bytes,delete Sk.builtins.ascii)};Sk.exportSymbol("Sk.setupObjects",Sk.setupObjects);Sk.exportSymbol("Sk.builtins",Sk.builtins)},function(G,V){Sk.builtin.str.$empty=new Sk.builtin.str("");Sk.builtin.str.$emptystr=Sk.builtin.str.$empty;Sk.builtin.str.$utf8=new Sk.builtin.str("utf-8");Sk.builtin.str.$ascii=
new Sk.builtin.str("ascii");Sk.builtin.str.$default_factory=new Sk.builtin.str("default_factory");Sk.builtin.str.$imag=new Sk.builtin.str("imag");Sk.builtin.str.$real=new Sk.builtin.str("real");Sk.builtin.str.$abs=new Sk.builtin.str("__abs__");Sk.builtin.str.$ann=new Sk.builtin.str("__annotations__");Sk.builtin.str.$bases=new Sk.builtin.str("__bases__");Sk.builtin.str.$bytes=new Sk.builtin.str("__bytes__");Sk.builtin.str.$call=new Sk.builtin.str("__call__");Sk.builtin.str.$class=new Sk.builtin.str("__class__");
Sk.builtin.str.$class_getitem=new Sk.builtin.str("__class_getitem__");Sk.builtin.str.$cmp=new Sk.builtin.str("__cmp__");Sk.builtin.str.$complex=new Sk.builtin.str("__complex__");Sk.builtin.str.$contains=new Sk.builtin.str("__contains__");Sk.builtin.str.$copy=new Sk.builtin.str("__copy__");Sk.builtin.str.$dict=new Sk.builtin.str("__dict__");Sk.builtin.str.$dir=new Sk.builtin.str("__dir__");Sk.builtin.str.$doc=new Sk.builtin.str("__doc__");Sk.builtin.str.$enter=new Sk.builtin.str("__enter__");Sk.builtin.str.$eq=
new Sk.builtin.str("__eq__");Sk.builtin.str.$exit=new Sk.builtin.str("__exit__");Sk.builtin.str.$index=new Sk.builtin.str("__index__");Sk.builtin.str.$init=new Sk.builtin.str("__init__");Sk.builtin.str.$initsubclass=new Sk.builtin.str("__init_subclass__");Sk.builtin.str.$int_=new Sk.builtin.str("__int__");Sk.builtin.str.$iter=new Sk.builtin.str("__iter__");Sk.builtin.str.$file=new Sk.builtin.str("__file__");Sk.builtin.str.$float_=new Sk.builtin.str("__float__");Sk.builtin.str.$format=new Sk.builtin.str("__format__");
Sk.builtin.str.$ge=new Sk.builtin.str("__ge__");Sk.builtin.str.$getattr=new Sk.builtin.str("__getattr__");Sk.builtin.str.$getattribute=new Sk.builtin.str("__getattribute__");Sk.builtin.str.$getitem=new Sk.builtin.str("__getitem__");Sk.builtin.str.$gt=new Sk.builtin.str("__gt__");Sk.builtin.str.$keys=new Sk.builtin.str("keys");Sk.builtin.str.$le=new Sk.builtin.str("__le__");Sk.builtin.str.$len=new Sk.builtin.str("__len__");Sk.builtin.str.$length_hint=new Sk.builtin.str("__length_hint__");Sk.builtin.str.$loader=
new Sk.builtin.str("__loader__");Sk.builtin.str.$lt=new Sk.builtin.str("__lt__");Sk.builtin.str.$module=new Sk.builtin.str("__module__");Sk.builtin.str.$missing=new Sk.builtin.str("__missing__");Sk.builtin.str.$name=new Sk.builtin.str("__name__");Sk.builtin.str.$ne=new Sk.builtin.str("__ne__");Sk.builtin.str.$new=new Sk.builtin.str("__new__");Sk.builtin.str.$next=new Sk.builtin.str("__next__");Sk.builtin.str.$path=new Sk.builtin.str("__path__");Sk.builtin.str.$prepare=new Sk.builtin.str("__prepare__");
Sk.builtin.str.$qualname=new Sk.builtin.str("__qualname__");Sk.builtin.str.$repr=new Sk.builtin.str("__repr__");Sk.builtin.str.$reversed=new Sk.builtin.str("__reversed__");Sk.builtin.str.$round=new Sk.builtin.str("__round__");Sk.builtin.str.$setattr=new Sk.builtin.str("__setattr__");Sk.builtin.str.$setitem=new Sk.builtin.str("__setitem__");Sk.builtin.str.$slots=new Sk.builtin.str("__slots__");Sk.builtin.str.$str=new Sk.builtin.str("__str__");Sk.builtin.str.$setname=new Sk.builtin.str("__set_name__");
Sk.builtin.str.$trunc=new Sk.builtin.str("__trunc__");Sk.builtin.str.$write=new Sk.builtin.str("write");Sk.misceval.op2method_={Eq:Sk.builtin.str.$eq,NotEq:Sk.builtin.str.$ne,Gt:Sk.builtin.str.$gt,GtE:Sk.builtin.str.$ge,Lt:Sk.builtin.str.$lt,LtE:Sk.builtin.str.$le}}]);}).call(this || window)

//# sourceMappingURL=skulpt.min.js.map