Skip to content

Instantly share code, notes, and snippets.

@estasney
Created May 20, 2018 01:59
Show Gist options
  • Select an option

  • Save estasney/cc4437970439d39c4dbfce4f73a2fdca to your computer and use it in GitHub Desktop.

Select an option

Save estasney/cc4437970439d39c4dbfce4f73a2fdca to your computer and use it in GitHub Desktop.
'use strict';var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(e,g,f){if(null==e)throw new TypeError("The 'this' value for String.prototype."+f+" must not be null or undefined");if(g instanceof RegExp)throw new TypeError("First argument to String.prototype."+f+" must not be a regular expression");return e+""};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(e,g,f){e!=Array.prototype&&e!=Object.prototype&&(e[g]=f.value)};$jscomp.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:"undefined"!=typeof global&&null!=global?global:e};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(e,g,f,h){if(g){f=$jscomp.global;e=e.split(".");for(h=0;h<e.length-1;h++){var x=e[h];x in f||(f[x]={});f=f[x]}e=e[e.length-1];h=f[e];g=g(h);g!=h&&null!=g&&$jscomp.defineProperty(f,e,{configurable:!0,writable:!0,value:g})}};
$jscomp.polyfill("String.prototype.startsWith",function(e){return e?e:function(e,f){var g=$jscomp.checkStringArgs(this,e,"startsWith");e+="";var x=g.length,r=e.length;f=Math.max(0,Math.min(f|0,g.length));for(var l=0;l<r&&f<x;)if(g[f++]!=e[l++])return!1;return l>=r}},"es6","es3");$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;
$jscomp.Symbol=function(e){return $jscomp.SYMBOL_PREFIX+(e||"")+$jscomp.symbolCounter_++};$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var e=$jscomp.global.Symbol.iterator;e||(e=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[e]&&$jscomp.defineProperty(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};
$jscomp.arrayIterator=function(e){var g=0;return $jscomp.iteratorPrototype(function(){return g<e.length?{done:!1,value:e[g++]}:{done:!0}})};$jscomp.iteratorPrototype=function(e){$jscomp.initSymbolIterator();e={next:e};e[$jscomp.global.Symbol.iterator]=function(){return this};return e};
$jscomp.polyfill("Array.from",function(e){return e?e:function(e,f,h){$jscomp.initSymbolIterator();f=null!=f?f:function(e){return e};var g=[],r=e[Symbol.iterator];if("function"==typeof r)for(e=r.call(e);!(r=e.next()).done;)g.push(f.call(h,r.value));else{r=e.length;for(var l=0;l<r;l++)g.push(f.call(h,e[l]))}return g}},"es6","es3");
$jscomp.iteratorFromArray=function(e,g){$jscomp.initSymbolIterator();e instanceof String&&(e+="");var f=0,h={next:function(){if(f<e.length){var x=f++;return{value:g(x,e[x]),done:!1}}h.next=function(){return{done:!0,value:void 0}};return h.next()}};h[Symbol.iterator]=function(){return h};return h};$jscomp.polyfill("Array.prototype.keys",function(e){return e?e:function(){return $jscomp.iteratorFromArray(this,function(e){return e})}},"es6","es3");
function tab_content(){function e(a){return void 0===a||null===a?!1:0<=["boolean","number"].indexOf(typeof a)?a:a.__bool__ instanceof Function?a.__bool__()?a:!1:a.__len__ instanceof Function?0!==a.__len__()?a:!1:a instanceof Function?a:0!==y(a)?a:!1}function g(a){this.iterable=a;this.index=0}function f(a){this.iterable=a;this.index=0}function h(a,b,d){void 0==b&&(b=a,a=0);void 0==d&&(d=1);if(0<d&&a>=b||0>d&&a<=b)return[];for(var c=[];0<d?a<b:a>b;a+=d)c.push(a);return c}function x(a){if(null==a||"object"==
typeof a)return a;var b={},d;for(d in obj)a.hasOwnProperty(d)&&(b[d]=a[d]);return b}function r(a){if(null==a||"object"==typeof a)return a;var b={},d;for(d in obj)a.hasOwnProperty(d)&&(b[d]=r(a[d]));return b}function l(a){return a?[].slice.apply(a):[]}function p(a){a=a?[].slice.apply(a):[];a.__class__=p;return a}function q(a){var b=[];if(a)for(var d=0;d<a.length;d++)b.add(a[d]);b.__class__=q;return b}function M(a,b){if(void 0==a)return new Uint8Array(0);b=H(a);if(b==B)return new Uint8Array(a);if(b==
u){b=new Uint8Array(y(a));for(var d=0;d<y(a);d++)b[d]=a.charCodeAt(d);return b}if(b==l||b==p)return new Uint8Array(a);throw P;}function u(a){if("number"===typeof a)return a.toString();try{return a.__str__()}catch(b){try{return I(a)}catch(d){return String(a)}}}function Q(a){return this.hasOwnProperty(a)}function R(){var a=[],b;for(b in this)C(b)||a.push(b);return a}function S(){var a=[],b;for(b in this)C(b)||a.push([b,this[b]]);return a}function T(a){delete this[a]}function U(){for(var a in this)delete this[a]}
function V(a,b){var d=this[a];void 0==d&&(d=this["py_"+a]);return void 0==d?void 0==b?null:b:d}function W(a,b){var d=this[a];if(void 0!=d)return d;b=void 0==b?null:b;return this[a]=b}function X(a,b){var d=this[a];if(void 0!=d)return delete this[a],d;if(void 0===b)throw N(a,Error());return b}function Y(){var a=Object.keys(this)[0];if(null==a)throw N("popitem(): dictionary is empty",Error());var b=p([a,this[a]]);delete this[a];return b}function Z(a){for(var b in a)this[b]=a[b]}function aa(){var a=[],
b;for(b in this)C(b)||a.push(this[b]);return a}function ba(a){return this[a]}function ca(a,b){this[a]=b}function z(a){var b={};if(!a||a instanceof Array){if(a)for(var d=0;d<a.length;d++){var c=a[d];if(!(c instanceof Array)||2!=c.length)throw J("dict update sequence element #"+d+" has length "+c.length+"; 2 is required",Error());var e=c[0];c=c[1];!(a instanceof Array)&&a instanceof Object&&(K(a,z)||(c=z(c)));b[e]=c}}else if(K(a,z))for(c=a.py_keys(),d=0;d<c.length;d++)e=c[d],b[e]=a[e];else if(a instanceof
Object)b=a;else throw J("Invalid type of object for dict creation",Error());k(b,"__class__",{value:z,enumerable:!1,writable:!0});k(b,"__contains__",{value:Q,enumerable:!1});k(b,"py_keys",{value:R,enumerable:!1});k(b,"__iter__",{value:function(){new g(this.py_keys())},enumerable:!1});k(b,Symbol.iterator,{value:function(){new f(this.py_keys())},enumerable:!1});k(b,"py_items",{value:S,enumerable:!1});k(b,"py_del",{value:T,enumerable:!1});k(b,"py_clear",{value:U,enumerable:!1});k(b,"py_get",{value:V,
enumerable:!1});k(b,"py_setdefault",{value:W,enumerable:!1});k(b,"py_pop",{value:X,enumerable:!1});k(b,"py_popitem",{value:Y,enumerable:!1});k(b,"py_update",{value:Z,enumerable:!1});k(b,"py_values",{value:aa,enumerable:!1});k(b,"__getitem__",{value:ba,enumerable:!1});k(b,"__setitem__",{value:ca,enumerable:!1});return b}var c={},D=function(a,b,d){if(""!=b){b=b.split(".");for(var c=b.length,e=0;e<b.length;e++){if(!a.hasOwnProperty(b[e])){c=e;break}a=a[b[e]]}for(e=c;e<b.length;e++)a[b[e]]={},a=a[b[e]]}for(var f in d)a[f]=
d[f]};c.__nest__=D;var L=function(a){a.__inited__||(a.__all__.__init__(a.__all__),a.__inited__=!0);return a.__all__};c.__init__=L;var m=function(a,b,d){return a&&(a.hasOwnProperty("__class__")||"string"==typeof a||a instanceof String)?(d&&Object.defineProperty(a,d,{value:function(){var d=[].slice.apply(arguments);return b.apply(null,[a].concat(d))},writable:!0,enumerable:!0,configurable:!0}),function(){var d=[].slice.apply(arguments);return b.apply(null,[a].concat(d))}):b};c.__get__=m;c.__getcm__=
function(a,b,d){return a.hasOwnProperty("__class__")?function(){var d=[].slice.apply(arguments);return b.apply(null,[a.__class__].concat(d))}:function(){var d=[].slice.apply(arguments);return b.apply(null,[a].concat(d))}};c.__getsm__=function(a,b,d){return b};var A={__name__:"type",__bases__:[],__new__:function(a,b,d,c){for(var e,t=function(){var a=[].slice.apply(arguments);return t.__new__(a)},f=d.length-1;0<=f;f--){var g=d[f],h;for(h in g)e=Object.getOwnPropertyDescriptor(g,h),Object.defineProperty(t,
h,e)}t.__metaclass__=a;t.__name__=b.startsWith("py_")?b.slice(3):b;t.__bases__=d;for(h in c)e=Object.getOwnPropertyDescriptor(c,h),Object.defineProperty(t,h,e);return t}};A.__metaclass__=A;c.py_metatype=A;var v={__init__:function(a){},__metaclass__:A,__name__:"object",__bases__:[],__new__:function(a){var b=Object.create(this,{__class__:{value:this,enumerable:!0}});this.__init__.apply(null,[b].concat(a));return b}};c.object=v;var n=function(a,b,d,c){void 0===c&&(c=b[0].__metaclass__);return c.__new__(c,
a,b,d)};c.__class__=n;c.__pragma__=function(){};D(c,"org.transcrypt.__base__",{__all__:{__inited__:!1,__init__:function(a){var b=n("__Envir__",[v],{__module__:"org.transcrypt.__base__",get __init__(){return m(this,function(a){a.interpreter_name="python";a.transpiler_name="transcrypt";a.transpiler_version="3.6.101";a.target_subdir="__javascript__"})}}),d=b();a.__Envir__=b;a.__envir__=d;a.__name__="org.transcrypt.__base__"}}});D(c,"org.transcrypt.__standard__",{__all__:{__inited__:!1,__init__:function(a){var b=
n("Exception",[v],{__module__:"org.transcrypt.__standard__",get __init__(){return m(this,function(a){var b=z();if(arguments.length){var d=arguments.length-1;if(arguments[d]&&arguments[d].hasOwnProperty("__kwargtrans__")){var c=arguments[d--],e;for(e in c)switch(e){case "self":a=c[e];break;default:b[e]=c[e]}delete b.__kwargtrans__}d=p([].slice.apply(arguments).slice(1,d+1))}else d=p();a.__args__=d;try{a.stack=b.error.stack}catch(na){a.stack="No stack trace available"}})},get __repr__(){return m(this,
function(a){return y(a.__args__)?"{}{}".format(a.__class__.__name__,I(p(a.__args__))):"{}()".format(a.__class__.__name__)})},get __str__(){return m(this,function(a){return 1<y(a.__args__)?u(p(a.__args__)):y(a.__args__)?u(a.__args__[0]):""})}}),d=n("IterableError",[b],{__module__:"org.transcrypt.__standard__",get __init__(){return m(this,function(a,d){b.__init__(a,"Can't iterate over non-iterable",w({error:d}))})}}),c=n("StopIteration",[b],{__module__:"org.transcrypt.__standard__",get __init__(){return m(this,
function(a,d){b.__init__(a,"Iterator exhausted",w({error:d}))})}}),e=n("ValueError",[b],{__module__:"org.transcrypt.__standard__",get __init__(){return m(this,function(a,d,c){b.__init__(a,d,w({error:c}))})}}),f=n("KeyError",[b],{__module__:"org.transcrypt.__standard__",get __init__(){return m(this,function(a,d,c){b.__init__(a,d,w({error:c}))})}}),g=n("AssertionError",[b],{__module__:"org.transcrypt.__standard__",get __init__(){return m(this,function(a,d,c){d?b.__init__(a,d,w({error:c})):b.__init__(a,
w({error:c}))})}}),h=n("NotImplementedError",[b],{__module__:"org.transcrypt.__standard__",get __init__(){return m(this,function(a,d,c){b.__init__(a,d,w({error:c}))})}}),k=n("IndexError",[b],{__module__:"org.transcrypt.__standard__",get __init__(){return m(this,function(a,d,c){b.__init__(a,d,w({error:c}))})}}),l=n("AttributeError",[b],{__module__:"org.transcrypt.__standard__",get __init__(){return m(this,function(a,d,c){b.__init__(a,d,w({error:c}))})}}),r=n("py_TypeError",[b],{__module__:"org.transcrypt.__standard__",
get __init__(){return m(this,function(a,d,c){b.__init__(a,d,w({error:c}))})}}),q=n("Warning",[b],{__module__:"org.transcrypt.__standard__"}),A=n("UserWarning",[q],{__module__:"org.transcrypt.__standard__"}),B=n("DeprecationWarning",[q],{__module__:"org.transcrypt.__standard__"}),C=n("RuntimeWarning",[q],{__module__:"org.transcrypt.__standard__"}),D=function(a,b,d){if("undefined"==typeof b||null!=b&&b.hasOwnProperty("__kwargtrans__"))b=null;if("undefined"==typeof d||null!=d&&d.hasOwnProperty("__kwargtrans__"))d=
!1;if(arguments.length){var c=arguments.length-1;if(arguments[c]&&arguments[c].hasOwnProperty("__kwargtrans__")){c=arguments[c--];for(var e in c)switch(e){case "iterable":a=c[e];break;case "key":b=c[e];break;case "reverse":d=c[e]}}}b?a.sort(function(a,d){if(arguments.length){var c=arguments.length-1;if(arguments[c]&&arguments[c].hasOwnProperty("__kwargtrans__")){c=arguments[c--];for(var e in c)switch(e){case "a":a=c[e];break;case "b":d=c[e]}}}return b(a)>b(d)?1:-1}):a.sort();d&&a.reverse()},E=n("__Terminal__",
[v],{__module__:"org.transcrypt.__standard__",get __init__(){return m(this,function(a){a.buffer="";try{a.element=document.getElementById("__terminal__")}catch(ma){a.element=null}a.element&&(a.element.style.overflowX="auto",a.element.style.boxSizing="border-box",a.element.style.padding="5px",a.element.innerHTML="_")})},get print(){return m(this,function(a){var b=" ";var d="\n";if(arguments.length){var c=arguments.length-1;if(arguments[c]&&arguments[c].hasOwnProperty("__kwargtrans__")){var e=arguments[c--],
t;for(t in e)switch(t){case "self":a=e[t];break;case "sep":b=e[t];break;case "end":d=e[t]}}var f=p([].slice.apply(arguments).slice(1,c+1))}else f=p();a.buffer="{}{}{}".format(a.buffer,b.join(function(){for(var a=[],b=f,d=0;d<y(b);d++)a.append(u(b[d]));return a}()),d).__getslice__(-4096,null,1);a.element?(a.element.innerHTML=a.buffer.py_replace("\n","<br>").py_replace(" ","&nbsp"),a.element.scrollTop=a.element.scrollHeight):console.log(b.join(function(){for(var a=[],b=f,d=0;d<y(b);d++)a.append(u(b[d]));
return a}()))})},get input(){return m(this,function(a,b){if(arguments.length){var d=arguments.length-1;if(arguments[d]&&arguments[d].hasOwnProperty("__kwargtrans__")){d=arguments[d--];for(var c in d)switch(c){case "self":a=d[c];break;case "question":b=d[c]}}}a.print("{}".format(b),w({end:""}));c=window.prompt("\n".join(a.buffer.py_split("\n").__getslice__(-16,null,1)));a.print(c);return c})}}),G=E();a.AssertionError=g;a.AttributeError=l;a.DeprecationWarning=B;a.Exception=b;a.IndexError=k;a.IterableError=
d;a.KeyError=f;a.NotImplementedError=h;a.RuntimeWarning=C;a.StopIteration=c;a.py_TypeError=r;a.UserWarning=A;a.ValueError=e;a.Warning=q;a.__Terminal__=E;a.__name__="org.transcrypt.__standard__";a.__sort__=D;a.__terminal__=G;a.filter=function(a,b){null==a&&(a=F);for(var d=[],c=0;c<y(b);c++){var e=b[c];a(e)&&d.append(e)}return d};a.map=function(a,b){for(var d=[],c=0;c<y(b);c++)d.append(a(b[c]));return d};a.sorted=function(a,b,d){if("undefined"==typeof b||null!=b&&b.hasOwnProperty("__kwargtrans__"))b=
null;if("undefined"==typeof d||null!=d&&d.hasOwnProperty("__kwargtrans__"))d=!1;if(arguments.length){var c=arguments.length-1;if(arguments[c]&&arguments[c].hasOwnProperty("__kwargtrans__"))for(e in c=arguments[c--],c)switch(e){case "iterable":a=c[e];break;case "key":b=c[e];break;case "reverse":d=c[e]}}var e=H(a)==z?x(a.py_keys()):x(a);D(e,b,d);return e}}}});c.__call__=function(){var a=[].slice.apply(arguments);return"object"==typeof a[0]&&"__call__"in a[0]?a[0].__call__.apply(a[1],a.slice(2)):a[0].apply(a[1],
a.slice(2))};D(c,"",L(c.org.transcrypt.__base__));A=c.__envir__;D(c,"",L(c.org.transcrypt.__standard__));var da=c.Exception,ea=c.StopIteration,J=c.ValueError,N=c.KeyError,fa=c.AssertionError,P=c.py_TypeError,ha=c.__sort__;c.print=c.__terminal__.print;c.input=c.__terminal__.input;A.executor_name=A.transpiler_name;c.main={__file__:""};c.__except__=null;var w=function(a){a.__kwargtrans__=null;a.constructor=Object;return a};c.__kwargtrans__=w;c.__globals__=function(a){return K(a,z)?a:z(a)};c.__super__=
function(a,b){for(var d=0;d<a.__bases__.length;d++){var c=a.__bases__[d];if(b in c)return c[b]}throw new da("Superclass method not found");};c.property=function(a,b){b||(b=function(){});return{get:function(){return a(this)},set:function(a){b(this,a)},enumerable:!0}};var k=function(a,b,d){a.hasOwnProperty(b)||Object.defineProperty(a,b,d)};c.__setProperty__=k;c.assert=function(a,b){if(!a)throw fa(b,Error());};c.__merge__=function(a,b){var d={},c;for(c in a)d[c]=a[c];for(c in b)d[c]=b[c];return d};c.dir=
function(a){var b=[],d;for(d in a)b.push(d.startsWith("py_")?d.slice(3):d);b.sort();return b};c.setattr=function(a,b,d){a[b]=d};c.getattr=function(a,b){return b in a?a[b]:a["py_"+b]};c.hasattr=function(a,b){try{return b in a||"py_"+b in a}catch(d){return!1}};c.delattr=function(a,b){b in a?delete a[b]:delete a["py_"+b]};c.__in__=function(a,b){return void 0===b||null===b?!1:b.__contains__ instanceof Function?b.__contains__(a):b.indexOf?-1<b.indexOf(a):b.hasOwnProperty(a)};var C=function(a){return a.startswith("__")&&
a.endswith("__")||"constructor"==a||a.startswith("py_")};c.__specialattrib__=C;var y=function(a){if(void 0===a||null===a)return 0;if(a.__len__ instanceof Function)return a.__len__();if(void 0!==a.length)return a.length;var b=0,d;for(d in a)C(d)||b++;return b};c.len=y;c.__t__=e;var E=function(a){if("inf"==a)return Infinity;if("-inf"==a)return-Infinity;if("nan"==a)return NaN;if(isNaN(parseFloat(a))){if(!1===a)return 0;if(!0===a)return 1;throw J("could not convert string to float: '"+u(a)+"'",Error());
}return+a};E.__name__="float";E.__bases__=[v];c.float=E;var B=function(a){return E(a)|0};B.__name__="int";B.__bases__=[v];c.int=B;var F=function(a){return!!e(a)};F.__name__="bool";F.__bases__=[B];c.bool=F;var H=function(a){var b=typeof a;if("object"==b)try{return"__class__"in a?a.__class__:v}catch(d){return b}else return"boolean"==b?F:"string"==b?u:"number"==b?0==a%1?B:E:null};c.py_typeof=H;var G=function(a,b){if(b instanceof Array){for(var d=0;d<b.length;d++){var c=b[d];if(G(a,c))return!0}return!1}try{c=
a;if(c==b)return!0;for(d=[].slice.call(c.__bases__);d.length;){c=d.shift();if(c==b)return!0;c.__bases__.length&&(d=[].slice.call(c.__bases__).concat(d))}return!1}catch(ia){return a==b||b==v}};c.issubclass=G;var K=function(a,b){try{return"__class__"in a?G(a.__class__,b):G(H(a),b)}catch(d){return G(H(a),b)}};c.isinstance=K;c.callable=function(a){return a&&"object"==typeof a&&"__call__"in a?!0:"function"===typeof a};var I=function(a){try{return a.__repr__()}catch(ja){try{return a.__str__()}catch(ka){try{if(null==
a)return"None";if(a.constructor==Object){var b="{",d=!1,c;for(c in a)if(!C(c)){var e=c.isnumeric()?c:"'"+c+"'";d?b+=", ":d=!0;b+=e+": "+I(a[c])}return b+"}"}return"boolean"==typeof a?a.toString().capitalize():a.toString()}catch(la){return"<object of type: "+typeof a+">"}}}};c.repr=I;c.chr=function(a){return String.fromCharCode(a)};c.ord=function(a){return a.charCodeAt(0)};c.max=function(a){return 1==arguments.length?Math.max.apply(null,a):Math.max.apply(null,arguments)};c.min=function(a){return 1==
arguments.length?Math.min.apply(null,a):Math.min.apply(null,arguments)};c.abs=Math.abs;c.round=function(a,b){if(b){var d=Math.pow(10,b);a*=d}var c=Math.round(a);.5==c-a&&c%2&&--c;b&&(c/=d);return c};g.prototype.__next__=function(){if(this.index<this.iterable.length)return this.iterable[this.index++];throw ea(Error());};f.prototype.next=function(){return this.index<this.iterable.py_keys.length?{value:this.index++,done:!1}:{value:void 0,done:!0}};c.py_reversed=function(a){a=a.slice();a.reverse();return a};
var O=function(){for(var a=[].slice.call(arguments),b=0;b<a.length;b++)"string"==typeof a[b]?a[b]=a[b].split(""):Array.isArray(a[b])||(a[b]=Array.from(a[b]));return(0==a.length?[]:a.reduce(function(a,b){return a.length<b.length?a:b})).map(function(b,c){return a.map(function(a){return a[c]})})};c.zip=O;c.range=h;c.any=function(a){for(var b=0;b<a.length;b++)if(F(a[b]))return!0;return!1};c.all=function(a){for(var b=0;b<a.length;b++)if(!F(a[b]))return!1;return!0};c.sum=function(a){for(var b=0,d=0;d<a.length;d++)b+=
a[d];return b};c.enumerate=function(a){return O(h(y(a)),a)};c.copy=x;c.deepcopy=r;c.list=l;Array.prototype.__class__=l;l.__name__="list";l.__bases__=[v];Array.prototype.__iter__=function(){return new g(this)};Array.prototype.__getslice__=function(a,b,d){0>a&&(a=this.length+a);null==b?b=this.length:0>b?b=this.length+b:b>this.length&&(b=this.length);for(var c=l([]);a<b;a+=d)c.push(this[a]);return c};Array.prototype.__setslice__=function(a,b,d,c){0>a&&(a=this.length+a);null==b?b=this.length:0>b&&(b=
this.length+b);if(null==d)Array.prototype.splice.apply(this,[a,b-a].concat(c));else for(var e=0;a<b;a+=d)this[a]=c[e++]};Array.prototype.__repr__=function(){if(this.__class__==q&&!this.length)return"set()";for(var a=this.__class__&&this.__class__!=l?this.__class__==p?"(":"{":"[",b=0;b<this.length;b++)b&&(a+=", "),a+=I(this[b]);this.__class__==p&&1==this.length&&(a+=",");return a+=this.__class__&&this.__class__!=l?this.__class__==p?")":"}":"]"};Array.prototype.__str__=Array.prototype.__repr__;Array.prototype.append=
function(a){this.push(a)};Array.prototype.py_clear=function(){this.length=0};Array.prototype.extend=function(a){this.push.apply(this,a)};Array.prototype.insert=function(a,b){this.splice(a,0,b)};Array.prototype.remove=function(a){a=this.indexOf(a);if(-1==a)throw J("list.remove(x): x not in list",Error());this.splice(a,1)};Array.prototype.index=function(a){return this.indexOf(a)};Array.prototype.py_pop=function(a){return void 0==a?this.pop():this.splice(a,1)[0]};Array.prototype.py_sort=function(){ha.apply(null,
[this].concat([].slice.apply(arguments)))};Array.prototype.__add__=function(a){return l(this.concat(a))};Array.prototype.__mul__=function(a){for(var b=this,d=1;d<a;d++)b=b.concat(this);return b};Array.prototype.__rmul__=Array.prototype.__mul__;c.tuple=p;p.__name__="tuple";p.__bases__=[v];c.set=q;q.__name__="set";q.__bases__=[v];Array.prototype.__bindexOf__=function(a){a+="";for(var b=0,d=this.length-1;b<=d;){var c=(b+d)/2|0,e=this[c]+"";if(e<a)b=c+1;else if(e>a)d=c-1;else return c}return-1};Array.prototype.add=
function(a){-1==this.indexOf(a)&&this.push(a)};Array.prototype.discard=function(a){a=this.indexOf(a);-1!=a&&this.splice(a,1)};Array.prototype.isdisjoint=function(a){this.sort();for(var b=0;b<a.length;b++)if(-1!=this.__bindexOf__(a[b]))return!1;return!0};Array.prototype.issuperset=function(a){this.sort();for(var b=0;b<a.length;b++)if(-1==this.__bindexOf__(a[b]))return!1;return!0};Array.prototype.issubset=function(a){return q(a.slice()).issuperset(this)};Array.prototype.union=function(a){for(var b=
q(this.slice().sort()),c=0;c<a.length;c++)-1==b.__bindexOf__(a[c])&&b.push(a[c]);return b};Array.prototype.intersection=function(a){this.sort();for(var b=q(),c=0;c<a.length;c++)-1!=this.__bindexOf__(a[c])&&b.push(a[c]);return b};Array.prototype.difference=function(a){a=q(a.slice().sort());for(var b=q(),c=0;c<this.length;c++)-1==a.__bindexOf__(this[c])&&b.push(this[c]);return b};Array.prototype.symmetric_difference=function(a){return this.union(a).difference(this.intersection(a))};Array.prototype.py_update=
function(){var a=[].concat.apply(this.slice(),arguments).sort();this.py_clear();for(var b=0;b<a.length;b++)a[b]!=a[b-1]&&this.push(a[b])};Array.prototype.__eq__=function(a){if(this.length!=a.length)return!1;this.__class__==q&&(this.sort(),a.sort());for(var b=0;b<this.length;b++)if(this[b]!=a[b])return!1;return!0};Array.prototype.__ne__=function(a){return!this.__eq__(a)};Array.prototype.__le__=function(a){return this.issubset(a)};Array.prototype.__ge__=function(a){return this.issuperset(a)};Array.prototype.__lt__=
function(a){return this.issubset(a)&&!this.issuperset(a)};Array.prototype.__gt__=function(a){return this.issuperset(a)&&!this.issubset(a)};c.bytearray=M;c.bytes=M;Uint8Array.prototype.__add__=function(a){var b=new Uint8Array(this.length+a.length);b.set(this);b.set(a,this.length);return b};Uint8Array.prototype.__mul__=function(a){for(var b=new Uint8Array(a*this.length),c=0;c<a;c++)b.set(this,c*this.length);return b};Uint8Array.prototype.__rmul__=Uint8Array.prototype.__mul__;c.str=u;String.prototype.__class__=
u;u.__name__="str";u.__bases__=[v];String.prototype.__iter__=function(){new g(this)};String.prototype.__repr__=function(){return(-1==this.indexOf("'")?"'"+this+"'":'"'+this+'"').py_replace("\t","\\t").py_replace("\n","\\n")};String.prototype.__str__=function(){return this};String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};String.prototype.endswith=function(a){if(a instanceof Array)for(var b=0;b<a.length;b++){if(this.slice(-a[b].length)==a[b])return!0}else return""==
a||this.slice(-a.length)==a;return!1};String.prototype.find=function(a,b){return this.indexOf(a,b)};String.prototype.__getslice__=function(a,b,c){0>a&&(a=this.length+a);null==b?b=this.length:0>b&&(b=this.length+b);var d="";if(1==c)d=this.substring(a,b);else for(;a<b;a+=c)d=d.concat(this.charAt(a));return d};k(String.prototype,"format",{get:function(){return m(this,function(a){var b=p([].slice.apply(arguments).slice(1)),c=0;return a.replace(/\{(\w*)\}/g,function(a,d){""==d&&(d=c++);if(d==+d)return void 0==
b[d]?a:u(b[d]);for(var e=0;e<b.length;e++)if("object"==typeof b[e]&&void 0!=b[e][d])return u(b[e][d]);return a})})},enumerable:!0});String.prototype.isalnum=function(){return/^[0-9a-zA-Z]{1,}$/.test(this)};String.prototype.isalpha=function(){return/^[a-zA-Z]{1,}$/.test(this)};String.prototype.isdecimal=function(){return/^[0-9]{1,}$/.test(this)};String.prototype.isdigit=function(){return this.isdecimal()};String.prototype.islower=function(){return/^[a-z]{1,}$/.test(this)};String.prototype.isupper=
function(){return/^[A-Z]{1,}$/.test(this)};String.prototype.isspace=function(){return/^[\s]{1,}$/.test(this)};String.prototype.isnumeric=function(){return!isNaN(parseFloat(this))&&isFinite(this)};String.prototype.join=function(a){return a.join(this)};String.prototype.lower=function(){return this.toLowerCase()};String.prototype.py_replace=function(a,b,c){return this.split(a,c).join(b)};String.prototype.lstrip=function(){return this.replace(/^\s*/g,"")};String.prototype.rfind=function(a,b){return this.lastIndexOf(a,
b)};String.prototype.rsplit=function(a,b){if(void 0==a||null==a){a=/\s+/;var c=this.strip()}else c=this;if(void 0==b||-1==b)return c.split(a);c=c.split(a);return b<c.length?(b=c.length-b,[c.slice(0,b).join(a)].concat(c.slice(b))):c};String.prototype.rstrip=function(){return this.replace(/\s*$/g,"")};String.prototype.py_split=function(a,b){if(void 0==a||null==a){a=/\s+/;var c=this.strip()}else c=this;if(void 0==b||-1==b)return c.split(a);c=c.split(a);return b<c.length?c.slice(0,b).concat([c.slice(b).join(a)]):
c};String.prototype.startswith=function(a){if(a instanceof Array)for(var b=0;b<a.length;b++){if(0==this.indexOf(a[b]))return!0}else return 0==this.indexOf(a);return!1};String.prototype.strip=function(){return this.trim()};String.prototype.upper=function(){return this.toUpperCase()};String.prototype.__mul__=function(a){for(var b="",c=0;c<a;c++)b+=this;return b};String.prototype.__rmul__=String.prototype.__mul__;c.dict=z;z.__name__="dict";z.__bases__=[v];k(Function.prototype,"__setdoc__",{value:function(a){this.__doc__=
a;return this},enumerable:!1});c.__jsmod__=function(a,b){return"object"==typeof a&&"__mod__"in a?a.__mod__(b):"object"==typeof b&&"__rmod__"in b?b.__rmod__(a):a%b};c.mod=function(a,b){return"object"==typeof a&&"__mod__"in a?a.__mod__(b):"object"==typeof b&&"__rmod__"in b?b.__rmod__(a):(a%b+b)%b};c.pow=function(a,b){return"object"==typeof a&&"__pow__"in a?a.__pow__(b):"object"==typeof b&&"__rpow__"in b?b.__rpow__(a):Math.pow(a,b)};c.__neg__=function(a){return"object"==typeof a&&"__neg__"in a?a.__neg__():
-a};c.__matmul__=function(a,b){return a.__matmul__(b)};c.__mul__=function(a,b){return"object"==typeof a&&"__mul__"in a?a.__mul__(b):"object"==typeof b&&"__rmul__"in b?b.__rmul__(a):"string"==typeof a?a.__mul__(b):"string"==typeof b?b.__rmul__(a):a*b};c.__truediv__=function(a,b){return"object"==typeof a&&"__truediv__"in a?a.__truediv__(b):"object"==typeof b&&"__rtruediv__"in b?b.__rtruediv__(a):"object"==typeof a&&"__div__"in a?a.__div__(b):"object"==typeof b&&"__rdiv__"in b?b.__rdiv__(a):a/b};c.__floordiv__=
function(a,b){return"object"==typeof a&&"__floordiv__"in a?a.__floordiv__(b):"object"==typeof b&&"__rfloordiv__"in b?b.__rfloordiv__(a):"object"==typeof a&&"__div__"in a?a.__div__(b):"object"==typeof b&&"__rdiv__"in b?b.__rdiv__(a):Math.floor(a/b)};c.__add__=function(a,b){return"object"==typeof a&&"__add__"in a?a.__add__(b):"object"==typeof b&&"__radd__"in b?b.__radd__(a):a+b};c.__sub__=function(a,b){return"object"==typeof a&&"__sub__"in a?a.__sub__(b):"object"==typeof b&&"__rsub__"in b?b.__rsub__(a):
a-b};c.__lshift__=function(a,b){return"object"==typeof a&&"__lshift__"in a?a.__lshift__(b):"object"==typeof b&&"__rlshift__"in b?b.__rlshift__(a):a<<b};c.__rshift__=function(a,b){return"object"==typeof a&&"__rshift__"in a?a.__rshift__(b):"object"==typeof b&&"__rrshift__"in b?b.__rrshift__(a):a>>b};c.__or__=function(a,b){return"object"==typeof a&&"__or__"in a?a.__or__(b):"object"==typeof b&&"__ror__"in b?b.__ror__(a):a|b};c.__xor__=function(a,b){return"object"==typeof a&&"__xor__"in a?a.__xor__(b):
"object"==typeof b&&"__rxor__"in b?b.__rxor__(a):a^b};c.__and__=function(a,b){return"object"==typeof a&&"__and__"in a?a.__and__(b):"object"==typeof b&&"__rand__"in b?b.__rand__(a):a&b};c.__eq__=function(a,b){return"object"==typeof a&&"__eq__"in a?a.__eq__(b):a==b};c.__ne__=function(a,b){return"object"==typeof a&&"__ne__"in a?a.__ne__(b):a!=b};c.__lt__=function(a,b){return"object"==typeof a&&"__lt__"in a?a.__lt__(b):a<b};c.__le__=function(a,b){return"object"==typeof a&&"__le__"in a?a.__le__(b):a<=
b};c.__gt__=function(a,b){return"object"==typeof a&&"__gt__"in a?a.__gt__(b):a>b};c.__ge__=function(a,b){return"object"==typeof a&&"__ge__"in a?a.__ge__(b):a>=b};c.__imatmul__=function(a,b){return"__imatmul__"in a?a.__imatmul__(b):a.__matmul__(b)};c.ipow=function(a,b){return"object"==typeof a&&"__pow__"in a?a.__ipow__(b):"object"==typeof a&&"__ipow__"in a?a.__pow__(b):"object"==typeof b&&"__rpow__"in b?b.__rpow__(a):Math.pow(a,b)};c.ijsmod__=function(a,b){return"object"==typeof a&&"__imod__"in a?
a.__ismod__(b):"object"==typeof a&&"__mod__"in a?a.__mod__(b):"object"==typeof b&&"__rpow__"in b?b.__rmod__(a):a%b};c.imod=function(a,b){return"object"==typeof a&&"__imod__"in a?a.__imod__(b):"object"==typeof a&&"__mod__"in a?a.__mod__(b):"object"==typeof b&&"__rmod__"in b?b.__rmod__(a):(a%b+b)%b};c.__imul__=function(a,b){return"object"==typeof a&&"__imul__"in a?a.__imul__(b):"object"==typeof a&&"__mul__"in a?a.__mul__(b):"object"==typeof b&&"__rmul__"in b?b.__rmul__(a):"string"==typeof a?a.__mul__(b):
"string"==typeof b?b.__rmul__(a):a*b};c.__idiv__=function(a,b){return"object"==typeof a&&"__idiv__"in a?a.__idiv__(b):"object"==typeof a&&"__div__"in a?a.__div__(b):"object"==typeof b&&"__rdiv__"in b?b.__rdiv__(a):a/b};c.__iadd__=function(a,b){return"object"==typeof a&&"__iadd__"in a?a.__iadd__(b):"object"==typeof a&&"__add__"in a?a.__add__(b):"object"==typeof b&&"__radd__"in b?b.__radd__(a):a+b};c.__isub__=function(a,b){return"object"==typeof a&&"__isub__"in a?a.__isub__(b):"object"==typeof a&&"__sub__"in
a?a.__sub__(b):"object"==typeof b&&"__rsub__"in b?b.__rsub__(a):a-b};c.__ilshift__=function(a,b){return"object"==typeof a&&"__ilshift__"in a?a.__ilshift__(b):"object"==typeof a&&"__lshift__"in a?a.__lshift__(b):"object"==typeof b&&"__rlshift__"in b?b.__rlshift__(a):a<<b};c.__irshift__=function(a,b){return"object"==typeof a&&"__irshift__"in a?a.__irshift__(b):"object"==typeof a&&"__rshift__"in a?a.__rshift__(b):"object"==typeof b&&"__rrshift__"in b?b.__rrshift__(a):a>>b};c.__ior__=function(a,b){return"object"==
typeof a&&"__ior__"in a?a.__ior__(b):"object"==typeof a&&"__or__"in a?a.__or__(b):"object"==typeof b&&"__ror__"in b?b.__ror__(a):a|b};c.__ixor__=function(a,b){return"object"==typeof a&&"__ixor__"in a?a.__ixor__(b):"object"==typeof a&&"__xor__"in a?a.__xor__(b):"object"==typeof b&&"__rxor__"in b?b.__rxor__(a):a^b};c.__iand__=function(a,b){return"object"==typeof a&&"__iand__"in a?a.__iand__(b):"object"==typeof a&&"__and__"in a?a.__and__(b):"object"==typeof b&&"__rand__"in b?b.__rand__(a):a&b};c.__getitem__=
function(a,b){return"object"==typeof a&&"__getitem__"in a?a.__getitem__(b):("string"==typeof a||a instanceof Array)&&0>b?a[a.length+b]:a[b]};c.__setitem__=function(a,b,c){"object"==typeof a&&"__setitem__"in a?a.__setitem__(b,c):("string"==typeof a||a instanceof Array)&&0>b?a[a.length+b]=c:a[b]=c};c.__getslice__=function(a,b,c,e){return"object"==typeof a&&"__getitem__"in a?a.__getitem__([b,c,e]):a.__getslice__(b,c,e)};c.__setslice__=function(a,b,c,e,f){"object"==typeof a&&"__setitem__"in a?a.__setitem__([b,
c,e],f):a.__setslice__(b,c,e,f)};(function(){c.__name__="__main__";c.generate_form=function(a,b,c,e,f,g){return'\n <div class="tab-content">\n \x3c!-- Filter Creation Tab Content --\x3e\n <div class="tab-pane" id="tabContent{id_int}">\n <div class="">\n <div class="form-group">\n <label class="control-label control-label-left col-sm-3" for="search-name{id_int}">Search Name</label>\n <div class="controls col-sm-9">\n <input id="search-name{id_int}" type="text" class="form-control"\n data-role="text" name="search-name" value={search_name} disabled>\n </div>\n </div>\n <div class="form-group">\n <label class="control-label control-label-left col-sm-3"\n for="boolean-search">Boolean</label>\n <div class="controls col-sm-9">\n <textarea id="boolean-search" rows="3" class="form-control"\n data-role="textarea"\n name="boolean-search{id_int}" disabled>{boolean_string}</textarea>\n </div>\n </div>\n <div class="form-group">\n <label class="control-label control-label-left col-sm-3">Search In</label>\n <div class="controls col-sm-9">\n <label class="checkbox" for="check-summary">\n <input type="checkbox" value="check-summary" id="check-summary"\n name="searchin-summary" {summary_checked} disabled>Summary</label>\n <label class="checkbox" for="check-skills">\n <input type="checkbox" value="check-skills" id="check-skills"\n name="searchin-skills" {skills_checked} disabled>Skills</label>\n <label class="checkbox" for="check-jd">\n <input type="checkbox" value="check-jd" id="check-jd" name="search-injd" {jd_checked} disabled>Job\n Descriptions</label>\n </div>\n </div>\n </div>\n </div>\n '.format(w({id_int:a,
search_name:b,boolean_string:c,summary_checked:e,skills_checked:f,jd_checked:g}))}})();return c}window.tab_content=tab_content();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment