MediaWiki:Gadget-MOOC.js

Une page de Wikiversité, la communauté pédagogique libre.

Note : après avoir publié vos modifications, il se peut que vous deviez forcer le rechargement complet du cache de votre navigateur pour voir les changements.

  • Firefox / Safari : maintenez la touche Maj (Shift) en cliquant sur le bouton Actualiser ou appuyez sur Ctrl + F5 ou Ctrl + R (⌘ + R sur un Mac).
  • Google Chrome : appuyez sur Ctrl + Maj + R (⌘ + Shift + R sur un Mac).
  • Internet Explorer / Edge : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl + F5.
  • Opera : appuyez sur Ctrl + F5.
"use strict";var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++){s(r[o])}return s})({1:[function(require,module,exports){"use strict";var stringWidth=require("string-width");function ansiAlign(text,opts){if(!text)return text;opts=opts||{};var align=opts.align||"center";if(align==="left")return text;var split=opts.split||"\n";var pad=opts.pad||" ";var widthDiffFn=align!=="right"?halfDiff:fullDiff;var returnString=false;if(!Array.isArray(text)){returnString=true;text=String(text).split(split)}var width=void 0;var maxWidth=0;text=text.map(function(str){str=String(str);width=stringWidth(str);maxWidth=Math.max(width,maxWidth);return{str:str,width:width}}).map(function(obj){return new Array(widthDiffFn(maxWidth,obj.width)+1).join(pad)+obj.str});return returnString?text.join(split):text}ansiAlign.left=function left(text){return ansiAlign(text,{align:"left"})};ansiAlign.center=function center(text){return ansiAlign(text,{align:"center"})};ansiAlign.right=function right(text){return ansiAlign(text,{align:"right"})};module.exports=ansiAlign;function halfDiff(maxWidth,curWidth){return Math.floor((maxWidth-curWidth)/2)}function fullDiff(maxWidth,curWidth){return maxWidth-curWidth}},{"string-width":3}],2:[function(require,module,exports){"use strict";module.exports=function(x){if(Number.isNaN(x)){return false}if(x>=4352&&(x<=4447||x===9001||x===9002||11904<=x&&x<=12871&&x!==12351||12880<=x&&x<=19903||19968<=x&&x<=42182||43360<=x&&x<=43388||44032<=x&&x<=55203||63744<=x&&x<=64255||65040<=x&&x<=65049||65072<=x&&x<=65131||65281<=x&&x<=65376||65504<=x&&x<=65510||110592<=x&&x<=110593||127488<=x&&x<=127569||131072<=x&&x<=262141)){return true}return false}},{}],3:[function(require,module,exports){"use strict";var stripAnsi=require("strip-ansi");var isFullwidthCodePoint=require("is-fullwidth-code-point");module.exports=function(str){if(typeof str!=="string"||str.length===0){return 0}var width=0;str=stripAnsi(str);for(var i=0;i<str.length;i++){var code=str.codePointAt(i);if(code<=31||code>=127&&code<=159){continue}if(code>=65536){i++}if(isFullwidthCodePoint(code)){width+=2}else{width++}}return width}},{"is-fullwidth-code-point":2,"strip-ansi":42}],4:[function(require,module,exports){"use strict";module.exports=function(){return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}},{}],5:[function(require,module,exports){"use strict";function assembleStyles(){var styles={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};styles.colors.grey=styles.colors.gray;Object.keys(styles).forEach(function(groupName){var group=styles[groupName];Object.keys(group).forEach(function(styleName){var style=group[styleName];styles[styleName]=group[styleName]={open:"\x1B["+style[0]+"m",close:"\x1B["+style[1]+"m"}});Object.defineProperty(styles,groupName,{value:group,enumerable:false})});return styles}Object.defineProperty(module,"exports",{enumerable:true,get:assembleStyles})},{}],6:[function(require,module,exports){"use strict";exports.byteLength=byteLength;exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i<len;++i){lookup[i]=code[i];revLookup[code.charCodeAt(i)]=i}revLookup["-".charCodeAt(0)]=62;revLookup["_".charCodeAt(0)]=63;function placeHoldersCount(b64){var len=b64.length;if(len%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}return b64[len-2]==="="?2:b64[len-1]==="="?1:0}function byteLength(b64){return b64.length*3/4-placeHoldersCount(b64)}function toByteArray(b64){var i,j,l,tmp,placeHolders,arr;var len=b64.length;placeHolders=placeHoldersCount(b64);arr=new Arr(len*3/4-placeHolders);l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;i<l;i+=4,j+=3){tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)];arr[L++]=tmp>>16&255;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}if(placeHolders===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[L++]=tmp&255}else if(placeHolders===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;i<end;i+=3){tmp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2];output.push(tripletToBase64(tmp))}return output.join("")}function fromByteArray(uint8){var tmp;var len=uint8.length;var extraBytes=len%3;var output="";var parts=[];var maxChunkLength=16383;for(var i=0,len2=len-extraBytes;i<len2;i+=maxChunkLength){parts.push(encodeChunk(uint8,i,i+maxChunkLength>len2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];output+=lookup[tmp>>2];output+=lookup[tmp<<4&63];output+="=="}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];output+=lookup[tmp>>10];output+=lookup[tmp>>4&63];output+=lookup[tmp<<2&63];output+="="}parts.push(output);return parts.join("")}},{}],7:[function(require,module,exports){"use strict";var stringWidth=require("string-width");var chalk=require("chalk");var widestLine=require("widest-line");var cliBoxes=require("cli-boxes");var camelCase=require("camelcase");var ansiAlign=require("ansi-align");var termSize=require("term-size");var getObject=function getObject(detail){var obj=void 0;if(typeof detail==="number"){obj={top:detail,right:detail*3,bottom:detail,left:detail*3}}else{obj=Object.assign({top:0,right:0,bottom:0,left:0},detail)}return obj};var getBorderChars=function getBorderChars(borderStyle){var sides=["topLeft","topRight","bottomRight","bottomLeft","vertical","horizontal"];var chars=void 0;if(typeof borderStyle==="string"){chars=cliBoxes[borderStyle];if(!chars){throw new TypeError("Invalid border style: "+borderStyle)}}else{sides.forEach(function(key){if(!borderStyle[key]||typeof borderStyle[key]!=="string"){throw new TypeError("Invalid border style: "+key)}});chars=borderStyle}return chars};var getBackgroundColorName=function getBackgroundColorName(x){return camelCase("bg",x)};module.exports=function(text,opts){opts=Object.assign({padding:0,borderStyle:"single",dimBorder:false,align:"left",float:"left"},opts);if(opts.backgroundColor){opts.backgroundColor=getBackgroundColorName(opts.backgroundColor)}if(opts.borderColor&&!chalk[opts.borderColor]){throw new Error(opts.borderColor+" is not a valid borderColor")}if(opts.backgroundColor&&!chalk[opts.backgroundColor]){throw new Error(opts.backgroundColor+" is not a valid backgroundColor")}var chars=getBorderChars(opts.borderStyle);var padding=getObject(opts.padding);var margin=getObject(opts.margin);var colorizeBorder=function colorizeBorder(x){var ret=opts.borderColor?chalk[opts.borderColor](x):x;return opts.dimBorder?chalk.dim(ret):ret};var colorizeContent=function colorizeContent(x){return opts.backgroundColor?chalk[opts.backgroundColor](x):x};text=ansiAlign(text,{align:opts.align});var NL="\n";var PAD=" ";var lines=text.split(NL);if(padding.top>0){lines=Array(padding.top).fill("").concat(lines)}if(padding.bottom>0){lines=lines.concat(Array(padding.bottom).fill(""))}var contentWidth=widestLine(text)+padding.left+padding.right;var paddingLeft=PAD.repeat(padding.left);var columns=termSize().columns;var marginLeft=PAD.repeat(margin.left);if(opts.float==="center"){var padWidth=(columns-contentWidth)/2;marginLeft=PAD.repeat(padWidth)}else if(opts.float==="right"){var _padWidth=Math.max(columns-contentWidth-2,0);marginLeft=PAD.repeat(_padWidth)}var horizontal=chars.horizontal.repeat(contentWidth);var top=colorizeBorder(NL.repeat(margin.top)+marginLeft+chars.topLeft+horizontal+chars.topRight);var bottom=colorizeBorder(marginLeft+chars.bottomLeft+horizontal+chars.bottomRight+NL.repeat(margin.bottom));var side=colorizeBorder(chars.vertical);var middle=lines.map(function(line){var paddingRight=PAD.repeat(contentWidth-stringWidth(line)-padding.left);return marginLeft+side+colorizeContent(paddingLeft+line+paddingRight)+side}).join(NL);return top+NL+middle+NL+bottom};module.exports._borderStyles=cliBoxes},{"ansi-align":1,"camelcase":8,"chalk":13,"cli-boxes":16,"string-width":10,"term-size":44,"widest-line":49}],8:[function(require,module,exports){"use strict";function preserveCamelCase(str){var isLastCharLower=false;var isLastCharUpper=false;var isLastLastCharUpper=false;for(var i=0;i<str.length;i++){var c=str[i];if(isLastCharLower&&/[a-zA-Z]/.test(c)&&c.toUpperCase()===c){str=str.substr(0,i)+"-"+str.substr(i);isLastCharLower=false;isLastLastCharUpper=isLastCharUpper;isLastCharUpper=true;i++}else if(isLastCharUpper&&isLastLastCharUpper&&/[a-zA-Z]/.test(c)&&c.toLowerCase()===c){str=str.substr(0,i-1)+"-"+str.substr(i-1);isLastLastCharUpper=isLastCharUpper;isLastCharUpper=false;isLastCharLower=true}else{isLastCharLower=c.toLowerCase()===c;isLastLastCharUpper=isLastCharUpper;isLastCharUpper=c.toUpperCase()===c}}return str}module.exports=function(str){if(arguments.length>1){str=Array.from(arguments).map(function(x){return x.trim()}).filter(function(x){return x.length}).join("-")}else{str=str.trim()}if(str.length===0){return""}if(str.length===1){return str.toLowerCase()}if(/^[a-z0-9]+$/.test(str)){return str}var hasUpperCase=str!==str.toLowerCase();if(hasUpperCase){str=preserveCamelCase(str)}return str.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,function(m,p1){return p1.toUpperCase()})}},{}],9:[function(require,module,exports){arguments[4][2][0].apply(exports,arguments)},{"dup":2}],10:[function(require,module,exports){arguments[4][3][0].apply(exports,arguments)},{"dup":3,"is-fullwidth-code-point":9,"strip-ansi":42}],11:[function(require,module,exports){},{}],12:[function(require,module,exports){(function(global){"use strict";var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("isarray");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.TYPED_ARRAY_SUPPORT=global.TYPED_ARRAY_SUPPORT!==undefined?global.TYPED_ARRAY_SUPPORT:typedArraySupport();exports.kMaxLength=kMaxLength();function typedArraySupport(){try{var arr=new Uint8Array(1);arr.__proto__={__proto__:Uint8Array.prototype,foo:function foo(){return 42}};return arr.foo()===42&&typeof arr.subarray==="function"&&arr.subarray(1,1).byteLength===0}catch(e){return false}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()<length){throw new RangeError("Invalid typed array length")}if(Buffer.TYPED_ARRAY_SUPPORT){that=new Uint8Array(length);that.__proto__=Buffer.prototype}else{if(that===null){that=new Buffer(length)}that.length=length}return that}function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length)}if(typeof arg==="number"){if(typeof encodingOrOffset==="string"){throw new Error("If encoding is specified then the first argument must be a string")}return allocUnsafe(this,arg)}return from(this,arg,encodingOrOffset,length)}Buffer.poolSize=8192;Buffer._augment=function(arr){arr.__proto__=Buffer.prototype;return arr};function from(that,value,encodingOrOffset,length){if(typeof value==="number"){throw new TypeError("\"value\" argument must not be a number")}if(typeof ArrayBuffer!=="undefined"&&value instanceof ArrayBuffer){return fromArrayBuffer(that,value,encodingOrOffset,length)}if(typeof value==="string"){return fromString(that,value,encodingOrOffset)}return fromObject(that,value)}Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length)};if(Buffer.TYPED_ARRAY_SUPPORT){Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;if(typeof Symbol!=="undefined"&&Symbol.species&&Buffer[Symbol.species]===Buffer){Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:true})}}function assertSize(size){if(typeof size!=="number"){throw new TypeError("\"size\" argument must be a number")}else if(size<0){throw new RangeError("\"size\" argument must not be negative")}}function alloc(that,size,fill,encoding){assertSize(size);if(size<=0){return createBuffer(that,size)}if(fill!==undefined){return typeof encoding==="string"?createBuffer(that,size).fill(fill,encoding):createBuffer(that,size).fill(fill)}return createBuffer(that,size)}Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding)};function allocUnsafe(that,size){assertSize(size);that=createBuffer(that,size<0?0:checked(size)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i<size;++i){that[i]=0}}return that}Buffer.allocUnsafe=function(size){return allocUnsafe(null,size)};Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size)};function fromString(that,string,encoding){if(typeof encoding!=="string"||encoding===""){encoding="utf8"}if(!Buffer.isEncoding(encoding)){throw new TypeError("\"encoding\" must be a valid string encoding")}var length=byteLength(string,encoding)|0;that=createBuffer(that,length);var actual=that.write(string,encoding);if(actual!==length){that=that.slice(0,actual)}return that}function fromArrayLike(that,array){var length=array.length<0?0:checked(array.length)|0;that=createBuffer(that,length);for(var i=0;i<length;i+=1){that[i]=array[i]&255}return that}function fromArrayBuffer(that,array,byteOffset,length){array.byteLength;if(byteOffset<0||array.byteLength<byteOffset){throw new RangeError("'offset' is out of bounds")}if(array.byteLength<byteOffset+(length||0)){throw new RangeError("'length' is out of bounds")}if(byteOffset===undefined&&length===undefined){array=new Uint8Array(array)}else if(length===undefined){array=new Uint8Array(array,byteOffset)}else{array=new Uint8Array(array,byteOffset,length)}if(Buffer.TYPED_ARRAY_SUPPORT){that=array;that.__proto__=Buffer.prototype}else{that=fromArrayLike(that,array)}return that}function fromObject(that,obj){if(Buffer.isBuffer(obj)){var len=checked(obj.length)|0;that=createBuffer(that,len);if(that.length===0){return that}obj.copy(that,0,0,len);return that}if(obj){if(typeof ArrayBuffer!=="undefined"&&obj.buffer instanceof ArrayBuffer||"length"in obj){if(typeof obj.length!=="number"||isnan(obj.length)){return createBuffer(that,0)}return fromArrayLike(that,obj)}if(obj.type==="Buffer"&&isArray(obj.data)){return fromArrayLike(that,obj.data)}}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(length){if(length>=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i<len;++i){if(a[i]!==b[i]){x=a[i];y=b[i];break}}if(x<y)return-1;if(y<x)return 1;return 0};Buffer.isEncoding=function isEncoding(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return true;default:return false;}};Buffer.concat=function concat(list,length){if(!isArray(list)){throw new TypeError("\"list\" argument must be an Array of Buffers")}if(list.length===0){return Buffer.alloc(0)}var i;if(length===undefined){length=0;for(i=0;i<list.length;++i){length+=list[i].length}}var buffer=Buffer.allocUnsafe(length);var pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(!Buffer.isBuffer(buf)){throw new TypeError("\"list\" argument must be an Array of Buffers")}buf.copy(buffer,pos);pos+=buf.length}return buffer};function byteLength(string,encoding){if(Buffer.isBuffer(string)){return string.length}if(typeof ArrayBuffer!=="undefined"&&typeof ArrayBuffer.isView==="function"&&(ArrayBuffer.isView(string)||string instanceof ArrayBuffer)){return string.byteLength}if(typeof string!=="string"){string=""+string}var len=string.length;if(len===0)return 0;var loweredCase=false;for(;;){switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":case undefined:return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return len*2;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true;}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;if(start===undefined||start<0){start=0}if(start>this.length){return""}if(end===undefined||end>this.length){end=this.length}if(end<=0){return""}end>>>=0;start>>>=0;if(end<=start){return""}if(!encoding)encoding="utf8";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true;}}}Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var i=0;i<len;i+=2){swap(this,i,i+1)}return this};Buffer.prototype.swap32=function swap32(){var len=this.length;if(len%4!==0){throw new RangeError("Buffer size must be a multiple of 32-bits")}for(var i=0;i<len;i+=4){swap(this,i,i+3);swap(this,i+1,i+2)}return this};Buffer.prototype.swap64=function swap64(){var len=this.length;if(len%8!==0){throw new RangeError("Buffer size must be a multiple of 64-bits")}for(var i=0;i<len;i+=8){swap(this,i,i+7);swap(this,i+1,i+6);swap(this,i+2,i+5);swap(this,i+3,i+4)}return this};Buffer.prototype.toString=function toString(){var length=this.length|0;if(length===0)return"";if(arguments.length===0)return utf8Slice(this,0,length);return slowToString.apply(this,arguments)};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return"<Buffer "+str+">"};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target)){throw new TypeError("Argument must be a Buffer")}if(start===undefined){start=0}if(end===undefined){end=target?target.length:0}if(thisStart===undefined){thisStart=0}if(thisEnd===undefined){thisEnd=this.length}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError("out of range index")}if(thisStart>=thisEnd&&start>=end){return 0}if(thisStart>=thisEnd){return-1}if(start>=end){return 1}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i<len;++i){if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i];y=targetCopy[i];break}}if(x<y)return-1;if(y<x)return 1;return 0};function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(buffer.length===0)return-1;if(typeof byteOffset==="string"){encoding=byteOffset;byteOffset=0}else if(byteOffset>2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset;if(isNaN(byteOffset)){byteOffset=dir?0:buffer.length-1}if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1}else if(byteOffset<0){if(dir)byteOffset=0;else return-1}if(typeof val==="string"){val=Buffer.from(val,encoding)}if(Buffer.isBuffer(val)){if(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==="function"){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset)}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset)}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le"){if(arr.length<2||val.length<2){return-1}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2}}function read(buf,i){if(indexSize===1){return buf[i]}else{return buf.readUInt16BE(i*indexSize)}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++){if(read(arr,i)===read(val,foundIndex===-1?0:i-foundIndex)){if(foundIndex===-1)foundIndex=i;if(i-foundIndex+1===valLength)return foundIndex*indexSize}else{if(foundIndex!==-1)i-=i-foundIndex;foundIndex=-1}}}else{if(byteOffset+valLength>arrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;j<valLength;j++){if(read(arr,i+j)!==read(val,j)){found=false;break}}if(found)return i}}return-1}Buffer.prototype.includes=function includes(val,byteOffset,encoding){return this.indexOf(val,byteOffset,encoding)!==-1};Buffer.prototype.indexOf=function indexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,true)};Buffer.prototype.lastIndexOf=function lastIndexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,false)};function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;if(!length){length=remaining}else{length=Number(length);if(length>remaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new TypeError("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;i<length;++i){var parsed=parseInt(string.substr(i*2,2),16);if(isNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function latin1Write(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}Buffer.prototype.write=function write(string,offset,length,encoding){if(offset===undefined){encoding="utf8";length=this.length;offset=0}else if(length===undefined&&typeof offset==="string"){encoding=offset;length=this.length;offset=0}else if(isFinite(offset)){offset=offset|0;if(isFinite(length)){length=length|0;if(encoding===undefined)encoding="utf8"}else{encoding=length;length=undefined}}else{throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported")}var remaining=this.length-offset;if(length===undefined||length>remaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true;}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i<end){var firstByte=buf[i];var codePoint=null;var bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}var res="";var i=0;while(i<len){res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH))}return res}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i){ret+=String.fromCharCode(buf[i]&127)}return ret}function latin1Slice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i){ret+=String.fromCharCode(buf[i])}return ret}function hexSlice(buf,start,end){var len=buf.length;if(!start||start<0)start=0;if(!end||end<0||end>len)end=len;var out="";for(var i=start;i<end;++i){out+=toHex(buf[i])}return out}function utf16leSlice(buf,start,end){var bytes=buf.slice(start,end);var res="";for(var i=0;i<bytes.length;i+=2){res+=String.fromCharCode(bytes[i]+bytes[i+1]*256)}return res}Buffer.prototype.slice=function slice(start,end){var len=this.length;start=~~start;end=end===undefined?len:~~end;if(start<0){start+=len;if(start<0)start=0}else if(start>len){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(end<start)end=start;var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT){newBuf=this.subarray(start,end);newBuf.__proto__=Buffer.prototype}else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,undefined);for(var i=0;i<sliceLen;++i){newBuf[i]=this[i+start]}}return newBuf};function checkOffset(offset,ext,length){if(offset%1!==0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256)){val+=this[offset+i]*mul}return val};Buffer.prototype.readUIntBE=function readUIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert){checkOffset(offset,byteLength,this.length)}var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256)){val+=this[offset+i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("\"buffer\" argument must be a Buffer instance");if(value>max||value<min)throw new RangeError("\"value\" argument is out of bounds");if(offset+ext>buf.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1;var i=0;this[offset]=value&255;while(++i<byteLength&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value&255;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i<j;++i){buf[offset+i]=(value&255<<8*(littleEndian?i:1-i))>>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i<j;++i){buf[offset+i]=value>>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=0;this[offset]=value&255;while(++i<byteLength&&(mul*=256)){if(value<0&&sub===0&&this[offset+i-1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e+38,-3.4028234663852886e+38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e+308,-1.7976931348623157e+308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end<start)end=start;if(end===start)return 0;if(target.length===0||this.length===0)return 0;if(targetStart<0){throw new RangeError("targetStart out of bounds")}if(start<0||start>=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart<end-start){end=target.length-targetStart+start}var len=end-start;var i;if(this===target&&start<targetStart&&targetStart<end){for(i=len-1;i>=0;--i){target[i+targetStart]=this[i+start]}}else if(len<1000||!Buffer.TYPED_ARRAY_SUPPORT){for(i=0;i<len;++i){target[i+targetStart]=this[i+start]}}else{Uint8Array.prototype.set.call(target,this.subarray(start,start+len),targetStart)}return len};Buffer.prototype.fill=function fill(val,start,end,encoding){if(typeof val==="string"){if(typeof start==="string"){encoding=start;start=0;end=this.length}else if(typeof end==="string"){encoding=end;end=this.length}if(val.length===1){var code=val.charCodeAt(0);if(code<256){val=code}}if(encoding!==undefined&&typeof encoding!=="string"){throw new TypeError("encoding must be a string")}if(typeof encoding==="string"&&!Buffer.isEncoding(encoding)){throw new TypeError("Unknown encoding: "+encoding)}}else if(typeof val==="number"){val=val&255}if(start<0||this.length<start||this.length<end){throw new RangeError("Out of range index")}if(end<=start){return this}start=start>>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==="number"){for(i=start;i<end;++i){this[i]=val}}else{var bytes=Buffer.isBuffer(val)?val:utf8ToBytes(new Buffer(val,encoding).toString());var len=bytes.length;for(i=0;i<end-start;++i){this[i+start]=bytes[i%len]}}return this};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g;function base64clean(str){str=stringtrim(str).replace(INVALID_BASE64_RE,"");if(str.length<2)return"";while(str.length%4!==0){str=str+"="}return str}function stringtrim(str){if(str.trim)return str.trim();return str.replace(/^\s+|\s+$/g,"")}function toHex(n){if(n<16)return"0"+n.toString(16);return n.toString(16)}function utf8ToBytes(string,units){units=units||Infinity;var codePoint;var length=string.length;var leadSurrogate=null;var bytes=[];for(var i=0;i<length;++i){codePoint=string.charCodeAt(i);if(codePoint>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i<str.length;++i){byteArray.push(str.charCodeAt(i)&255)}return byteArray}function utf16leToBytes(str,units){var c,hi,lo;var byteArray=[];for(var i=0;i<str.length;++i){if((units-=2)<0)break;c=str.charCodeAt(i);hi=c>>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length;++i){if(i+offset>=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function isnan(val){return val!==val}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":6,"ieee754":25,"isarray":28}],13:[function(require,module,exports){(function(process){"use strict";var escapeStringRegexp=require("escape-string-regexp");var ansiStyles=require("ansi-styles");var stripAnsi=require("strip-ansi");var hasAnsi=require("has-ansi");var supportsColor=require("supports-color");var defineProps=Object.defineProperties;var isSimpleWindowsTerm=process.platform==="win32"&&!/^xterm/i.test(process.env.TERM);function Chalk(options){this.enabled=!options||options.enabled===undefined?supportsColor:options.enabled}if(isSimpleWindowsTerm){ansiStyles.blue.open="\x1B[94m"}var styles=function(){var ret={};Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");ret[key]={get:function get(){return build.call(this,this._styles.concat(key))}}});return ret}();var proto=defineProps(function chalk(){},styles);function build(_styles){var builder=function builder(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto;return builder}function applyStyle(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;a<argsLen;a++){str+=" "+args[a]}}if(!this.enabled||!str){return str}var nestedStyles=this._styles;var i=nestedStyles.length;var originalDim=ansiStyles.dim.open;if(isSimpleWindowsTerm&&(nestedStyles.indexOf("gray")!==-1||nestedStyles.indexOf("grey")!==-1)){ansiStyles.dim.open=""}while(i--){var code=ansiStyles[nestedStyles[i]];str=code.open+str.replace(code.closeRe,code.open)+code.close}ansiStyles.dim.open=originalDim;return str}function init(){var ret={};Object.keys(styles).forEach(function(name){ret[name]={get:function get(){return build.call(this,[name])}}});return ret}defineProps(Chalk.prototype,init());module.exports=new Chalk;module.exports.styles=ansiStyles;module.exports.hasColor=hasAnsi;module.exports.stripColor=stripAnsi;module.exports.supportsColor=supportsColor}).call(this,require("_process"))},{"_process":38,"ansi-styles":5,"escape-string-regexp":22,"has-ansi":24,"strip-ansi":42,"supports-color":14}],14:[function(require,module,exports){(function(process){"use strict";var argv=process.argv;var terminator=argv.indexOf("--");var hasFlag=function hasFlag(flag){flag="--"+flag;var pos=argv.indexOf(flag);return pos!==-1&&(terminator!==-1?pos<terminator:true)};module.exports=function(){if("FORCE_COLOR"in process.env){return true}if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")){return false}if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){return true}if(process.stdout&&!process.stdout.isTTY){return false}if(process.platform==="win32"){return true}if("COLORTERM"in process.env){return true}if(process.env.TERM==="dumb"){return false}if(/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)){return true}return false}()}).call(this,require("_process"))},{"_process":38}],15:[function(require,module,exports){module.exports={"single":{"topLeft":"\u250C","topRight":"\u2510","bottomRight":"\u2518","bottomLeft":"\u2514","vertical":"\u2502","horizontal":"\u2500"},"double":{"topLeft":"\u2554","topRight":"\u2557","bottomRight":"\u255D","bottomLeft":"\u255A","vertical":"\u2551","horizontal":"\u2550"},"round":{"topLeft":"\u256D","topRight":"\u256E","bottomRight":"\u256F","bottomLeft":"\u2570","vertical":"\u2502","horizontal":"\u2500"},"single-double":{"topLeft":"\u2553","topRight":"\u2556","bottomRight":"\u255C","bottomLeft":"\u2559","vertical":"\u2551","horizontal":"\u2500"},"double-single":{"topLeft":"\u2552","topRight":"\u2555","bottomRight":"\u255B","bottomLeft":"\u2558","vertical":"\u2502","horizontal":"\u2550"},"classic":{"topLeft":"+","topRight":"+","bottomRight":"+","bottomLeft":"+","vertical":"|","horizontal":"-"}}},{}],16:[function(require,module,exports){"use strict";module.exports=require("./boxes.json")},{"./boxes.json":15}],17:[function(require,module,exports){"use strict";module.exports=function(str,pos){if(str===null||str===undefined){throw TypeError()}str=String(str);var size=str.length;var i=pos?Number(pos):0;if(Number.isNaN(i)){i=0}if(i<0||i>=size){return undefined}var first=str.charCodeAt(i);if(first>=55296&&first<=56319&&size>i+1){var second=str.charCodeAt(i+1);if(second>=56320&&second<=57343){return(first-55296)*1024+second-56320+65536}}return first}},{}],18:[function(require,module,exports){"use strict";var cp=require("child_process");var parse=require("./lib/parse");var enoent=require("./lib/enoent");function spawn(command,args,options){var parsed;var spawned;parsed=parse(command,args,options);spawned=cp.spawn(parsed.command,parsed.args,parsed.options);enoent.hookChildProcess(spawned,parsed);return spawned}module.exports=spawn;module.exports.spawn=spawn;module.exports._parse=parse;module.exports._enoent=enoent},{"./lib/enoent":19,"./lib/parse":20,"child_process":11}],19:[function(require,module,exports){(function(process){"use strict";var isWin=process.platform==="win32";function notFoundError(command,syscall){var err;err=new Error(syscall+" "+command+" ENOENT");err.code=err.errno="ENOENT";err.syscall=syscall+" "+command;return err}function hookChildProcess(cp,parsed){var originalEmit;if(!isWin){return}originalEmit=cp.emit;cp.emit=function(name,arg1){var err;if(name==="exit"){err=verifyENOENT(arg1,parsed,"spawn");if(err){return originalEmit.call(cp,"error",err)}}return originalEmit.apply(cp,arguments)}}function verifyENOENT(status,parsed,syscall){if(isWin&&status===1&&!parsed.file){return notFoundError(parsed.original,syscall)}return null}module.exports.hookChildProcess=hookChildProcess;module.exports.verifyENOENT=verifyENOENT;module.exports.notFoundError=notFoundError}).call(this,require("_process"))},{"_process":38}],20:[function(require,module,exports){(function(process,Buffer){"use strict";var fs=require("fs");var LRU=require("lru-cache");var resolveCommand=require("./resolveCommand");var isWin=process.platform==="win32";var shebangCache=new LRU({max:50,maxAge:30*1000});function readShebang(command){var buffer;var fd;var match;var shebang;if(shebangCache.has(command)){return shebangCache.get(command)}buffer=new Buffer(150);try{fd=fs.openSync(command,"r");fs.readSync(fd,buffer,0,150,0);fs.closeSync(fd)}catch(e){}match=buffer.toString().trim().match(/#!(.+)/i);if(match){shebang=match[1].replace(/\/usr\/bin\/env\s+/i,"")}shebangCache.set(command,shebang);return shebang}function escapeArg(arg,quote){arg=""+arg;if(!quote){arg=arg.replace(/([\(\)%!\^<>&|;,"'\s])/g,"^$1")}else{arg=arg.replace(/(\\*)"/g,"$1$1\\\"");arg=arg.replace(/(\\*)$/,"$1$1");arg="\""+arg+"\""}return arg}function escapeCommand(command){return /^[a-z0-9_-]+$/i.test(command)?command:escapeArg(command,true)}function parse(command,args,options){var shebang;var applyQuotes;var file;var original;if(args&&!Array.isArray(args)){options=args;args=null}args=args?args.slice(0):[];options=options||{};original=command;if(isWin){file=resolveCommand(command);file=file||resolveCommand(command,true);shebang=file&&readShebang(file);if(shebang){args.unshift(file);command=shebang}applyQuotes=command!=="echo";command=escapeCommand(command);args=args.map(function(arg){return escapeArg(arg,applyQuotes)});args=["/s","/c","\""+command+(args.length?" "+args.join(" "):"")+"\""];command=process.env.comspec||"cmd.exe";options.windowsVerbatimArguments=true}return{command:command,args:args,options:options,file:file,original:original}}module.exports=parse}).call(this,require("_process"),require("buffer").Buffer)},{"./resolveCommand":21,"_process":38,"buffer":12,"fs":11,"lru-cache":32}],21:[function(require,module,exports){(function(process){"use strict";var path=require("path");var which=require("which");var LRU=require("lru-cache");var commandCache=new LRU({max:50,maxAge:30*1000});var hasSepInPathRegExp=new RegExp(process.platform==="win32"?/[\/\\]/:/\//);function resolveCommand(command,noExtension){var resolved;if(hasSepInPathRegExp.test(command)){command=path.resolve(command)}noExtension=!!noExtension;resolved=commandCache.get(command+"!"+noExtension);if(commandCache.has(command)){return commandCache.get(command)}try{resolved=!noExtension?which.sync(command):which.sync(command,{pathExt:path.delimiter+(process.env.PATHEXT||"")})}catch(e){}commandCache.set(command+"!"+noExtension,resolved);return resolved}module.exports=resolveCommand}).call(this,require("_process"))},{"_process":38,"lru-cache":32,"path":36,"which":48}],22:[function(require,module,exports){"use strict";var matchOperatorsRe=/[|\\{}()[\]^$+*?.]/g;module.exports=function(str){if(typeof str!=="string"){throw new TypeError("Expected a string")}return str.replace(matchOperatorsRe,"\\$&")}},{}],23:[function(require,module,exports){(function(process){"use strict";var childProcess=require("child_process");var crossSpawnAsync=require("cross-spawn-async");var stripEof=require("strip-eof");var objectAssign=require("object-assign");var npmRunPath=require("npm-run-path");var isStream=require("is-stream");var pathKey=require("path-key")();var TEN_MEBIBYTE=1024*1024*10;function handleArgs(cmd,args,opts){var parsed;if(opts&&opts.__winShell===true){delete opts.__winShell;parsed={command:cmd,args:args,options:opts,file:cmd,original:cmd}}else{parsed=crossSpawnAsync._parse(cmd,args,opts)}opts=objectAssign({maxBuffer:TEN_MEBIBYTE,stripEof:true,preferLocal:true,encoding:"utf8"},parsed.options);if(opts.preferLocal){opts.env=objectAssign({},opts.env||process.env);opts.env[pathKey]=npmRunPath({cwd:opts.cwd,path:opts.env[pathKey]})}return{cmd:parsed.command,args:parsed.args,opts:opts}}function handleInput(spawned,opts){var input=opts.input;if(input===null||input===undefined){return}if(isStream(input)){input.pipe(spawned.stdin)}else{spawned.stdin.end(input)}}function handleOutput(opts,val){if(opts.stripEof){val=stripEof(val)}return val}function handleShell(fn,cmd,opts){var file;var args;opts=objectAssign({},opts);if(process.platform==="win32"){opts.__winShell=true;file=process.env.comspec||"cmd.exe";args=["/s","/c","\""+cmd+"\""];opts.windowsVerbatimArguments=true}else{file="/bin/sh";args=["-c",cmd]}if(opts.shell){file=opts.shell}return fn(file,args,opts)}module.exports=function(cmd,args,opts){var spawned;var promise=new Promise(function(resolve,reject){var parsed=handleArgs(cmd,args,opts);spawned=childProcess.execFile(parsed.cmd,parsed.args,parsed.opts,function(err,stdout,stderr){if(err){err.stdout=stdout;err.stderr=stderr;err.message+=stdout;reject(err);return}resolve({stdout:handleOutput(parsed.opts,stdout),stderr:handleOutput(parsed.opts,stderr)})});crossSpawnAsync._enoent.hookChildProcess(spawned,parsed);handleInput(spawned,parsed.opts)});spawned.then=promise.then.bind(promise);spawned["catch"]=promise["catch"].bind(promise);return spawned};module.exports.stdout=function(){return module.exports.apply(null,arguments).then(function(x){return x.stdout})};module.exports.stderr=function(){return module.exports.apply(null,arguments).then(function(x){return x.stderr})};module.exports.shell=function(cmd,opts){return handleShell(module.exports,cmd,opts)};module.exports.spawn=function(cmd,args,opts){var parsed=handleArgs(cmd,args,opts);var spawned=childProcess.spawn(parsed.cmd,parsed.args,parsed.opts);crossSpawnAsync._enoent.hookChildProcess(spawned,parsed);return spawned};module.exports.sync=function(cmd,args,opts){var parsed=handleArgs(cmd,args,opts);if(isStream(parsed.opts.input)){throw new TypeError("The `input` option cannot be a stream in sync mode")}var result=childProcess.spawnSync(parsed.cmd,parsed.args,parsed.opts);if(parsed.opts.stripEof){result.stdout=stripEof(result.stdout);result.stderr=stripEof(result.stderr)}return result};module.exports.shellSync=function(cmd,opts){return handleShell(module.exports.sync,cmd,opts)}}).call(this,require("_process"))},{"_process":38,"child_process":11,"cross-spawn-async":18,"is-stream":27,"npm-run-path":33,"object-assign":35,"path-key":37,"strip-eof":43}],24:[function(require,module,exports){"use strict";var ansiRegex=require("ansi-regex");var re=new RegExp(ansiRegex().source);module.exports=re.test.bind(re)},{"ansi-regex":4}],25:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],26:[function(require,module,exports){"use strict";var numberIsNan=require("number-is-nan");module.exports=function(x){if(numberIsNan(x)){return false}if(x>=4352&&(x<=4447||9001===x||9002===x||11904<=x&&x<=12871&&x!==12351||12880<=x&&x<=19903||19968<=x&&x<=42182||43360<=x&&x<=43388||44032<=x&&x<=55203||63744<=x&&x<=64255||65040<=x&&x<=65049||65072<=x&&x<=65131||65281<=x&&x<=65376||65504<=x&&x<=65510||110592<=x&&x<=110593||127488<=x&&x<=127569||131072<=x&&x<=262141)){return true}return false}},{"number-is-nan":34}],27:[function(require,module,exports){"use strict";var isStream=module.exports=function(stream){return stream!==null&&(typeof stream==="undefined"?"undefined":_typeof(stream))==="object"&&typeof stream.pipe==="function"};isStream.writable=function(stream){return isStream(stream)&&stream.writable!==false&&typeof stream._write==="function"&&_typeof(stream._writableState)==="object"};isStream.readable=function(stream){return isStream(stream)&&stream.readable!==false&&typeof stream._read==="function"&&_typeof(stream._readableState)==="object"};isStream.duplex=function(stream){return isStream.writable(stream)&&isStream.readable(stream)};isStream.transform=function(stream){return isStream.duplex(stream)&&typeof stream._transform==="function"&&_typeof(stream._transformState)==="object"}},{}],28:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return toString.call(arr)=="[object Array]"}},{}],29:[function(require,module,exports){(function(process,global){var fs=require("fs");var core;if(process.platform==="win32"||global.TESTING_WINDOWS){core=require("./windows.js")}else{core=require("./mode.js")}module.exports=isexe;isexe.sync=sync;function isexe(path,options,cb){if(typeof options==="function"){cb=options;options={}}if(!cb){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise(function(resolve,reject){isexe(path,options||{},function(er,is){if(er){reject(er)}else{resolve(is)}})})}core(path,options||{},function(er,is){if(er){if(er.code==="EACCES"||options&&options.ignoreErrors){er=null;is=false}}cb(er,is)})}function sync(path,options){try{return core.sync(path,options||{})}catch(er){if(options&&options.ignoreErrors||er.code==="EACCES"){return false}else{throw er}}}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./mode.js":30,"./windows.js":31,"_process":38,"fs":11}],30:[function(require,module,exports){(function(process){module.exports=isexe;isexe.sync=sync;var fs=require("fs");function isexe(path,options,cb){fs.stat(path,function(er,stat){cb(er,er?false:checkStat(stat,options))})}function sync(path,options){return checkStat(fs.statSync(path),options)}function checkStat(stat,options){return stat.isFile()&&checkMode(stat,options)}function checkMode(stat,options){var mod=stat.mode;var uid=stat.uid;var gid=stat.gid;var myUid=options.uid!==undefined?options.uid:process.getuid&&process.getuid();var myGid=options.gid!==undefined?options.gid:process.getgid&&process.getgid();var u=parseInt("100",8);var g=parseInt("010",8);var o=parseInt("001",8);var ug=u|g;var ret=mod&o||mod&g&&gid===myGid||mod&u&&uid===myUid||mod&ug&&myUid===0;return ret}}).call(this,require("_process"))},{"_process":38,"fs":11}],31:[function(require,module,exports){(function(process){module.exports=isexe;isexe.sync=sync;var fs=require("fs");function checkPathExt(path,options){var pathext=options.pathExt!==undefined?options.pathExt:process.env.PATHEXT;if(!pathext){return true}pathext=pathext.split(";");if(pathext.indexOf("")!==-1){return true}for(var i=0;i<pathext.length;i++){var p=pathext[i].toLowerCase();if(p&&path.substr(-p.length).toLowerCase()===p){return true}}return false}function checkStat(stat,path,options){if(!stat.isSymbolicLink()&&!stat.isFile()){return false}return checkPathExt(path,options)}function isexe(path,options,cb){fs.stat(path,function(er,stat){cb(er,er?false:checkStat(stat,path,options))})}function sync(path,options){return checkStat(fs.statSync(path),path,options)}}).call(this,require("_process"))},{"_process":38,"fs":11}],32:[function(require,module,exports){"use strict";module.exports=LRUCache;var Map=require("pseudomap");var util=require("util");var Yallist=require("yallist");var hasSymbol=typeof Symbol==="function";var makeSymbol;if(hasSymbol){makeSymbol=function makeSymbol(key){return Symbol["for"](key)}}else{makeSymbol=function makeSymbol(key){return"_"+key}}var MAX=makeSymbol("max");var LENGTH=makeSymbol("length");var LENGTH_CALCULATOR=makeSymbol("lengthCalculator");var ALLOW_STALE=makeSymbol("allowStale");var MAX_AGE=makeSymbol("maxAge");var DISPOSE=makeSymbol("dispose");var NO_DISPOSE_ON_SET=makeSymbol("noDisposeOnSet");var LRU_LIST=makeSymbol("lruList");var CACHE=makeSymbol("cache");function naiveLength(){return 1}function LRUCache(options){if(!(this instanceof LRUCache)){return new LRUCache(options)}if(typeof options==="number"){options={max:options}}if(!options){options={}}var max=this[MAX]=options.max;if(!max||!(typeof max==="number")||max<=0){this[MAX]=Infinity}var lc=options.length||naiveLength;if(typeof lc!=="function"){lc=naiveLength}this[LENGTH_CALCULATOR]=lc;this[ALLOW_STALE]=options.stale||false;this[MAX_AGE]=options.maxAge||0;this[DISPOSE]=options.dispose;this[NO_DISPOSE_ON_SET]=options.noDisposeOnSet||false;this.reset()}Object.defineProperty(LRUCache.prototype,"max",{set:function set(mL){if(!mL||!(typeof mL==="number")||mL<=0){mL=Infinity}this[MAX]=mL;trim(this)},get:function get(){return this[MAX]},enumerable:true});Object.defineProperty(LRUCache.prototype,"allowStale",{set:function set(allowStale){this[ALLOW_STALE]=!!allowStale},get:function get(){return this[ALLOW_STALE]},enumerable:true});Object.defineProperty(LRUCache.prototype,"maxAge",{set:function set(mA){if(!mA||!(typeof mA==="number")||mA<0){mA=0}this[MAX_AGE]=mA;trim(this)},get:function get(){return this[MAX_AGE]},enumerable:true});Object.defineProperty(LRUCache.prototype,"lengthCalculator",{set:function set(lC){if(typeof lC!=="function"){lC=naiveLength}if(lC!==this[LENGTH_CALCULATOR]){this[LENGTH_CALCULATOR]=lC;this[LENGTH]=0;this[LRU_LIST].forEach(function(hit){hit.length=this[LENGTH_CALCULATOR](hit.value,hit.key);this[LENGTH]+=hit.length},this)}trim(this)},get:function get(){return this[LENGTH_CALCULATOR]},enumerable:true});Object.defineProperty(LRUCache.prototype,"length",{get:function get(){return this[LENGTH]},enumerable:true});Object.defineProperty(LRUCache.prototype,"itemCount",{get:function get(){return this[LRU_LIST].length},enumerable:true});LRUCache.prototype.rforEach=function(fn,thisp){thisp=thisp||this;for(var walker=this[LRU_LIST].tail;walker!==null;){var prev=walker.prev;forEachStep(this,fn,walker,thisp);walker=prev}};function forEachStep(self,fn,node,thisp){var hit=node.value;if(isStale(self,hit)){del(self,node);if(!self[ALLOW_STALE]){hit=undefined}}if(hit){fn.call(thisp,hit.value,hit.key,self)}}LRUCache.prototype.forEach=function(fn,thisp){thisp=thisp||this;for(var walker=this[LRU_LIST].head;walker!==null;){var next=walker.next;forEachStep(this,fn,walker,thisp);walker=next}};LRUCache.prototype.keys=function(){return this[LRU_LIST].toArray().map(function(k){return k.key},this)};LRUCache.prototype.values=function(){return this[LRU_LIST].toArray().map(function(k){return k.value},this)};LRUCache.prototype.reset=function(){if(this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length){this[LRU_LIST].forEach(function(hit){this[DISPOSE](hit.key,hit.value)},this)}this[CACHE]=new Map;this[LRU_LIST]=new Yallist;this[LENGTH]=0};LRUCache.prototype.dump=function(){return this[LRU_LIST].map(function(hit){if(!isStale(this,hit)){return{k:hit.key,v:hit.value,e:hit.now+(hit.maxAge||0)}}},this).toArray().filter(function(h){return h})};LRUCache.prototype.dumpLru=function(){return this[LRU_LIST]};LRUCache.prototype.inspect=function(n,opts){var str="LRUCache {";var extras=false;var as=this[ALLOW_STALE];if(as){str+="\n  allowStale: true";extras=true}var max=this[MAX];if(max&&max!==Infinity){if(extras){str+=","}str+="\n  max: "+util.inspect(max,opts);extras=true}var maxAge=this[MAX_AGE];if(maxAge){if(extras){str+=","}str+="\n  maxAge: "+util.inspect(maxAge,opts);extras=true}var lc=this[LENGTH_CALCULATOR];if(lc&&lc!==naiveLength){if(extras){str+=","}str+="\n  length: "+util.inspect(this[LENGTH],opts);extras=true}var didFirst=false;this[LRU_LIST].forEach(function(item){if(didFirst){str+=",\n  "}else{if(extras){str+=",\n"}didFirst=true;str+="\n  "}var key=util.inspect(item.key).split("\n").join("\n  ");var val={value:item.value};if(item.maxAge!==maxAge){val.maxAge=item.maxAge}if(lc!==naiveLength){val.length=item.length}if(isStale(this,item)){val.stale=true}val=util.inspect(val,opts).split("\n").join("\n  ");str+=key+" => "+val});if(didFirst||extras){str+="\n"}str+="}";return str};LRUCache.prototype.set=function(key,value,maxAge){maxAge=maxAge||this[MAX_AGE];var now=maxAge?Date.now():0;var len=this[LENGTH_CALCULATOR](value,key);if(this[CACHE].has(key)){if(len>this[MAX]){del(this,this[CACHE].get(key));return false}var node=this[CACHE].get(key);var item=node.value;if(this[DISPOSE]){if(!this[NO_DISPOSE_ON_SET]){this[DISPOSE](key,item.value)}}item.now=now;item.maxAge=maxAge;item.value=value;this[LENGTH]+=len-item.length;item.length=len;this.get(key);trim(this);return true}var hit=new Entry(key,value,len,now,maxAge);if(hit.length>this[MAX]){if(this[DISPOSE]){this[DISPOSE](key,value)}return false}this[LENGTH]+=hit.length;this[LRU_LIST].unshift(hit);this[CACHE].set(key,this[LRU_LIST].head);trim(this);return true};LRUCache.prototype.has=function(key){if(!this[CACHE].has(key))return false;var hit=this[CACHE].get(key).value;if(isStale(this,hit)){return false}return true};LRUCache.prototype.get=function(key){return get(this,key,true)};LRUCache.prototype.peek=function(key){return get(this,key,false)};LRUCache.prototype.pop=function(){var node=this[LRU_LIST].tail;if(!node)return null;del(this,node);return node.value};LRUCache.prototype.del=function(key){del(this,this[CACHE].get(key))};LRUCache.prototype.load=function(arr){this.reset();var now=Date.now();for(var l=arr.length-1;l>=0;l--){var hit=arr[l];var expiresAt=hit.e||0;if(expiresAt===0){this.set(hit.k,hit.v)}else{var maxAge=expiresAt-now;if(maxAge>0){this.set(hit.k,hit.v,maxAge)}}}};LRUCache.prototype.prune=function(){var self=this;this[CACHE].forEach(function(value,key){get(self,key,false)})};function get(self,key,doUse){var node=self[CACHE].get(key);if(node){var hit=node.value;if(isStale(self,hit)){del(self,node);if(!self[ALLOW_STALE])hit=undefined}else{if(doUse){self[LRU_LIST].unshiftNode(node)}}if(hit)hit=hit.value}return hit}function isStale(self,hit){if(!hit||!hit.maxAge&&!self[MAX_AGE]){return false}var stale=false;var diff=Date.now()-hit.now;if(hit.maxAge){stale=diff>hit.maxAge}else{stale=self[MAX_AGE]&&diff>self[MAX_AGE]}return stale}function trim(self){if(self[LENGTH]>self[MAX]){for(var walker=self[LRU_LIST].tail;self[LENGTH]>self[MAX]&&walker!==null;){var prev=walker.prev;del(self,walker);walker=prev}}}function del(self,node){if(node){var hit=node.value;if(self[DISPOSE]){self[DISPOSE](hit.key,hit.value)}self[LENGTH]-=hit.length;self[CACHE]["delete"](hit.key);self[LRU_LIST].removeNode(node)}}function Entry(key,value,length,now,maxAge){this.key=key;this.value=value;this.length=length;this.now=now;this.maxAge=maxAge||0}},{"pseudomap":39,"util":47,"yallist":50}],33:[function(require,module,exports){(function(process){"use strict";var path=require("path");var pathKey=require("path-key");module.exports=function(opts){opts=opts||{};var prev;var pth=path.resolve(opts.cwd||".");var ret=[];while(prev!==pth){ret.push(path.join(pth,"node_modules/.bin"));prev=pth;pth=path.resolve(pth,"..")}ret.push(path.dirname(process.execPath));return ret.concat(opts.path||process.env[pathKey()]).join(path.delimiter)}}).call(this,require("_process"))},{"_process":38,"path":36,"path-key":37}],34:[function(require,module,exports){"use strict";module.exports=Number.isNaN||function(x){return x!==x}},{}],35:[function(require,module,exports){"use strict";var getOwnPropertySymbols=Object.getOwnPropertySymbols;var hasOwnProperty=Object.prototype.hasOwnProperty;var propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val===null||val===undefined){throw new TypeError("Object.assign cannot be called with null or undefined")}return Object(val)}function shouldUseNative(){try{if(!Object.assign){return false}var test1=new String("abc");test1[5]="de";if(Object.getOwnPropertyNames(test1)[0]==="5"){return false}var test2={};for(var i=0;i<10;i++){test2["_"+String.fromCharCode(i)]=i}var order2=Object.getOwnPropertyNames(test2).map(function(n){return test2[n]});if(order2.join("")!=="0123456789"){return false}var test3={};"abcdefghijklmnopqrst".split("").forEach(function(letter){test3[letter]=letter});if(Object.keys(Object.assign({},test3)).join("")!=="abcdefghijklmnopqrst"){return false}return true}catch(err){return false}}module.exports=shouldUseNative()?Object.assign:function(target,source){var from;var to=toObject(target);var symbols;for(var s=1;s<arguments.length;s++){from=Object(arguments[s]);for(var key in from){if(hasOwnProperty.call(from,key)){to[key]=from[key]}}if(getOwnPropertySymbols){symbols=getOwnPropertySymbols(from);for(var i=0;i<symbols.length;i++){if(propIsEnumerable.call(from,symbols[i])){to[symbols[i]]=from[symbols[i]]}}}}return to}},{}],36:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function splitPath(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!=="")break}var end=arr.length-1;for(;end>=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push("..")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join("/")};exports.sep="/";exports.delimiter=":";exports.dirname=function(path){var result=splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir};exports.basename=function(path,ext){var f=splitPath(path)[2];if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length)}return f};exports.extname=function(path){return splitPath(path)[3]};function filter(xs,f){if(xs.filter)return xs.filter(f);var res=[];for(var i=0;i<xs.length;i++){if(f(xs[i],i,xs))res.push(xs[i])}return res}var substr="ab".substr(-1)==="b"?function(str,start,len){return str.substr(start,len)}:function(str,start,len){if(start<0)start=str.length+start;return str.substr(start,len)}}).call(this,require("_process"))},{"_process":38}],37:[function(require,module,exports){(function(process){"use strict";module.exports=function(opts){opts=opts||{};var env=opts.env||process.env;var platform=opts.platform||process.platform;if(platform!=="win32"){return"PATH"}return Object.keys(env).filter(function(x){return x.toUpperCase()==="PATH"})[0]||"Path"}}).call(this,require("_process"))},{"_process":38}],38:[function(require,module,exports){var process=module.exports={};var cachedSetTimeout;var cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){cachedSetTimeout=setTimeout}else{cachedSetTimeout=defaultSetTimout}}catch(e){cachedSetTimeout=defaultSetTimout}try{if(typeof clearTimeout==="function"){cachedClearTimeout=clearTimeout}else{cachedClearTimeout=defaultClearTimeout}}catch(e){cachedClearTimeout=defaultClearTimeout}})();function runTimeout(fun){if(cachedSetTimeout===setTimeout){return setTimeout(fun,0)}if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout){cachedSetTimeout=setTimeout;return setTimeout(fun,0)}try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout){return clearTimeout(marker)}if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout){cachedClearTimeout=clearTimeout;return clearTimeout(marker)}try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){if(!draining||!currentQueue){return}draining=false;if(currentQueue.length){queue=currentQueue.concat(queue)}else{queueIndex=-1}if(queue.length){drainQueue()}}function drainQueue(){if(draining){return}var timeout=runTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run()}}queueIndex=-1;len=queue.length}currentQueue=null;draining=false;runClearTimeout(timeout)}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1){for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i]}}queue.push(new Item(fun,args));if(queue.length===1&&!draining){runTimeout(drainQueue)}};function Item(fun,array){this.fun=fun;this.array=array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(name){return[]};process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")};process.umask=function(){return 0}},{}],39:[function(require,module,exports){(function(process){if(process.env.npm_package_name==="pseudomap"&&process.env.npm_lifecycle_script==="test")process.env.TEST_PSEUDOMAP="true";if(typeof Map==="function"&&!process.env.TEST_PSEUDOMAP){module.exports=Map}else{module.exports=require("./pseudomap")}}).call(this,require("_process"))},{"./pseudomap":40,"_process":38}],40:[function(require,module,exports){var hasOwnProperty=Object.prototype.hasOwnProperty;module.exports=PseudoMap;function PseudoMap(set){if(!(this instanceof PseudoMap))throw new TypeError("Constructor PseudoMap requires 'new'");this.clear();if(set){if(set instanceof PseudoMap||typeof Map==="function"&&set instanceof Map)set.forEach(function(value,key){this.set(key,value)},this);else if(Array.isArray(set))set.forEach(function(kv){this.set(kv[0],kv[1])},this);else throw new TypeError("invalid argument")}}PseudoMap.prototype.forEach=function(fn,thisp){thisp=thisp||this;Object.keys(this._data).forEach(function(k){if(k!=="size")fn.call(thisp,this._data[k].value,this._data[k].key)},this)};PseudoMap.prototype.has=function(k){return!!find(this._data,k)};PseudoMap.prototype.get=function(k){var res=find(this._data,k);return res&&res.value};PseudoMap.prototype.set=function(k,v){set(this._data,k,v)};PseudoMap.prototype["delete"]=function(k){var res=find(this._data,k);if(res){delete this._data[res._index];this._data.size--}};PseudoMap.prototype.clear=function(){var data=Object.create(null);data.size=0;Object.defineProperty(this,"_data",{value:data,enumerable:false,configurable:true,writable:false})};Object.defineProperty(PseudoMap.prototype,"size",{get:function get(){return this._data.size},set:function set(n){},enumerable:true,configurable:true});PseudoMap.prototype.values=PseudoMap.prototype.keys=PseudoMap.prototype.entries=function(){throw new Error("iterators are not implemented in this version")};function same(a,b){return a===b||a!==a&&b!==b}function Entry(k,v,i){this.key=k;this.value=v;this._index=i}function find(data,k){for(var i=0,s="_"+k,key=s;hasOwnProperty.call(data,key);key=s+i++){if(same(data[key].key,k))return data[key]}}function set(data,k,v){for(var i=0,s="_"+k,key=s;hasOwnProperty.call(data,key);key=s+i++){if(same(data[key].key,k)){data[key].value=v;return}}data.size++;data[key]=new Entry(k,v,key)}},{}],41:[function(require,module,exports){"use strict";var stripAnsi=require("strip-ansi");var codePointAt=require("code-point-at");var isFullwidthCodePoint=require("is-fullwidth-code-point");module.exports=function(str){if(typeof str!=="string"||str.length===0){return 0}var width=0;str=stripAnsi(str);for(var i=0;i<str.length;i++){var code=codePointAt(str,i);if(code<=31||code>=127&&code<=159){continue}if(code>=65536){i++}if(isFullwidthCodePoint(code)){width+=2}else{width++}}return width}},{"code-point-at":17,"is-fullwidth-code-point":26,"strip-ansi":42}],42:[function(require,module,exports){"use strict";var ansiRegex=require("ansi-regex")();module.exports=function(str){return typeof str==="string"?str.replace(ansiRegex,""):str}},{"ansi-regex":4}],43:[function(require,module,exports){"use strict";module.exports=function(x){var lf=typeof x==="string"?"\n":"\n".charCodeAt();var cr=typeof x==="string"?"\r":"\r".charCodeAt();if(x[x.length-1]===lf){x=x.slice(0,x.length-1)}if(x[x.length-1]===cr){x=x.slice(0,x.length-1)}return x}},{}],44:[function(require,module,exports){(function(process,__dirname){"use strict";var path=require("path");var execa=require("execa");var create=function create(columns,rows){return{columns:parseInt(columns,10),rows:parseInt(rows,10)}};module.exports=function(){var env=process.env;var stdout=process.stdout;var stderr=process.stderr;if(stdout&&stdout.columns&&stdout.rows){return create(stdout.columns,stdout.rows)}if(stderr&&stderr.columns&&stderr.rows){return create(stderr.columns,stderr.rows)}if(env.COLUMNS&&env.LINES){return create(env.COLUMNS,env.LINES)}if(process.platform==="win32"){try{var size=execa.sync(path.join(__dirname,"vendor/win-term-size.exe")).stdout.split(/\r?\n/);if(size.length===2){return create(size[0],size[1])}}catch(err){}}else{if(process.platform==="darwin"){try{var _size=execa.shellSync(path.join(__dirname,"vendor/resize"),["-u"]).stdout.match(/\d+/g);if(_size.length===2){return create(_size[0],_size[1])}}catch(err){}}try{var _size2=execa.sync("resize",["-u"]).stdout.match(/\d+/g);if(_size2.length===2){return create(_size2[0],_size2[1])}}catch(err){}try{var columns=execa.sync("tput",["cols"]).stdout;var rows=execa.sync("tput",["lines"]).stdout;if(columns&&rows){return create(columns,rows)}}catch(err){}}return create(80,24)}}).call(this,require("_process"),"/node_modules/term-size")},{"_process":38,"execa":23,"path":36}],45:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function TempCtor(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],46:[function(require,module,exports){module.exports=function isBuffer(arg){return arg&&(typeof arg==="undefined"?"undefined":_typeof(arg))==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},{}],47:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i<arguments.length;i++){objects.push(inspect(arguments[i]))}return objects.join(" ")}var i=1;var args=arguments;var len=args.length;var str=String(f).replace(formatRegExp,function(x){if(x==="%%")return"%";if(i>=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x;}});for(var x=args[i];i<len;x=args[++i]){if(isNull(x)||!isObject(x)){str+=" "+x}else{str+=" "+inspect(x)}}return str};exports.deprecate=function(fn,msg){if(isUndefined(global.process)){return function(){return exports.deprecate(fn,msg).apply(this,arguments)}}if(process.noDeprecation===true){return fn}var warned=false;function deprecated(){if(!warned){if(process.throwDeprecation){throw new Error(msg)}else if(process.traceDeprecation){console.trace(msg)}else{console.error(msg)}warned=true}return fn.apply(this,arguments)}return deprecated};var debugs={};var debugEnviron;exports.debuglog=function(set){if(isUndefined(debugEnviron))debugEnviron=process.env.NODE_DEBUG||"";set=set.toUpperCase();if(!debugs[set]){if(new RegExp("\\b"+set+"\\b","i").test(debugEnviron)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else{debugs[set]=function(){}}}return debugs[set]};function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};if(arguments.length>=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}if(isUndefined(ctx.showHidden))ctx.showHidden=false;if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect;inspect.colors={"bold":[1,22],"italic":[3,23],"underline":[4,24],"inverse":[7,27],"white":[37,39],"grey":[90,39],"black":[30,39],"blue":[34,39],"cyan":[36,39],"green":[32,39],"magenta":[35,39],"red":[31,39],"yellow":[33,39]};inspect.styles={"special":"cyan","number":"yellow","boolean":"yellow","undefined":"grey","null":"bold","string":"green","date":"magenta","regexp":"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"\x1B["+inspect.colors[style][0]+"m"+str+"\x1B["+inspect.colors[style][1]+"m"}else{return str}}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach(function(val,idx){hash[val]=true});return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}if(isDate(value)){return ctx.stylize(Date.prototype.toString.call(value),"date")}if(isError(value)){return formatError(value)}}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}if(isError(value)){base=" "+formatError(value)}if(keys.length===0&&(!array||value.length==0)){return braces[0]+base+braces[1]}if(recurseTimes<0){if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}else{return ctx.stylize("[Object]","special")}}ctx.seen.push(value);var output;if(array){output=formatArray(ctx,value,recurseTimes,visibleKeys,keys)}else{output=keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)})}ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\"")+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i<l;++i){if(hasOwnProperty(value,String(i))){output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),true))}else{output.push("")}}keys.forEach(function(key){if(!key.match(/^\d+$/)){output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,true))}});return output}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]};if(desc.get){if(desc.set){str=ctx.stylize("[Getter/Setter]","special")}else{str=ctx.stylize("[Getter]","special")}}else{if(desc.set){str=ctx.stylize("[Setter]","special")}}if(!hasOwnProperty(visibleKeys,key)){name="["+key+"]"}if(!str){if(ctx.seen.indexOf(desc.value)<0){if(isNull(recurseTimes)){str=formatValue(ctx,desc.value,null)}else{str=formatValue(ctx,desc.value,recurseTimes-1)}if(str.indexOf("\n")>-1){if(array){str=str.split("\n").map(function(line){return"  "+line}).join("\n").substr(2)}else{str="\n"+str.split("\n").map(function(line){return"   "+line}).join("\n")}}}else{str=ctx.stylize("[Circular]","special")}}if(isUndefined(name)){if(array&&key.match(/^\d+$/)){return str}name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,"\"").replace(/(^"|"$)/g,"'");name=ctx.stylize(name,"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(length>60){return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n  ")+" "+braces[1]}return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return(typeof arg==="undefined"?"undefined":_typeof(arg))==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return(typeof arg==="undefined"?"undefined":_typeof(arg))==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||(typeof arg==="undefined"?"undefined":_typeof(arg))==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=require("./support/isBuffer");function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--){origin[keys[i]]=add[keys[i]]}return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":46,"_process":38,"inherits":45}],48:[function(require,module,exports){(function(process){module.exports=which;which.sync=whichSync;var isWindows=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";var path=require("path");var COLON=isWindows?";":":";var isexe=require("isexe");function getNotFoundError(cmd){var er=new Error("not found: "+cmd);er.code="ENOENT";return er}function getPathInfo(cmd,opt){var colon=opt.colon||COLON;var pathEnv=opt.path||process.env.PATH||"";var pathExt=[""];pathEnv=pathEnv.split(colon);var pathExtExe="";if(isWindows){pathEnv.unshift(process.cwd());pathExtExe=opt.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM";pathExt=pathExtExe.split(colon);if(cmd.indexOf(".")!==-1&&pathExt[0]!=="")pathExt.unshift("")}if(cmd.match(/\//)||isWindows&&cmd.match(/\\/))pathEnv=[""];return{env:pathEnv,ext:pathExt,extExe:pathExtExe}}function which(cmd,opt,cb){if(typeof opt==="function"){cb=opt;opt={}}var info=getPathInfo(cmd,opt);var pathEnv=info.env;var pathExt=info.ext;var pathExtExe=info.extExe;var found=[];(function F(i,l){if(i===l){if(opt.all&&found.length)return cb(null,found);else return cb(getNotFoundError(cmd))}var pathPart=pathEnv[i];if(pathPart.charAt(0)==="\""&&pathPart.slice(-1)==="\"")pathPart=pathPart.slice(1,-1);var p=path.join(pathPart,cmd);if(!pathPart&&/^\.[\\\/]/.test(cmd)){p=cmd.slice(0,2)+p};(function E(ii,ll){if(ii===ll)return F(i+1,l);var ext=pathExt[ii];isexe(p+ext,{pathExt:pathExtExe},function(er,is){if(!er&&is){if(opt.all)found.push(p+ext);else return cb(null,p+ext)}return E(ii+1,ll)})})(0,pathExt.length)})(0,pathEnv.length)}function whichSync(cmd,opt){opt=opt||{};var info=getPathInfo(cmd,opt);var pathEnv=info.env;var pathExt=info.ext;var pathExtExe=info.extExe;var found=[];for(var i=0,l=pathEnv.length;i<l;i++){var pathPart=pathEnv[i];if(pathPart.charAt(0)==="\""&&pathPart.slice(-1)==="\"")pathPart=pathPart.slice(1,-1);var p=path.join(pathPart,cmd);if(!pathPart&&/^\.[\\\/]/.test(cmd)){p=cmd.slice(0,2)+p}for(var j=0,ll=pathExt.length;j<ll;j++){var cur=p+pathExt[j];var is;try{is=isexe.sync(cur,{pathExt:pathExtExe});if(is){if(opt.all)found.push(cur);else return cur}}catch(ex){}}}if(opt.all&&found.length)return found;throw getNotFoundError(cmd)}}).call(this,require("_process"))},{"_process":38,"isexe":29,"path":36}],49:[function(require,module,exports){"use strict";var stringWidth=require("string-width");module.exports=function(str){return Math.max.apply(null,str.split("\n").map(function(x){return stringWidth(x)}))}},{"string-width":41}],50:[function(require,module,exports){module.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(list){var self=this;if(!(self instanceof Yallist)){self=new Yallist}self.tail=null;self.head=null;self.length=0;if(list&&typeof list.forEach==="function"){list.forEach(function(item){self.push(item)})}else if(arguments.length>0){for(var i=0,l=arguments.length;i<l;i++){self.push(arguments[i])}}return self}Yallist.prototype.removeNode=function(node){if(node.list!==this){throw new Error("removing node which does not belong to this list")}var next=node.next;var prev=node.prev;if(next){next.prev=prev}if(prev){prev.next=next}if(node===this.head){this.head=next}if(node===this.tail){this.tail=prev}node.list.length--;node.next=null;node.prev=null;node.list=null};Yallist.prototype.unshiftNode=function(node){if(node===this.head){return}if(node.list){node.list.removeNode(node)}var head=this.head;node.list=this;node.next=head;if(head){head.prev=node}this.head=node;if(!this.tail){this.tail=node}this.length++};Yallist.prototype.pushNode=function(node){if(node===this.tail){return}if(node.list){node.list.removeNode(node)}var tail=this.tail;node.list=this;node.prev=tail;if(tail){tail.next=node}this.tail=node;if(!this.head){this.head=node}this.length++};Yallist.prototype.push=function(){for(var i=0,l=arguments.length;i<l;i++){push(this,arguments[i])}return this.length};Yallist.prototype.unshift=function(){for(var i=0,l=arguments.length;i<l;i++){unshift(this,arguments[i])}return this.length};Yallist.prototype.pop=function(){if(!this.tail){return undefined}var res=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return res};Yallist.prototype.shift=function(){if(!this.head){return undefined}var res=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return res};Yallist.prototype.forEach=function(fn,thisp){thisp=thisp||this;for(var walker=this.head,i=0;walker!==null;i++){fn.call(thisp,walker.value,i,this);walker=walker.next}};Yallist.prototype.forEachReverse=function(fn,thisp){thisp=thisp||this;for(var walker=this.tail,i=this.length-1;walker!==null;i--){fn.call(thisp,walker.value,i,this);walker=walker.prev}};Yallist.prototype.get=function(n){for(var i=0,walker=this.head;walker!==null&&i<n;i++){walker=walker.next}if(i===n&&walker!==null){return walker.value}};Yallist.prototype.getReverse=function(n){for(var i=0,walker=this.tail;walker!==null&&i<n;i++){walker=walker.prev}if(i===n&&walker!==null){return walker.value}};Yallist.prototype.map=function(fn,thisp){thisp=thisp||this;var res=new Yallist;for(var walker=this.head;walker!==null;){res.push(fn.call(thisp,walker.value,this));walker=walker.next}return res};Yallist.prototype.mapReverse=function(fn,thisp){thisp=thisp||this;var res=new Yallist;for(var walker=this.tail;walker!==null;){res.push(fn.call(thisp,walker.value,this));walker=walker.prev}return res};Yallist.prototype.reduce=function(fn,initial){var acc;var walker=this.head;if(arguments.length>1){acc=initial}else if(this.head){walker=this.head.next;acc=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=0;walker!==null;i++){acc=fn(acc,walker.value,i);walker=walker.next}return acc};Yallist.prototype.reduceReverse=function(fn,initial){var acc;var walker=this.tail;if(arguments.length>1){acc=initial}else if(this.tail){walker=this.tail.prev;acc=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=this.length-1;walker!==null;i--){acc=fn(acc,walker.value,i);walker=walker.prev}return acc};Yallist.prototype.toArray=function(){var arr=new Array(this.length);for(var i=0,walker=this.head;walker!==null;i++){arr[i]=walker.value;walker=walker.next}return arr};Yallist.prototype.toArrayReverse=function(){var arr=new Array(this.length);for(var i=0,walker=this.tail;walker!==null;i++){arr[i]=walker.value;walker=walker.prev}return arr};Yallist.prototype.slice=function(from,to){to=to||this.length;if(to<0){to+=this.length}from=from||0;if(from<0){from+=this.length}var ret=new Yallist;if(to<from||to<0){return ret}if(from<0){from=0}if(to>this.length){to=this.length}for(var i=0,walker=this.head;walker!==null&&i<from;i++){walker=walker.next}for(;walker!==null&&i<to;i++,walker=walker.next){ret.push(walker.value)}return ret};Yallist.prototype.sliceReverse=function(from,to){to=to||this.length;if(to<0){to+=this.length}from=from||0;if(from<0){from+=this.length}var ret=new Yallist;if(to<from||to<0){return ret}if(from<0){from=0}if(to>this.length){to=this.length}for(var i=this.length,walker=this.tail;walker!==null&&i>to;i--){walker=walker.prev}for(;walker!==null&&i>from;i--,walker=walker.prev){ret.push(walker.value)}return ret};Yallist.prototype.reverse=function(){var head=this.head;var tail=this.tail;for(var walker=head;walker!==null;walker=walker.prev){var p=walker.prev;walker.prev=walker.next;walker.next=p}this.head=tail;this.tail=head;return this};function push(self,item){self.tail=new Node(item,self.tail,null,self);if(!self.head){self.head=self.tail}self.length++}function unshift(self,item){self.head=new Node(item,null,self.head,self);if(!self.tail){self.tail=self.head}self.length++}function Node(value,prev,next,list){if(!(this instanceof Node)){return new Node(value,prev,next,list)}this.list=list;this.value=value;if(prev){prev.next=this;this.prev=prev}else{this.prev=null}if(next){next.prev=this;this.next=next}else{this.next=null}}},{}],51:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _Title=require("./Components/Title.js");var _Title2=_interopRequireDefault(_Title);var _Menu=require("./Components/Menu.js");var _Menu2=_interopRequireDefault(_Menu);var _Content=require("./Components/Content.js");var _Content2=_interopRequireDefault(_Content);var _LessonContent=require("./Components/Lesson/LessonContent.js");var _LessonContent2=_interopRequireDefault(_LessonContent);var _LessonHeader=require("./Components/Lesson/LessonHeader.js");var _LessonHeader2=_interopRequireDefault(_LessonHeader);var _Breadcrumb=require("./Components/Breadcrumb.js");var _Breadcrumb2=_interopRequireDefault(_Breadcrumb);var _Header=require("./Components/Header.js");var _Header2=_interopRequireDefault(_Header);var _MenuFooter=require("./Components/MenuFooter.js");var _MenuFooter2=_interopRequireDefault(_MenuFooter);var _LessonFooter=require("./Components/Lesson/LessonFooter.js");var _LessonFooter2=_interopRequireDefault(_LessonFooter);var _FirstHeading=require("./Components/FirstHeading.js");var _FirstHeading2=_interopRequireDefault(_FirstHeading);var _api=require("./api");var _messages=require("./messages.js");var _utils=require("./utils.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var BACKLINK_CLASS="mooc-wikiv-precedent";var FORWARD_CLASS="mooc-wikiv-suivant";var Bootstrap=function(){function Bootstrap(){_classCallCheck(this,Bootstrap)}_createClass(Bootstrap,[{key:"fixGadgetsIncompatibility",value:function fixGadgetsIncompatibility($element){var doFix=function doFix(){return $element.find(".clear").attr("style","height: auto !important;")};setTimeout(doFix,50);setTimeout(doFix,100)}},{key:"generateFirstHeading",value:function generateFirstHeading(title,img){var imageBox=img?"<span style=\"margin-right: 30px;\">"+img.outerHTML+"</span>":null;return new _FirstHeading2["default"]([imageBox,title])}},{key:"generateMenu",value:function generateMenu(url){var pageName=(0,_api.getPageNameFromUrl)(url);function onError(){(0,_messages.complainMenuUrlNotFound)(url)}function onSuccess(data){data=$(data.text["*"]).children().get();var menu=new _Menu2["default"](data);_Menu2["default"].replace(menu);var menuFooter=data.reduce(function(acc,el){if(el.tagName==="H5"){el=$(el).find(".mw-headline");var a=el.find("a");var config=(0,_utils.getConfig)(el.text());var icon=config&&config[1]?config[1]:null;var label=(0,_utils.removeConfig)(a.text());return acc.addInfo(a.attr("href"),label,(0,_utils.getIcon)((0,_utils.slug)(icon)))}return acc},new _MenuFooter2["default"]);_MenuFooter2["default"].replace(menuFooter);var titles=menu.selectByURL(window.location.pathname);var titles2=menuFooter.getByURL(window.location.pathname);if(titles){_Breadcrumb2["default"].update(new _Breadcrumb2["default"]([titles[1],titles[2],titles[3]]));_Title2["default"].update(titles[1].text());_Header2["default"].replaceTitle(titles[2].text());_LessonHeader2["default"].replaceTitle(titles[3].text());var lessonURL=titles[2].attr("data-src");if(lessonURL){_Content2["default"].generateHeaderByURL(lessonURL,function(data){if(!data||data.length===0)_Header2["default"]["delete"]();_Header2["default"].replace(new _Header2["default"](data));_Header2["default"].replaceTitle(titles[2].text());_LessonHeader2["default"].replaceTitle(titles[3].text())})}else{_Header2["default"]["delete"]();(0,_messages.log)(_messages.RELATED_ITEMS_NOT_FOUND)}}else if(titles2){_Breadcrumb2["default"]["delete"]();_Header2["default"]["delete"]();_Title2["default"]["delete"]();_LessonHeader2["default"].replaceTitle(titles2[3].text())}else{(0,_messages.complainUrlNotFoundInMenuError)(window.location.pathname)}if(window.location.hash!=="")window.location.href=window.location.href}(0,_api.getPage)(pageName,onSuccess,onError)}},{key:"generateContent",value:function generateContent(element,content,oldContent){var lessonHeader=new _LessonHeader2["default"](_utils.ALT_TEXT);var backLink=$(oldContent).find("."+BACKLINK_CLASS);var forwardLink=$(oldContent).find("."+FORWARD_CLASS);if(backLink.length===0||forwardLink.length===0)(0,_messages.log)(_messages.NAV_LINKS_NOT_FOUND);var lessonFooter=new _LessonFooter2["default"](backLink,forwardLink);var lesson=new _LessonContent2["default"](lessonHeader,oldContent);var generatedContent=new _Content2["default"](lesson,lessonFooter);content.append(generatedContent.generate());element.append(content)}},{key:"generateNavBar",value:function generateNavBar(content){var navBar=$("<div />").addClass("my-sb").append(new _Menu2["default"](false).generate()).append(new _MenuFooter2["default"]().generate());content.append(navBar)}},{key:"generateTitle",value:function generateTitle(element){element.append(new _Title2["default"](_utils.ALT_TEXT).generate())}},{key:"generateBreadCrumb",value:function generateBreadCrumb(element){element.append(new _Breadcrumb2["default"]([_utils.ALT_TEXT,_utils.ALT_TEXT,_utils.ALT_TEXT]).generate())}},{key:"generate",value:function generate(config,element,content,oldContent){(0,_messages.debug)("moocwikiv starting generation");this.generateFirstHeading(config.title,config.image);this.generateTitle(element);this.generateBreadCrumb(element);this.generateMenu(config.menuURL);this.generateNavBar(content);this.generateContent(element,content,oldContent);this.fixGadgetsIncompatibility($("#moocwikiv"))}}]);return Bootstrap}();exports["default"]=Bootstrap},{"./Components/Breadcrumb.js":52,"./Components/Content.js":53,"./Components/FirstHeading.js":54,"./Components/Header.js":55,"./Components/Lesson/LessonContent.js":56,"./Components/Lesson/LessonFooter.js":57,"./Components/Lesson/LessonHeader.js":58,"./Components/Menu.js":60,"./Components/MenuFooter.js":61,"./Components/Title.js":64,"./api":66,"./messages.js":69,"./utils.js":70}],52:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _utils=require("../utils.js");var _Menu=require("./Menu.js");var _Menu2=_interopRequireDefault(_Menu);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var BREADCRUMB_CLASS="my-breadcrumb";var Breadcrumb=function(){_createClass(Breadcrumb,null,[{key:"update",value:function update(e){$("."+BREADCRUMB_CLASS).html(e.generate(false))}},{key:"delete",value:function _delete(){$("."+BREADCRUMB_CLASS).empty();$("."+BREADCRUMB_CLASS).remove()}}]);function Breadcrumb(items){_classCallCheck(this,Breadcrumb);this._items=items;this._links=[];this.reducer=this.reducer.bind(this);this.delimiter="&gt;";var folders=$("."+_Menu.MENU_CLASS+">."+_Menu.MENU_LEVEL1);this._links[0]=this.findFirstLevel1Item(folders,items[0]);this._links[1]=this.findFirstLevel2Item(folders,items[1])}_createClass(Breadcrumb,[{key:"findFirstLevel1Item",value:function findFirstLevel1Item(folders,item){var self=this;return folders.reduce(function(acc,el){var a=$(el).find(".nav-item-header a").get(0);if(a==item.get(0)){var firstlesson=$(el).find(".nav-item-content").children().first();var firstItem=firstlesson.find(".nav-item-content").children().first();if(!acc)acc=self.getLink(firstItem.find("a"))}return acc},false)}},{key:"findFirstLevel2Item",value:function findFirstLevel2Item(folders,item){var self=this;return _Menu2["default"].reduceLevel2Items(folders,function(acc,el){el.map(function(){var x=$(this);var a=x.find(".nav-item-header a").get(0);if(a==item.get(0)){var matchingItem=$(x).find(".nav-item-content").children().first();if(!acc)acc=self.getLink(matchingItem.find("a"))}});return acc},false)}},{key:"getLink",value:function getLink($item){return $item.attr("data-src")?$item.attr("data-src"):$item.attr("href")}},{key:"reducer",value:function reducer(acc,el,i){var isLast=i==this._items.length-1;var delimiter=!isLast?" "+this.delimiter+" ":"";var preparedLink=this._links[i]?this._links[i]:"#";var link=(0,_utils.isInstanceOfjQuery)(el)?"<a href=\""+preparedLink+"\">"+el.text()+"</a>":el;var text=isLast?"<strong>"+link+"</strong>":link;acc.push(text+delimiter);return acc}},{key:"generate",value:function generate(){var useClass=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;var content=this._items.reduce(this.reducer,[]);var div=$("<div />").html(content);if(useClass)div.addClass(BREADCRUMB_CLASS);return div}}]);return Breadcrumb}();exports["default"]=Breadcrumb},{"../utils.js":70,"./Menu.js":60}],53:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _utils=require("../utils");var _Header=require("./Header");var _Header2=_interopRequireDefault(_Header);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var CONTENT_CLASS="my-main-content";var Content=function(){_createClass(Content,null,[{key:"update",value:function update(element,content){element.find("."+CONTENT_CLASS).html(content)}}]);function Content(content,footer){_classCallCheck(this,Content);this._content=content;this._footer=footer}_createClass(Content,[{key:"generate",value:function generate(){var header=new _Header2["default"](false).generate();return $("<div />").addClass("my-main").addClass(CONTENT_CLASS).append(header).append(this._content.generate()).append(this._footer.generate())}}],[{key:"generateHeaderByURL",value:function generateHeaderByURL(url,cb){(0,_utils.request)(url,function(data){data=$(data).find(_utils.CONTENT_ID).children().get();if(cb)cb(data)})}}]);return Content}();exports["default"]=Content},{"../utils":70,"./Header":55}],54:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var FIRSTHEADING_ID="firstHeading";var FirstHeading=function(){_createClass(FirstHeading,null,[{key:"update",value:function update(title){$("#"+FIRSTHEADING_ID).html(title)}}]);function FirstHeading(title){_classCallCheck(this,FirstHeading);return FirstHeading.update(title)}return FirstHeading}();exports["default"]=FirstHeading},{}],55:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _Picto=require("./Picto.js");var _Picto2=_interopRequireDefault(_Picto);var _Message=require("../Components/Message");var _Message2=_interopRequireDefault(_Message);var _utils=require("../utils.js");var _messages=require("../messages.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var HEADER_CLASS="my-main-content-header";var TITLE_MAX_LENGTH=50;var Header=function(){_createClass(Header,null,[{key:"replace",value:function replace(header){$("."+HEADER_CLASS).html(header.generate(false))}},{key:"replaceTitle",value:function replaceTitle(title){$("."+HEADER_CLASS+" .my-title-wrap h2").html((0,_utils.truncate)(TITLE_MAX_LENGTH)(title))}},{key:"delete",value:function _delete(){$("."+HEADER_CLASS).empty();$("."+HEADER_CLASS).remove()}}]);function Header(data){_classCallCheck(this,Header);this._data=data;this.reducer=this.reducer.bind(this)}_createClass(Header,[{key:"generateTitle",value:function generateTitle(){var title=$("<h2 />");var IEVersion=(0,_utils.getIEVersion)();return $("<div />").addClass("my-title-wrap "+(0,_utils.getIfLessThan)(10)("ie__my-title-wrap",IEVersion)).html(title)}},{key:"generatePicto",value:function generatePicto(picto,widthClass){if(!picto)return;var IEVersion=(0,_utils.getIEVersion)();return $("<div />").addClass("my-feature-item "+widthClass+" bibloc mutate "+(0,_utils.getIfLessThan)(10)("ieFlexbox",IEVersion)).html(picto.generate())}},{key:"getWidthClass",value:function getWidthClass(number){return"w-"+Math.round(100/number)}},{key:"generateRow",value:function generateRow(){return $("<div />").addClass("row")}},{key:"generatePictos",value:function generatePictos(list){var _this=this;var row=this.generateRow();var widthClass=this.getWidthClass(list.length);list.map(function(p){return _this.generatePicto(p,widthClass)}).map(function(x){return row.append(x)});return $("<div />").addClass("mutate-md").css("text-align","center").html(row)}},{key:"reducer",value:function reducer(acc,el){if(el.tagName==="H1"||el.tagName==="H2"||el.tagName==="H3"){var config=(0,_utils.getConfig)(el.innerText);var icon=(0,_utils.slug)(config?config[1]:"");var text=(0,_utils.removeConfig)($(el).find(".mw-headline").text());var pictoIcon=_Picto2["default"].getText(icon);if(!pictoIcon){(0,_messages.complainIconNotFound)(icon)}acc.push(new _Picto2["default"]((0,_utils.getIcon)(icon),pictoIcon,text))}return acc}},{key:"generate",value:function generate(){var addClass=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;try{var title;var row="<div style=\"display:block;width:835px;height:160px;\">"+_utils.ALT_TEXT+"</div>";if(this._data!==false){var pictos=$(this._data).children().reduce(this.reducer,[]);title=this.generateTitle();row=this.generateRow().addClass("mutate");row.append(this.generatePictos(pictos))}return $("<div />").addClass(addClass?HEADER_CLASS:null).append(title).append(row)}catch(e){_Message2["default"].replace(new _Message2["default"]((0,_messages.createHeaderGenerationFailed)(e.message)));(0,_messages.log)(e.message);console.log(e.stack);return $("<div />").addClass(addClass?HEADER_CLASS:null)}}}]);return Header}();exports["default"]=Header},{"../Components/Message":62,"../messages.js":69,"../utils.js":70,"./Picto.js":63}],56:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var LessonContent=function(){function LessonContent(header,content){_classCallCheck(this,LessonContent);this._header=header;this._content=content}_createClass(LessonContent,[{key:"generate",value:function generate(){var content=$("<div />").addClass("my-lesson-content").html(this._content);var header=this._header?this._header.generate():null;return $("<div />").addClass("my-lesson").append(header).append(content)}}]);return LessonContent}();exports["default"]=LessonContent},{}],57:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _Link=require("../Link.js");var _Link2=_interopRequireDefault(_Link);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var LESSON_FOOTER_CLASS="my-lesson-tools bifloat mutate";var LessonFooter=function(){function LessonFooter(back,next){_classCallCheck(this,LessonFooter);this._back=back.length>0?back:false;this._next=next.length>0?next:false}_createClass(LessonFooter,[{key:"generateLinks",value:function generateLinks(){var row=$("<div />").addClass("row middle");var el=$("<div />").addClass("my-tools-2");if(this._back){var href=this._back.find("a").attr("href");var back=new _Link2["default"](this._back.text().replace("<",""),href,"link-pic-after pic-prev");row.append(back.generate());this._back.empty();this._back.remove()}if(this._back||this._next)row.append("<div class=\"my-nav-sep\"></div>");if(this._next){var _href=this._next.find("a").attr("href");var forward=new _Link2["default"](this._next.text().replace(">",""),_href,"link-pic pic-next");row.append(forward.generate());this._next.empty();this._next.remove()}return el.append(row)}},{key:"generateLeft",value:function generateLeft(){return $("<div />").addClass("my-tools-1")}},{key:"generate",value:function generate(){var links=this.generateLinks();return $("<div />").addClass(LESSON_FOOTER_CLASS).append(this.generateLeft()).append(links)}}]);return LessonFooter}();exports["default"]=LessonFooter},{"../Link.js":59}],58:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var LESSON_HEADER_CLASS="my-lesson-header";var LessonHeader=function(){_createClass(LessonHeader,null,[{key:"replaceTitle",value:function replaceTitle(title){$("."+LESSON_HEADER_CLASS+" h3").text(title)}},{key:"delete",value:function _delete(){$("."+LESSON_HEADER_CLASS).empty();$("."+LESSON_HEADER_CLASS).remove()}}]);function LessonHeader(content){_classCallCheck(this,LessonHeader);this._content=content}_createClass(LessonHeader,[{key:"generate",value:function generate(){var title=$("<h3 />").text(this._content);return $("<div />").addClass(LESSON_HEADER_CLASS).html(title)}}]);return LessonHeader}();exports["default"]=LessonHeader},{}],59:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var Link=function(){function Link(content,to,className){_classCallCheck(this,Link);this._content=content;this._to=to;this._className=className}_createClass(Link,[{key:"generate",value:function generate(){var link=$("<a />",{href:this._to}).html(this._content);return $("<div />").addClass("link").addClass(this._className).html(link)}}]);return Link}();exports["default"]=Link},{}],60:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.MENU_LEVEL1=exports.MENU_CLASS=undefined;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _utils=require("../utils");var _messages=require("../messages");function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++){arr2[i]=arr[i]}return arr2}else{return Array.from(arr)}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var MENU_CLASS=exports.MENU_CLASS="my-sb-nav";var MENU_LEVEL1=exports.MENU_LEVEL1="folder";var MENU_LEVEL2="lesson";var MENU_LEVEL3="level3";var Menu=function(){_createClass(Menu,null,[{key:"getURLFromItem",value:function getURLFromItem($item){var a=$item.find("a");if(a)return a.attr("href");return false}},{key:"reduceLevel2Items",value:function reduceLevel2Items(folders,f){var initialValue=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];return folders.reduce(function(acc,e){var res=$(e).find("."+MENU_LEVEL2);return f(acc,res)},initialValue)}},{key:"reduceLevel3Items",value:function reduceLevel3Items(folders,f){var initialValue=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];var lessons=Menu.reduceLevel2Items(folders,function(acc,e){if(e.length>0)acc=[].concat(_toConsumableArray(acc),_toConsumableArray(e));return acc},[]);var items=lessons.reduce(function(acc,e){var res=$(e).find("."+MENU_LEVEL3);if(res.length>0)acc=[].concat(_toConsumableArray(acc),_toConsumableArray(res));return acc},[]);return items.reduce(f,initialValue)}},{key:"replace",value:function replace(menu){$("."+MENU_CLASS).html(menu.generate())}}]);function Menu(menu,url){_classCallCheck(this,Menu);this.menu=menu;this._url=url;this.reducer=this.reducer.bind(this);this.foldAccordeon=this.foldAccordeon.bind(this);this.setItemActif=this.setItemActif.bind(this)}_createClass(Menu,[{key:"selectByURL",value:function selectByURL(p){var folders=$("."+MENU_CLASS+">."+MENU_LEVEL1);var item=Menu.reduceLevel3Items(folders,function(acc,e){e=$(e);var url=Menu.getURLFromItem(e);if(url.indexOf("#")!==-1){url=url.substr(0,url.indexOf("#"))}url=url.replace(/(.*)title=(.*)\&action=edit(.*)/,"/wiki/$2");if(url===p){acc.push(e)}return acc},[]);return this.setItemActif(item.pop())}},{key:"findFirstLevel3Item",value:function findFirstLevel3Item(){var folders=$("."+MENU_CLASS+">."+MENU_LEVEL1);return Menu.reduceLevel3Items(folders,function(acc,e){if(acc)return acc;return $(e)},false)}},{key:"setItemActif",value:function setItemActif($item){var CLASS="active";if(!$item)return false;$item.addClass(CLASS);var lesson=$item.parent().parent();var folder=lesson.parent().parent();this.toggleOpen(lesson);this.toggleOpen(folder);return{1:folder.find(".nav-item-header>a").first(),2:lesson.find(".nav-item-header>a").first(),3:$item.find("a").first()}}},{key:"getLastElement",value:function getLastElement(array){return array[array.length-1]}},{key:"isLesson",value:function isLesson($n){return $n.hasClass("lesson")}},{key:"isFolder",value:function isFolder($n){return $n.hasClass("folder")}},{key:"isLevel3",value:function isLevel3($n){return $n.hasClass("level3")}},{key:"normalizeItem",value:function normalizeItem($n){return $n.get(0).innerHTML}},{key:"normalizeLink",value:function normalizeLink(e){var oldLink=$(e).attr("href");return $(e).attr("data-src",oldLink).attr("href","#"+(0,_utils.slug)($(e).text())).attr("title","").get()}},{key:"applyAccordeon",value:function applyAccordeon(element){var _this=this;var level=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;var index=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;var $itemHeader=element.find(".nav-item-header").first();$itemHeader.append((0,_utils.generateExpandableBtn)(_utils.ITEM_OPEN_BTN,_utils.ITEM_CLOSE_BTN,(0,_utils.ariaAttributes)((0,_utils.ariaControls)(level,index),false)));$itemHeader.find("a, .expandable").click(function(){_this.toggleOpen(element)});return element}},{key:"toggleOpen",value:function toggleOpen(e){var $expandable=e.find(".expandable").first();var $hideable=e.find(".nav-item-content");var expanded=$expandable.attr("aria-expanded");var hidden=$hideable.attr("aria-hidden");$expandable.attr("aria-expanded",expanded=="true"?false:true);$hideable.attr("aria-hidden",hidden=="false"?true:false);e.toggleClass("closed");e.toggleClass("open")}},{key:"generateLevel1",value:function generateLevel1(item){item=this.normalizeItem(item);if($(item).get(0)&&$(item).get(0).tagName==="A"){item=this.normalizeLink(item)}item=$("<div />").addClass("nav-item nav-item-header").wrapInner(item);item=$("<div />").addClass(MENU_LEVEL1+" closed").wrapInner(item);$("<div />").addClass("nav-item-content").appendTo(item);return item}},{key:"generateLevel2",value:function generateLevel2(item){item=this.normalizeItem(item);if($(item).get(0)&&$(item).get(0).tagName==="A"){item=this.normalizeLink(item)}else{item="<a href=\"#\">"+item+"</a>"}item=$("<div />").addClass("nav-item nav-item-header").wrapInner(item);item=$("<div />").addClass(MENU_LEVEL2+" closed").wrapInner(item);$("<div />").addClass("nav-item-content").appendTo(item);return item}},{key:"generateLevel3",value:function generateLevel3(item){item=this.normalizeItem(item);var regexRes=(0,_utils.getConfig)(item);item=(0,_utils.removeConfig)(item);item=$("<div />").addClass("nav-item nav-item-lesson "+MENU_LEVEL3).wrapInner(item);if(regexRes&&regexRes[1]){var value=(0,_utils.getIcon)((0,_utils.slug)(regexRes[1]));if(value)item.addClass(value)}$(item).find("a").attr("href",function(i,href){return href+_utils.APPEND_CONTENT_LINKS});return item}},{key:"reducer",value:function reducer(acc,element){if(!element){return acc}var $e=$(element).find(".mw-headline");var lastItem=this.getLastElement(acc);var state=false;try{if(element.tagName==="H1")state=this.generateLevel1($e,lastItem);else if(element.tagName==="H2")state=this.generateLevel2($e,lastItem);else if(element.tagName==="H3")state=this.generateLevel3($e,lastItem)}catch(e){console.error("Menu",e)}if(state){acc.push(state)}return acc}},{key:"foldAccordeon",value:function foldAccordeon(acc,el,index){var _this2=this;var level2=acc.level2,level3=acc.level3;var $content=el.find(".nav-item-content");if(this.isFolder(el)){if(level2.length==0)return acc;$content.attr("aria-hidden",true);$content.attr("id",(0,_utils.ariaControls)(1,index));level2.reverse().map(function(x){return x.clone()}).map(function(x,k2){x=_this2.applyAccordeon(x,2,index+""+k2);$(x).find(".nav-item-content").attr("id",(0,_utils.ariaControls)(2,index+""+k2));return x}).map(function(x){return $content.append(x)});this.cleanup(level2);this.applyAccordeon(el,1,index);acc.level2=[]}if(this.isLesson(el)){level2.push(el);if(level3.length==0)return acc;$content.attr("aria-hidden",true);level3.reverse().map(function(x){return x.clone()}).map(function(x){return $content.append(x)});this.cleanup(level3);acc.level3=[]}if(this.isLevel3(el))level3.push(el);return acc}},{key:"cleanup",value:function cleanup(array){array.map(function(x){return x.empty()});array.map(function(x){return x.remove()})}},{key:"generate",value:function generate(){var alt=$("<div></div>").css("width","300px").css("height","800px").text(_utils.ALT_TEXT);if(!this.menu)return $("<div></div>").addClass(MENU_CLASS).html(alt);(0,_utils.removeExternalMark)($(this.menu));var generated=this.menu.reduce(this.reducer,[]);if(generated.length===0){(0,_messages.log)(_messages.MENU_HAS_NOT_BEEN_GENERATED);return generated}generated.reverse();generated.reduce(this.foldAccordeon,{level2:[],level3:[]});generated.reverse();return generated}}]);return Menu}();exports["default"]=Menu},{"../messages":69,"../utils":70}],61:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var MENU_FOOTER_CLASS="my-sb-more";var MenuFooter=function(){_createClass(MenuFooter,[{key:"getByURL",value:function getByURL(url){return this._blocks.reduce(function(acc,block){var a=$(block).find("a");if(!acc&&url===a.attr("href"))return{3:a};return acc},false)}}],[{key:"replace",value:function replace(menu){$("."+MENU_FOOTER_CLASS).html(menu.generate())}}]);function MenuFooter(){_classCallCheck(this,MenuFooter);this._blocks=[]}_createClass(MenuFooter,[{key:"addInfo",value:function addInfo(link,label,picto){var a=$("<a />").attr("href",link).attr("title",label).text(label);var block=$("<div />").addClass("btn btn-pic btn-pic-sb pic-"+picto).html(a);this._blocks.push(block);return this}},{key:"generate",value:function generate(){return $("<div />").addClass(MENU_FOOTER_CLASS).html(this._blocks)}}]);return MenuFooter}();exports["default"]=MenuFooter},{}],62:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var MESSAGE_CLASS="moocwikiv-debug";var Message=function(){_createClass(Message,null,[{key:"formatElement",value:function formatElement(element){return element.css("color","#f44336").css("border","1px solid #f44336").css("padding","7px").css("width","100%")}},{key:"replace",value:function replace(msg){$("."+MESSAGE_CLASS).html(msg.getFormatedMessage())}}]);function Message(msg){_classCallCheck(this,Message);this._msg=msg}_createClass(Message,[{key:"getFormatedMessage",value:function getFormatedMessage(){return Message.formatElement($("<div />").html(this._msg))}},{key:"generate",value:function generate(){if(this._msg===""){return $("<p />").addClass(MESSAGE_CLASS)}var msg=Message.formatElement($("<div />").html(this._msg));return $("<p />").addClass(MESSAGE_CLASS).html(msg)}}]);return Message}();exports["default"]=Message},{}],63:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _utils=require("../utils.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var TEXT_LENGTH=85;var Picto=function(){_createClass(Picto,null,[{key:"getText",value:function getText(icon){var str;switch(icon){case"prerequis":str="Pr\xE9-requis";break;case"objectif":str="Objectif";break;case"competencesvisees":str="Comp\xE9tences vis\xE9es";break;case"duree":str="Dur\xE9e";break;case"public":str="Public";break;}return str}}]);function Picto(icon,title,text){_classCallCheck(this,Picto);this._icon=icon;this._title=title;this._text=(0,_utils.truncate)(TEXT_LENGTH)(text)}_createClass(Picto,[{key:"generate",value:function generate(){var content=$("<div />").html("<strong>"+this._title+"&nbsp;:</strong><br>\n                                 <em>"+this._text+"</em>").addClass("my-feature");var icon=$("<div />").addClass("pic-feature sprite").addClass("pic-"+this._icon);return $("<div />").css("width","100%").append(icon).append("<br />").append(content)}}]);return Picto}();exports["default"]=Picto},{"../utils.js":70}],64:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var TITLE_CLASS="secondHeading";var Title=function(){_createClass(Title,null,[{key:"update",value:function update(text){$("."+TITLE_CLASS).text(text)}},{key:"delete",value:function _delete(){$("."+TITLE_CLASS).empty();$("."+TITLE_CLASS).remove()}}]);function Title(text){_classCallCheck(this,Title);this._text=text}_createClass(Title,[{key:"generate",value:function generate(){return $("<h1 />").addClass(TITLE_CLASS).html(this._text)}}]);return Title}();exports["default"]=Title},{}],65:[function(require,module,exports){"use strict";if(!Array.from){Array.from=function(){var toStr=Object.prototype.toString;var isCallable=function isCallable(fn){return typeof fn==="function"||toStr.call(fn)==="[object Function]"};var toInteger=function toInteger(value){var number=Number(value);if(isNaN(number)){return 0}if(number===0||!isFinite(number)){return number}return(number>0?1:-1)*Math.floor(Math.abs(number))};var maxSafeInteger=Math.pow(2,53)-1;var toLength=function toLength(value){var len=toInteger(value);return Math.min(Math.max(len,0),maxSafeInteger)};return function from(arrayLike){var C=this;var items=Object(arrayLike);if(arrayLike==null){throw new TypeError("Array.from requires an array-like object - not null or undefined")}var mapFn=arguments.length>1?arguments[1]:void undefined;var T;if(typeof mapFn!=="undefined"){if(!isCallable(mapFn)){throw new TypeError("Array.from: when provided, the second argument must be a function")}if(arguments.length>2){T=arguments[2]}}var len=toLength(items.length);var A=isCallable(C)?Object(new C(len)):new Array(len);var k=0;var kValue;while(k<len){kValue=items[k];if(mapFn){A[k]=typeof T==="undefined"?mapFn(kValue,k):mapFn.call(T,kValue,k)}else{A[k]=kValue}k+=1}A.length=len;return A}}()}if(typeof Object.assign!="function"){Object.assign=function(target,varArgs){"use strict";if(target==null){throw new TypeError("Cannot convert undefined or null to object")}var to=Object(target);for(var index=1;index<arguments.length;index++){var nextSource=arguments[index];if(nextSource!=null){for(var nextKey in nextSource){if(Object.prototype.hasOwnProperty.call(nextSource,nextKey)){to[nextKey]=nextSource[nextKey]}}}}return to}}if(!Array.prototype.fill){Object.defineProperty(Array.prototype,"fill",{value:function value(_value){if(this==null){throw new TypeError("this is null or not defined")}var O=Object(this);var len=O.length>>>0;var start=arguments[1];var relativeStart=start>>0;var k=relativeStart<0?Math.max(len+relativeStart,0):Math.min(relativeStart,len);var end=arguments[2];var relativeEnd=end===undefined?len:end>>0;var final=relativeEnd<0?Math.max(len+relativeEnd,0):Math.min(relativeEnd,len);while(k<final){O[k]=_value;k++}return O}})}Number.isNaN=Number.isNaN||function(value){return typeof value==="number"&&isNaN(value)};if(!String.prototype.repeat){String.prototype.repeat=function(count){"use strict";if(this==null){throw new TypeError("can't convert "+this+" to object")}var str=""+this;count=+count;if(count!=count){count=0}if(count<0){throw new RangeError("repeat count must be non-negative")}if(count==Infinity){throw new RangeError("repeat count must be less than infinity")}count=Math.floor(count);if(str.length==0||count==0){return""}if(str.length*count>=1<<28){throw new RangeError("repeat count must not overflow maximum string size")}var rpt="";for(;;){if((count&1)==1){rpt+=str}count>>>=1;if(count==0){break}str+=str}return rpt}}if(!String.prototype.codePointAt){(function(){"use strict";var codePointAt=function codePointAt(position){if(this==null){throw TypeError()}var string=String(this);var size=string.length;var index=position?Number(position):0;if(index!=index){index=0}if(index<0||index>=size){return undefined}var first=string.charCodeAt(index);var second;if(first>=55296&&first<=56319&&size>index+1){second=string.charCodeAt(index+1);if(second>=56320&&second<=57343){return(first-55296)*1024+second-56320+65536}}return first};if(Object.defineProperty){Object.defineProperty(String.prototype,"codePointAt",{"value":codePointAt,"configurable":true,"writable":true})}else{String.prototype.codePointAt=codePointAt}})()}if(!console.debug)console.debug=console.log},{}],66:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getPage=getPage;exports.getPageNameFromUrl=getPageNameFromUrl;var _messages=require("./messages");function JSONRequest(url,onSuccess,onError){function complete(data){if(data.responseJSON.parse){return onSuccess(data.responseJSON.parse)}if(data.responseJSON.error&&onError){return onError(data.error)}}$.ajax({dataType:"json",url:url,complete:complete,error:_messages.log})}function getPage(page,onSuccess,onError){var url="/w/api.php?action=parse&page="+page+"&format=json&redirects";return JSONRequest(url,onSuccess,onError)}function getPageNameFromUrl(url){var matches=/\/wiki\/(.*)\?.*/.exec(url);if(matches&&matches[1]){return matches[1]}}},{"./messages":69}],67:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();exports.fallback=fallback;var _messages=require("./messages.js");var _Menu=require("./Components/Menu.js");var _Menu2=_interopRequireDefault(_Menu);var _Breadcrumb=require("./Components/Breadcrumb.js");var _Breadcrumb2=_interopRequireDefault(_Breadcrumb);var _Header=require("./Components/Header.js");var _Header2=_interopRequireDefault(_Header);var _MenuFooter=require("./Components/MenuFooter.js");var _MenuFooter2=_interopRequireDefault(_MenuFooter);var _Title=require("./Components/Title.js");var _Title2=_interopRequireDefault(_Title);var _FirstHeading=require("./Components/FirstHeading.js");var _FirstHeading2=_interopRequireDefault(_FirstHeading);var _LessonHeader=require("./Components/Lesson/LessonHeader.js");var _LessonHeader2=_interopRequireDefault(_LessonHeader);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var Empty=function(){function Empty(){_classCallCheck(this,Empty)}_createClass(Empty,[{key:"generate",value:function generate(){return""}}]);return Empty}();function fallback(){(0,_messages.debug)("Entering fallback mode");_Menu2["default"].replace(new Empty);_MenuFooter2["default"].replace(new Empty);_Breadcrumb2["default"].update(new Empty);_FirstHeading2["default"].update(new Empty);_Title2["default"].update("");_LessonHeader2["default"].replaceTitle("");_Header2["default"]["delete"]();$(".my-sb").remove()}},{"./Components/Breadcrumb.js":52,"./Components/FirstHeading.js":54,"./Components/Header.js":55,"./Components/Lesson/LessonHeader.js":58,"./Components/Menu.js":60,"./Components/MenuFooter.js":61,"./Components/Title.js":64,"./messages.js":69}],68:[function(require,module,exports){"use strict";require("./Polyfill/IE.js");var _Message=require("./Components/Message.js");var _Message2=_interopRequireDefault(_Message);var _Bootstrap=require("./Bootstrap.js");var _Bootstrap2=_interopRequireDefault(_Bootstrap);var _messages=require("./messages.js");var _utils=require("./utils.js");var _fallback=require("./fallback");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}$.fn.reduce=[].reduce;var startLoader=function startLoader(page){return page.html("Chargement ...")};var stopLoaderAndReplace=function stopLoaderAndReplace(page,element){return page.html(element)};var moocwikiv=function moocwikiv(){var page=$(this);page.parent().prepend(new _Message2["default"]("").generate());if(_utils.isPrinting){(0,_messages.log)(_messages.PRINTING);return false}var element=$("<div></div>");var content=$("<div></div>").addClass("my-layout clear");page.css("display","block");var pageContentChildren=page.parent().children();var oldContent=pageContentChildren.reduce(function(acc,el){if(el.id==="moocwikiv")return acc;acc.content.push(el);return acc},{content:[],title:null});var config=page.children().reduce(function(acc,el){var $e=$(el).find(".mw-headline");if(el.tagName==="H1")acc.title=$e.text();if(el.tagName==="H3")acc.menuURL=$e.find("a").attr("href");if(el.tagName==="DIV"||el.tagName==="P"){var img=$(el).find("img");if(img)acc.image=img.get(0)}return acc},{menuURL:false,title:false,image:false});(0,_messages.debug)("Template config",config);config.menuURL=config.menuURL+"?useformat=desktop";startLoader(page);new _Bootstrap2["default"]().generate(config,element,content,oldContent.content);stopLoaderAndReplace(page,element);if(!config.menuURL){return(0,_messages.complainMenuUrlNotFound)()}};$(function(){try{$("#moocwikiv").each(moocwikiv)}catch(e){(0,_messages.complainFallback)(e.message);console.log(e.stack);(0,_fallback.fallback)()}})},{"./Bootstrap.js":51,"./Components/Message.js":62,"./Polyfill/IE.js":65,"./fallback":67,"./messages.js":69,"./utils.js":70}],69:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.MENU_HAS_NOT_BEEN_GENERATED=exports.PRINTING=exports.RELATED_ITEMS_NOT_FOUND=exports.NAV_LINKS_NOT_FOUND=exports.debug=exports.log=undefined;exports.createUrlNotFoundInMenu=createUrlNotFoundInMenu;exports.createHeaderGenerationFailed=createHeaderGenerationFailed;exports.complainUrlNotFoundInMenuError=complainUrlNotFoundInMenuError;exports.complainMenuUrlNotFound=complainMenuUrlNotFound;exports.complainIconNotFound=complainIconNotFound;exports.complainFallback=complainFallback;var _boxen=require("boxen");var _boxen2=_interopRequireDefault(_boxen);var _Message=require("./Components/Message");var _Message2=_interopRequireDefault(_Message);var _fallback=require("./fallback");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var prefix="moocwikiv : ";var log=exports.log=function log(){for(var _len=arguments.length,m=Array(_len),_key=0;_key<_len;_key++){m[_key]=arguments[_key]}return console.log((0,_boxen2["default"])(prefix+m.join(","),{padding:1}))};var debug=exports.debug=function debug(){var _console;return(_console=console).debug.apply(_console,arguments)};function createSeeHelpPage(url){var link="<a href=\""+url+"\" target=\"_blank\">"+url+"</a>";return"Vous pouvez consulter la page : "+link+" pour plus d'information"}function createMenuUrlNotFound(url){return"\n    Erreur : URL du menu introuvable "+(url?"("+url+")":"")+".\n    "+createSeeHelpPage("https://fr.wikiversity.org/wiki/Mod%C3%A8le_MOOC_administration#Erreur_:_URL_du_menu_introuvable")+"\n  "}function createUrlNotFoundInMenu(url){return"\n    Erreur : cette page est introuvable dans le menu "+(url?"("+url+")":"")+".\n    "+createSeeHelpPage("https://fr.wikiversity.org/wiki/Mod%C3%A8le_MOOC_administration#Erreur_:_cette_page_est_introuvable_dans_le_menu")+"\n  "}function createHeaderGenerationFailed(error){return"\n    Erreur : l'en-t\xEAte n'a pas pu \xEAtre charg\xE9 "+(error?"("+error+")":"")+".\n    "+createSeeHelpPage("https://fr.wikiversity.org/wiki/Mod%C3%A8le_MOOC_administration#Erreur_:_l.27en-t.C3.AAte_n.27a_pas_pu_.C3.AAtre_charg.C3.A9")+"\n  "}function createIconNotFound(name){return"\n    Erreur : ic\xF4ne introuvable "+(name?"("+name+")":"")+".\n    "+createSeeHelpPage("https://fr.wikiversity.org/wiki/Mod%C3%A8le_MOOC_administration#Erreur_:_ic.C3.B4ne_introuvable")+"\n  "}function createFallback(error){return"\n    Erreur : le mod\xE8le n'a pas pu \xEAtre g\xE9n\xE9r\xE9 "+(error?"("+error+")":"")+",\n    vous pouvez consulter <a target=\"_blank\" href=\"https://fr.wikiversity.org/wiki/Wikiversit%C3%A9:La_salle_caf%C3%A9\">Wikiversit\xE9:La salle caf\xE9</a> pour plus d'information\n  "}var NAV_LINKS_NOT_FOUND=exports.NAV_LINKS_NOT_FOUND="Lien pr\xE9c\xE9dent ou suivant introuvable";var RELATED_ITEMS_NOT_FOUND=exports.RELATED_ITEMS_NOT_FOUND="Items li\xE9s au niveau 2 introuvable";var PRINTING=exports.PRINTING="Mode impression";var MENU_HAS_NOT_BEEN_GENERATED=exports.MENU_HAS_NOT_BEEN_GENERATED="Le menu n'a pas pu \xEAtre g\xE9n\xE9r\xE9";function complainUrlNotFoundInMenuError(url){var msg=createUrlNotFoundInMenu(url);log(msg);_Message2["default"].replace(new _Message2["default"](msg));(0,_fallback.fallback)()}function complainMenuUrlNotFound(url){var msg=createMenuUrlNotFound(url);log(msg);_Message2["default"].replace(new _Message2["default"](msg));(0,_fallback.fallback)()}function complainIconNotFound(name){var msg=createIconNotFound(name);log(msg);_Message2["default"].replace(new _Message2["default"](msg))}function complainFallback(error){var msg=createFallback(error);log(msg);_Message2["default"].replace(new _Message2["default"](msg))}},{"./Components/Message":62,"./fallback":67,"boxen":7}],70:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getIfLessThan=exports.getIEVersion=exports.truncate=exports.ariaControls=exports.generateExpandableBtn=exports.ariaAttributes=exports.ITEM_CLOSE_BTN=exports.ITEM_OPEN_BTN=exports.capitalizeFirstLetter=exports.APPEND_CONTENT_LINKS=exports.ALT_TEXT=exports.getIcon=exports.iconMarkupMap=exports.MENU_LEVEL_3=exports.MENU_LEVEL_2=exports.MENU_LEVEL_1=exports.CONTENT_ID=exports.slug=exports.isPrinting=exports.isExternalWikiLink=exports.removeToc=exports.removeConfig=exports.getConfig=exports.isInstanceOfjQuery=exports.removeExternalMark=exports.wrapToTag=exports.wrapInnerToClass=exports.wrapToClass=exports.request=exports.CONFIG_REGEX=undefined;var _messages=require("./messages.js");var CONFIG_REGEX=exports.CONFIG_REGEX=/\(#\s?(.*)\)/g;var request=exports.request=function request(url,success){var onSuccess=function onSuccess(data,textStatus){if(textStatus=="success")success(data);else success(false)};$.ajax({url:url,success:onSuccess})};var wrapToClass=exports.wrapToClass=function wrapToClass(CSSClass){return function(node){return node.wrap("<div class=\""+CSSClass+"\"></div>")}};var wrapInnerToClass=exports.wrapInnerToClass=function wrapInnerToClass(CSSClass){return function(node){return node.wrapInner("<div class=\""+CSSClass+"\"></div>")}};var wrapToTag=exports.wrapToTag=function wrapToTag(tag){return function(node){return node.wrap("<"+tag+"></"+tag+">")}};var removeExternalMark=exports.removeExternalMark=function removeExternalMark($n){return $n.find("a").removeClass("external")};var isInstanceOfjQuery=exports.isInstanceOfjQuery=function isInstanceOfjQuery(x){return x instanceof jQuery};var getConfig=exports.getConfig=function getConfig(t){return CONFIG_REGEX.exec(t)};var removeConfig=exports.removeConfig=function removeConfig(t){return t.replace(CONFIG_REGEX,"")};var removeToc=exports.removeToc=function removeToc($n){return $n.find("#toc").remove()};var isExternalWikiLink=exports.isExternalWikiLink=function isExternalWikiLink(u){return u.indexOf("http://")===0||u.indexOf("https://")===0};var isPrinting=exports.isPrinting=window.location.search.indexOf("printable=yes")!==-1;var slug=exports.slug=function slug(str){str=str.replace(/^\s+|\s+$/g,"");str=str.toLowerCase();var from="\xE0\xE1\xE4\xE2\xE8\xE9\xEB\xEA\xEC\xED\xEF\xEE\xF2\xF3\xF6\xF4\xF9\xFA\xFC\xFB\xF1\xE7\xB7/_,:;- ";var to="aaaaeeeeiiiioooouuuunc________";for(var i=0,l=from.length;i<l;i++){str=str.replace(new RegExp(from.charAt(i),"g"),to.charAt(i))}str=str.replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-");return str};var CONTENT_ID=exports.CONTENT_ID="#mw-content-text";var MENU_LEVEL_1=exports.MENU_LEVEL_1="h1";var MENU_LEVEL_2=exports.MENU_LEVEL_2="h2";var MENU_LEVEL_3=exports.MENU_LEVEL_3="h3";var iconMarkupMap=exports.iconMarkupMap={video:"bases",texte:"activity",quizz:"evaluation",prerequis:"prerequis",objectif:"objectif",competencesvisees:"competence",duree:"duree",moocwikivplus:"contrib",moocwikivinfo:"info","public":"public"};var getIcon=exports.getIcon=function getIcon(id){var icon=iconMarkupMap[id];if(!icon){(0,_messages.complainIconNotFound)(id)}return icon};var ALT_TEXT=exports.ALT_TEXT="Chargement ...";var APPEND_CONTENT_LINKS=exports.APPEND_CONTENT_LINKS="#firstHeading";var capitalizeFirstLetter=exports.capitalizeFirstLetter=function capitalizeFirstLetter(s){return s.charAt(0).toUpperCase()+s.slice(1)};var ITEM_OPEN_BTN=exports.ITEM_OPEN_BTN="<div class=\"btn-closed\">D\xE9ployer</div>";var ITEM_CLOSE_BTN=exports.ITEM_CLOSE_BTN="<div class=\"btn-open\">Refermer</div>";var ariaAttributes=exports.ariaAttributes=function ariaAttributes(controls){var expanded=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return"aria-expanded=\""+expanded+"\" aria-controls=\""+controls+"\""};var generateExpandableBtn=exports.generateExpandableBtn=function generateExpandableBtn(open,close,attributes){return"<div class=\"expandable sprite\" role=\"button\" "+attributes+">"+open+" "+close+"</div>"};var ariaControls=exports.ariaControls=function ariaControls(){var level=arguments.length>0&&arguments[0]!==undefined?arguments[0]:1;var index=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;return"item-l"+level+"-i"+index};var truncate=exports.truncate=function truncate(nbr){return function(str){return str.length>nbr?str.substring(0,nbr)+"...":str}};var getIEVersion=exports.getIEVersion=function getIEVersion(){var rv=-1;if(navigator.appName=="Microsoft Internet Explorer"){var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(re.exec(ua)!=null)rv=parseFloat(RegExp.$1)}return rv};var getIfLessThan=exports.getIfLessThan=function getIfLessThan(v1){return function(str,v2){return v1>v2&&v2!==-1?str:""}}},{"./messages.js":69}]},{},[68]);

//# sourceMappingURL=script.js.map